@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&display=swap");

:root {
  color-scheme: light;
  --ink: #17251f;
  --muted: #65746d;
  --line: #dbe6e0;
  --surface: #ffffff;
  --surface-soft: #f3f8f5;
  --brand: #176b4d;
  --brand-dark: #0f513b;
  --accent: #dff3e9;
  --shadow: 0 18px 50px rgba(24, 64, 48, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  max-width: 100%;
  overflow-x: hidden;
  background: #edf5f0;
}

body {
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: clamp(24px, 5vw, 64px) clamp(16px, 4vw, 40px) 72px;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 0%, rgba(112, 190, 151, 0.2), transparent 32rem),
    linear-gradient(180deg, #f9fcfa 0%, #edf5f0 100%);
  font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  text-align: left;
  overflow-x: hidden;
}

.app-header {
  display: grid;
  position: relative;
  width: min(100%, 1080px);
  margin: 0 auto 18px;
  padding: 20px 24px 24px;
  grid-template-columns: auto 1fr;
  gap: 12px 24px;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  color: #fff;
  background:
    radial-gradient(circle at 90% 20%, rgba(165, 231, 195, 0.24), transparent 18rem),
    linear-gradient(135deg, #0c4433, #176b4d 65%, #237e5e);
  box-shadow: 0 24px 60px rgba(12, 68, 51, 0.2);
}

.app-header::after {
  content: "+";
  position: absolute;
  right: clamp(16px, 6vw, 70px);
  bottom: -80px;
  color: rgba(255, 255, 255, 0.06);
  font-size: 13rem;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
}

.brand {
  display: flex;
  position: relative;
  z-index: 1;
  gap: 10px;
  align-items: center;
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.tool-nav {
  display: flex;
  position: relative;
  z-index: 2;
  gap: 4px;
  justify-self: end;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 11px;
  background: rgba(6, 48, 35, 0.35);
}

.tool-nav a {
  padding: 7px 11px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.76rem;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  transition: color 150ms ease, background 150ms ease;
}

.tool-nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
}

.tool-nav a.active {
  color: var(--brand-dark);
  background: var(--mint, #b9ebd0);
}

.brand-mark {
  display: block;
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.language-switcher {
  display: inline-flex;
  position: absolute;
  right: 24px;
  bottom: 22px;
  z-index: 3;
  gap: 2px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  background: rgba(6, 48, 35, 0.38);
  backdrop-filter: blur(8px);
}

.language-switcher button {
  min-width: 32px;
  padding: 5px 7px;
  border: 0;
  border-radius: 7px;
  color: rgba(255, 255, 255, 0.72);
  background: transparent;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}

.language-switcher button:hover,
.language-switcher button.active {
  color: var(--brand-dark);
  background: var(--mint, #b9ebd0);
}

.eyebrow {
  position: relative;
  z-index: 1;
  margin-bottom: 10px;
  color: #b9ebd0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  grid-column: 1 / -1;
  margin-top: 8px;
}

.app-header h1 {
  position: relative;
  z-index: 1;
  max-width: 780px;
  margin: 0;
  grid-column: 1 / -1;
  font-size: clamp(1.55rem, 3vw, 2.25rem);
  line-height: 1.12;
  letter-spacing: -0.045em;
}

.app-header p {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0;
  grid-column: 1 / -1;
  color: rgba(255, 255, 255, 0.76);
  font-size: clamp(0.95rem, 2vw, 1.08rem);
}

.frmSearch,
.frmProfile,
#primesResult,
#chartG {
  width: min(100%, 1080px);
  min-width: 0;
  max-width: 1080px;
  margin-inline: auto;
}

.frmSearch,
.frmProfile {
  position: relative;
  padding: clamp(20px, 4vw, 32px);
  border: 1px solid rgba(23, 107, 77, 0.12);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.frmSearch:focus-within,
.frmProfile:focus-within {
  border-color: rgba(23, 107, 77, 0.35);
  box-shadow: 0 22px 54px rgba(24, 64, 48, 0.14);
}

.frmSearch {
  margin-bottom: 16px;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 600;
}

.frmSearch::before {
  content: "1";
  display: inline-grid;
  width: 30px;
  height: 30px;
  margin-right: 10px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--brand);
  font-size: 0.875rem;
}

.frmProfile {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 18px;
  align-items: center;
  margin-bottom: 18px;
}

.frmProfile::before {
  content: attr(data-profile-label);
  flex: 0 0 100%;
  margin-bottom: 4px;
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.evolution-profiles {
  display: block;
}

.evolution-profiles::before {
  display: none;
}

.profiles-heading {
  display: flex;
  margin-bottom: 16px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 700;
}

.add-profile {
  display: inline-flex;
  min-height: 40px;
  padding: 0 14px;
  align-items: center;
  gap: 8px;
  border: 1px solid #b8d4c7;
  border-radius: 10px;
  color: var(--brand);
  background: var(--accent);
  font: 700 0.83rem "DM Sans", sans-serif;
  cursor: pointer;
}

.add-profile span {
  font-size: 1.15rem;
  line-height: 1;
}

.add-profile:hover {
  border-color: var(--brand);
  background: #d3eddf;
}

.add-profile:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

#profiles-list {
  display: grid;
  gap: 10px;
}

.profile-row {
  display: grid;
  padding: 14px;
  grid-template-columns: 34px minmax(170px, 1fr) minmax(140px, 0.8fr) minmax(170px, auto) 36px;
  gap: 12px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-soft);
}

.profile-row:first-child {
  grid-template-columns: 34px minmax(170px, 1fr) minmax(140px, 0.8fr) minmax(170px, auto);
}

.profile-row label:not(.accident-field) {
  display: grid;
  gap: 5px;
}

.profile-number {
  display: inline-grid;
  width: 30px;
  height: 30px;
  margin-bottom: 8px;
  place-items: center;
  border-radius: 9px;
  color: #fff;
  background: var(--brand);
  font-size: 0.8rem;
  font-weight: 700;
}

.accident-field {
  display: flex;
  min-height: 46px;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.accident-field input[type="checkbox"] {
  margin: 0;
}

.remove-profile {
  width: 36px;
  height: 36px;
  margin-bottom: 5px;
  border: 0;
  border-radius: 9px;
  color: #9a3e3e;
  background: #fae8e8;
  font-size: 1.35rem;
  cursor: pointer;
}

.remove-profile:hover {
  background: #f5d5d5;
}

.profile-help {
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.cantons-break {
  flex: 0 0 100%;
  height: 2px;
}

.canton-picker {
  display: grid;
  flex: 0 0 100%;
  grid-template-columns: minmax(320px, 1.2fr) minmax(280px, 0.8fr);
  gap: 18px;
  align-items: stretch;
}

.canton-map-card,
.canton-options {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
}

.canton-map-heading {
  display: flex;
  margin-bottom: 10px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 700;
}

.canton-map-heading small {
  padding: 4px 8px;
  border-radius: 20px;
  color: var(--brand);
  background: var(--accent);
  font-size: 0.7rem;
}

.canton-map {
  display: block;
  width: 100%;
  height: auto;
}

.canton-map [data-canton] {
  cursor: pointer;
  outline: none;
}

.canton-map rect {
  fill: #fff;
  stroke: #bdd0c7;
  stroke-width: 2;
  rx: 8px;
  transition: fill 140ms ease, stroke 140ms ease, transform 140ms ease;
}

.canton-map text {
  fill: #5e7068;
  font: 700 13px "DM Sans", sans-serif;
  text-anchor: middle;
  pointer-events: none;
}

.canton-map [data-canton]:hover rect,
.canton-map [data-canton]:focus rect {
  stroke: var(--brand);
}

.canton-map [data-canton]:focus rect {
  stroke-width: 4;
}

.canton-map [data-canton].selected rect {
  fill: var(--brand);
  stroke: var(--brand-dark);
}

.canton-map [data-canton].selected text {
  fill: #fff;
}

.canton-map-card > p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.7rem;
  text-align: center;
}

.canton-options {
  display: grid;
  grid-template-columns: repeat(4, auto 20px);
  gap: 8px 4px;
  align-content: center;
  align-items: center;
}

.canton-options label {
  padding-left: 4px;
}

.canton-options input[type="checkbox"] {
  margin: 0;
}

.canton-options #cselect {
  min-width: 130px;
  margin-top: 8px;
  grid-column: 1 / -1;
}

.profiles-results {
  display: grid;
  gap: 18px;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
}

.profiles-results::before {
  display: none !important;
}

.profile-result {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  padding: clamp(16px, 3vw, 26px);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow);
}

.profile-result:focus {
  outline: 3px solid rgba(23, 107, 77, 0.2);
  outline-offset: 3px;
}

.profile-result-heading {
  display: flex;
  margin-bottom: 16px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.profile-result-heading .profile-result-details {
  margin-bottom: 0;
}

.profile-result h2 {
  margin: 0 0 3px;
  color: var(--ink);
  font-size: 1.2rem;
}

.profile-result-details {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.82rem;
}

.profile-result h2 small {
  margin-left: 7px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 500;
}

.total-result {
  border-color: rgba(23, 107, 77, 0.3);
  background: linear-gradient(180deg, #f7fcf9, #fff);
}

.total-result-heading {
  display: flex;
  margin-bottom: 18px;
  gap: 12px;
  align-items: center;
}

.total-result-heading > div {
  min-width: 0;
}

.copy-table {
  display: inline-flex;
  min-height: 38px;
  margin-left: auto;
  padding: 0 13px;
  flex: 0 0 auto;
  align-items: center;
  border: 1px solid #b8d4c7;
  border-radius: 9px;
  color: var(--brand);
  background: #fff;
  font: 700 0.75rem "DM Sans", sans-serif;
  cursor: pointer;
  transition: color 150ms ease, border-color 150ms ease, background 150ms ease;
}

.copy-table::before {
  content: "⧉";
  margin-right: 7px;
  font-size: 0.95rem;
}

.copy-table:hover {
  border-color: var(--brand);
  background: var(--accent);
}

.copy-table.copied {
  color: #fff;
  border-color: var(--brand);
  background: var(--brand);
}

.result-panel-heading {
  display: flex;
  margin-bottom: 16px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.result-panel-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1.25rem;
  letter-spacing: -0.025em;
}

.caisses-results::before,
.cantons-results::before,
.franchise-results::before {
  display: none !important;
}

.cantons-results,
.franchise-results {
  display: grid !important;
  gap: 18px;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
  contain: none !important;
}

.canton-result-panel,
.franchise-result-panel {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: clamp(16px, 3vw, 24px);
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow);
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}

.canton-result-panel:focus,
.franchise-result-panel:focus {
  outline: 3px solid rgba(23, 107, 77, 0.2);
  outline-offset: 3px;
}

.result-panel-description {
  margin: -4px 0 18px;
  color: var(--muted);
  font-size: 0.82rem;
}

.savings-summary {
  display: grid;
  margin: 2px 0 22px;
  padding: 16px;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  border: 1px solid #c9dfd4;
  border-radius: 14px;
  background: #dce9e2;
}

.savings-summary > div {
  display: flex;
  min-width: 0;
  padding: 15px;
  flex-direction: column;
  justify-content: center;
  background: #fff;
}

.savings-summary > div:first-child {
  border-radius: 9px 0 0 9px;
  background: linear-gradient(145deg, #0c4433, var(--brand));
}

.savings-summary > div:last-child {
  border-radius: 0 9px 9px 0;
}

.savings-summary span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 600;
}

.savings-summary strong {
  margin-top: 3px;
  color: var(--brand-dark);
  font-size: clamp(1rem, 2vw, 1.35rem);
  letter-spacing: -0.035em;
}

.savings-summary small {
  margin-top: 3px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.68rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.savings-summary .savings-main span,
.savings-summary .savings-main strong {
  color: #fff;
}

.franchise-savings {
  margin: 0;
}

.canton-result-panel td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #fff;
  box-shadow: 5px 0 10px rgba(23, 55, 43, 0.06);
}

.canton-result-panel td {
  padding-inline: 10px;
}

#primesResult:focus {
  outline: 3px solid rgba(23, 107, 77, 0.2);
  outline-offset: 3px;
}

.total-result-heading h2,
.total-result-heading p {
  margin: 0;
}

.total-result-heading p {
  color: var(--muted);
  font-size: 0.78rem;
}

.total-icon {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 11px;
  color: #fff;
  background: var(--brand);
  font-size: 1.15rem;
  font-weight: 700;
}

.total-result tbody td:nth-child(2) {
  color: var(--brand-dark);
}

.total-chart {
  width: 100%;
  min-width: 0;
  min-height: 420px;
  margin: 4px 0 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.total-chart > div,
.total-chart svg {
  width: 100% !important;
  max-width: 100% !important;
}

.profile-result-content {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  contain: inline-size;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}

.result-loading,
.result-error {
  padding: 18px;
  border-radius: 10px;
  color: var(--muted);
  background: var(--surface-soft);
  text-align: center;
}

.selection-warning {
  display: flex;
  padding: 18px;
  flex-direction: column;
  gap: 3px;
  border: 1px solid #eadfbf;
  border-radius: 12px;
  color: #725d21;
  background: #fffbef;
}

.selection-warning span {
  font-size: 0.82rem;
}

.result-error {
  color: #8e3838;
  background: #fae8e8;
}

label {
  color: #34463e;
  font-size: 0.9rem;
  font-weight: 600;
}

input[type="text"],
input[type="search"],
select {
  min-height: 46px;
  padding: 0 42px 0 14px;
  border: 1px solid #c9d8d0;
  border-radius: 11px;
  outline: none;
  color: var(--ink);
  background-color: var(--surface);
  font: inherit;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--brand) 50%),
    linear-gradient(135deg, var(--brand) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 20px,
    calc(100% - 13px) 20px;
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
}

input[type="text"] {
  width: min(100%, 330px);
  margin-left: 10px;
  padding-right: 14px;
}

input:hover,
select:hover {
  border-color: #8eaea0;
}

input:focus,
select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(23, 107, 77, 0.13);
}

input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin: 0 6px 0 -8px;
  accent-color: var(--brand);
}

