/* Kerlan Diagnostics — site de démonstration La Balise.
   Aucune règle inline dans la page : la CSP du domaine (style-src 'self') les bloquerait. */

@font-face { font-family: "Archivo"; src: url("/exemples/diagnostiqueur/fonts/archivo.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url("/exemples/diagnostiqueur/fonts/hanken.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

/* Contrastes (WCAG) : navy/mist-bg 14.6 · muted/mist-bg 6.1 · white/navy 16.0 · white/teal 5.6 · green/navy 7.4 · mist/navy 8.6 */
:root {
  --navy: #10243A;
  --navy-2: #1A3550;
  --navy-3: #284866;
  --bg: #EAF0F5;
  --white: #FFFFFF;
  --card: #FFFFFF;
  --ink: #10243A;
  --muted: #4F6174;
  --mist: #B6C6D6;
  --teal: #0B6B75;
  --teal-2: #0E808B;
  --green: #3FBF7F;
  --line: rgba(16, 36, 58, .14);
  --line-light: rgba(255, 255, 255, .14);
  --radius: 18px;
  --shadow: 0 1px 0 rgba(16, 36, 58, .05), 0 24px 46px -30px rgba(16, 36, 58, .5);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --display: "Archivo", system-ui, sans-serif;
  --font: "Hanken Grotesk", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.6 var(--font); }
main, .foot { overflow-x: clip; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 800; line-height: 1.02; letter-spacing: -0.03em; }
h1 em, h2 em { font-style: normal; font-weight: 500; color: var(--teal); }
.visit h2 em { color: var(--green); }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 6px; }
.visit :focus-visible, .foot :focus-visible { outline-color: var(--green); }
small { font-size: .84em; }

/* ---------- Bandeau démo ---------- */
.demo-bar { position: relative; z-index: 60; display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 4px 16px; padding: 8px 16px; background: var(--navy); color: var(--mist); font-size: 13px; text-align: center; }
.demo-bar strong { color: var(--white); }
.demo-bar a { color: var(--green); font-weight: 700; text-decoration: none; }
.demo-bar a:hover { text-decoration: underline; }

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 15px 24px; border: 0; border-radius: 12px; font: 700 16px/1.1 var(--display); text-decoration: none; text-align: center; cursor: pointer; transition: transform .25s var(--ease), background-color .2s ease, color .2s ease; }
.btn-teal { background: var(--teal); color: var(--white); }
.btn-teal:hover { background: var(--teal-2); transform: translateY(-2px); }
.btn-teal:active { transform: translateY(1px) scale(.98); }
.btn-line { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--white); }
.btn-block { width: 100%; }

