/* Identité Maison de l'Audition : noir sur blanc avec le vert canard des centres, monogramme MA, titres à empattements fins. Une colonne de 70rem, grands caractères pour un public souvent âgé. */
:root {
  --paper: #ffffff;
  --surface: #ffffff;
  --band: #eef6f5;
  --accent: #00797b;
  --accent-soft: #d7eeec;
  --ink: #1d1d1b;
  --text: #262624;
  --muted: #5f5e59;
  --line: #e2e0db;
  --btn: #1d1d1b;
  --btn-ink: #ffffff;
  --dark: #1d1d1b;
  --dark-ink: #f7f6f3;
  --logo-filter: none;
  --ok: #2e6b46; --ok-bg: #eaf3ed;
  --mid: #8a5a00; --mid-bg: #fbf1dc;
  --high: #9b2c22; --high-bg: #fbe9e6;
  --display: "Marcellus", "Didot", "Bodoni 72", Georgia, serif;
  --body: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;
  --r: 4px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #121211; --surface: #1a1a18; --band: #12201f; --accent: #4fc1bc; --accent-soft: #133836; --ink: #f4f3ef; --text: #e6e5e1; --muted: #a8a7a1;
    --line: #34332f; --btn: #f4f3ef; --btn-ink: #121211; --dark: #000000; --dark-ink: #f4f3ef; --logo-filter: invert(1);
    --ok: #8fd1a8; --ok-bg: #16281d; --mid: #f0c068; --mid-bg: #2c2312; --high: #f19a90; --high-bg: #321816;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #121211; --surface: #1a1a18; --band: #12201f; --accent: #4fc1bc; --accent-soft: #133836; --ink: #f4f3ef; --text: #e6e5e1; --muted: #a8a7a1;
  --line: #34332f; --btn: #f4f3ef; --btn-ink: #121211; --dark: #000000; --dark-ink: #f4f3ef; --logo-filter: invert(1);
  --ok: #8fd1a8; --ok-bg: #16281d; --mid: #f0c068; --mid-bg: #2c2312; --high: #f19a90; --high-bg: #321816;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--text); font-family: var(--body); font-size: 1.125rem; line-height: 1.6; }
img, svg { max-width: 100%; height: auto; }
a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; color: var(--ink); line-height: 1.15; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); letter-spacing: 0.005em; }
h2 { font-size: clamp(1.55rem, 3vw, 2.1rem); }
h3 { font-size: 1.35rem; }
p { margin: 0; }
.small { font-size: 0.9rem; }
.muted { color: var(--muted); }

