/* Comparatif LAMal : feuille de style du site client.
   Thème clair unique, une police (Source Sans 3), une couleur de marque. */

:root {
  /* Thème cohérent avec Assura : rouge-orangé de marque, noir, blanc et gris clairs. */
  --brand: #e62d0a;
  --brand-dark: #b81901;
  --brand-light: #fef3ef;
  --text: #1a1a1a;
  --text-muted: #5f6368;
  --border: #e5e5e5;
  --bg: #ffffff;
  --bg-alt: #f5f5f5;
  --success: #1f7a4d;
  --success-light: #ecf7f0;
  --warning-light: #fff7e6;
  --warning: #8a5a00;
  --error: #b42318;
  --ring: rgba(230, 45, 10, .25);
  --radius: 8px;
  --font: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  --container: 1120px;
  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font: 400 17px/1.6 var(--font);
  color: var(--text);
  background: var(--bg);
}
img, svg { max-width: 100%; display: block; }
a { color: var(--brand); }
a:hover { color: var(--brand-dark); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; font-weight: 700; color: var(--text); text-wrap: balance; }
h1 { font-size: clamp(30px, 4vw, 42px); }
h2 { font-size: clamp(24px, 3vw, 30px); }
h3 { font-size: 19px; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
.muted { color: var(--text-muted); }
.small { font-size: 15px; }
.tabular { font-variant-numeric: tabular-nums; }
.skip-link { position: absolute; left: -9999px; top: 8px; background: var(--brand); color: #fff; padding: 8px 14px; border-radius: var(--radius); z-index: 100; }
.skip-link:focus { left: 8px; }

/* ---------- En-tête ---------- */
.site-header { border-bottom: 1px solid var(--border); background: var(--bg); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 700; font-size: 19px; }
.logo svg { width: 28px; height: 28px; }
.logo span { color: var(--brand); }
.main-nav ul { list-style: none; display: flex; gap: 28px; margin: 0; padding: 0; }
.main-nav a { color: var(--text); text-decoration: none; font-weight: 600; font-size: 16px; }
.main-nav a:hover { color: var(--brand); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 16px/1.2 var(--font); text-decoration: none; cursor: pointer;
  padding: 12px 22px; border-radius: var(--radius); border: 1px solid transparent;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-secondary { background: var(--bg); color: var(--brand); border-color: var(--brand); }
.btn-secondary:hover { background: var(--brand-light); }
.btn-link { background: none; border: 0; padding: 0; color: var(--brand); font-weight: 600; cursor: pointer; font: 600 16px var(--font); }
.btn-link:hover { text-decoration: underline; }
.btn-sm { padding: 8px 14px; font-size: 15px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .6; cursor: not-allowed; }

/* ---------- Formulaires ---------- */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-weight: 600; margin-bottom: 6px; }
.form-hint { display: block; font-size: 15px; color: var(--text-muted); margin-top: 6px; }
.form-control {
  display: block; width: 100%; font: 400 17px var(--font); color: var(--text);
  background: #fff; border: 1px solid #c4cdd5; border-radius: var(--radius);
  padding: 11px 13px; transition: border-color .15s, box-shadow .15s;
}
.form-control:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring); }
.form-control.short { max-width: 220px; }
.form-control.medium { max-width: 440px; }
textarea.form-control { resize: vertical; min-height: 100px; }
.form-check { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0; cursor: pointer; }
.form-check input { width: 18px; height: 18px; margin: 4px 0 0; accent-color: var(--brand); flex: none; }
.form-check small { display: block; color: var(--text-muted); font-size: 15px; }
.form-error { color: var(--error); font-size: 15px; margin: 12px 0 0; }
.indent { margin-left: 28px; }
.req { color: var(--brand); font-weight: 700; text-decoration: none; }

