/* ==========================================================================
   Santé.cm — design system (sans dépendance)
   Tokens · reset · typographie fluide · composants · pages publiques
   Thème clair / sombre (auto, ou forcé via <html data-theme="light|dark">)
   ========================================================================== */

:root {
  --bg: #f4f8f6;
  --surface: #ffffff;
  --surface-2: #eef4f1;
  --surface-3: #e2ece7;
  --text: #0e1f19;
  --text-2: #3b4d46;
  --muted: #62736c;
  --border: #dbe5e0;
  --border-strong: #bccdc5;

  --primary: #0a7a56;
  --primary-hover: #086649;
  --primary-ink: #ffffff;
  --primary-soft: #e0f3ea;
  --primary-strong: #064b35;

  --accent: #f2b100;
  --accent-soft: #fff3cf;
  --danger: #d92d20;
  --danger-soft: #fdeceb;
  --warning: #b45f06;
  --warning-soft: #fff1d9;
  --info: #1769d1;
  --info-soft: #e5effc;
  --success: var(--primary);
  --success-soft: var(--primary-soft);
  --whatsapp: #178f47;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-1: 0 1px 2px rgba(14, 31, 25, .06), 0 1px 3px rgba(14, 31, 25, .05);
  --shadow-2: 0 8px 24px -10px rgba(14, 31, 25, .18), 0 2px 6px rgba(14, 31, 25, .05);
  --shadow-3: 0 24px 48px -20px rgba(14, 31, 25, .28);
  --ring: 0 0 0 3px rgba(10, 122, 86, .28);

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --fs-xs: .78rem;
  --fs-sm: .875rem;
  --fs-base: 1rem;
  --fs-lg: clamp(1.05rem, 1rem + .25vw, 1.2rem);
  --fs-xl: clamp(1.25rem, 1.1rem + .7vw, 1.6rem);
  --fs-2xl: clamp(1.6rem, 1.25rem + 1.6vw, 2.35rem);
  --fs-hero: clamp(2rem, 1.2rem + 3.6vw, 3.6rem);
  --header-h: 68px;
  --gutter: clamp(1rem, 4vw, 2rem);
  color-scheme: light;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a1310;
  --surface: #111e19;
  --surface-2: #172822;
  --surface-3: #1e352d;
  --text: #e7f1ed;
  --text-2: #b6c8c0;
  --muted: #8ba198;
  --border: #223a31;
  --border-strong: #315246;
  --primary: #34c48f;
  --primary-hover: #5bd6a8;
  --primary-ink: #04261a;
  --primary-soft: #12362a;
  --primary-strong: #a9ebd0;
  --accent-soft: #3a2e07;
  --danger: #ff6b5e;
  --danger-soft: #3c1a17;
  --warning: #f0a23a;
  --warning-soft: #3a2a0e;
  --info: #6aa8ff;
  --info-soft: #132a4a;
  --whatsapp: #3ddc84;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-2: 0 10px 28px -10px rgba(0, 0, 0, .6);
  --shadow-3: 0 28px 56px -20px rgba(0, 0, 0, .7);
  --ring: 0 0 0 3px rgba(52, 196, 143, .35);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0a1310;
    --surface: #111e19;
    --surface-2: #172822;
    --surface-3: #1e352d;
    --text: #e7f1ed;
    --text-2: #b6c8c0;
    --muted: #8ba198;
    --border: #223a31;
    --border-strong: #315246;
    --primary: #34c48f;
    --primary-hover: #5bd6a8;
    --primary-ink: #04261a;
    --primary-soft: #12362a;
    --primary-strong: #a9ebd0;
    --accent-soft: #3a2e07;
    --danger: #ff6b5e;
    --danger-soft: #3c1a17;
    --warning: #f0a23a;
    --warning-soft: #3a2a0e;
    --info: #6aa8ff;
    --info-soft: #132a4a;
    --whatsapp: #3ddc84;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-2: 0 10px 28px -10px rgba(0, 0, 0, .6);
    --shadow-3: 0 28px 56px -20px rgba(0, 0, 0, .7);
    --ring: 0 0 0 3px rgba(52, 196, 143, .35);
  }
}