#chercher {
  display: block;
  min-width: 180px;
  min-height: 50px;
  margin: 6px auto 28px;
  padding: 0 24px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: var(--brand);
  box-shadow: 0 10px 24px rgba(23, 107, 77, 0.22);
  font: 700 1rem "DM Sans", sans-serif;
  cursor: pointer;
  transition: background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

#chercher:hover {
  background: var(--brand-dark);
  box-shadow: 0 14px 28px rgba(23, 107, 77, 0.28);
  transform: translateY(-2px);
}

#chercher:active {
  transform: translateY(0);
}

.action-row {
  display: flex;
  width: min(100%, 1080px);
  margin: 6px auto 28px;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.action-row #chercher {
  margin: 0;
}

.share-simulation {
  display: inline-flex;
  min-height: 50px;
  padding: 0 20px;
  align-items: center;
  border: 1px solid #b8d4c7;
  border-radius: 12px;
  color: var(--brand);
  background: #fff;
  font: 700 0.9rem "DM Sans", sans-serif;
  cursor: pointer;
}

.share-simulation::before {
  content: "↗";
  margin-right: 8px;
}

.share-simulation:hover {
  border-color: var(--brand);
  background: var(--accent);
}

.share-simulation.copied {
  color: #fff;
  border-color: var(--brand);
  background: var(--brand);
}