/* ---------- En-tête ---------- */
.top { position: sticky; top: 0; z-index: 50; background: rgba(234, 240, 245, .92); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid transparent; transition: border-color .3s ease; }
.top.is-scrolled { border-color: var(--line); }
.top-inner { display: flex; align-items: center; gap: 28px; min-height: 70px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { width: 44px; height: 44px; }
.brand-text { display: grid; }
.brand-name { font: 800 21px/1 var(--display); letter-spacing: -0.03em; }
.brand-sub { margin-top: 3px; font-size: 13px; color: var(--muted); }
.nav { display: flex; gap: 26px; margin-left: auto; }
.nav a { color: var(--muted); font-weight: 600; font-size: 15px; text-decoration: none; transition: color .2s ease; }
.nav a:hover { color: var(--ink); }
.top-cta { padding: 11px 18px; border-radius: 12px; background: var(--navy); color: var(--white); font: 700 15px var(--display); text-decoration: none; white-space: nowrap; transition: background-color .2s ease; }
.top-cta:hover { background: var(--navy-3); }

/* ---------- Hero + questionnaire ---------- */
.hero { padding: 44px 0 90px; background: linear-gradient(180deg, transparent, rgba(255, 255, 255, .6)), radial-gradient(800px 460px at 88% 0%, rgba(11, 107, 117, .12), transparent 65%); }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.eyebrow { font: 700 13px var(--display); letter-spacing: .16em; text-transform: uppercase; color: var(--teal); }
.hero h1 { margin-top: 16px; font-size: clamp(38px, 5vw, 66px); }
.hero-lead { margin-top: 22px; max-width: 32em; font-size: 19px; color: var(--muted); }
.hero-proofs { display: grid; gap: 10px; margin: 28px 0 0; padding: 0; list-style: none; color: var(--muted); }
.hero-proofs li { position: relative; padding-left: 30px; }
.hero-proofs li::before { content: ""; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border-radius: 50%; background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22'%3E%3Cpath d='M6 11.5l3.5 3.5L16 8' fill='none' stroke='%2310243A' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100%; }
.hero-proofs strong { color: var(--ink); }

.quiz { padding: 24px; border-radius: 24px; background: var(--card); box-shadow: 0 40px 70px -40px rgba(16, 36, 58, .6), 0 0 0 1px var(--line); }
.quiz-title { font-size: 26px; }
.q { margin: 16px 0 0; padding: 0; border: 0; min-width: 0; }
.q legend { padding: 0; margin-bottom: 8px; font: 700 14px var(--display); letter-spacing: .02em; color: var(--muted); text-transform: uppercase; }
.q legend small { font: 400 13px var(--font); text-transform: none; letter-spacing: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.chip span { display: block; padding: 10px 16px; border-radius: 10px; background: var(--bg); box-shadow: inset 0 0 0 1.5px rgba(16, 36, 58, .2); font: 600 15px/1.1 var(--font); transition: background-color .2s ease, color .2s ease, transform .25s var(--ease); }
.chip:hover span { transform: translateY(-2px); }
.chip input:checked + span { background: var(--navy); color: var(--white); box-shadow: none; }
.chip input:focus-visible + span { outline: 3px solid var(--teal); outline-offset: 2px; }
.field { display: block; margin-top: 16px; }
.field > span { display: block; margin: 0 0 6px 2px; font: 700 14px var(--display); letter-spacing: .02em; color: var(--muted); text-transform: uppercase; }
.field input, .field select { width: 100%; padding: 13px 14px; border: 0; border-radius: 12px; background: var(--bg); color: var(--ink); font: 600 16px var(--font); box-shadow: inset 0 0 0 1.5px rgba(16, 36, 58, .25); }
.field input:focus, .field select:focus { outline: none; box-shadow: inset 0 0 0 2px var(--navy), 0 0 0 4px rgba(11, 107, 117, .3); }
.list { margin-top: 18px; padding: 18px; border-radius: 18px; background: var(--navy); color: var(--white); }
.diag-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.diag-list li { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 10px 12px; border-radius: 12px; background: var(--navy-2); animation: pop .35s var(--ease) both; }
.diag-list strong { font: 700 16px var(--display); }
.diag-list .price { font-weight: 700; color: var(--green); font-variant-numeric: tabular-nums; }
.diag-list small { grid-column: 1 / -1; color: var(--mist); }
.total { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line-light); }
.total p:first-child { display: grid; color: var(--mist); font-size: 14px; }
.total-label { color: var(--white); font: 700 18px var(--display); }
.total-price { font: 800 38px/1 var(--display); letter-spacing: -0.03em; color: var(--green); font-variant-numeric: tabular-nums; }
.note { margin: 12px 0 14px; padding: 10px 12px; border-radius: 10px; background: rgba(63, 191, 127, .14); color: #D6F3E3; font-size: 14px; }
.note:empty { display: none; }
.fine { margin-top: 12px; font-size: 13px; color: var(--muted); text-align: center; }
.fine-left { text-align: left; margin-top: 22px; }
.list .fine { color: var(--mist); }
@keyframes pop { from { opacity: 0; transform: translateY(8px); } }

/* ---------- Énergie ---------- */
.energy { padding: 100px 0; background: var(--white); }
.kicker { font: 700 13px var(--display); letter-spacing: .16em; text-transform: uppercase; color: var(--teal); }
.kicker-teal { color: var(--green); }
.energy h2, .visit h2, .about h2, .book h2 { margin-top: 12px; font-size: clamp(34px, 4.4vw, 56px); }
.section-lead { margin-top: 18px; max-width: 38em; font-size: 18px; color: var(--muted); }
.scale { position: relative; display: grid; gap: 6px; max-width: 640px; margin-top: 34px; }
.scale-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; height: 44px; padding: 0 16px; border-radius: 6px 22px 22px 6px; color: var(--navy); font: 800 22px var(--display); transition: transform .4s var(--ease), box-shadow .3s ease, opacity .3s ease; opacity: .55; }
.scale-bar small { font: 600 13px var(--font); }
.scale-bar.is-on { opacity: 1; transform: translateX(10px) scale(1.03); box-shadow: 0 14px 28px -14px rgba(16, 36, 58, .6); }
.s-a { width: 42%; background: #4CC28A; }
.s-b { width: 52%; background: #7ACB6E; }
.s-c { width: 62%; background: #C7DB4A; }
.s-d { width: 72%; background: #F4DE50; }
.s-e { width: 82%; background: #F6B14E; }
.s-f { width: 92%; background: #F07C48; }
.s-g { width: 100%; background: #E5574F; }
.scale-pin { position: absolute; left: 0; top: 0; z-index: 2; padding: 6px 12px; border-radius: 10px; background: var(--navy); color: var(--white); font: 700 14px var(--display); white-space: nowrap; transition: top .5s var(--ease), left .5s var(--ease); pointer-events: none; opacity: 0; }
.scale-pin.is-visible { opacity: 1; }
.scale-note { min-height: 3.2em; margin-top: 22px; max-width: 40em; font-size: 18px; }
.era { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.era button { padding: 11px 16px; border: 0; border-radius: 10px; background: var(--bg); color: var(--ink); font: 600 15px var(--font); cursor: pointer; box-shadow: inset 0 0 0 1.5px rgba(16, 36, 58, .2); transition: background-color .2s ease, color .2s ease; }
.era button[aria-pressed="true"] { background: var(--navy); color: var(--white); box-shadow: none; }

/* ---------- La visite ---------- */
.visit { padding: 100px 0; background: var(--navy); color: var(--white); }
.visit-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.steps { display: grid; gap: 14px; margin: 28px 0 0; padding: 0; list-style: none; counter-reset: s; }
.steps li { position: relative; padding: 16px 18px 16px 70px; border-radius: 16px; background: var(--navy-2); color: var(--mist); counter-increment: s; }
.steps li::before { content: counter(s); position: absolute; left: 18px; top: 14px; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--green); color: var(--navy); font: 800 18px var(--display); }
.steps strong { display: block; color: var(--white); font: 800 19px var(--display); }
.thermal { margin: 0; }
.thermal img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 22px; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .8); }
.thermal figcaption { margin-top: 12px; color: var(--mist); font-size: 14px; }

/* ---------- À propos ---------- */
.about { padding: 100px 0; background: var(--white); }
.about-grid { display: grid; grid-template-columns: .75fr 1.25fr; gap: 56px; align-items: center; }
.about-photo { margin: 0; justify-self: center; width: min(100%, 340px); }
.about-photo img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 26px; box-shadow: var(--shadow); }
.badges { display: grid; gap: 8px; margin: 24px 0 0; padding: 0; list-style: none; }
.badges li { position: relative; padding: 10px 14px 10px 44px; border-radius: 12px; background: var(--bg); font-weight: 600; }
.badges li::before { content: ""; position: absolute; left: 14px; top: 13px; width: 20px; height: 20px; border-radius: 50%; background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22'%3E%3Cpath d='M6 11.5l3.5 3.5L16 8' fill='none' stroke='%2310243A' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100%; }

/* ---------- Rendez-vous ---------- */
.book { padding: 100px 0; }
.book-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; margin-top: 34px; align-items: start; }
.slots { display: grid; gap: 16px; }
.slots[hidden] { display: none; }
.days { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.day { padding: 12px 8px; border: 0; border-radius: 14px; background: var(--card); color: var(--ink); font: 700 16px/1.2 var(--font); cursor: pointer; text-align: center; box-shadow: inset 0 0 0 1.5px rgba(16, 36, 58, .2); transition: transform .25s var(--ease), background-color .2s ease; }
.day:hover { transform: translateY(-2px); }
.day small { display: block; color: var(--muted); font-weight: 400; }
.day[aria-checked="true"] { background: var(--navy); color: var(--white); box-shadow: none; }
.day[aria-checked="true"] small { color: var(--mist); }
.hours { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.hour { display: grid; padding: 14px 8px; border: 0; border-radius: 14px; background: var(--card); color: var(--ink); font: 700 18px var(--display); cursor: pointer; box-shadow: inset 0 0 0 1.5px rgba(16, 36, 58, .2); transition: background-color .2s ease, transform .25s var(--ease); }
.hour:hover { transform: translateY(-2px); }
.hour small { color: var(--muted); font: 400 14px var(--font); }
.hour[aria-checked="true"] { background: var(--teal); color: var(--white); box-shadow: none; }
.hour[aria-checked="true"] small { color: #CFEAEC; }
.book-form, .book-done { padding: 26px; border-radius: 22px; background: var(--card); box-shadow: 0 30px 60px -36px rgba(16, 36, 58, .5), 0 0 0 1px var(--line); }
.pick { margin-bottom: 14px; padding: 12px 14px; border-radius: 12px; background: var(--bg); color: var(--navy); font-weight: 700; }
.b-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.field-wide { grid-column: 1 / -1; }
.b-grid .field { margin-top: 12px; }
.form-error { min-height: 1.4em; margin: 12px 0 8px; color: #B3261E; font-weight: 700; font-size: 15px; }
.book-done { text-align: center; }
.book-done[hidden] { display: none; }
.book-done:focus { outline: none; }
.book-done h3 { margin-top: 10px; font-size: 30px; }
.book-done p { margin-top: 8px; color: var(--muted); }
.book-done .btn { margin-top: 16px; }
.done-mark { width: 84px; margin: 0 auto; animation: stamp .6s var(--ease) both; }
.done-tick { stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw .6s .25s var(--ease) forwards; }
@keyframes stamp { from { transform: scale(1.6) rotate(-12deg); opacity: 0; } }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- Pied de page ---------- */
.foot { padding: 56px 0; background: var(--navy); color: var(--mist); font-size: 15px; }
.foot-grid { display: grid; grid-template-columns: 1.3fr 1fr 1.2fr; gap: 32px; }
.brand-name-foot { margin-bottom: 12px; color: var(--white); font-size: 24px; }
.foot a { color: var(--white); }
.foot-small { margin-top: 6px; font-size: 13px; }
.foot-credit a { color: var(--green); font-weight: 700; text-decoration: none; }
.foot-credit a:hover { text-decoration: underline; }

.sticky-cta { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1040px) {
  .nav { display: none; }
  .top-cta { margin-left: auto; }
  .hero-grid, .visit-grid, .about-grid, .book-grid { grid-template-columns: 1fr; }
  .about-photo { order: -1; width: min(100%, 280px); }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .demo-long { display: none; }
  .top-inner { min-height: 60px; gap: 10px; }
  .brand-mark { width: 38px; height: 38px; }
  .brand-name { font-size: 17px; }
  .brand-sub { display: none; }
  .top-cta { display: none; }
  .hero { padding: 28px 0 64px; }
  .hero-lead { font-size: 17px; }
  .quiz { padding: 16px 14px; border-radius: 20px; }
  .total-price { font-size: 32px; }
  .energy, .visit, .about, .book { padding: 72px 0; }
  .scale-bar small { display: none; }
  .b-grid { grid-template-columns: 1fr; }
  .book-form, .book-done { padding: 22px 16px; }
  .foot { padding-bottom: 100px; }
  .foot-grid { grid-template-columns: 1fr; }
  .sticky-cta { display: block; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 55; transition: transform .35s var(--ease), opacity .3s ease; }
  .sticky-cta .btn { width: 100%; box-shadow: 0 16px 30px -10px rgba(16, 36, 58, .6); }
  .sticky-cta.is-away { transform: translateY(150%); opacity: 0; pointer-events: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Les éléments de grille peuvent rétrécir sous la largeur de leur contenu */
.hero-grid > *, .visit-grid > *, .about-grid > *, .book-grid > * { min-width: 0; }