.wrap { max-width: 70rem; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

/* En-tête */
.top { background: var(--surface); border-bottom: 1px solid var(--line); }
.top-in { display: flex; flex-direction: column; align-items: center; gap: 1rem; padding-block: 1.5rem 0.9rem; }
.brand { display: block; text-decoration: none; }
.brand img { filter: var(--logo-filter); display: block; }
.brand .logo-full { height: clamp(120px, 20vw, 190px); width: auto; }
.top nav { display: flex; gap: 0.2rem; flex-wrap: wrap; justify-content: center; }
.top nav a { text-decoration: none; padding: 0.4rem 0.8rem; font-weight: 700; color: var(--ink); border-bottom: 2px solid transparent; }
.top nav a[aria-current="page"], .top nav a:hover { border-bottom-color: var(--accent); }
.top nav .nav-test { background: var(--btn); color: var(--btn-ink); border-radius: var(--r); border-bottom: 0; margin-left: 0.4rem; }
.top nav .nav-test:hover, .top nav .nav-test[aria-current="page"] { opacity: 0.85; }

/* Ouverture */
.hero { padding-block: clamp(2.5rem, 6vw, 4.5rem); background: linear-gradient(180deg, var(--band), var(--paper)); }
.hero-in { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.hero-txt { display: flex; flex-direction: column; gap: 1.1rem; min-width: 0; }
.hero-c .wrap { display: flex; flex-direction: column; gap: 1.1rem; }
.eyebrow { font-size: 0.82rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.lead { font-size: 1.25rem; max-width: 38rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.actions.center { justify-content: center; }
.btn { display: inline-block; background: var(--btn); color: var(--btn-ink); text-decoration: none; font: 700 1.05rem/1.3 var(--body); padding: 0.85rem 1.4rem; border-radius: var(--r); border: 2px solid var(--btn); cursor: pointer; }
.btn:hover { opacity: 0.85; }
.btn:disabled { opacity: 0.35; cursor: not-allowed; }
.btn-2 { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-inv { background: var(--dark-ink); color: var(--dark); border-color: var(--dark-ink); }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* Encart test (blanc sur noir, comme le logo principal) */
.teaser { background: var(--dark); color: var(--dark-ink); border-radius: var(--r); padding: clamp(1.5rem, 3vw, 2.25rem); display: flex; flex-direction: column; gap: 0.9rem; min-width: 0; }
.teaser h2 { color: var(--dark-ink); }
.teaser .small { color: var(--dark-ink); opacity: 0.75; }
.teaser .eyebrow { color: #5ccac4; }
.teaser { border-top: 4px solid #5ccac4; }

/* Centres */
#centres { display: flex; flex-direction: column; gap: 1.5rem; padding-block: 1rem 3.5rem; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: var(--r); padding: 1.5rem; display: flex; flex-direction: column; gap: 0.6rem; }
.card h3 { font-size: 1.75rem; }
.card h3 a { text-decoration: none; }
.card .hours { color: var(--muted); font-size: 1rem; }
.card .tel { font-weight: 700; font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.card .tel a { text-decoration: none; }
.card .actions { margin-top: auto; padding-top: 0.5rem; }
.more { font-weight: 700; }

/* Services */
.band { background: var(--band); padding-block: 3.5rem; }
.band .wrap { display: flex; flex-direction: column; gap: 1.75rem; }
.services { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.75rem 2.5rem; }
.services li { display: flex; flex-direction: column; gap: 0.4rem; padding-top: 1rem; border-top: 2px solid var(--accent); }
.services p { max-width: 34rem; }
.rac { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2.5rem; padding-block: 3.5rem; align-items: start; }
.rac-txt { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: flex; flex-direction: column; gap: 0.9rem; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 2.2rem 1fr; gap: 0.75rem; align-items: baseline; }
.steps li::before { content: counter(s); font-family: var(--display); color: var(--ink); background: var(--accent-soft); border: 1px solid var(--accent); width: 2.2rem; height: 2.2rem; border-radius: 50%; display: grid; place-items: center; font-size: 1.05rem; }

/* Page centre */
.infos { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; padding-block: 0 3.5rem; }
.info-block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 1.5rem; display: flex; flex-direction: column; gap: 0.75rem; min-width: 0; }
.info-block h2 { font-family: var(--body); font-weight: 700; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent); }
.info-block h2:not(:first-child) { margin-top: 0.75rem; }
.big { font-size: 1.35rem; font-weight: 700; color: var(--ink); }
.big a { text-decoration: none; font-variant-numeric: tabular-nums; }
.hours-t { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
.hours-t th, .hours-t td { text-align: left; padding: 0.45rem 0; border-bottom: 1px solid var(--line); }
.hours-t th { font-weight: 700; width: 40%; }
.hours-t .ferme { color: var(--muted); }
.hours-t .ferme th { font-weight: 400; }
.note { color: var(--muted); font-size: 1rem; }
.zone-c { display: flex; flex-direction: column; gap: 0.9rem; padding-block: 0 3.5rem; }
.zone-c p { max-width: 42rem; }
.avis { font-weight: 700; }

/* Test auditif */
.warn { background: var(--band); border-left: 3px solid var(--accent); padding: 0.9rem 1.1rem; max-width: 46rem; font-size: 1rem; }
.test { display: flex; flex-direction: column; gap: 1.75rem; padding-block: 0 4rem; max-width: 52rem; }
.progress { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.4rem; font-size: 0.9rem; font-weight: 700; color: var(--muted); }
.progress li { border-top: 3px solid var(--line); padding-top: 0.4rem; }
.progress li.on { border-top-color: var(--accent); color: var(--ink); }
.step { display: flex; flex-direction: column; gap: 1.1rem; }
.quiz { display: flex; flex-direction: column; gap: 0.6rem; }
.quiz fieldset { border: 1px solid var(--line); border-radius: var(--r); margin: 0; padding: 0.9rem 1rem 1rem; display: flex; flex-direction: column; gap: 0.6rem; }
.quiz legend { padding: 0; float: left; width: 100%; font-weight: 700; color: var(--ink); }
.opts { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.opts label { position: relative; }
.opts input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.opts span { display: inline-block; min-width: 6.5rem; text-align: center; padding: 0.55rem 1rem; border: 1px solid var(--ink); border-radius: var(--r); cursor: pointer; }
.opts input:checked + span { background: var(--btn); color: var(--btn-ink); }
.opts input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 2px; }
.check { margin: 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: 0.4rem; }
.listen { border: 1px solid var(--line); border-radius: var(--r); padding: 2rem 1rem; display: flex; flex-direction: column; align-items: center; gap: 0.9rem; text-align: center; }
.t-count { font-family: var(--display); font-size: 1.6rem; color: var(--ink); }
.ear { width: 64px; height: 64px; border-radius: 50%; border: 2px solid var(--ink); position: relative; }
.ear::after { content: "D"; position: absolute; inset: 0; display: grid; place-items: center; font: 700 1.3rem var(--body); color: var(--ink); }
.ear.l::after { content: "G"; }
.ear.pulse { animation: pulse 2s ease-out; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 var(--line); } 50% { box-shadow: 0 0 0 18px transparent; } 100% { box-shadow: none; } }
.btn-no { background: transparent; color: var(--ink); border-color: var(--ink); }
.result { border-radius: var(--r); padding: 1.5rem; display: flex; flex-direction: column; gap: 0.6rem; }
.result.ok { background: var(--ok-bg); } .result.ok h2 { color: var(--ok); }
.result.mid { background: var(--mid-bg); } .result.mid h2 { color: var(--mid); }
.result.high { background: var(--high-bg); } .result.high h2 { color: var(--high); }
.det { margin: 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: 0.3rem; }
.rdv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; }
.rdv .btn { text-align: center; }

/* Pied de page : logo blanc sur noir */
.foot { background: var(--dark); color: var(--dark-ink); padding-block: 3rem; font-size: 1rem; }
.foot .wrap { display: flex; flex-direction: column; gap: 1.75rem; }
.f-logo { width: 220px; filter: invert(1); }
.foot a { color: var(--dark-ink); }
.f-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.f-c { display: flex; flex-direction: column; gap: 0.3rem; }
.f-v { font-family: var(--display); color: #5ccac4; font-size: 1.3rem; }
.f-small { opacity: 0.7; font-size: 0.9rem; max-width: 46rem; }

@media (max-width: 860px) {
  .hero-in, .rac, .infos { grid-template-columns: 1fr; }
  .cards, .f-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .services, .rdv { grid-template-columns: 1fr; }
  .btn { width: 100%; text-align: center; }
  .top nav .nav-test { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) { .ear.pulse { animation: none; } }
/* Spécialité mise en avant : le sur-mesure occupe toute la largeur */
.services li:first-child { grid-column: 1 / -1; }
.services li:first-child h3 { font-size: 1.6rem; }
.services li:first-child p { max-width: 46rem; }

/* Photos des centres */
.photos { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 0.75rem; padding-block: 0 3.5rem; }
.photos figure { margin: 0; min-width: 0; }
.photos img { display: block; width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r); }
.photos figure:first-child img { aspect-ratio: auto; max-height: 26rem; }
@media (max-width: 760px) { .photos { grid-template-columns: 1fr 1fr; } .photos figure:first-child { grid-column: 1 / -1; } }