#commune-box {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 12px;
  color: #365046;
  background: var(--surface-soft);
  font-size: 0.92rem;
  font-weight: 400;
  box-shadow: inset 3px 0 var(--brand);
}

#suggesstion-box {
  position: relative;
  z-index: 10;
  width: min(100%, 330px);
  margin: 6px 0 0 165px;
}

#suggesstion-box ul {
  overflow: hidden;
  margin: 0;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(25, 60, 46, 0.14);
  list-style: none;
}

#suggesstion-box li {
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
}

#suggesstion-box li:hover {
  background: var(--accent);
}

.user1,
.user2,
.user3,
.user4,
.user5 {
  display: flex;
  flex: 0 0 100%;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
}

.add,
.del {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: transform 150ms ease, background 150ms ease;
}

.add:hover,
.del:hover {
  background: var(--accent);
  transform: scale(1.05);
}

#primesResult,
#chartG {
  display: block;
  width: min(100%, 1080px);
  min-width: 0;
  max-width: min(100%, 1080px);
  contain: inline-size;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
  border-radius: 16px;
  background: #fff;
}

#primesResult:empty,
#chartG:empty {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
}

#chartG.chart-active {
  display: block !important;
  width: min(100%, 1080px) !important;
  height: auto !important;
}

#chartG > *,
.profile-result-content > :not(table) {
  max-width: 100%;
}

