/* prix-appareil-auditif.eu
   Motif : le ticket de caisse (qui paie quoi) et l'étiquette de prix.
   Polices : Bitter (titres, montants), Figtree (texte). */
@font-face { font-family: "Bitter"; src: url("/static/fonts/bitter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("/static/fonts/figtree.woff2") format("woff2"); font-weight: 300 900; font-display: swap; }

:root {
  --ink: #10243e;
  --ink-2: #44546a;
  --paper: #ffffff;
  --mist: #eef2f6;
  --rule: #d5dce4;
  --tag: #ffd23f;
  --tag-soft: #fff6cf;
  --secu: #2a62c9;
  --mutu: #178a63;
  --reste: #d9472b;
  --link: #1d4fb0;
  --bg: var(--paper);
  --max: 72rem;
  --gut: clamp(1rem, 4.5vw, 2.5rem);
  --r: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 118.75%; -webkit-text-size-adjust: 100%; }
html.grand { font-size: 137.5%; }
body { margin: 0; font-family: "Figtree", system-ui, sans-serif; font-weight: 400; line-height: 1.6; color: var(--ink); background: var(--paper); }
img, svg { max-width: 100%; }
a { color: var(--link); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-family: "Bitter", Georgia, serif; color: var(--ink); line-height: 1.15; margin: 0 0 .6em; overflow-wrap: break-word; text-wrap: balance; }
h1 { font-size: clamp(1.9rem, 6vw, 3.2rem); font-weight: 800; letter-spacing: -.015em; }
h2 { font-size: clamp(1.45rem, 3.6vw, 2rem); font-weight: 750; margin-top: 1.8em; }
h3 { font-size: 1.15rem; font-weight: 700; margin-top: 1.4em; }
p, ul, ol, dl, table { margin: 0 0 1em; }
.num, .eur { font-family: "Bitter", Georgia, serif; font-variant-numeric: tabular-nums lining-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: .5rem; background: var(--ink); color: #fff; padding: .6rem 1rem; z-index: 99; }
.skip:focus { left: .5rem; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gut); }

/* ---------- En-tête ---------- */
.hd { position: sticky; top: 0; z-index: 40; background: var(--paper); border-bottom: 2px solid var(--ink); }
.hd .wrap { display: flex; align-items: center; gap: .75rem; min-height: 4.1rem; }
.brand { display: inline-flex; align-items: center; gap: .5rem; margin-right: auto; color: var(--ink); text-decoration: none; font-family: "Bitter", serif; font-weight: 750; font-size: 1.05rem; letter-spacing: -.01em; white-space: nowrap; }
.brand svg { width: 2.1rem; height: 1.4rem; flex: none; }
.brand b { font-weight: 750; }
.brand .bn span { font-weight: 400; color: var(--ink-2); }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .15rem; }
.nav a { display: block; padding: .5rem .7rem; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; border-radius: var(--r); }
.nav a:hover { background: var(--mist); }
.nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--tag); }
.btn-t, .btn-m { font: inherit; font-weight: 650; font-size: .9rem; color: var(--ink); background: var(--mist); border: 1px solid var(--rule); border-radius: 999px; min-height: 2.75rem; padding: .3rem .9rem; display: inline-flex; align-items: center; gap: .4rem; cursor: pointer; }
.btn-t[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-t svg, .btn-m svg { width: 1.15rem; height: 1.15rem; flex: none; }
@media (max-width: 63.99em) {
  .nav { display: none; }
  .nav.open { display: block; position: fixed; inset: 4.2rem 0 0 0; background: var(--paper); padding: 1rem var(--gut) 2rem; overflow-y: auto; border-top: 2px solid var(--ink); }
  .nav.open ul { flex-direction: column; gap: 0; }
  .nav.open a { font-size: 1.25rem; padding: 1rem .25rem; border-bottom: 1px solid var(--rule); border-radius: 0; }
}
@media (min-width: 64em) { .btn-m { display: none; } }
@media (max-width: 26em) {
  .hd .wrap { gap: 2vw; padding: 0 4vw; }
  .brand { font-size: 4.2vw; gap: .35em; }
  .brand svg { width: 1.9em; height: 1.25em; }
  .btn-t, .btn-m { font-size: 3.8vw; padding: .3em .75em; min-width: 44px; min-height: 44px; justify-content: center; }
  .btn-t .w { display: none; }
}

/* ---------- Fil d'Ariane ---------- */
.fil ol { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-wrap: wrap; gap: .2rem .5rem; font-size: .88rem; color: var(--ink-2); }
.fil li + li::before { content: "/"; margin-right: .5rem; color: var(--rule); }
.fil a { color: var(--ink-2); }

/* ---------- Accueil : ouverture avec le simulateur ---------- */
.open { background: var(--mist); --bg: var(--mist); padding: clamp(2rem, 6vw, 4.5rem) 0 clamp(2.5rem, 6vw, 4.5rem); border-bottom: 2px dashed var(--rule); }
.open__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.5rem; align-items: start; }
@media (min-width: 62em) { .open__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 27rem); gap: 4rem; } }
.lede { font-size: 1.2rem; color: var(--ink-2); max-width: 36rem; }
.open .lede { margin-bottom: 1.5rem; }
.keys { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .6rem; max-width: 34rem; }
.keys li { display: grid; grid-template-columns: 6.2rem 1fr; gap: 1rem; align-items: baseline; padding-bottom: .6rem; border-bottom: 1px dotted var(--rule); }
.keys .eur { font-size: 1.35rem; font-weight: 800; text-align: right; white-space: nowrap; }