/* Choix sous forme de cartes (modèle d'assurance) */
.option-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 10px; }
.option { position: relative; display: block; border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px 12px 42px; cursor: pointer; background: #fff; }
.option:hover { border-color: var(--brand); }
.option input { position: absolute; left: 14px; top: 15px; width: 17px; height: 17px; margin: 0; accent-color: var(--brand); }
.option strong { display: block; font-weight: 600; }
.option span { display: block; font-size: 15px; color: var(--text-muted); line-height: 1.4; }
.option:has(input:checked) { border-color: var(--brand); background: var(--brand-light); }

/* Choix en ligne (franchise) */
.choice-row { display: flex; flex-wrap: wrap; gap: 8px; }
.choice-row label { position: relative; cursor: pointer; }
.choice-row input { position: absolute; opacity: 0; }
.choice-row span { display: block; min-width: 76px; text-align: center; padding: 9px 12px; border: 1px solid #c4cdd5; border-radius: var(--radius); font-variant-numeric: tabular-nums; background: #fff; }
.choice-row label:hover span { border-color: var(--brand); }
.choice-row input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.choice-row input:focus-visible + span { outline: 3px solid var(--ring); outline-offset: 2px; }

/* Suggestions de commune */
.autocomplete { position: relative; max-width: 520px; }
.autocomplete ul { position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; right: 0; margin: 0; padding: 4px; list-style: none; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(26, 26, 26, .12); max-height: 280px; overflow-y: auto; }
.autocomplete li { padding: 9px 11px; border-radius: 4px; cursor: pointer; }
.autocomplete li:hover, .autocomplete li[aria-selected="true"] { background: var(--brand-light); }

/* ---------- Accueil : bandeau + comparateur ---------- */
.hero { background: var(--bg-alt); border-bottom: 1px solid var(--border); padding: 48px 0 56px; }
.hero .container { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 48px; align-items: start; }
.hero-text { padding-top: 12px; }
.hero-text p { font-size: 19px; color: var(--text-muted); max-width: 34em; }
.hero-points { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 10px; }
.hero-points li { position: relative; padding-left: 30px; }
.hero-points li::before { content: ""; position: absolute; left: 2px; top: 6px; width: 16px; height: 9px; border-left: 3px solid var(--success); border-bottom: 3px solid var(--success); transform: rotate(-45deg); }
.hero-source { margin-top: 28px; font-size: 15px; color: var(--text-muted); }

.comparator { background: #fff; border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 4px 20px rgba(26, 26, 26, .06); }
.comparator-head { padding: 18px 26px; border-bottom: 1px solid var(--border); }
.steps-indicator { list-style: none; display: flex; gap: 6px; margin: 0; padding: 0; counter-reset: step; }
.steps-indicator li { flex: 1; font-size: 14px; font-weight: 600; color: var(--text-muted); padding-top: 10px; border-top: 4px solid var(--border); }
.steps-indicator li.active, .steps-indicator li.done { color: var(--brand); border-top-color: var(--brand); }
.comparator-body { padding: 24px 26px 8px; }
.comparator-body h2 { font-size: 23px; margin-bottom: 4px; }
.comparator-body .intro { color: var(--text-muted); margin-bottom: 22px; }
.comparator-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 16px 26px 22px; border-top: 1px solid var(--border); }
.comparator-foot .right { display: flex; gap: 10px; flex-wrap: wrap; margin-left: auto; }

/* ---------- Sections de contenu ---------- */
.section { padding: 64px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { max-width: 40em; margin-bottom: 32px; }
.section-head p { color: var(--text-muted); font-size: 18px; }
.how-steps { list-style: none; counter-reset: how; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin: 0; padding: 0; }
.how-steps li { counter-increment: how; }
.how-steps li::before { content: counter(how); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--brand-light); color: var(--brand); font-weight: 700; margin-bottom: 14px; }
.how-steps p { color: var(--text-muted); margin: 0; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.facts p { color: var(--text-muted); margin: 0; }
.faq { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--border); }
.faq details:first-of-type { border-top: 1px solid var(--border); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 36px 18px 0; font-weight: 600; font-size: 18px; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 6px; top: 26px; width: 10px; height: 10px; border-right: 2px solid var(--text-muted); border-bottom: 2px solid var(--text-muted); transform: rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(-135deg); top: 30px; }
.faq details p { color: var(--text-muted); padding-bottom: 8px; max-width: 46em; }

/* ---------- Résultats ---------- */
.page-head { background: var(--bg-alt); border-bottom: 1px solid var(--border); padding: 32px 0 28px; }
.page-head h1 { font-size: clamp(28px, 3.4vw, 36px); margin-bottom: 8px; }
.breadcrumb { font-size: 15px; margin-bottom: 14px; }
.breadcrumb a { text-decoration: none; }
.summary-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; color: var(--text-muted); }
.summary-line ul { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; padding: 0; }
.summary-line li + li::before { content: "·"; margin-right: 14px; color: #a0abb5; }

.key-figures { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--border); border-radius: var(--radius); margin: 28px 0 20px; background: #fff; }
.key-figures div { padding: 16px 20px; }
.key-figures div + div { border-left: 1px solid var(--border); }
.key-figures dt { font-size: 15px; color: var(--text-muted); }
.key-figures dd { margin: 2px 0 0; font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.key-figures dd small { font-size: 15px; font-weight: 400; color: var(--text-muted); }

.alert { display: flex; gap: 16px 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; border-radius: var(--radius); padding: 18px 20px; margin-bottom: 24px; border: 1px solid; }
.alert p { margin: 0; }
.alert-success { background: var(--success-light); border-color: #b9dfc8; }
.alert-success strong { color: var(--success); }
.alert-info { background: var(--brand-light); border-color: #f6d5cb; }
.alert-warning { background: var(--warning-light); border-color: #f0dcb4; }

.results-table-wrap { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: #fff; }
.results-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.results-table caption { text-align: left; padding: 14px 18px; font-size: 15px; color: var(--text-muted); border-bottom: 1px solid var(--border); }
.results-table th, .results-table td { padding: 14px 18px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--border); }
.results-table thead th { background: var(--bg-alt); font-size: 14px; font-weight: 600; color: var(--text-muted); }
.results-table tbody tr:last-child td { border-bottom: 0; }
.results-table tbody tr:hover { background: #fafbfc; }
.results-table .num { text-align: right; white-space: nowrap; }
.results-table .rank { width: 48px; color: var(--text-muted); }
.results-table .insurer { font-weight: 700; }
.results-table .insurer small, .results-table .model small { display: block; font-weight: 400; color: var(--text-muted); font-size: 14px; }
.results-table .price { font-size: 19px; font-weight: 700; }
.results-table .action { text-align: right; width: 1%; white-space: nowrap; }
.results-table tr.is-best { background: var(--brand-light); }
.results-table tr.is-best:hover { background: #fdebe5; }
.results-table tr.is-current { background: var(--warning-light); }
.label { display: inline-block; font-size: 13px; font-weight: 600; border-radius: 4px; padding: 1px 8px; margin-top: 4px; }
.label-success { background: var(--success); color: #fff; }
.label-warning { background: #f3d8a4; color: var(--warning); }
.doc-link { color: inherit; text-decoration: underline; text-decoration-color: #b5c0c9; text-underline-offset: 3px; }
.doc-link:hover { color: var(--brand); text-decoration-color: var(--brand); }
.row-details summary { cursor: pointer; color: var(--brand); font-size: 14px; font-weight: 600; margin-top: 4px; }
.row-details ul { margin: 6px 0 0; padding-left: 18px; font-size: 14px; font-weight: 400; color: var(--text-muted); }

.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 28px; }
.info-box { border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; background: #fff; }
.info-box h2 { font-size: 20px; margin-bottom: 6px; }
.info-box p { color: var(--text-muted); margin: 0 0 12px; }
.info-box p:last-child { margin-bottom: 0; }
.source-note { font-size: 14px; color: var(--text-muted); margin: 24px 0 0; }
.loading { padding: 80px 0; text-align: center; color: var(--text-muted); }
.spinner { width: 32px; height: 32px; margin: 0 auto 14px; border: 3px solid var(--border); border-top-color: var(--brand); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Inscription ---------- */
.signup-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 40px; align-items: start; padding: 36px 0 64px; }
.form-card { border: 1px solid var(--border); border-radius: 8px; padding: 28px; background: #fff; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.privacy-note { background: var(--bg-alt); border-left: 3px solid var(--brand); padding: 12px 14px; font-size: 15px; color: var(--text-muted); margin: 0 0 20px; }
.summary-card { border: 1px solid var(--border); border-radius: 8px; background: #fff; position: sticky; top: 20px; }
.summary-card header { padding: 18px 22px; border-bottom: 1px solid var(--border); }
.summary-card header p { margin: 0; color: var(--text-muted); font-size: 15px; }
.summary-card h2 { font-size: 22px; margin: 2px 0 2px; }
.summary-card .price-big { font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; padding: 18px 22px 0; margin: 0; }
.summary-card .price-big small { font-size: 16px; font-weight: 400; color: var(--text-muted); }
.summary-card dl { margin: 0; padding: 14px 22px 20px; display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: 15px; }
.summary-card dt { color: var(--text-muted); }
.summary-card dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.summary-card .saving { margin: 14px 22px 0; padding: 10px 12px; border-radius: var(--radius); background: var(--success-light); color: var(--success); font-weight: 600; font-size: 15px; }
.success-panel { text-align: center; padding: 24px 8px; }
.success-icon { width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 50%; background: var(--success-light); position: relative; }
.success-icon::after { content: ""; position: absolute; left: 19px; top: 15px; width: 18px; height: 10px; border-left: 3px solid var(--success); border-bottom: 3px solid var(--success); transform: rotate(-45deg); }

/* ---------- Pages de texte ---------- */
.prose { max-width: 760px; padding: 40px 0 64px; }
.prose h2 { font-size: 22px; margin-top: 1.6em; }
.prose p, .prose li { color: #33424f; }

/* ---------- Pied de page ---------- */
.site-footer { background: #1a1a1a; color: #c8c8c8; padding: 40px 0 28px; font-size: 15px; }
.site-footer a { color: #f2f2f2; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-top { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; padding-bottom: 24px; border-bottom: 1px solid #333; }
.footer-top .logo { color: #fff; }
.footer-top .logo span { color: #ff8a6b; }
.footer-top p { max-width: 30em; margin: 10px 0 0; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-bottom { padding-top: 18px; color: #9a9a9a; }

/* ---------- Fenêtre de modification ---------- */
dialog { border: 0; border-radius: 8px; padding: 0; width: min(640px, calc(100% - 32px)); max-height: calc(100% - 32px); box-shadow: 0 20px 60px rgba(26, 26, 26, .3); }
dialog::backdrop { background: rgba(26, 26, 26, .5); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero .container, .signup-layout, .info-grid { grid-template-columns: 1fr; }
  .hero { padding: 28px 0 40px; }
  .hero-text { padding-top: 0; }
  .summary-card { position: static; order: -1; }
  .how-steps, .facts { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .main-nav { display: none; }
  .key-figures { grid-template-columns: 1fr; }
  .key-figures div + div { border-left: 0; border-top: 1px solid var(--border); }
  .form-row { grid-template-columns: 1fr; }
  .comparator-body, .comparator-head, .comparator-foot { padding-left: 18px; padding-right: 18px; }
  /* tableau -> cartes empilées */
  .results-table thead { display: none; }
  .results-table, .results-table tbody, .results-table tr, .results-table td { display: block; width: 100%; }
  .results-table tr { position: relative; padding: 14px 16px; border-bottom: 1px solid var(--border); }
  .results-table td { border: 0; padding: 2px 0; text-align: left; }
  .results-table td.rank { position: absolute; right: 16px; top: 14px; width: auto; }
  .results-table td.num, .results-table td.action { text-align: left; }
  .results-table td[data-label]::before { content: attr(data-label) " : "; color: var(--text-muted); font-size: 14px; }
  .results-table td.action { margin-top: 10px; }
  .results-table caption { display: block; }
  .results-table td.action { width: 100%; white-space: normal; }
  .summary-line li + li::before { display: none; }
  .summary-line ul { gap: 2px 12px; }
  .results-table td.action .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
.step { border: 0; margin: 0; padding: 0; min-width: 0; }
.kid-row { margin-bottom: 10px; }
.inline-field { display: flex; gap: 10px; align-items: center; }

/* ---------- Utilitaires ---------- */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.m-0 { margin: 0; }
.mt-20 { margin-top: 20px; }
.mt-28 { margin-top: 28px; }
.pad { padding: 18px 22px; }

/* ---------- Carte de visite du conseiller ---------- */
.advisor-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.advisor-brand img, .avatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; flex: none; background: var(--brand-light); }
.advisor-brand strong { display: block; font-size: 17px; line-height: 1.2; }
.advisor-brand span { display: block; font-size: 14px; color: var(--brand); font-weight: 600; }
.header-actions { display: flex; align-items: center; gap: 28px; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--brand); background: var(--brand-light); border-radius: 999px; padding: 4px 12px; margin-bottom: 16px; }
.services { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.service { border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; background: #fff; }
.service h3 { margin-bottom: 8px; }
.service p { color: var(--text-muted); margin: 0; font-size: 16px; }
.service-top { width: 32px; height: 4px; background: var(--brand); border-radius: 2px; margin-bottom: 16px; }
.advisor-section { display: grid; grid-template-columns: 280px 1fr; gap: 48px; align-items: center; }
.advisor-photo { width: 100%; aspect-ratio: 1; max-width: 280px; border-radius: 12px; object-fit: cover; background: var(--bg-alt); }
.advisor-section p { color: var(--text-muted); font-size: 18px; max-width: 36em; }
.contact-list { list-style: none; margin: 20px 0 24px; padding: 0; display: grid; gap: 8px; font-size: 18px; }
.contact-list a { color: var(--text); font-weight: 600; text-decoration: none; }
.contact-list a:hover { color: var(--brand); }
.contact-list span { color: var(--text-muted); display: inline-block; min-width: 92px; }
.advisor-box { display: flex; gap: 16px; align-items: center; }
.advisor-box img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex: none; }
.disclaimer { font-size: 14px; color: #9a9a9a; margin: 8px 0 0; }
@media (max-width: 960px) {
  .services { grid-template-columns: 1fr 1fr; }
  .advisor-section { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 760px) {
  .services { grid-template-columns: 1fr; }
  .header-actions .btn { display: none; }
}
.footer-name { color: #fff; font-size: 19px; }
.label-brand { background: var(--brand); color: #fff; }
.key-figures dd.saving-figure { color: var(--success); }
.advisor-brand strong { color: var(--text); }
.pull-quote { margin: 20px 0 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--brand); font-size: 18px; color: var(--text); max-width: 38em; }
.services { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 760px) { .services { grid-template-columns: 1fr; } }