/* Google Charts injecte des dimensions fixes dans ces éléments. */
#chartG > div,
[id^="chartG-"] > div {
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden;
}

#chartG svg,
[id^="chartG-"] svg,
#chartG canvas,
[id^="chartG-"] canvas {
  max-width: 100% !important;
}

#primesResult:not(:empty),
#chartG:not(:empty) {
  margin-top: 18px;
  padding: clamp(12px, 3vw, 24px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

#primesResult:not(:empty)::before {
  content: attr(data-results-label);
  display: block;
  margin-bottom: 18px;
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

table {
  display: table;
  width: max-content;
  min-width: 100%;
  max-width: none;
  border-collapse: collapse;
  font-size: 0.92rem;
  text-align: left;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

th {
  color: #fff;
  background: var(--brand);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

tr:nth-child(odd) {
  background: var(--surface-soft);
}

tr:nth-child(even) {
  background: var(--surface);
}

tbody tr:hover {
  background: var(--accent);
}

@media (max-width: 680px) {
  body {
    padding: 24px 12px 48px;
  }

  .app-header {
    margin-bottom: 16px;
    padding: 18px;
    grid-template-columns: 1fr;
    gap: 12px;
    border-radius: 18px;
  }

  .brand {
    margin: 0;
  }

  .language-switcher {
    position: static;
    width: max-content;
    grid-row: 1;
    justify-self: end;
  }

  .tool-nav {
    width: calc(100% + 4px);
    margin: 2px -2px 0;
    justify-self: stretch;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .tool-nav::-webkit-scrollbar {
    display: none;
  }

  .app-header h1 {
    font-size: 1.65rem;
  }

  .action-row {
    align-items: stretch;
    flex-direction: column;
  }

  .action-row #chercher,
  .share-simulation {
    width: 100%;
    justify-content: center;
  }

  .savings-summary {
    grid-template-columns: 1fr 1fr;
  }

  .savings-summary > div:first-child {
    grid-column: 1 / -1;
    border-radius: 9px 9px 0 0;
  }

  .savings-summary > div:last-child {
    border-radius: 0 0 9px 0;
  }

  .frmSearch,
  .frmProfile {
    padding: 18px;
    border-radius: 16px;
  }

  .frmSearch::before {
    display: none;
  }

  #search-npa-box {
    display: block;
    width: 100%;
    margin: 10px 0 0;
  }

  #suggesstion-box {
    width: 100%;
    margin-left: 0;
  }

  .frmProfile > label,
  .frmProfile > select,
  .frmProfile > input[type="text"] {
    width: 100%;
  }

  .frmProfile > input[type="checkbox"] {
    margin-left: 0;
  }

  .profiles-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .add-profile {
    justify-content: center;
  }

  .profile-row,
  .profile-row:first-child {
    grid-template-columns: 32px 1fr 36px;
    align-items: center;
  }

  .profile-row:first-child {
    grid-template-columns: 32px 1fr;
  }

  .profile-row label:not(.accident-field) {
    grid-column: 2;
  }

  .profile-number {
    grid-row: 1;
    align-self: start;
    margin-top: 22px;
  }

  .remove-profile {
    grid-column: 3;
    grid-row: 1;
    align-self: start;
    margin-top: 21px;
  }

  .accident-field {
    min-height: 36px;
    grid-column: 2 / -1;
  }

  .profile-result-heading,
  .total-result-heading {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .profile-result-heading .copy-table,
  .total-result-heading .copy-table {
    width: 100%;
    margin-left: 0;
    justify-content: center;
  }

  .canton-picker {
    grid-template-columns: 1fr;
  }

  .canton-options {
    grid-template-columns: repeat(3, auto 20px);
  }

  .user1 select,
  .user2 select,
  .user3 select,
  .user4 select,
  .user5 select {
    flex: 1 1 100%;
  }

  th,
  td {
    padding: 11px 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