/* ---------- Le ticket ---------- */
.ticket { position: relative; background: var(--paper); border: 1px solid var(--rule); border-radius: 2px; padding: 1.6rem 1.4rem 1.4rem; box-shadow: 0 14px 34px -22px rgba(16, 36, 62, .45); margin: 1.4rem 0; }
.ticket::before, .ticket::after { content: ""; position: absolute; left: -1px; right: -1px; height: 12px; background: radial-gradient(circle at 6px 6px, var(--bg) 5px, transparent 5.5px) 0 0 / 12px 12px repeat-x; }
.ticket::before { top: -6px; }
.ticket::after { bottom: -6px; }
.ticket__t { font-family: "Bitter", serif; font-weight: 750; font-size: 1.1rem; margin: 0 0 1rem; }
.ticket__l { margin: 0; }
.ticket__l div { display: flex; align-items: baseline; gap: .5rem; padding: .35rem 0; }
.ticket__l dt { flex: none; max-width: 65%; }
.ticket__l div::after { content: ""; order: 1; flex: 1; border-bottom: 2px dotted var(--rule); transform: translateY(-.3em); }
.ticket__l dd { order: 2; margin: 0; font-family: "Bitter", serif; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ticket__l .tot { border-top: 2px solid var(--ink); margin-top: .4rem; padding-top: .6rem; font-size: 1.2rem; font-weight: 700; }
.ticket__l .tot::after { display: none; }
.ticket__l .tot dt { margin-right: auto; }
.ticket__l .tot dd { font-size: 1.6rem; color: var(--reste); }
.ticket__l .tot.zero dd { color: var(--mutu); }
.ticket__n { font-size: .85rem; color: var(--ink-2); margin: .9rem 0 0; }

.bill { display: flex; gap: 2px; height: 1.35rem; margin: 1rem 0 .7rem; background: var(--paper); }
.bill span { display: block; height: 100%; min-width: 0; transition: flex-basis .35s ease; }
.bill span:first-child { border-radius: 4px 0 0 4px; }
.bill span:last-child { border-radius: 0 4px 4px 0; }
.s-secu { background: var(--secu); }
.s-mutu { background: var(--mutu); }
.s-reste { background: var(--reste); }
.key { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .3rem 1.1rem; font-size: .88rem; color: var(--ink-2); }
.key li { display: inline-flex; align-items: center; gap: .4rem; }
.key i { width: .8rem; height: .8rem; border-radius: 2px; display: inline-block; }
@media (prefers-reduced-motion: reduce) { .bill span { transition: none; } }

/* Simulateur */
.sim fieldset { border: 0; padding: 0; margin: 0 0 1rem; min-width: 0; }
.sim legend, .sim .lab { font-weight: 650; padding: 0; margin-bottom: .4rem; display: block; }
.seg { display: flex; flex-wrap: wrap; gap: .4rem; }
.seg label { display: inline-flex; align-items: center; gap: .45rem; min-height: 2.75rem; padding: .35rem .85rem; border: 1px solid var(--rule); border-radius: var(--r); background: var(--paper); cursor: pointer; font-weight: 500; }
.seg label:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: var(--tag-soft); font-weight: 650; }
.seg input { accent-color: var(--ink); width: 1.05rem; height: 1.05rem; margin: 0; }
.range { display: grid; grid-template-columns: 1fr auto; gap: .8rem; align-items: center; }
.range output { font-family: "Bitter", serif; font-weight: 750; font-size: 1.2rem; min-width: 5.5rem; text-align: right; }
input[type="range"] { width: 100%; accent-color: var(--ink); height: 2.75rem; }
.sim select { font: inherit; font-size: 1rem; min-height: 2.75rem; width: 100%; padding: .4rem .7rem; border: 1px solid var(--ink-2); border-radius: var(--r); background: var(--paper); color: var(--ink); }
.sim [hidden] { display: none !important; }

