/* ==========================================================================
   Salama Harbil — Contrôle technique Marrakech
   Feuille de style unique. Aucun framework.
   Palette : les couleurs officielles du réseau Salama (#005a9e, #003366, #0099ca).
   ========================================================================== */

/* --- 1. Reset ------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { overflow-x: hidden; }   /* aucun débordement latéral possible */
body, h1, h2, h3, h4, p, ul, ol, figure, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, iframe { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: inherit; }
table { border-collapse: collapse; width: 100%; }

/* --- 2. Jetons ---------------------------------------------------------- */
:root {
  /* couleur */
  --ink:        #003366;   /* --salama-dark du site officiel */
  --ink-2:      #0d3a68;
  --blue:       #005a9e;
  --blue-deep:  #003f6f;
  --blue-pale:  #e4eef6;
  --cyan:       #0099ca;   /* le cyan de l'arc du logo Salama */
  --cyan-light: #5ecbee;   /* la version lisible sur fond bleu foncé */
  --concrete:   #edf1f4;
  --paper:      #ffffff;
  --line:       #d6dde4;
  --line-soft:  #e7ecf1;
  --muted:      #5c6e7e;
  --conforme:   #16875a;
  --refus:      #c1372c;

  /* typo */
  --display: "Readex Pro", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --body:    "IBM Plex Sans Arabic", system-ui, -apple-system, sans-serif;
  --data:    "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;

  --fs-hero:  clamp(2.3rem, 5.6vw, 4.1rem);
  --fs-h2:    clamp(1.75rem, 3.4vw, 2.6rem);
  --fs-h3:    clamp(1.15rem, 1.8vw, 1.4rem);
  --fs-lede:  clamp(1.05rem, 1.5vw, 1.2rem);
  --fs-sm:    0.875rem;
  --fs-xs:    0.78rem;

  /* mesure */
  --wrap: 1140px;
  --gut: 1.5rem;
  --r-sm: 6px;
  --r: 12px;
  --r-lg: 20px;

  --shadow: 0 1px 2px rgba(7, 26, 43, .06), 0 8px 24px -12px rgba(7, 26, 43, .18);
  --shadow-lg: 0 2px 4px rgba(7, 26, 43, .08), 0 24px 48px -20px rgba(7, 26, 43, .3);
}

/* --- 3. Base ------------------------------------------------------------ */
body {
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--concrete);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .u-display {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
}
h1 { font-size: var(--fs-hero); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); letter-spacing: -0.01em; }
p  { max-width: 68ch; }

:is(a, button, input, select, summary):focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

::selection { background: var(--cyan-light); color: var(--ink); }