/* ------------------------------------------------------------------ reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  font-family: var(--font); font-size: var(--fs-base); line-height: 1.55;
  color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; display: block; }
img { height: auto; }
a { color: var(--primary); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--primary-hover); }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: var(--fs-2xl); font-weight: 800; }
h2 { font-size: var(--fs-xl); font-weight: 750; }
h3 { font-size: var(--fs-lg); font-weight: 700; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.2em; }
hr { border: 0; border-top: 1px solid var(--border); margin: 1.5rem 0; }
small, .small { font-size: var(--fs-sm); }
.muted { color: var(--muted); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.hidden, [hidden] { display: none !important; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--primary); color: var(--primary-ink); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }

.skip-link { position: absolute; left: 1rem; top: -100px; z-index: 1000; background: var(--primary); color: var(--primary-ink); padding: .6rem 1rem; border-radius: var(--radius-sm); text-decoration: none; }
.skip-link:focus { top: .75rem; }

/* ------------------------------------------------------------------ layout */
.container { width: min(1200px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.container-narrow { width: min(820px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.section { padding-block: clamp(2rem, 5vw, 4rem); }
.section-tight { padding-block: clamp(1.25rem, 3vw, 2rem); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.section-head h2 { margin: 0; }
.section-head p { margin: .25rem 0 0; color: var(--muted); }
.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.stack > * + * { margin-top: 1rem; }
.row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.row-between { justify-content: space-between; }
.spacer { flex: 1; }

.icon { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }
.icon-lg { width: 1.6em; height: 1.6em; }
.icon-xl { width: 2.4em; height: 2.4em; }

/* ------------------------------------------------------------------ boutons */
.btn {
  --_bg: var(--surface); --_fg: var(--text); --_bd: var(--border-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 44px; padding: .55rem 1.05rem; border-radius: 999px; border: 1px solid var(--_bd);
  background: var(--_bg); color: var(--_fg); font: inherit; font-weight: 650; font-size: .95rem; line-height: 1.2;
  text-decoration: none; cursor: pointer; transition: transform .12s, box-shadow .15s, background .15s, border-color .15s; white-space: nowrap;
}
.btn:hover { --_bg: var(--surface-2); color: var(--_fg); box-shadow: var(--shadow-1); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.is-loading { opacity: .6; pointer-events: none; }
.btn-primary { --_bg: var(--primary); --_fg: var(--primary-ink); --_bd: var(--primary); }
.btn-primary:hover { --_bg: var(--primary-hover); --_bd: var(--primary-hover); box-shadow: 0 8px 20px -8px var(--primary); }
.btn-soft { --_bg: var(--primary-soft); --_fg: var(--primary-strong); --_bd: transparent; }
.btn-soft:hover { --_bg: var(--surface-3); }
.btn-ghost { --_bg: transparent; --_bd: transparent; }
.btn-ghost:hover { --_bg: var(--surface-2); box-shadow: none; }
.btn-danger { --_bg: var(--danger); --_fg: #fff; --_bd: var(--danger); }
.btn-danger:hover { --_bg: #b42318; }
.btn-danger-soft { --_bg: var(--danger-soft); --_fg: var(--danger); --_bd: transparent; }
.btn-whatsapp { --_bg: var(--whatsapp); --_fg: #fff; --_bd: var(--whatsapp); }
.btn-whatsapp:hover { --_bg: #12783a; }
.btn-accent { --_bg: var(--accent); --_fg: #2b2100; --_bd: var(--accent); }
.btn-lg { min-height: 52px; padding: .75rem 1.5rem; font-size: 1.05rem; }
.btn-sm { min-height: 36px; padding: .3rem .8rem; font-size: .85rem; }
.btn-block { display: flex; width: 100%; }
.btn-icon { width: 44px; padding: 0; }
.btn-icon.btn-sm { width: 36px; }
.btn-group { display: inline-flex; gap: .5rem; flex-wrap: wrap; }

/* ------------------------------------------------------------------ formulaires */
.field { margin-bottom: 1.1rem; }
.field > label, .field-label { display: block; font-weight: 650; font-size: var(--fs-sm); margin-bottom: .35rem; color: var(--text); }
.req { color: var(--danger); }
input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]), select, textarea {
  width: 100%; min-height: 46px; padding: .6rem .85rem; font: inherit; color: var(--text);
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 12px;
  transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 110px; resize: vertical; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2362736c' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .8rem center; padding-right: 2.4rem; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .8; }
input[type=file] { width: 100%; padding: .55rem; border: 1px dashed var(--border-strong); border-radius: 12px; background: var(--surface-2); font: inherit; }
input[type=file]::file-selector-button { margin-right: .75rem; padding: .4rem .8rem; border: 0; border-radius: 999px; background: var(--primary); color: var(--primary-ink); font-weight: 600; cursor: pointer; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--danger); }
.hint { font-size: var(--fs-xs); color: var(--muted); margin: .3rem 0 0; }
.error { font-size: var(--fs-sm); color: var(--danger); margin: .3rem 0 0; font-weight: 600; }
.check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 500 !important; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: .15rem; accent-color: var(--primary); flex: none; }
.input-wrap { position: relative; }
.input-wrap input { padding-right: 3rem; }
.input-toggle { position: absolute; right: .35rem; top: 50%; transform: translateY(-50%); border: 0; background: transparent; width: 38px; height: 38px; border-radius: 50%; color: var(--muted); cursor: pointer; }
.input-toggle:hover { background: var(--surface-2); }
.form-grid { display: grid; gap: 0 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.form-grid .span-all { grid-column: 1 / -1; }
.form-actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-top: 1rem; }
.captcha label { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.captcha input { max-width: 140px; }
fieldset { border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem 0; margin: 0 0 1.25rem; }
legend { padding: 0 .5rem; font-weight: 700; font-size: var(--fs-sm); color: var(--text-2); }

/* ------------------------------------------------------------------ cartes, badges, alertes */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-1); }
.card-pad { padding: clamp(1rem, 2.5vw, 1.5rem); }
.card-hover { transition: transform .18s, box-shadow .2s, border-color .2s; }
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--border-strong); }
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .18rem .6rem; border-radius: 999px; font-size: var(--fs-xs); font-weight: 700; line-height: 1.4; white-space: nowrap; border: 1px solid transparent; }
.badge-neutral { background: var(--surface-3); color: var(--text-2); }
.badge-success { background: var(--success-soft); color: var(--primary-strong); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-pro { background: linear-gradient(135deg, #f7c948, #f2a900); color: #2b2100; }
.badge-open { background: var(--success-soft); color: var(--primary-strong); }
.badge-closed { background: var(--surface-3); color: var(--muted); }
.badge-duty { background: #4b2a9c; color: #fff; }
.dot { width: .55rem; height: .55rem; border-radius: 50%; background: currentColor; display: inline-block; }
.alert { display: flex; gap: .75rem; padding: .9rem 1.1rem; border-radius: var(--radius); border: 1px solid transparent; margin-bottom: 1rem; font-size: .95rem; }
.alert ul { margin: .3rem 0 0; padding-left: 1.1rem; }
.alert-success { background: var(--success-soft); color: var(--primary-strong); border-color: color-mix(in srgb, var(--primary) 30%, transparent); }
.alert-danger { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 30%, transparent); display: block; }
.alert-warning { background: var(--warning-soft); color: var(--warning); border-color: color-mix(in srgb, var(--warning) 30%, transparent); }
.alert-info { background: var(--info-soft); color: var(--info); border-color: color-mix(in srgb, var(--info) 30%, transparent); }
.alert .icon { margin-top: .15rem; }
.flash-wrap { position: sticky; top: calc(var(--header-h) + 8px); z-index: 40; }
.stars { display: inline-flex; gap: 1px; color: var(--border-strong); }
.stars .on { color: #f2b100; fill: #f2b100; }
.stars .half { color: #f2b100; fill: color-mix(in srgb, #f2b100 45%, transparent); }
.stars .icon { width: 1em; height: 1em; }
.chip { display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .85rem; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); text-decoration: none; font-size: var(--fs-sm); font-weight: 600; cursor: pointer; }
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.is-active, .chip[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }

/* ------------------------------------------------------------------ tableaux, pagination */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
th, td { padding: .75rem 1rem; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--surface-2); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
td .row { flex-wrap: nowrap; }
.pagination ul { display: flex; flex-wrap: wrap; gap: .35rem; list-style: none; padding: 0; margin: 1.75rem 0 0; justify-content: center; }
.pagination a, .pagination span { display: inline-flex; min-width: 40px; height: 40px; align-items: center; justify-content: center; padding: 0 .6rem; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); text-decoration: none; font-weight: 650; font-size: var(--fs-sm); }
.pagination a:hover { border-color: var(--primary); }
.pagination .current { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.pagination .gap { border: 0; background: none; }
.empty { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.empty .icon { width: 3rem; height: 3rem; margin: 0 auto 1rem; color: var(--border-strong); }

/* ------------------------------------------------------------------ en-tête */
.site-header { position: sticky; top: 0; z-index: 50; height: var(--header-h); background: color-mix(in srgb, var(--surface) 86%, transparent); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; gap: 1rem; height: 100%; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 850; font-size: 1.25rem; letter-spacing: -.02em; color: var(--text); text-decoration: none; }
.brand:hover { color: var(--text); }
.brand-mark { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #0a7a56, #16b981); box-shadow: 0 6px 16px -6px #0a7a56; }
.brand-mark .icon { width: 22px; height: 22px; stroke-width: 2.6; }
.brand small { color: var(--primary); font-weight: 800; }
.main-nav { display: none; align-items: center; gap: .15rem; margin-left: 1rem; }
.main-nav a { padding: .5rem .8rem; border-radius: 999px; color: var(--text-2); text-decoration: none; font-weight: 600; font-size: .92rem; }
.main-nav a:hover { background: var(--surface-2); color: var(--text); }
.main-nav a.is-active { background: var(--primary-soft); color: var(--primary-strong); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: .4rem; }
.header-actions .btn-label { display: none; }
.user-menu { position: relative; }
.user-menu summary { list-style: none; cursor: pointer; }
.user-menu summary::-webkit-details-marker { display: none; }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-strong); font-weight: 800; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 10px); min-width: 230px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-3); padding: .5rem; z-index: 60; }
.menu-pop a, .menu-pop button { display: flex; align-items: center; gap: .6rem; width: 100%; padding: .6rem .75rem; border: 0; background: none; border-radius: 10px; color: var(--text); font: inherit; font-size: .92rem; text-decoration: none; cursor: pointer; text-align: left; }
.menu-pop a:hover, .menu-pop button:hover { background: var(--surface-2); }
.menu-pop .menu-head { padding: .6rem .75rem; border-bottom: 1px solid var(--border); margin-bottom: .35rem; }
.menu-pop hr { margin: .35rem 0; }
.drawer { position: fixed; inset: 0; z-index: 90; background: rgba(6, 20, 15, .55); opacity: 0; pointer-events: none; transition: opacity .2s; }
.drawer.is-open { opacity: 1; pointer-events: auto; }
.drawer-panel { position: absolute; right: 0; top: 0; bottom: 0; width: min(340px, 88vw); background: var(--surface); padding: 1rem; overflow-y: auto; transform: translateX(100%); transition: transform .25s ease; display: flex; flex-direction: column; gap: .25rem; }
.drawer.is-open .drawer-panel { transform: none; }
.drawer-panel a { display: flex; align-items: center; gap: .75rem; padding: .85rem 1rem; border-radius: 12px; color: var(--text); text-decoration: none; font-weight: 650; }
.drawer-panel a:hover, .drawer-panel a.is-active { background: var(--primary-soft); color: var(--primary-strong); }
@media (min-width: 1024px) {
  .main-nav { display: flex; }
  #menu-open { display: none; }
  .header-actions .btn-label { display: inline; }
}

/* barre de navigation mobile */
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 45; display: grid; grid-template-columns: repeat(4, 1fr); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(14px); border-top: 1px solid var(--border); padding-bottom: env(safe-area-inset-bottom); }
.bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: .1rem; padding: .55rem 0 .45rem; color: var(--muted); text-decoration: none; font-size: .68rem; font-weight: 650; }
.bottom-nav a .icon { width: 1.45rem; height: 1.45rem; }
.bottom-nav a.is-active { color: var(--primary); }
@media (min-width: 1024px) { .bottom-nav { display: none; } }
@media (max-width: 1023px) { body { padding-bottom: 64px; } }

/* ------------------------------------------------------------------ hero */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(1000px 420px at 85% -10%, rgba(255, 255, 255, .16), transparent 60%),
    radial-gradient(700px 380px at 0% 110%, rgba(242, 177, 0, .22), transparent 60%),
    linear-gradient(135deg, #053f2d 0%, #0a7a56 55%, #12a575 100%);
  padding-block: clamp(2.5rem, 7vw, 5.5rem) clamp(4.5rem, 9vw, 7rem);
}
.hero::before { content: ""; position: absolute; inset: 0; opacity: .12; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56'%3E%3Cpath d='M26 18h4v8h8v4h-8v8h-4v-8h-8v-4h8z' fill='%23fff'/%3E%3C/svg%3E"); }
.hero-inner { position: relative; display: grid; gap: 2rem; }
.hero h1 { font-size: var(--fs-hero); font-weight: 850; letter-spacing: -.03em; margin: 0 0 .75rem; max-width: 18ch; text-wrap: balance; }
.hero h1 em { font-style: normal; color: #ffd75e; }
.hero p.lead { font-size: var(--fs-lg); max-width: 56ch; color: rgba(255, 255, 255, .9); margin-bottom: 1.5rem; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 1.75rem; margin-top: 1.75rem; }
.hero-stats strong { display: block; font-size: 1.6rem; font-weight: 850; line-height: 1.1; }
.hero-stats span { font-size: var(--fs-sm); opacity: .85; }
.search-card { position: relative; z-index: 2; margin-top: -3.4rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); box-shadow: var(--shadow-3); padding: clamp(1rem, 2.5vw, 1.5rem); }
.search-grid { display: grid; gap: .75rem; grid-template-columns: 1fr; }
@media (min-width: 720px) { .search-grid { grid-template-columns: 1.6fr 1fr auto; align-items: end; } }
.search-card .field { margin: 0; }
.search-tabs { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .75rem; scrollbar-width: none; }
.search-tabs::-webkit-scrollbar { display: none; }
.search-tabs label { flex: none; }
.search-tabs input { position: absolute; opacity: 0; }
.search-tabs span { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem 1rem; border-radius: 999px; border: 1px solid var(--border-strong); font-weight: 650; font-size: var(--fs-sm); cursor: pointer; background: var(--surface); }
.search-tabs input:checked + span { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.search-tabs input:focus-visible + span { box-shadow: var(--ring); }
.suggest-wrap { position: relative; }
.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-3); overflow: hidden; }
.suggest a { display: flex; align-items: center; gap: .75rem; padding: .7rem 1rem; text-decoration: none; color: var(--text); }
.suggest a:hover, .suggest a[aria-selected="true"] { background: var(--surface-2); }
.suggest small { color: var(--muted); display: block; }

/* tuiles de catégories */
.tile { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.25rem; text-decoration: none; color: var(--text); }
.tile-icon { width: 52px; height: 52px; flex: none; display: grid; place-items: center; border-radius: 16px; background: var(--primary-soft); color: var(--primary); }
.tile-icon .icon { width: 26px; height: 26px; }
.tile strong { display: block; font-size: 1.02rem; }
.tile span { color: var(--muted); font-size: var(--fs-sm); }
.city-card { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: 1rem 1.25rem; text-decoration: none; color: var(--text); }
.city-card strong { display: block; }
.city-card small { color: var(--muted); }

/* ------------------------------------------------------------------ cartes d'établissement */
.est-card { display: flex; flex-direction: column; gap: .75rem; padding: 1.15rem; height: 100%; position: relative; }
.est-card-head { display: flex; gap: .85rem; align-items: flex-start; }
.est-logo { width: 52px; height: 52px; flex: none; border-radius: 14px; overflow: hidden; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.est-logo img { width: 100%; height: 100%; object-fit: cover; }
.est-card h3 { margin: 0 0 .15rem; font-size: 1.05rem; }
.est-card h3 a { color: var(--text); text-decoration: none; }
.est-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.est-meta { display: flex; flex-wrap: wrap; gap: .4rem .9rem; color: var(--muted); font-size: var(--fs-sm); }
.est-meta span { display: inline-flex; align-items: center; gap: .3rem; }
.est-badges { display: flex; flex-wrap: wrap; gap: .4rem; }
.est-actions { display: flex; gap: .5rem; margin-top: auto; position: relative; z-index: 2; }
.est-actions .btn { flex: 1; }
.est-distance { margin-left: auto; font-weight: 800; color: var(--primary); font-size: var(--fs-sm); white-space: nowrap; }

/* ------------------------------------------------------------------ liste / filtres */
.page-head { background: var(--surface); border-bottom: 1px solid var(--border); padding-block: 1.5rem; }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; font-size: var(--fs-sm); color: var(--muted); margin-bottom: .75rem; list-style: none; padding: 0; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb li + li::before { content: "›"; margin-right: .35rem; }
.filters { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); align-items: end; }
.filters .field { margin: 0; }
.filter-toggles { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
.toggle-chip { position: relative; }
.toggle-chip input { position: absolute; opacity: 0; }
.toggle-chip span { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .9rem; border-radius: 999px; border: 1px solid var(--border-strong); font-size: var(--fs-sm); font-weight: 650; cursor: pointer; background: var(--surface); }
.toggle-chip input:checked + span { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.toggle-chip input:focus-visible + span { box-shadow: var(--ring); }
.results-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; margin: 1.5rem 0 1rem; }
.view-switch { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 999px; overflow: hidden; }
.view-switch button { border: 0; background: var(--surface); padding: .45rem .9rem; font: inherit; font-weight: 650; font-size: var(--fs-sm); cursor: pointer; color: var(--text-2); display: inline-flex; gap: .4rem; align-items: center; }
.view-switch button[aria-pressed="true"] { background: var(--primary); color: var(--primary-ink); }
.map { position: relative; width: 100%; height: 420px; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); background: var(--surface-3); touch-action: none; cursor: grab; user-select: none; }
.map:active { cursor: grabbing; }
.map-tiles { position: absolute; inset: 0; }
.map-tiles img { position: absolute; width: 256px; height: 256px; max-width: none; pointer-events: none; -webkit-user-drag: none; }
.map-pin { position: absolute; width: 34px; height: 34px; margin: -34px 0 0 -17px; color: var(--primary); filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .35)); cursor: pointer; z-index: 3; border: 0; background: none; padding: 0; }
.map-pin svg { width: 34px; height: 34px; fill: currentColor; stroke: #fff; stroke-width: 1.5; }
.map-pin[aria-current="true"] { color: var(--danger); z-index: 4; }
.map-controls { position: absolute; right: .75rem; top: .75rem; display: grid; gap: .35rem; z-index: 5; }
.map-controls button { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface); font-size: 1.2rem; font-weight: 700; cursor: pointer; color: var(--text); box-shadow: var(--shadow-1); }
.map-popup { position: absolute; z-index: 6; max-width: 260px; transform: translate(-50%, -100%); margin-top: -42px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: .7rem .9rem; box-shadow: var(--shadow-3); font-size: var(--fs-sm); }
.map-popup a { font-weight: 700; }
.map-attrib { position: absolute; left: 0; bottom: 0; z-index: 5; padding: .15rem .5rem; font-size: 10px; background: rgba(255, 255, 255, .8); color: #333; border-top-right-radius: 8px; }
.map-attrib a { color: #1d5fa6; }
.map-large { height: min(70vh, 640px); }

/* ------------------------------------------------------------------ fiche */
.est-hero { background: var(--surface); border-bottom: 1px solid var(--border); padding-block: 1.75rem 1.25rem; }
.est-cover { height: clamp(120px, 22vw, 240px); border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 1.25rem; background: linear-gradient(135deg, var(--primary-soft), var(--surface-3)); }
.est-cover img { width: 100%; height: 100%; object-fit: cover; }
.est-title { display: flex; gap: 1rem; align-items: flex-start; }
.est-title .est-logo { width: 72px; height: 72px; border-radius: 20px; }
.est-title h1 { margin: 0 0 .35rem; font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.2rem); }
.action-bar { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.25rem; }
.detail-layout { display: grid; gap: 1.5rem; padding-block: 1.5rem 3rem; }
@media (min-width: 960px) { .detail-layout { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; } .sticky-side { position: sticky; top: calc(var(--header-h) + 16px); } }
.info-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .9rem; }
.info-list li { display: flex; gap: .8rem; align-items: flex-start; }
.info-list .icon { color: var(--primary); margin-top: .2rem; }
.info-list small { color: var(--muted); display: block; }
.hours-table td { padding: .5rem .25rem; border: 0; }
.hours-table tr.today td { font-weight: 800; color: var(--primary-strong); }
.gallery { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.gallery button { border: 0; padding: 0; background: none; border-radius: 14px; overflow: hidden; cursor: zoom-in; aspect-ratio: 4/3; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.gallery button:hover img { transform: scale(1.05); }
dialog { border: 0; border-radius: var(--radius-lg); padding: 0; max-width: min(92vw, 900px); width: 100%; background: var(--surface); color: var(--text); box-shadow: var(--shadow-3); }
dialog::backdrop { background: rgba(4, 16, 11, .7); backdrop-filter: blur(3px); }
.dialog-head { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); }
.dialog-body { padding: 1.25rem; max-height: 75vh; overflow-y: auto; }
.product-card { display: flex; flex-direction: column; overflow: hidden; }
.product-photo { aspect-ratio: 4/3; background: var(--surface-2); display: grid; place-items: center; color: var(--border-strong); }
.product-photo img { width: 100%; height: 100%; object-fit: cover; }
.product-body { padding: 1rem; display: flex; flex-direction: column; gap: .4rem; flex: 1; }
.product-body h3 { margin: 0; font-size: 1rem; }
.price { font-weight: 800; color: var(--primary-strong); }
.review { padding: 1rem 0; border-bottom: 1px solid var(--border); }
.review:last-child { border-bottom: 0; }
.rating-input { display: inline-flex; flex-direction: row-reverse; gap: .15rem; }
.rating-input input { position: absolute; opacity: 0; }
.rating-input label { cursor: pointer; color: var(--border-strong); font-size: 1.9rem; line-height: 1; }
.rating-input label:hover, .rating-input label:hover ~ label, .rating-input input:checked ~ label { color: #f2b100; }
.rating-input input:focus-visible + label { outline: 3px solid var(--primary); border-radius: 6px; }
.basket-bar { position: fixed; left: 50%; transform: translateX(-50%) translateY(120%); bottom: 76px; z-index: 44; display: flex; align-items: center; gap: 1rem; padding: .65rem .65rem .65rem 1.25rem; border-radius: 999px; background: var(--primary-strong); color: #fff; box-shadow: var(--shadow-3); transition: transform .25s; }
[data-theme="dark"] .basket-bar { background: var(--primary); color: var(--primary-ink); }
.basket-bar.is-visible { transform: translateX(-50%) translateY(0); }
@media (min-width: 1024px) { .basket-bar { bottom: 24px; } }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--border-strong); border-radius: 999px; overflow: hidden; }
.qty button { width: 34px; height: 34px; border: 0; background: var(--surface-2); cursor: pointer; font-size: 1.1rem; color: var(--text); }
.qty output { min-width: 32px; text-align: center; font-weight: 700; }
.basket-line { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid var(--border); }

/* duty */
.duty-hero { background: linear-gradient(135deg, #2d1a63, #4b2a9c 60%, #6d44d0); color: #fff; padding-block: clamp(2rem, 5vw, 3.5rem); }
.duty-hero h1 { color: #fff; }
.duty-card { border-left: 5px solid #6d44d0; }
.pulse { width: .7rem; height: .7rem; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 rgba(34, 197, 94, .7); animation: pulse 1.8s infinite; display: inline-block; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }

/* CTA + pied de page */
.cta-band { background: linear-gradient(135deg, #053f2d, #0a7a56); color: #fff; border-radius: var(--radius-xl); padding: clamp(1.5rem, 4vw, 3rem); display: grid; gap: 1.25rem; align-items: center; }
@media (min-width: 800px) { .cta-band { grid-template-columns: 1fr auto; } }
.cta-band h2 { color: #fff; margin: 0 0 .4rem; }
.cta-band p { margin: 0; opacity: .92; }
.steps { counter-reset: step; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.step { padding: 1.25rem; position: relative; }
.step::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: var(--primary); color: var(--primary-ink); font-weight: 800; margin-bottom: .75rem; }
.site-footer { margin-top: auto; background: #06231a; color: #c4d8cf; padding-block: 3rem 1.5rem; }
.site-footer a { color: #c4d8cf; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer h4 { color: #fff; font-size: .95rem; margin-bottom: .75rem; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; font-size: var(--fs-sm); }
.footer-bottom { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid rgba(255, 255, 255, .12); display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; font-size: var(--fs-xs); }

/* authentification */
.auth-wrap { min-height: calc(100vh - var(--header-h)); display: grid; place-items: center; padding: 2rem var(--gutter); background: radial-gradient(800px 400px at 50% -10%, var(--primary-soft), transparent 70%), var(--bg); }
.auth-card { width: min(100%, 440px); padding: clamp(1.5rem, 4vw, 2.25rem); }
.auth-card h1 { font-size: 1.6rem; }

/* prose (pages statiques) */
.prose { max-width: 72ch; }
.prose h2 { margin-top: 2rem; }
.prose li { margin-bottom: .35rem; }

/* toasts */
.toast-host { position: fixed; right: 1rem; bottom: 5rem; z-index: 120; display: grid; gap: .5rem; }
.toast { background: var(--text); color: var(--bg); padding: .7rem 1rem; border-radius: 12px; box-shadow: var(--shadow-3); font-size: var(--fs-sm); animation: toast-in .25s ease; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

@media print {
  .site-header, .site-footer, .bottom-nav, .btn, .drawer, .flash-wrap, .action-bar { display: none !important; }
  body { background: #fff; color: #000; padding: 0; }
  .card { box-shadow: none; }
}

/* ------------------------------------------------------------------ correctifs responsive */
.main-nav a { white-space: nowrap; }
.header-actions { flex-shrink: 0; }
.hide-mobile { display: none; }
@media (min-width: 640px) { .hide-mobile { display: inline-flex; } }
.drawer { visibility: hidden; transition: opacity .2s, visibility 0s linear .25s; }
.drawer.is-open { visibility: visible; transition-delay: 0s; }
html, body { overflow-x: clip; }
@media (max-width: 1099px) { .main-nav { display: none !important; } #menu-open { display: inline-flex !important; } .header-actions .btn-label { display: none !important; } }
@media (min-width: 1100px) { .main-nav { display: flex; } #menu-open { display: none; } }
@media (min-width: 1280px) { .header-actions .btn-label { display: inline !important; } }
.icon { display: inline-block; fill: none; }
.stars .icon { fill: none; }
.stars .on { fill: #f2b100; color: #f2b100; }