/* ---------- En-tête de page ---------- */
.ph { padding: clamp(1.5rem, 4vw, 3rem) 0 clamp(1.8rem, 4vw, 3rem); border-bottom: 2px dashed var(--rule); }
.ph__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem 3rem; align-items: center; }
@media (min-width: 56em) { .ph__grid { grid-template-columns: minmax(0, 1fr) auto; } }
.ph h1 { max-width: 22ch; }
.ph .lede { margin: 0; }

/* L'étiquette de prix */
.tag { position: relative; display: inline-grid; justify-items: start; gap: .1rem; background: var(--tag); color: var(--ink); padding: 1rem 1.6rem 1rem 2.6rem; clip-path: polygon(1.4rem 0, 100% 0, 100% 100%, 1.4rem 100%, 0 50%); transform: rotate(-3deg); min-width: 11rem; justify-self: start; }
.tag::before { content: ""; position: absolute; left: 1.05rem; top: 50%; width: .7rem; height: .7rem; margin-top: -.35rem; border-radius: 50%; background: var(--paper); box-shadow: inset 0 0 0 2px rgba(16, 36, 62, .25); }
.tag__v { font-family: "Bitter", serif; font-weight: 800; font-size: clamp(1.9rem, 5vw, 2.6rem); line-height: 1; font-variant-numeric: lining-nums; white-space: nowrap; }
.tag__l { font-size: .85rem; font-weight: 600; max-width: 13rem; line-height: 1.3; }
@media (min-width: 56em) { .tag { justify-self: end; } }

/* ---------- Corps ---------- */
.sec { padding: clamp(2rem, 5vw, 3.5rem) 0; }
.sec--mist { background: var(--mist); --bg: var(--mist); }
.sec > .wrap > h2:first-child, .sec h2.first { margin-top: 0; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem 3.5rem; }
@media (min-width: 62em) { .cols { grid-template-columns: minmax(0, 1fr) 20rem; } .cols > aside { position: sticky; top: 6rem; align-self: start; } }
.prose { max-width: 42rem; }
.prose > h2:first-child { margin-top: 0; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: .45rem; }
.prose li::marker { color: var(--ink-2); }
.intro-p { font-size: 1.1rem; }
.more { font-weight: 650; }
aside .go { display: block; font-weight: 650; padding: .75rem 0; border-bottom: 1px solid var(--rule); }