/* --- 4. Blocs de mise en page ------------------------------------------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gut); }
.wrap--narrow { max-width: 820px; }

.band { padding-block: clamp(3.5rem, 7vw, 6rem); }
.band--tight { padding-block: clamp(2.5rem, 4vw, 3.5rem); }
.band--paper { background: var(--paper); }
.band--ink { background: var(--ink); color: #fff; }
.band--ink p { color: rgba(255, 255, 255, .78); }

.eyebrow {
  font-family: var(--data);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: .9rem;
}
.band--ink .eyebrow { color: var(--cyan-light); }

.lede { font-size: var(--fs-lede); color: var(--muted); }
.band--ink .lede { color: rgba(255, 255, 255, .8); }

.head { max-width: 62ch; margin-bottom: clamp(2rem, 3.5vw, 3rem); }
.head > .lede { margin-top: 1rem; }

/* --- 5. Boutons --------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: .85rem 1.5rem;
  border-radius: var(--r-sm);
  font-family: var(--display);
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: background-color .18s ease, color .18s ease, transform .18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--blue); color: #fff; }
.btn--primary:hover { background: var(--blue-deep); }
.btn--accent { background: #fff; color: var(--blue); }
.btn--accent:hover { background: var(--blue-pale); }
.btn--ghost { border: 1.5px solid var(--line); color: var(--ink); background: var(--paper); }
.btn--ghost:hover { border-color: var(--blue); color: var(--blue); }
.band--ink .btn--ghost { background: transparent; border-color: rgba(255,255,255,.3); color: #fff; }
.band--ink .btn--ghost:hover { border-color: #fff; color: #fff; }
.btn--lg { padding: 1rem 1.9rem; font-size: 1.02rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }

/* --- 6. En-tête --------------------------------------------------------- */
.topbar {
  background: var(--ink);
  color: rgba(255, 255, 255, .72);
  font-size: var(--fs-xs);
}
.topbar__in { display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; align-items: center; padding-block: .55rem; }
.topbar a { text-decoration: none; }
.topbar a:hover { color: #fff; }
.topbar__sep { margin-inline-start: auto; }

.site-head {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.site-head__in { display: flex; align-items: center; gap: 1.25rem; min-height: 72px; }
.site-head__in > * { flex: none; }
.site-head__in > .brand { flex: 0 1 auto; }

.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; margin-inline-end: auto; min-width: 0; }
.brand > span { min-width: 0; }
.brand__mark { flex: none; height: 34px; width: auto; }
.brand__split { flex: none; width: 1px; height: 26px; background: var(--line); }
.brand__name { font-family: var(--display); font-weight: 700; font-size: 1.02rem; line-height: 1.1; letter-spacing: -0.02em;
  display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand__sub { display: block; font-family: var(--data); font-size: .62rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

.nav { display: flex; align-items: center; gap: .25rem; }
.nav a {
  padding: .5rem .8rem;
  border-radius: var(--r-sm);
  font-size: .93rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink-2);
}
.nav a:hover { background: var(--blue-pale); color: var(--blue-deep); }
.nav a[aria-current="page"] { color: var(--blue); font-weight: 600; }

.langs { display: flex; gap: .2rem; flex: none; }
.lang {
  padding: .4rem .55rem;
  border: 1.5px solid var(--line);
  border-radius: var(--r-sm);
  font-family: var(--data);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-decoration: none;
  color: var(--muted);
}
.lang:hover { border-color: var(--blue); color: var(--blue); }
.lang[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

.burger { display: none; width: 44px; height: 44px; align-items: center; justify-content: center; border: 1.5px solid var(--line); border-radius: var(--r-sm); }
.burger span, .burger span::before, .burger span::after {
  display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px;
}
.burger span { position: relative; }
.burger span::before, .burger span::after { content: ""; position: absolute; inset-inline-start: 0; }
.burger span::before { top: -6px; }
.burger span::after { top: 6px; }

/* --- 7. La plaque : élément signature ----------------------------------- */
.plate-field { display: grid; gap: .7rem; }
.plate-field__label { font-family: var(--data); font-size: var(--fs-xs); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.band--ink .plate-field__label { color: rgba(255, 255, 255, .6); }

/* la plaque garde toujours l'ordre de lecture physique : série | lettre | préfecture */
.plate {
  direction: ltr;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, auto) auto minmax(0, auto);
  align-items: stretch;
  gap: 0;
  width: 100%;
  max-width: 420px;
  background: #fff;
  border: 3px solid #0d0d0d;
  border-radius: 9px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.plate input, .plate select {
  border: 0;
  background: transparent;
  font-family: var(--data);
  font-weight: 600;
  color: #0d0d0d;
  text-align: center;
  padding: .7rem .4rem;
  min-width: 0;
  appearance: none;
}
.plate input::placeholder { color: #b9bfc5; }
.plate__serial { font-size: clamp(1.6rem, 4.6vw, 2.3rem); letter-spacing: .06em; }
.plate__letter {
  font-family: var(--body) !important;
  font-size: clamp(1.4rem, 3.6vw, 1.9rem);
  padding-inline: .85rem;
  text-align: center;
  text-align-last: center;
  cursor: pointer;
}
.plate__region { font-size: clamp(1.2rem, 3vw, 1.6rem); width: 3.6ch; min-width: 0; }
.plate__bar { width: 3px; background: #0d0d0d; }
.plate:focus-within { box-shadow: 0 0 0 4px var(--cyan), var(--shadow-lg); }

.plate-foreign { display: none; }
.plate-foreign input {
  width: 100%;
  max-width: 420px;
  padding: .9rem 1rem;
  border: 1.5px solid var(--line);
  border-radius: var(--r-sm);
  background: #fff;
  font-family: var(--data);
  font-size: 1.1rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.is-foreign .plate { display: none; }
.is-foreign .plate-foreign { display: block; }

.plate-switch { display: flex; gap: .4rem; }
.plate-switch button {
  padding: .4rem .8rem;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--muted);
}
.plate-switch button[aria-pressed="true"] { border-color: var(--blue); background: var(--blue-pale); color: var(--blue-deep); font-weight: 600; }
.band--ink .plate-switch button { border-color: rgba(255,255,255,.26); color: rgba(255,255,255,.72); }
.band--ink .plate-switch button[aria-pressed="true"] { background: #fff; border-color: #fff; color: var(--ink); }

/* --- 8. Hero ------------------------------------------------------------ */
.hero { position: relative; background: var(--ink); color: #fff; overflow: hidden; }
/* l'arc du logo, repris en filet lumineux sous le hero */
.hero::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--blue) 0%, var(--cyan) 50%, var(--blue) 100%);
}
.hero__in {
  display: grid;
  gap: clamp(2.5rem, 5vw, 4.5rem);
  align-items: center;
  padding-block: clamp(3rem, 7vw, 5.5rem) clamp(3.5rem, 7vw, 6rem);
}
@media (min-width: 900px) { .hero__in { grid-template-columns: 1.05fr .95fr; } }

.hero h1 { color: #fff; max-width: 17ch; }
.hero h1 em { font-style: normal; color: var(--cyan-light); }
.hero__lede { margin-top: 1.25rem; font-size: var(--fs-lede); color: rgba(255, 255, 255, .78); max-width: 46ch; }

.hero__badges { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.75rem; }
.chip {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .35rem .75rem;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 999px;
  font-size: var(--fs-xs);
  font-weight: 500;
  color: rgba(255, 255, 255, .85);
}

.booker {
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: var(--r-lg);
  padding: clamp(1.4rem, 3vw, 2rem);
  display: grid;
  gap: 1.25rem;
}
.booker__foot { display: flex; flex-wrap: wrap; gap: .9rem; align-items: center; }

.next-slot {
  display: flex; align-items: center; gap: .6rem;
  font-size: var(--fs-sm);
  color: rgba(255, 255, 255, .8);
}
.next-slot b { color: #fff; font-family: var(--data); font-weight: 600; }
.dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--conforme); box-shadow: 0 0 0 4px rgba(22, 135, 90, .25); }

/* animation d'arrivée : la plaque se pose */
@media (prefers-reduced-motion: no-preference) {
  .hero h1, .hero__lede, .hero__badges { animation: rise .6s cubic-bezier(.2, .7, .3, 1) both; }
  .hero__lede { animation-delay: .07s; }
  .hero__badges { animation-delay: .14s; }
  .booker { animation: snap .55s cubic-bezier(.2, .8, .25, 1) .1s both; }
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes snap { from { opacity: 0; transform: translateY(22px) scale(.97); } }

/* --- 9. Cartes et grilles ----------------------------------------------- */
.grid { display: grid; gap: 1.25rem; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(258px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

.card {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  padding: 1.5rem;
}
.card h3 { margin-bottom: .5rem; }
.card p { color: var(--muted); font-size: .95rem; }
.card--link { text-decoration: none; transition: border-color .18s ease, transform .18s ease; }
.card--link:hover { border-color: var(--blue); transform: translateY(-2px); }

.icon {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  margin-bottom: 1rem;
  border-radius: 9px;
  background: var(--blue-pale);
  color: var(--blue);
}
.icon svg { width: 20px; height: 20px; }

/* chiffre-clé */
.stat { display: grid; gap: .25rem; }
.stat__n { font-family: var(--data); font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: 600; line-height: 1; letter-spacing: -0.02em; }
.stat__l { font-size: var(--fs-sm); color: var(--muted); }
.band--ink .stat__l { color: rgba(255, 255, 255, .7); }
.band--ink .stat__n { color: var(--cyan-light); }

/* --- 10. Déroulé de la visite (séquence réelle, donc numérotée) --------- */
.flow { counter-reset: step; display: grid; gap: 0; }
.flow__item {
  counter-increment: step;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem;
  padding-block: 1.6rem;
  border-top: 1px solid var(--line);
}
.flow__item:last-child { border-bottom: 1px solid var(--line); }
.flow__item::before {
  content: counter(step);
  grid-row: span 2;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--cyan-light);
  font-family: var(--data);
  font-weight: 600;
  font-size: 1.05rem;
}
.flow__item h3 { align-self: center; }
.flow__item p { grid-column: 2; margin-top: .35rem; color: var(--muted); font-size: .95rem; }

/* --- 11. Points de contrôle (numérotation officielle de l'annexe) ------- */
.points { display: grid; gap: .6rem; }
.point {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  overflow: hidden;
}
.point > summary {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.3rem;
  cursor: pointer;
  list-style: none;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.05rem;
}
.point > summary::-webkit-details-marker { display: none; }
.point__n {
  flex: none;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 8px;
  background: var(--blue-pale);
  color: var(--blue-deep);
  font-family: var(--data);
  font-size: .95rem;
}
.point__caret { margin-inline-start: auto; color: var(--muted); transition: transform .2s ease; }
.point[open] .point__caret { transform: rotate(180deg); }
.point[open] > summary { border-bottom: 1px solid var(--line-soft); }
.point__body { padding: 1.1rem 1.3rem 1.3rem; display: grid; gap: 1.1rem; }
.point__group h4 { font-size: var(--fs-xs); font-family: var(--data); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: .5rem; }
.point__group ul { display: flex; flex-wrap: wrap; gap: .4rem; }
.point__group li {
  padding: .3rem .7rem;
  background: var(--concrete);
  border-radius: 999px;
  font-size: var(--fs-sm);
  color: var(--ink-2);
}

/* --- 12. Tableau réglementaire ------------------------------------------ */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); }
.table { font-size: .95rem; }
.table th, .table td { padding: .95rem 1.1rem; text-align: start; vertical-align: top; }
.table thead th {
  background: var(--ink);
  color: #fff;
  font-family: var(--data);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.table tbody tr + tr { border-top: 1px solid var(--line-soft); }
.table tbody th { font-weight: 600; }
.table td.num { font-family: var(--data); font-weight: 600; white-space: nowrap; }

/* --- 13. Formulaires ---------------------------------------------------- */
.field { display: grid; gap: .4rem; }
.field > label, .legend {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--ink-2);
}
.field .hint { font-size: var(--fs-xs); color: var(--muted); }
.input, .select {
  width: 100%;
  padding: .8rem .95rem;
  border: 1.5px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--paper);
  transition: border-color .15s ease;
}
.select { appearance: none; cursor: pointer; padding-inline-end: 2.4rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235c6e7e' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 18px;
  background-position: right .85rem center;
}
[dir="rtl"] .select { background-position: left .85rem center; }
.input:focus, .select:focus { border-color: var(--blue); }
.input[aria-invalid="true"], .select[aria-invalid="true"] { border-color: var(--refus); }
.error { font-size: var(--fs-xs); color: var(--refus); font-weight: 500; }
.hp { position: absolute; inset-inline-start: -9999px; }

fieldset { border: 0; padding: 0; margin: 0; }

/* indicatif du pays collé au numéro */
.phone { display: grid; grid-template-columns: minmax(8rem, auto) minmax(0, 1fr); gap: .5rem; }
.phone .select { padding-inline-end: 2rem; background-position: right .6rem center; }
[dir="rtl"] .phone .select { background-position: left .6rem center; }
@media (max-width: 420px) { .phone { grid-template-columns: 1fr; } }

/* choix en cartes radio */
.choices { display: grid; gap: .6rem; margin-top: .6rem; }
@media (min-width: 620px) { .choices--2 { grid-template-columns: 1fr 1fr; } }
.choice { position: relative; display: block; }
.choice input { position: absolute; opacity: 0; width: 0; height: 0; }
.choice__box {
  display: grid;
  gap: .2rem;
  padding: .9rem 1.1rem;
  border: 1.5px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--paper);
  transition: border-color .15s ease, background-color .15s ease;
}
.choice__box strong { font-weight: 600; font-size: .97rem; }
.choice__box span { font-size: var(--fs-xs); color: var(--muted); }
.choice:hover .choice__box { border-color: var(--blue); }
.choice input:checked + .choice__box { border-color: var(--blue); background: var(--blue-pale); box-shadow: inset 0 0 0 1px var(--blue); }
.choice input:focus-visible + .choice__box { outline: 3px solid var(--cyan); outline-offset: 2px; }

/* --- 14. Calculateur de prix ------------------------------------------- */
.calc {
  display: grid;
  gap: 1.5rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(1.4rem, 3vw, 2.2rem);
}
@media (min-width: 860px) { .calc { grid-template-columns: 1.15fr .85fr; align-items: start; } }
.calc__out {
  background: var(--ink);
  color: #fff;
  border-radius: var(--r);
  padding: 1.5rem;
  position: sticky;
  top: 96px;
}
.calc__total { font-family: var(--data); font-size: clamp(2.2rem, 6vw, 3rem); font-weight: 600; line-height: 1; letter-spacing: -0.03em; color: var(--cyan-light); }
.calc__total sup { font-family: var(--body); font-size: .9rem; font-weight: 500; color: rgba(255,255,255,.7); margin-inline-start: .3rem; letter-spacing: 0; }
.calc__lines { margin-top: 1.25rem; display: grid; gap: .5rem; font-size: var(--fs-sm); }
.calc__lines li { display: flex; justify-content: space-between; gap: 1rem; color: rgba(255, 255, 255, .75); }
.calc__lines b { font-family: var(--data); font-weight: 500; color: #fff; }
.calc__note { margin-top: 1.25rem; padding-top: 1.1rem; border-top: 1px solid rgba(255,255,255,.14); font-size: var(--fs-xs); color: rgba(255,255,255,.6); }

/* --- 15. Agenda de rendez-vous ----------------------------------------- */
.steps { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: 2rem; }
.steps li {
  display: flex; align-items: center; gap: .5rem;
  padding: .35rem .8rem .35rem .4rem;
  border-radius: 999px;
  font-size: var(--fs-sm);
  color: var(--muted);
  background: var(--paper);
  border: 1px solid var(--line-soft);
}
.steps li b {
  width: 24px; height: 24px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--concrete);
  font-family: var(--data);
  font-size: var(--fs-xs);
  font-weight: 600;
}
.steps li[aria-current="step"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.steps li[aria-current="step"] b { background: var(--cyan-light); color: var(--ink); }
.steps li[data-done="true"] b { background: var(--conforme); color: #fff; }

.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(1.4rem, 3vw, 2.2rem);
  display: grid;
  gap: 1.5rem;
}
.panel > h2 { font-size: clamp(1.4rem, 2.4vw, 1.75rem); }
.panel[hidden] { display: none; }
.panel > * { min-width: 0; }

.days {
  display: flex;
  gap: .5rem;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding-bottom: .5rem;
  scroll-snap-type: x proximity;
}
.day {
  flex: none;
  scroll-snap-align: start;
  width: 86px;
  min-height: 92px;
  padding: .75rem .5rem;
  border: 1.5px solid var(--line);
  border-radius: var(--r);
  background: var(--paper);
  text-align: center;
  transition: border-color .15s ease, background-color .15s ease;
}
.day__dow { font-size: var(--fs-xs); color: var(--muted); text-transform: capitalize; }
.day__d { font-family: var(--data); font-size: 1.45rem; font-weight: 600; line-height: 1.2; }
.day__m { font-size: var(--fs-xs); color: var(--muted); }
.day__free { margin-top: .3rem; font-size: .66rem; font-family: var(--body); color: var(--refus); }
.day:hover:not([disabled]) { border-color: var(--blue); }
.day[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: #fff; }
.day[aria-pressed="true"] :is(.day__dow, .day__m) { color: rgba(255,255,255,.7); }
.day[aria-pressed="true"] .day__free { color: var(--cyan-light); }

.day[disabled] { opacity: .4; cursor: not-allowed; }
.day[disabled] .day__free { color: var(--refus); }

.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: .5rem; }
.slots > * { min-width: 0; }
.slot {
  padding: .65rem .3rem;
  border: 1.5px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--paper);
  font-family: var(--data);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
}
.slot:hover:not([disabled]) { border-color: var(--blue); color: var(--blue-deep); }
.slot[aria-pressed="true"] { border-color: var(--blue); background: var(--blue); color: #fff; }
.slot[disabled] { opacity: .38; cursor: not-allowed; text-decoration: line-through; }

.recap { display: grid; gap: .6rem; padding: 1.1rem 1.25rem; background: var(--concrete); border-radius: var(--r); font-size: .95rem; }
.recap dl { display: grid; grid-template-columns: auto 1fr; gap: .4rem 1.25rem; margin: 0; }
.recap dt { color: var(--muted); font-size: var(--fs-sm); }
.recap dd { margin: 0; font-weight: 600; }
.recap dd.num { font-family: var(--data); }

.notice { padding: 1rem 1.2rem; border-radius: var(--r-sm); font-size: .93rem; border-inline-start: 4px solid; }
.notice--info { background: var(--blue-pale); border-color: var(--blue); color: var(--blue-deep); }
.notice--warn { background: #fff6dd; border-color: #e0a800; color: #8a6800; }
.notice--err  { background: #fdeceb; border-color: var(--refus); color: var(--refus); }

.ticket {
  background: var(--ink);
  color: #fff;
  border-radius: var(--r-lg);
  overflow: hidden;
}
.ticket__top { padding: clamp(1.5rem, 4vw, 2.2rem); text-align: center; }
.ticket__ref { font-family: var(--data); font-size: clamp(1.5rem, 5vw, 2.1rem); font-weight: 600; letter-spacing: .1em; color: var(--cyan-light); }
.ticket__when { font-family: var(--display); font-size: var(--fs-h3); margin-top: .75rem; }
.ticket__grid { display: grid; gap: 1px; background: rgba(255,255,255,.14); border-top: 1px solid rgba(255,255,255,.14); }
@media (min-width: 620px) { .ticket__grid { grid-template-columns: 1fr 1fr; } }
.ticket__cell { background: var(--ink); padding: 1.1rem 1.4rem; }
.ticket__cell dt { font-size: var(--fs-xs); color: rgba(255,255,255,.6); }
.ticket__cell dd { margin: .2rem 0 0; font-weight: 600; }

.spinner {
  width: 18px; height: 18px;
  border: 2.5px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
.btn--ghost .spinner { border-color: rgba(7,26,43,.2); border-top-color: var(--ink); }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2s; } }

.skeleton {
  background: linear-gradient(90deg, var(--concrete) 25%, #f6f8fa 50%, var(--concrete) 75%);
  background-size: 200% 100%;
  border-radius: var(--r-sm);
  animation: shimmer 1.3s linear infinite;
  height: 46px;
}
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }

/* --- 16. Infos pratiques ----------------------------------------------- */
.hours { display: grid; gap: 0; }
.hours li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .1rem 1rem;
  padding: .65rem 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: .95rem;
}
.hours li > * { min-width: 0; }
.hours li:last-child { border-bottom: 0; }
.hours b { font-family: var(--data); font-weight: 500; overflow-wrap: anywhere; }
.hours li[data-today="true"] { color: var(--blue-deep); }
.hours li[data-today="true"] b { font-weight: 600; }
.hours li[data-closed="true"] b { color: var(--refus); font-family: var(--body); }

.map { border: 0; width: 100%; height: 100%; min-height: 320px; border-radius: var(--r); filter: saturate(.85); }

.contact-list { display: grid; gap: 1.1rem; }
.contact-list a { text-decoration: none; font-weight: 600; }
.contact-list a:hover { color: var(--blue); }
.contact-list dt { font-size: var(--fs-xs); font-family: var(--data); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: .15rem; }
.contact-list dd { margin: 0; }

/* --- 17. Pied de page -------------------------------------------------- */
.site-foot { background: var(--ink); color: rgba(255, 255, 255, .7); font-size: .93rem; }
.site-foot__in { display: grid; gap: 2.5rem; padding-block: clamp(3rem, 5vw, 4rem) 2rem; }
@media (min-width: 760px) { .site-foot__in { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-foot h4 { font-size: var(--fs-xs); font-family: var(--data); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--cyan-light); margin-bottom: 1rem; }
.site-foot a { text-decoration: none; }
.site-foot a:hover { color: #fff; }
.site-foot ul { display: grid; gap: .55rem; }
.site-foot .brand__name { color: #fff; }
.site-foot .brand__mark { background: #fff; padding: .35rem .5rem; border-radius: 8px; }
.site-foot .brand__split { background: rgba(255, 255, 255, .25); }
.site-foot__legal {
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem;
  padding-block: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, .12);
  font-size: var(--fs-xs);
  color: rgba(255, 255, 255, .5);
}

/* --- 18. Utilitaires --------------------------------------------------- */
.u-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.u-center { text-align: center; margin-inline: auto; }
.u-mt { margin-top: 1.5rem; }
.u-mt-lg { margin-top: 2.5rem; }
.u-num { font-family: var(--data); font-weight: 600; }
.skip {
  position: absolute; inset-inline-start: 1rem; top: -100%;
  z-index: 100; padding: .7rem 1.1rem;
  background: var(--cyan-light); color: var(--ink);
  font-weight: 600; text-decoration: none; border-radius: 0 0 var(--r-sm) var(--r-sm);
}
.skip:focus { top: 0; }

/* --- 19. RTL ----------------------------------------------------------- */
[dir="rtl"] body { letter-spacing: 0; }
[dir="rtl"] :is(h1, h2, h3, h4) { letter-spacing: 0; line-height: 1.3; }
[dir="rtl"] .point__caret { transform: none; }
[dir="rtl"] .day__dow { text-transform: none; }
/* chiffres, prix et heures restent en lecture latine */
[dir="rtl"] :is(.u-num, .stat__n, .calc__total, .ticket__ref, .slot, .day__d, .hours b, .table td.num, .recap dd.num) { direction: ltr; unicode-bidi: isolate; }

/* --- 20. Responsive ---------------------------------------------------- */
@media (max-width: 880px) {
  .burger { display: flex; }
  .nav {
    position: fixed;
    inset: 72px 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 1rem var(--gut) 1.5rem;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    transform: translateY(-120%);
    transition: transform .25s ease;
  }
  .nav[data-open="true"] { transform: translateY(0); }
  .nav a { padding: .85rem .5rem; border-bottom: 1px solid var(--line-soft); border-radius: 0; font-size: 1rem; }
  .site-head__in { min-height: 64px; }
  .nav { inset-block-start: 64px; }
  .topbar__in { font-size: .72rem; }
  .calc__out { position: static; }
}
/* l'en-tête porte un nom plus long et trois langues : on le resserre */
@media (max-width: 560px) {
  .site-head__in { gap: .6rem; }
  .brand { gap: .5rem; }
  .brand__mark { height: 28px; }
  .brand__name { font-size: .92rem; }
  .brand__sub { display: none; }
  .brand__split { display: none; }
  .lang { padding: .35rem .42rem; font-size: .72rem; }
}

@media (max-width: 480px) {
  :root { --gut: 1.1rem; }
  .plate { max-width: 100%; }
  .day { width: 76px; }
}

@media print {
  .site-head, .topbar, .site-foot, .nav, .btn { display: none !important; }
  body { background: #fff; }
  .ticket { border: 2px solid #000; color: #000; background: #fff; }
  .ticket__cell { background: #fff; }
  .ticket__ref { color: #000; }
}