/* Montants à retenir */
.figs { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 3rem; margin: 0; }
@media (min-width: 48em) { .figs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.figs div { display: grid; grid-template-columns: minmax(0, 7rem) minmax(0, 1fr); gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.figs dt { font-family: "Bitter", serif; font-weight: 800; font-size: 1.55rem; text-align: right; white-space: nowrap; }
.figs dd { margin: 0; overflow-wrap: break-word; min-width: 0; }
@media (max-width: 30em) { .figs div { grid-template-columns: minmax(0, 5.6rem) minmax(0, 1fr); gap: .7rem; } .figs dt { font-size: 1.25rem; white-space: normal; } }
.figs dd a { font-weight: 650; }

/* Rubriques */
.rub { list-style: none; padding: 0; margin: 0; border-top: 2px solid var(--ink); }
.rub li { display: grid; grid-template-columns: minmax(0, 1fr); gap: .2rem 2rem; padding: 1.2rem 0; border-bottom: 1px solid var(--rule); }
@media (min-width: 48em) { .rub li { grid-template-columns: 18rem 1fr; } }
.rub a { font-family: "Bitter", serif; font-weight: 750; font-size: 1.25rem; }
.rub p { margin: 0; color: var(--ink-2); }

/* Tableaux */
.tab { width: 100%; border-collapse: collapse; font-size: .98rem; }
.tab th, .tab td { text-align: left; padding: .7rem .6rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
.tab thead th { font-family: "Bitter", serif; border-bottom: 2px solid var(--ink); }
.tab td.r, .tab th.r { text-align: right; font-family: "Bitter", serif; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 40em) {
  .tab thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .tab, .tab tbody, .tab tr, .tab th, .tab td { display: block; width: 100%; }
  .tab tr { padding: .6rem 0; border-bottom: 1px solid var(--rule); }
  .tab th, .tab td { border: 0; padding: .2rem 0; }
  .tab tbody th { font-family: "Bitter", serif; font-size: 1.05rem; }
  .tab td[data-k]::before { content: attr(data-k) " : "; font-weight: 650; }
  .tab td.r { text-align: left; white-space: normal; }
}
.src { font-size: .85rem; color: var(--ink-2); }

/* Barres (recherches par marque) */
.bars, .prose .bars { list-style: none; padding: 0; margin: 1rem 0 .6rem; display: grid; gap: .55rem; }
.bars li { display: grid; grid-template-columns: minmax(5rem, 7rem) minmax(0, 1fr); gap: .8rem; align-items: center; }
.bars li > a { font-weight: 650; }
.bar { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.bar > span { display: block; height: 1.5rem; width: calc((100% - 3.5rem) * var(--w)); background: var(--secu); border-radius: 0 4px 4px 0; flex: none; }
.bar b { font-size: .95rem; font-weight: 700; }

/* Liens de navigation transversale */
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.chips a { display: inline-flex; align-items: center; gap: .4rem; min-height: 2.75rem; padding: .35rem 1rem; border: 1px solid var(--ink-2); border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 600; background: var(--paper); }
.chips a:hover { background: var(--tag-soft); }
.chips a[aria-current="page"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.chips small { font-weight: 500; color: inherit; opacity: .75; }

/* Annuaire */
.ctrs { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
@media (min-width: 48em) { .ctrs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ctr { border: 1px solid var(--rule); border-top: 4px solid var(--ink); background: var(--paper); padding: 1.2rem 1.2rem 1.3rem; height: 100%; display: flex; flex-direction: column; }
.ctr h3 { margin: 0 0 .35rem; font-size: 1.15rem; }
.ctr address { font-style: normal; color: var(--ink-2); margin-bottom: .4rem; }
.ctr .note { margin: 0 0 .4rem; font-size: .95rem; }
.badge { display: inline-block; font-size: .85rem; font-weight: 650; margin-bottom: .8rem; }
.acts { display: grid; gap: .5rem; margin-top: auto; padding-top: .6rem; }
.b-call, .b-line { display: flex; align-items: center; justify-content: center; gap: .5rem; min-height: 3rem; padding: .5rem 1rem; border-radius: var(--r); font-weight: 650; text-decoration: none; text-align: center; }
.b-call { background: var(--ink); color: #fff; font-family: "Bitter", serif; font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.b-call:hover { background: #1f3a5f; color: #fff; }
.b-call svg { width: 1.1rem; height: 1.1rem; }
.b-line { border: 1px solid var(--ink-2); color: var(--ink); background: var(--paper); }
.b-line:hover { background: var(--mist); }
.acts .duo { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }

/* Piles et Audipile */
.pile { display: grid; grid-template-columns: 2.4rem 1fr; gap: .9rem; align-items: start; background: var(--tag-soft); border: 1px solid #ecd67a; border-radius: var(--r); padding: 1.1rem 1.2rem; margin: 1.5rem 0; }
.pile svg { width: 2.4rem; height: 2.4rem; }
.pile p { margin: 0; }
.pile a { font-weight: 700; }

/* Calculateur budget piles */
.budget { border: 2px solid var(--ink); border-radius: var(--r); padding: 1.3rem 1.3rem .6rem; margin: 1.2rem 0 1.5rem; background: var(--paper); }
.budget input[type="text"] { font: inherit; font-size: 1rem; min-height: 2.75rem; width: 100%; padding: .4rem .7rem; border: 1px solid var(--ink-2); border-radius: var(--r); background: var(--paper); color: var(--ink); }
.budget .row2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 1.2rem; }
@media (min-width: 40em) { .budget input[type="text"] { font: inherit; font-size: 1rem; min-height: 2.75rem; width: 100%; padding: .4rem .7rem; border: 1px solid var(--ink-2); border-radius: var(--r); background: var(--paper); color: var(--ink); }
.budget .row2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.budget .ticket { margin-bottom: 1rem; box-shadow: none; }

/* Alerte */
.warn { border-left: 5px solid var(--reste); background: #fdf0ed; padding: .9rem 1.1rem; margin: 1.5rem 0; }
.warn p { margin: 0; }
.ok { border-left: 5px solid var(--mutu); background: #e9f6f0; padding: .9rem 1.1rem; margin: 1.5rem 0; }
.ok p { margin: 0; }

/* FAQ */
.faq { border-top: 2px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 1rem; align-items: center; padding: 1rem 0; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary h3 { margin: 0; font-size: 1.1rem; }
.faq summary::after { content: "+"; font-family: "Bitter", serif; font-size: 1.6rem; font-weight: 700; line-height: 1; flex: none; width: 2rem; height: 2rem; display: grid; place-items: center; border: 1px solid var(--rule); border-radius: 50%; }
.faq details[open] summary::after { content: "–"; }
.faq .a { padding: 0 0 1rem; max-width: 42rem; }
.faq .a p:last-child { margin-bottom: 0; }

/* Pied de page */
.ft { background: var(--ink); color: #dfe6ef; padding: 3rem 0 2rem; margin-top: 0; }
.ft a { color: #fff; }
.ft .cols4 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; }
@media (min-width: 48em) { .ft .cols4 { grid-template-columns: 1.3fr repeat(3, 1fr); } }
.ft .t { font-family: "Bitter", serif; font-weight: 700; color: #fff; margin-bottom: .6rem; font-size: 1.05rem; }
.ft ul { list-style: none; padding: 0; margin: 0; }
.ft li { margin-bottom: .45rem; }
.ft .brand { color: #fff; }
.ft .brand .bn span { color: #b9c5d4; }
.ft .legal { border-top: 1px solid #2c4467; margin-top: 2.5rem; padding-top: 1.2rem; font-size: .88rem; color: #b9c5d4; }

@media print { .hd, .ft, .btn-t, .btn-m, .sim fieldset { display: none !important; } .ticket { box-shadow: none; } }
