/* ==========================================================================
   SafeHer224, systeme de design v4.
   Canevas gris clair, contenu pose dans de grands panneaux blancs arrondis.
   Typographie resserree : le corps de texte fait 15px, les titres restent
   contenus. Aucune ressource externe : polices et icones sont servies par
   le projet, le public vise se connecte souvent en reseau lent.
   ========================================================================== */

/* --- Polices locales ------------------------------------------------------ */

@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/plus-jakarta-sans-latin.7660bd9909fb.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/plus-jakarta-sans-latin-ext.341687eeeb6a.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
    U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}

:root {
  /* Encres */
  --ink-900: oklch(21% 0.02 200);
  --ink-800: oklch(28% 0.018 200);
  --ink-600: oklch(42% 0.015 200);
  --ink-500: oklch(52% 0.013 200);
  --ink-400: oklch(62% 0.012 200);
  --ink-300: oklch(74% 0.01 200);

  /* Canevas et surfaces */
  --canvas: oklch(96.4% 0.005 120);
  --surface: oklch(100% 0 0);
  --surface-2: oklch(98.2% 0.004 120);
  --surface-3: oklch(95.6% 0.008 140);
  --line: oklch(92% 0.006 140);
  --line-strong: oklch(86% 0.01 140);

  /* Marque : rose poudré, sobre (pas de rose vif) */
  --brand-900: oklch(27% 0.06 14);
  --brand-800: oklch(34% 0.09 14);
  --brand-700: oklch(41% 0.105 14);
  --brand-600: oklch(49% 0.12 14);
  --brand-500: oklch(60% 0.105 14);
  --brand-200: oklch(88% 0.05 14);
  --brand-100: oklch(93.5% 0.035 14);
  --brand-050: oklch(97% 0.02 14);
  --on-brand: oklch(99% 0.006 14);

  /* Or cuivre, pour les surfaces d'appel a l'action (complement du rose) */
  --fresh-700: oklch(46% 0.095 48);
  --fresh-600: oklch(56% 0.11 46);
  --fresh-500: oklch(66% 0.12 50);
  --fresh-200: oklch(89% 0.05 48);
  --fresh-100: oklch(94% 0.032 48);

  /* Semantique */
  --danger-700: oklch(44% 0.17 27);
  --danger-600: oklch(54% 0.19 27);
  --danger-200: oklch(88% 0.07 27);
  --danger-100: oklch(95% 0.04 27);
  --amber-700: oklch(50% 0.11 70);
  --amber-600: oklch(72% 0.14 75);
  --amber-100: oklch(95% 0.045 80);
  --info-700: oklch(42% 0.1 245);
  --info-600: oklch(56% 0.12 245);
  --info-100: oklch(95% 0.035 245);
  --ok-700: oklch(40% 0.09 155);
  --ok-600: oklch(55% 0.11 150);
  --ok-100: oklch(94.5% 0.04 150);

  /* Palette categorielle des graphiques (portail) */
  --chart-1: oklch(56% 0.1 195);
  --chart-2: oklch(60% 0.13 320);
  --chart-3: oklch(72% 0.14 75);
  --chart-4: oklch(62% 0.16 30);
  --chart-5: oklch(56% 0.13 295);
  --chart-6: oklch(58% 0.12 255);
  --chart-7: oklch(66% 0.11 110);
  --chart-8: oklch(50% 0.09 220);

  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --radius-pill: 999px;

  --max-width: 1200px;
  --max-width-narrow: 720px;

  --shadow-xs: 0 1px 2px oklch(21% 0.02 200 / 0.05);
  --shadow-sm: 0 1px 2px oklch(21% 0.02 200 / 0.04), 0 3px 10px -4px oklch(21% 0.02 200 / 0.1);
  --shadow-md: 0 1px 3px oklch(21% 0.02 200 / 0.05), 0 10px 24px -10px oklch(21% 0.02 200 / 0.16);
  --shadow-lg: 0 2px 6px oklch(21% 0.02 200 / 0.05), 0 20px 44px -18px oklch(21% 0.02 200 / 0.22);
  --shadow-brand: 0 2px 6px oklch(49% 0.12 14 / 0.18), 0 10px 20px -8px oklch(49% 0.12 14 / 0.28);

  --font-body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;

  --ring: 0 0 0 3px oklch(60% 0.105 14 / 0.32);
}

/* --- Base ---------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink-500);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  color: var(--ink-900);
  line-height: 1.22;
  letter-spacing: -0.021em;
  margin: 0;
  font-weight: 700;
}

p { margin: 0 0 0.9rem; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--brand-600);
  text-decoration-color: oklch(49% 0.12 14 / 0.28);
  text-underline-offset: 3px;
}

a:hover { color: var(--brand-700); text-decoration-color: currentColor; }

img { max-width: 100%; height: auto; display: block; }

:focus-visible {
  outline: 2px solid var(--brand-600);
  outline-offset: 2px;
  border-radius: 5px;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.accent { color: var(--brand-600); font-style: normal; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* --- Icones (sprite SVG local) -------------------------------------------- */

.ic {
  width: 1.25rem;
  height: 1.25rem;
  fill: currentColor;
  flex-shrink: 0;
  vertical-align: middle;
}

.ic--xs { width: 0.95rem; height: 0.95rem; }
.ic--sm { width: 1.1rem; height: 1.1rem; }
.ic--lg { width: 1.5rem; height: 1.5rem; }
.ic--xl { width: 1.9rem; height: 1.9rem; }
.ic--xxl { width: 2.4rem; height: 2.4rem; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 200;
  background: var(--brand-700);
  color: var(--on-brand);
  padding: 0.65rem 1.1rem;
  border-radius: 0 0 var(--radius-sm) 0;
  font-weight: 600;
  font-size: 0.85rem;
}

.skip-link:focus { left: 0; color: var(--on-brand); }

/* --- Navigation publique -------------------------------------------------- */

.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: oklch(96.4% 0.005 120 / 0.88);
  backdrop-filter: saturate(1.7) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.navbar__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.navbar__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 1.02rem;
  letter-spacing: -0.03em;
  color: var(--ink-900);
  text-decoration: none;
}

.navbar__brand:hover { color: var(--brand-700); }
.navbar__logo-mark { display: block; }

.navbar__links {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  margin-left: auto;
}

.navbar__links a {
  color: var(--ink-500);
  text-decoration: none;
  font-size: 0.865rem;
  font-weight: 550;
  padding: 0.42rem 0.7rem;
  border-radius: var(--radius-xs);
  white-space: nowrap;
  transition: background 0.14s ease, color 0.14s ease;
}

.navbar__links a:hover { background: var(--surface); color: var(--ink-900); }

.navbar__links a.is-active {
  color: var(--brand-700);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.navbar__actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

/* Sortie rapide : discrete, jamais un bandeau qui crie. */
.exit-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  padding: 0.42rem 0.75rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink-500);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}

.exit-btn:hover {
  color: var(--danger-600);
  border-color: var(--danger-200);
  background: var(--danger-100);
}

.navbar__pro-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong);
  color: var(--ink-500);
  background: var(--surface);
  text-decoration: none;
  transition: border-color 0.14s ease, color 0.14s ease;
}

.navbar__pro-link:hover { border-color: var(--brand-500); color: var(--brand-700); }

.navbar__pro-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: var(--brand-600);
  color: var(--on-brand);
  font-weight: 700;
  font-size: 0.82rem;
}

.navbar__toggle {
  display: none;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xs);
  color: var(--ink-800);
  cursor: pointer;
}

/* --- Boutons -------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  padding: 0.62rem 1.25rem;
  font-family: inherit;
  font-size: 0.885rem;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease;
  white-space: nowrap;
}

.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }

.btn--primary {
  background: var(--brand-700);
  color: var(--on-brand);
  box-shadow: var(--shadow-brand);
}

.btn--primary:hover { background: var(--brand-800); color: var(--on-brand); }

.btn--ghost {
  background: var(--surface);
  color: var(--ink-800);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-xs);
}

.btn--ghost:hover { border-color: var(--brand-500); color: var(--brand-700); }

.btn--danger { background: var(--danger-600); color: oklch(99% 0.005 27); }
.btn--danger:hover { background: var(--danger-700); color: oklch(99% 0.005 27); }

.btn--small { padding: 0.45rem 0.9rem; font-size: 0.815rem; }
.btn--large { padding: 0.78rem 1.6rem; font-size: 0.95rem; }
.btn--block { width: 100%; }

/* --- Structure : panneaux poses sur le canevas ---------------------------- */

.shell {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem 1rem;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.panel + .panel { margin-top: 1rem; }

.panel__inner { padding: 3rem 2.75rem; }

.section__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.6rem;
}

.section__title {
  font-size: clamp(1.25rem, 2.2vw, 1.55rem);
  font-weight: 750;
}

.section__subtitle {
  color: var(--ink-400);
  max-width: 60ch;
  font-size: 0.9rem;
}

.section__link {
  color: var(--brand-600);
  font-weight: 650;
  font-size: 0.855rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
}

.section__link:hover { gap: 0.45rem; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  margin: 0 0 0.85rem;
  color: var(--brand-700);
  background: var(--brand-050);
  border: 1px solid var(--brand-200);
  border-radius: var(--radius-pill);
  padding: 0.3rem 0.75rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.eyebrow .ic { width: 0.9rem; height: 0.9rem; }

.page-header { margin-bottom: 1.75rem; }

.page-header__title {
  font-size: clamp(1.5rem, 2.8vw, 1.95rem);
  font-weight: 780;
  margin-bottom: 0.6rem;
}

.page-header__lead {
  color: var(--ink-400);
  font-size: 0.95rem;
  max-width: 62ch;
}

/* Filigrane discret derriere le titre d'une page (ex. Numeros d'urgence) :
   une seule icone du sprite, tres agrandie et tres claire, jamais un visuel
   explicite -- le public du site est en detresse (voir orientation_extras.py). */
.page-header--watermark { position: relative; }

.page-header__watermark-icon {
  position: absolute;
  top: -2.25rem;
  right: -2.5rem;
  z-index: 0;
  pointer-events: none;
  color: var(--brand-100);
  opacity: 0.6;
}

.page-header__watermark-icon .ic { width: clamp(110px, 16vw, 170px); height: auto; }

.page-header--watermark > :not(.page-header__watermark-icon) {
  position: relative;
  z-index: 1;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.845rem;
  font-weight: 600;
  color: var(--ink-400);
  text-decoration: none;
  margin-bottom: 1rem;
}

.back-link:hover { color: var(--brand-700); }

/* --- Accueil : hero ------------------------------------------------------- */

.hero {
  position: relative;
  padding: 3.25rem 2.75rem 2.5rem;
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: 2.5rem;
  align-items: center;
  background:
    radial-gradient(120% 130% at 88% 0%, oklch(93.5% 0.035 14 / 0.9), transparent 60%),
    linear-gradient(180deg, oklch(99% 0.004 14), var(--surface));
}

.hero__title {
  font-size: clamp(1.9rem, 3.6vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.1;
  margin-bottom: 0.9rem;
}

.hero__title .accent { color: var(--brand-600); }

.hero__lead {
  font-size: 0.985rem;
  color: var(--ink-500);
  max-width: 46ch;
  margin-bottom: 1.5rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

.hero__reassure {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.hero__reassure span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.815rem;
  font-weight: 550;
  color: var(--ink-400);
}

.hero__reassure .ic { color: var(--fresh-600); }

/* Composition de droite : un bloc colore et des cartes flottantes */
.hero__visual {
  position: relative;
  min-height: 340px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(90% 80% at 20% 15%, oklch(80% 0.08 45 / 0.4), transparent 60%),
    linear-gradient(150deg, var(--brand-700), var(--brand-900) 72%);
  overflow: hidden;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.7rem;
}

.hero__visual::after {
  content: "";
  position: absolute;
  inset: auto -18% -32% auto;
  width: 74%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: oklch(100% 0 0 / 0.06);
}

.float-card {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  background: oklch(100% 0 0 / 0.96);
  border-radius: var(--radius-md);
  padding: 0.7rem 0.85rem;
  box-shadow: var(--shadow-md);
  max-width: 300px;
}

.float-card:nth-child(2) { margin-left: auto; }
.float-card:nth-child(3) { margin-left: 1.75rem; }

.float-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--brand-050);
  color: var(--brand-700);
  flex-shrink: 0;
}

.float-card__title {
  display: block;
  font-size: 0.845rem;
  font-weight: 700;
  color: var(--ink-900);
  line-height: 1.3;
}

.float-card__text {
  display: block;
  font-size: 0.755rem;
  color: var(--ink-400);
  line-height: 1.35;
}

/* --- Bande de statistiques ------------------------------------------------ */

.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  padding: 0 2.75rem 2.75rem;
}

.stat-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1.05rem 1.15rem;
}

.stat-card--accent {
  background: var(--brand-800);
  border-color: var(--brand-800);
}

.stat-card__value {
  font-size: 1.5rem;
  font-weight: 780;
  color: var(--brand-700);
  margin: 0 0 0.1rem;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.stat-card--accent .stat-card__value { color: var(--on-brand); }

.stat-card__label { margin: 0; font-size: 0.79rem; color: var(--ink-400); }
.stat-card--accent .stat-card__label { color: oklch(88% 0.02 14); }

/* --- Etapes numerotees ---------------------------------------------------- */

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.step {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1.4rem;
}

.step__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-pill);
  background: var(--brand-700);
  color: var(--on-brand);
  font-weight: 750;
  font-size: 0.85rem;
  margin-bottom: 0.85rem;
}

.step__title { font-size: 0.98rem; margin-bottom: 0.35rem; font-weight: 700; }
.step__text { font-size: 0.865rem; color: var(--ink-400); margin: 0; }

/* --- Cartes de contenu ---------------------------------------------------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.card-grid--3 { grid-template-columns: repeat(3, 1fr); }

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1.4rem;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--accent-color, var(--brand-600));
  opacity: 0;
  transition: opacity 0.16s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-strong);
}

.card:hover::before { opacity: 1; }

.card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft, var(--brand-050));
  color: var(--accent-color, var(--brand-700));
  margin-bottom: 0.9rem;
}

.card__title { font-size: 0.98rem; margin-bottom: 0.35rem; font-weight: 700; }
.card__text { font-size: 0.865rem; color: var(--ink-400); margin-bottom: 0.9rem; }

.card__cta {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  font-weight: 650;
  font-size: 0.845rem;
  text-decoration: none;
  color: var(--brand-600);
}

.card__cta:hover { gap: 0.45rem; }

/* Teintes par categorie d'aide, reprises dans les graphiques du portail */
.tint-1 { --accent-color: var(--chart-1); --accent-soft: oklch(95% 0.03 195); }
.tint-2 { --accent-color: var(--chart-2); --accent-soft: oklch(95% 0.035 320); }
.tint-3 { --accent-color: var(--chart-3); --accent-soft: oklch(95.5% 0.04 75); }
.tint-4 { --accent-color: var(--chart-4); --accent-soft: oklch(95% 0.04 30); }
.tint-5 { --accent-color: var(--chart-5); --accent-soft: oklch(95% 0.035 295); }
.tint-6 { --accent-color: var(--chart-6); --accent-soft: oklch(95% 0.035 255); }

/* --- Conseils ------------------------------------------------------------- */

.advice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.advice--card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1.35rem;
}

.advice__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--brand-050);
  color: var(--brand-700);
  margin-bottom: 0.8rem;
}

.advice__title { font-size: 0.94rem; margin-bottom: 0.3rem; font-weight: 700; }
.advice__text { font-size: 0.855rem; color: var(--ink-400); margin: 0; }

/* --- Bande d'appel a l'action --------------------------------------------- */

.cta-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  background: linear-gradient(135deg, var(--brand-800), var(--brand-900));
  border-radius: var(--radius-lg);
  padding: 1.9rem 2.1rem;
}

.cta-band--fresh {
  background: linear-gradient(135deg, var(--fresh-500), var(--fresh-600));
}

.cta-band__title {
  color: oklch(99% 0.005 14);
  font-size: 1.2rem;
  margin-bottom: 0.4rem;
}

.cta-band--fresh .cta-band__title { color: oklch(22% 0.05 48); }

.cta-band__text {
  color: oklch(88% 0.02 14);
  font-size: 0.885rem;
  max-width: 58ch;
  margin: 0;
}

.cta-band--fresh .cta-band__text { color: oklch(32% 0.05 48); }

.cta-band .btn--primary {
  background: var(--surface);
  color: var(--brand-800);
  box-shadow: none;
}

.cta-band .btn--primary:hover { background: var(--brand-100); color: var(--brand-900); }

/* --- Numeros d'urgence ---------------------------------------------------- */

.numero-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}

.numero-list__item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.05rem;
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}

.numero-list__item:hover { border-color: var(--brand-200); box-shadow: var(--shadow-sm); }

.numero-list__phone-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-pill);
  background: var(--danger-100);
  color: var(--danger-600);
  flex-shrink: 0;
}

.numero-list__body { display: flex; flex-direction: column; min-width: 0; }

.numero-list__number {
  font-family: var(--font-mono);
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--ink-900);
  text-decoration: none;
  line-height: 1.25;
}

.numero-list__number:hover { color: var(--brand-700); }

.numero-list__service { font-size: 0.815rem; color: var(--ink-400); }
.numero-list__call { margin-left: auto; }

.regional-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.6rem;
}

.regional-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  text-decoration: none;
  transition: border-color 0.14s ease, background 0.14s ease;
}

.regional-card:hover { border-color: var(--brand-500); background: var(--brand-050); }

.regional-card__number {
  font-family: var(--font-mono);
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--brand-700);
}

.regional-card__region { font-size: 0.79rem; color: var(--ink-400); }

/* --- Formulaires ---------------------------------------------------------- */

.form { display: grid; gap: 1rem; }

.form--card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.65rem;
}

.form__field { display: grid; gap: 0.32rem; }

.form__field--turnstile { margin: 0.9rem 0 0.2rem; }

.form__field label,
.form__label {
  font-size: 0.83rem;
  font-weight: 650;
  color: var(--ink-800);
}

.form__row-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.form__row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }

input[type="text"],
input[type="tel"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="date"],
select,
textarea {
  width: 100%;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--ink-900);
  background: var(--surface);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 0.62rem 0.8rem;
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}

input::placeholder, textarea::placeholder { color: var(--ink-300); }

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: var(--ring);
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23667' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.65rem center;
  background-size: 1.05rem;
  padding-right: 2.2rem;
}

textarea { min-height: 110px; resize: vertical; }

.form__error {
  margin: 0;
  color: var(--danger-700);
  font-size: 0.815rem;
  font-weight: 550;
  display: flex;
  align-items: center;
  gap: 0.28rem;
}

.form__hint { font-size: 0.805rem; color: var(--ink-400); margin: 0; }

.info-box {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  background: var(--info-100);
  border: 1px solid oklch(56% 0.12 245 / 0.2);
  border-radius: var(--radius-sm);
  padding: 0.8rem 0.95rem;
  color: var(--info-700);
  font-size: 0.855rem;
}

.info-box p { margin: 0; }
.info-box .ic { color: var(--info-600); }

.info-box--danger {
  background: var(--danger-100);
  border-color: oklch(54% 0.19 27 / 0.22);
  color: var(--danger-700);
}

.info-box--danger .ic { color: var(--danger-600); }

/* Selecteur de region en pastilles */
.region-picker { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.region-picker input { position: absolute; opacity: 0; width: 0; height: 0; }

.region-picker__label {
  display: inline-flex;
  align-items: center;
  padding: 0.48rem 0.9rem;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: var(--surface);
  font-size: 0.855rem;
  font-weight: 550;
  color: var(--ink-600);
  cursor: pointer;
  transition: all 0.14s ease;
}

.region-picker__label:hover { border-color: var(--brand-500); color: var(--brand-700); }

.region-picker input:checked + .region-picker__label {
  background: var(--brand-700);
  border-color: var(--brand-700);
  color: var(--on-brand);
}

.region-picker input:focus-visible + .region-picker__label { box-shadow: var(--ring); }

/* --- Parcours guide (wizard) ---------------------------------------------- */

.wizard { max-width: 720px; margin: 0 auto; }

.wizard__progress { margin-bottom: 1.5rem; }

.wizard__progress-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.wizard__step-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brand-700);
  letter-spacing: 0.02em;
  white-space: nowrap;
  text-transform: uppercase;
}

.wizard__step-hint {
  font-size: 0.78rem;
  color: var(--ink-400);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.wizard__progress-track {
  height: 5px;
  border-radius: var(--radius-pill);
  background: var(--line);
  overflow: hidden;
}

.wizard__progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand-600), var(--fresh-600));
  transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.wstep { display: none; }
.wstep.is-current { display: block; animation: wstep-in 0.26s ease both; }

@keyframes wstep-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.wstep__title {
  font-size: clamp(1.3rem, 2.4vw, 1.65rem);
  font-weight: 780;
  margin-bottom: 0.45rem;
}

.wstep__lead {
  color: var(--ink-400);
  font-size: 0.9rem;
  margin-bottom: 1.35rem;
  max-width: 56ch;
}

.wizard__card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

/* Cartes de choix */
.choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.6rem;
}

.choice-grid--2 { grid-template-columns: repeat(2, 1fr); }

.choice { position: relative; display: block; }

.choice input { position: absolute; opacity: 0; width: 0; height: 0; }

.choice__body {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  height: 100%;
  padding: 0.85rem 0.95rem;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.14s ease, background 0.14s ease, transform 0.12s ease, box-shadow 0.16s ease;
}

.choice__body:hover {
  border-color: var(--brand-500);
  background: var(--brand-050);
  transform: translateY(-1px);
}

.choice input:checked + .choice__body {
  border-color: var(--brand-700);
  background: var(--brand-050);
  box-shadow: 0 0 0 1.5px var(--brand-700);
}

.choice input:focus-visible + .choice__body { box-shadow: var(--ring); }

.choice__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--brand-050);
  border: 1px solid var(--brand-200);
  color: var(--brand-700);
  flex-shrink: 0;
  transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}

.choice input:checked + .choice__body .choice__icon {
  background: var(--brand-700);
  border-color: var(--brand-700);
  color: var(--on-brand);
}

.choice__text { min-width: 0; }

.choice__title {
  display: block;
  font-weight: 650;
  color: var(--ink-900);
  font-size: 0.9rem;
  line-height: 1.3;
}

.choice__note {
  display: block;
  font-size: 0.775rem;
  color: var(--ink-400);
  margin-top: 0.1rem;
  line-height: 1.35;
}

.choice__check {
  margin-left: auto;
  color: var(--brand-700);
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.choice input:checked + .choice__body .choice__check { opacity: 1; transform: none; }

/* Degres d'urgence : code couleur explicite */
.choice--urgence .choice__icon { background: var(--surface-3); border-color: var(--line); color: var(--ink-500); }

.choice--faible input:checked + .choice__body { border-color: var(--ok-600); box-shadow: 0 0 0 1.5px var(--ok-600); background: var(--ok-100); }
.choice--faible input:checked + .choice__body .choice__icon { background: var(--ok-600); border-color: var(--ok-600); color: var(--surface); }
.choice--faible input:checked + .choice__body .choice__check { color: var(--ok-700); }

.choice--modere input:checked + .choice__body { border-color: var(--info-600); box-shadow: 0 0 0 1.5px var(--info-600); background: var(--info-100); }
.choice--modere input:checked + .choice__body .choice__icon { background: var(--info-600); border-color: var(--info-600); color: var(--surface); }
.choice--modere input:checked + .choice__body .choice__check { color: var(--info-700); }

.choice--eleve input:checked + .choice__body { border-color: var(--amber-600); box-shadow: 0 0 0 1.5px var(--amber-600); background: var(--amber-100); }
.choice--eleve input:checked + .choice__body .choice__icon { background: var(--amber-600); border-color: var(--amber-600); color: var(--surface); }
.choice--eleve input:checked + .choice__body .choice__check { color: var(--amber-700); }

.choice--critique input:checked + .choice__body { border-color: var(--danger-600); box-shadow: 0 0 0 1.5px var(--danger-600); background: var(--danger-100); }
.choice--critique input:checked + .choice__body .choice__icon { background: var(--danger-600); border-color: var(--danger-600); color: var(--surface); }
.choice--critique input:checked + .choice__body .choice__check { color: var(--danger-700); }

.wizard__actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.5rem;
}

.wizard__actions .btn--primary { margin-left: auto; }

.wizard__error {
  display: none;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.9rem;
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-sm);
  background: var(--danger-100);
  color: var(--danger-700);
  font-size: 0.845rem;
  font-weight: 550;
}

.wizard__error.is-visible { display: flex; }

/* Interrupteur suivi */
.switch-field {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 0.95rem 1.05rem;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  cursor: pointer;
  transition: border-color 0.14s ease, background 0.14s ease;
}

.switch-field:hover { border-color: var(--brand-500); }

.switch-field input { position: absolute; opacity: 0; width: 0; height: 0; }

.switch-field__track {
  position: relative;
  width: 42px;
  height: 24px;
  border-radius: var(--radius-pill);
  background: var(--line-strong);
  flex-shrink: 0;
  margin-top: 0.1rem;
  transition: background 0.18s ease;
}

.switch-field__track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}

.switch-field input:checked + .switch-field__track { background: var(--brand-700); }
.switch-field input:checked + .switch-field__track::after { transform: translateX(18px); }
.switch-field input:focus-visible + .switch-field__track { box-shadow: var(--ring); }

.switch-field__label { font-weight: 650; color: var(--ink-900); display: block; font-size: 0.9rem; }
.switch-field__note { font-size: 0.815rem; color: var(--ink-400); margin: 0.15rem 0 0; }

/* Recapitulatif */
.recap {
  display: grid;
  gap: 0.4rem;
  padding: 0.95rem 1.1rem;
  border-radius: var(--radius-md);
  background: var(--brand-050);
  border: 1px solid var(--brand-200);
  margin-bottom: 1.1rem;
}

.recap__row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.845rem;
  color: var(--ink-600);
}

.recap__row .ic { color: var(--brand-600); width: 1rem; height: 1rem; }
.recap__value { font-weight: 650; color: var(--ink-900); }

.recap__edit {
  margin-left: auto;
  font-size: 0.79rem;
  font-weight: 650;
  background: none;
  border: none;
  color: var(--brand-600);
  cursor: pointer;
  font-family: inherit;
  padding: 0.15rem 0.35rem;
  border-radius: var(--radius-xs);
}

.recap__edit:hover { background: var(--brand-100); }

/* --- Panneau de resultat -------------------------------------------------- */

.success-panel {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  padding: 1rem 0;
}

.success-panel__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: var(--radius-pill);
  background: var(--ok-100);
  color: var(--ok-700);
  margin-bottom: 1rem;
}

.success-panel__title { font-size: 1.35rem; margin-bottom: 0.45rem; }
.success-panel__text { color: var(--ink-400); margin-bottom: 1.35rem; font-size: 0.92rem; }

.success-panel__actions {
  display: flex;
  gap: 0.55rem;
  justify-content: center;
  flex-wrap: wrap;
}

.code-result {
  background: var(--brand-050);
  border: 1px solid var(--brand-200);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.code-result__label {
  font-size: 0.73rem;
  font-weight: 700;
  color: var(--brand-700);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.4rem;
}

.code-result__code {
  font-family: var(--font-mono);
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--brand-900);
  letter-spacing: 0.05em;
  margin: 0 0 0.75rem;
}

.code-result__hint { font-size: 0.815rem; color: var(--ink-400); margin: 0.75rem 0 0; }

.statut-result {
  margin-top: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-align: center;
}

.statut-result__code {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink-900);
  margin-bottom: 0.6rem;
}

/* --- Pastilles ------------------------------------------------------------ */

.status-chip, .urgence-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.24rem 0.62rem;
  border-radius: var(--radius-pill);
  font-size: 0.755rem;
  font-weight: 650;
  white-space: nowrap;
  line-height: 1.45;
}

.status-chip--nouvelle { background: var(--amber-100); color: var(--amber-700); }
.status-chip--en_cours { background: var(--info-100); color: var(--info-700); }
.status-chip--orientee { background: var(--ok-100); color: var(--ok-700); }
.status-chip--cloturee { background: var(--surface-3); color: var(--ink-400); }

.urgence-chip--faible { background: var(--ok-100); color: var(--ok-700); }
.urgence-chip--modere { background: var(--info-100); color: var(--info-700); }
.urgence-chip--eleve { background: var(--amber-100); color: var(--amber-700); }
.urgence-chip--critique { background: var(--danger-100); color: var(--danger-700); }

.status-grid { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.28rem 0.7rem;
  border-radius: var(--radius-pill);
  background: var(--brand-050);
  border: 1px solid var(--brand-200);
  color: var(--brand-700);
  font-size: 0.78rem;
  font-weight: 650;
}

/* --- Toasts --------------------------------------------------------------- */

.toast-stack {
  position: fixed;
  top: 4rem;
  right: 1.25rem;
  z-index: 120;
  display: grid;
  gap: 0.5rem;
  max-width: min(400px, calc(100vw - 2.5rem));
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand-600);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  padding: 0.8rem 0.9rem;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast--success { border-left-color: var(--ok-600); }
.toast--error { border-left-color: var(--danger-600); }
.toast--warning { border-left-color: var(--amber-600); }

.toast__icon { color: var(--brand-600); margin-top: 0.05rem; }
.toast--success .toast__icon { color: var(--ok-600); }
.toast--error .toast__icon { color: var(--danger-600); }
.toast--warning .toast__icon { color: var(--amber-600); }

.toast__text { margin: 0; font-size: 0.865rem; color: var(--ink-800); }

.toast__close {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--ink-300);
  cursor: pointer;
  padding: 0;
  line-height: 1;
  display: inline-flex;
}

.toast__close:hover { color: var(--ink-800); }

/* --- Etats vides ---------------------------------------------------------- */

.empty-state {
  color: var(--ink-400);
  font-size: 0.875rem;
  text-align: center;
  padding: 1.75rem 1rem;
}

.empty-state-block { text-align: center; padding: 2.5rem 1.5rem; color: var(--ink-400); }
.empty-state-block img { width: 100px; opacity: 0.75; margin: 0 auto 1rem; }
.empty-state-block__title { font-size: 1rem; margin-bottom: 0.3rem; }
.empty-state-block__text { font-size: 0.855rem; margin: 0; }

/* --- Pages d'erreur (404, 403) ------------------------------------------- */

.errorpage {
  max-width: 34rem;
  margin: 0 auto;
  text-align: center;
}

.errorpage__code {
  font-family: var(--font-mono);
  font-size: clamp(3.5rem, 12vw, 5.5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--brand-100);
  margin: 0 0 0.5rem;
  user-select: none;
}

.errorpage__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.5rem;
}

.errorpage__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.4rem;
  justify-content: center;
  margin-top: 1.75rem;
}

.errorpage__links a {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--brand-700);
  font-weight: 650;
  font-size: 0.855rem;
  text-decoration: none;
}

.errorpage__links a:hover { text-decoration: underline; }
.errorpage__links .ic { color: var(--brand-500); }

.errorpage__urgent {
  margin-top: 1.75rem;
  text-align: left;
}

/* --- Pied de page --------------------------------------------------------- */

.site-footer {
  background: var(--brand-900);
  color: oklch(82% 0.02 14);
  border-radius: var(--radius-xl);
  margin: 1rem auto 1rem;
  max-width: var(--max-width);
  overflow: hidden;
}

.site-footer__inner {
  padding: 2.5rem 2.75rem 2rem;
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 2rem;
}

.site-footer__col { display: flex; flex-direction: column; gap: 0.45rem; }

.site-footer__col a {
  color: oklch(82% 0.02 14);
  text-decoration: none;
  font-size: 0.855rem;
  width: fit-content;
}

.site-footer__col a:hover { color: var(--surface); text-decoration: underline; }

.site-footer__brand {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--surface);
  margin: 0;
  letter-spacing: -0.03em;
}

.site-footer__tagline { font-size: 0.875rem; margin: 0; }

.site-footer__disclaimer {
  font-size: 0.79rem;
  color: oklch(70% 0.02 14);
  margin: 0.4rem 0 0;
  max-width: 40ch;
}

.site-footer__heading {
  font-size: 0.73rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: oklch(68% 0.03 14);
  margin: 0 0 0.25rem;
}

.site-footer__bottom {
  border-top: 1px solid oklch(100% 0 0 / 0.1);
  padding: 1rem 2.75rem;
  text-align: center;
}

.site-footer__bottom p { margin: 0; font-size: 0.8rem; color: oklch(70% 0.02 14); }

/* --- Authentification ----------------------------------------------------- */

.auth-shell {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 560px;
}

.auth-shell__panel {
  background: linear-gradient(150deg, var(--brand-700), var(--brand-900));
  color: oklch(90% 0.02 14);
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.auth-shell__panel::after {
  content: "";
  position: absolute;
  inset: auto -20% -35% auto;
  width: 70%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: oklch(100% 0 0 / 0.06);
}

.auth-shell__mark {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--surface);
  margin-bottom: 2rem;
  text-decoration: none;
  position: relative;
  z-index: 1;
}

.auth-shell__eyebrow {
  font-size: 0.73rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--brand-200);
  margin-bottom: 0.6rem;
  position: relative;
  z-index: 1;
}

.auth-shell__title {
  color: var(--surface);
  font-size: 1.6rem;
  margin-bottom: 0.7rem;
  position: relative;
  z-index: 1;
}

.auth-shell__lead {
  color: oklch(84% 0.02 14);
  max-width: 38ch;
  font-size: 0.885rem;
  position: relative;
  z-index: 1;
}

.auth-shell__form-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
}

.auth-card { width: 100%; max-width: 360px; }
.auth-card__eyebrow { font-size: 0.79rem; color: var(--ink-400); margin-bottom: 0.2rem; }
.auth-card__title { font-size: 1.45rem; margin-bottom: 0.35rem; }
.auth-card__subtitle { color: var(--ink-400); font-size: 0.875rem; margin-bottom: 1.5rem; }
.auth-card__submit { width: 100%; margin-top: 0.35rem; }

.auth-card__back {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 1.25rem;
  font-size: 0.845rem;
  color: var(--ink-400);
  text-decoration: none;
}

.auth-card__back:hover { color: var(--brand-700); }

/* --- Portail : structure -------------------------------------------------- */

.portal-body { background: var(--canvas); }

.portal-shell {
  display: grid;
  grid-template-columns: 250px 1fr;
  min-height: 100vh;
}

.portal-sidebar {
  background: var(--brand-900);
  color: oklch(84% 0.02 14);
  padding: 1.25rem 0.85rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.portal-sidebar__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--surface);
  text-decoration: none;
  padding: 0.3rem 0.55rem 1.25rem;
  letter-spacing: -0.03em;
}

.portal-nav { display: grid; gap: 0.15rem; }

.portal-nav__link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.58rem 0.7rem;
  border-radius: var(--radius-sm);
  color: oklch(80% 0.02 14);
  text-decoration: none;
  font-size: 0.865rem;
  font-weight: 550;
  transition: background 0.14s ease, color 0.14s ease;
}

.portal-nav__link:hover { background: oklch(100% 0 0 / 0.08); color: var(--surface); }

.portal-nav__link.is-active {
  background: oklch(100% 0 0 / 0.14);
  color: var(--surface);
  font-weight: 650;
}

.portal-nav__section {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: oklch(64% 0.03 14);
  margin: 1.25rem 0 0.4rem 0.7rem;
}

.portal-sidebar__footer {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding-top: 1rem;
  border-top: 1px solid oklch(100% 0 0 / 0.12);
}

.portal-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-pill);
  background: var(--brand-500);
  color: var(--surface);
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.portal-sidebar__user { min-width: 0; flex: 1; }

.portal-sidebar__username {
  margin: 0;
  font-size: 0.845rem;
  font-weight: 650;
  color: var(--surface);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-sidebar__role { margin: 0; font-size: 0.73rem; color: oklch(70% 0.02 14); }

.portal-sidebar__logout {
  color: oklch(76% 0.02 14);
  display: inline-flex;
  padding: 0.35rem;
  border-radius: var(--radius-xs);
  text-decoration: none;
}

.portal-sidebar__logout:hover { background: oklch(100% 0 0 / 0.12); color: var(--surface); }

.portal-main { min-width: 0; display: flex; flex-direction: column; }

.portal-topbar {
  display: none;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 1.1rem;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 30;
}

.portal-topbar__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xs);
  color: var(--ink-800);
  cursor: pointer;
}

.portal-topbar .portal-sidebar__brand { color: var(--ink-900); padding: 0; }

.portal-content { padding: 1.5rem 1.75rem 2.5rem; width: 100%; }

.portal-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.35rem;
}

.portal-page-title { font-size: 1.35rem; font-weight: 760; }

/* --- Portail : analytics -------------------------------------------------- */

.alert-banner {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  background: var(--danger-100);
  border: 1px solid oklch(54% 0.19 27 / 0.22);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.1rem;
  margin-bottom: 1.25rem;
}

.alert-banner__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--danger-600);
  flex-shrink: 0;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 oklch(54% 0.19 27 / 0.5); }
  50% { box-shadow: 0 0 0 6px oklch(54% 0.19 27 / 0); }
}

.alert-banner__text { margin: 0; font-size: 0.875rem; color: var(--danger-700); }
.alert-banner__text a { color: var(--danger-700); font-weight: 650; }

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.1rem;
}

.kpi {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.2rem;
  overflow: hidden;
}

.kpi::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--kpi-color, var(--brand-600));
}

.kpi__head {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.55rem;
}

.kpi__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-xs);
  background: var(--kpi-soft, var(--brand-050));
  color: var(--kpi-color, var(--brand-700));
}

.kpi__label { margin: 0; font-size: 0.78rem; color: var(--ink-400); font-weight: 600; }

.kpi__value {
  font-size: 1.7rem;
  font-weight: 780;
  color: var(--ink-900);
  margin: 0;
  line-height: 1;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
}

.kpi__foot { margin: 0.4rem 0 0; font-size: 0.755rem; color: var(--ink-400); }

.kpi--brand { --kpi-color: var(--chart-1); --kpi-soft: oklch(95% 0.03 195); }
.kpi--danger { --kpi-color: var(--danger-600); --kpi-soft: var(--danger-100); }
.kpi--info   { --kpi-color: var(--chart-6); --kpi-soft: oklch(95% 0.035 255); }
.kpi--ok     { --kpi-color: var(--chart-2); --kpi-soft: oklch(95% 0.04 145); }

.analytics-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 0.85rem;
  margin-bottom: 1.1rem;
}

.chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.1rem;
}

.chart-card, .portal-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.chart-card { padding: 1.25rem; }

.chart-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.1rem;
}

.chart-card__title { font-size: 0.94rem; font-weight: 700; margin: 0; }
.chart-card__hint { font-size: 0.775rem; color: var(--ink-400); margin: 0.15rem 0 0; }

/* Barres horizontales colorees */
.bar-row {
  display: grid;
  grid-template-columns: 108px 1fr 52px;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.55rem;
}

.bar-row:last-child { margin-bottom: 0; }

.bar-row__label {
  font-size: 0.815rem;
  color: var(--ink-600);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-row__track {
  height: 10px;
  background: var(--surface-3);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.bar-row__fill {
  display: block;
  height: 100%;
  background: var(--bar-color, var(--brand-600));
  border-radius: inherit;
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  min-width: 3px;
}

.bar-row__value {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 650;
  color: var(--ink-800);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.bar-row__value span { color: var(--ink-300); font-weight: 500; }

/* Barre d'avancement empilee, pour lire une progression dans un tableau */
.mini-bar {
  display: flex;
  width: 100%;
  height: 7px;
  border-radius: var(--radius-pill);
  overflow: hidden;
  background: var(--surface-3);
}

.mini-bar__part { display: block; height: 100%; }

.mini-bar__legend {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.745rem;
  color: var(--ink-400);
}

/* Histogramme vertical (evolution) */
.timeseries {
  display: flex;
  align-items: flex-end;
  gap: 0.4rem;
  height: 168px;
  padding-top: 0.5rem;
}

.timeseries__col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  height: 100%;
  justify-content: flex-end;
}

.timeseries__bar {
  width: 100%;
  max-width: 42px;
  background: linear-gradient(180deg, var(--chart-1), oklch(62% 0.09 195));
  border-radius: 6px 6px 3px 3px;
  min-height: 4px;
  position: relative;
  transition: height 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.timeseries__bar[data-zero="1"] { background: var(--surface-3); }

.timeseries__count {
  position: absolute;
  top: -1.15rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.73rem;
  font-weight: 700;
  color: var(--ink-600);
  font-variant-numeric: tabular-nums;
}

.timeseries__label {
  font-size: 0.72rem;
  color: var(--ink-400);
  white-space: nowrap;
}

/* Anneau de repartition */
.donut-wrap {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  flex-wrap: wrap;
}

.donut { position: relative; flex-shrink: 0; }
.donut svg { transform: rotate(-90deg); display: block; }

.donut__center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.donut__total {
  font-size: 1.35rem;
  font-weight: 780;
  color: var(--ink-900);
  line-height: 1;
  letter-spacing: -0.03em;
}

.donut__caption { font-size: 0.7rem; color: var(--ink-400); }

.legend { display: grid; gap: 0.45rem; flex: 1; min-width: 170px; }

.legend__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.815rem;
  color: var(--ink-600);
}

.legend__dot {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  flex-shrink: 0;
}

.legend__value {
  margin-left: auto;
  font-family: var(--font-mono);
  font-weight: 650;
  color: var(--ink-800);
  font-variant-numeric: tabular-nums;
}

.legend__pct { color: var(--ink-300); font-weight: 500; margin-left: 0.3rem; }

/* --- Portail : panneaux et tableaux --------------------------------------- */

.portal-panel { padding: 1.25rem; margin-bottom: 1.1rem; }
.portal-panel--narrow { max-width: 620px; }

.portal-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.portal-panel__title { font-size: 0.98rem; font-weight: 700; }

.portal-tabs {
  display: flex;
  gap: 0.3rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}

.portal-tabs__link {
  padding: 0.55rem 0.9rem;
  font-size: 0.865rem;
  font-weight: 600;
  color: var(--ink-400);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.portal-tabs__link:hover { color: var(--ink-900); }
.portal-tabs__link.is-active { color: var(--brand-700); border-bottom-color: var(--brand-600); }

.filter-bar {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 1.1rem;
}

.filter-bar select, .filter-bar input {
  width: auto;
  min-width: 150px;
  padding: 0.5rem 0.7rem;
  font-size: 0.865rem;
}

.filter-bar__search { flex: 1; min-width: 210px !important; }

.table-wrap { overflow-x: auto; }

.table { width: 100%; border-collapse: collapse; font-size: 0.865rem; }

.table th {
  text-align: left;
  font-size: 0.71rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-400);
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.table td {
  padding: 0.72rem 0.8rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink-600);
}

.table tbody tr:last-child td { border-bottom: none; }

.table__row-link { cursor: pointer; transition: background 0.12s ease; }
.table__row-link:hover { background: var(--brand-050); }

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 1.25rem;
  font-size: 0.845rem;
  color: var(--ink-400);
}

.pagination a {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: var(--surface);
  text-decoration: none;
  font-weight: 600;
}

.pagination a:hover { border-color: var(--brand-500); }

.detail-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 1rem;
  align-items: start;
}

.detail-list { display: grid; gap: 0.75rem; margin: 0; }

.detail-list dt {
  font-size: 0.71rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-400);
}

.detail-list dd { margin: 0.12rem 0 0; color: var(--ink-900); font-size: 0.885rem; }

.map-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 1.25rem; margin-bottom: 1.1rem; }

.map-insights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.75rem;
  margin-top: 1.1rem;
}

.map-insight-card {
  display: block;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.95rem 1.05rem;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease;
}

.map-insight-card:hover,
.map-insight-card:focus-visible { border-color: var(--ink-300); }

.map-insight-card__region { font-weight: 700; color: var(--ink-900); margin-bottom: 0.35rem; font-size: 0.9rem; }

.map-insight-card__stat {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.79rem;
  color: var(--ink-400);
  padding: 0.12rem 0;
}

.map-insight-card__stat strong {
  color: var(--ink-800);
  font-variant-numeric: tabular-nums;
}

#sh-map {
  height: clamp(320px, 60vh, 520px);
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--line);
  z-index: 0;
}

.map-legend { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 0.85rem; }
.map-legend__item { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.79rem; color: var(--ink-400); }
.map-legend__dot { width: 10px; height: 10px; border-radius: 50%; }

.sh-map-popup { font-family: var(--font-body); font-size: 0.845rem; }
.sh-map-popup h4 { margin: 0 0 0.3rem; }
.sh-map-popup p { margin: 0.1rem 0; }
.sh-map-popup a { display: inline-block; margin-top: 0.4rem; font-weight: 600; }

/* --- Animations ----------------------------------------------------------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-reveal].is-visible { opacity: 1; transform: none; }

/* --- Responsive ----------------------------------------------------------- */

@media (max-width: 1080px) {
  .navbar__toggle { display: inline-flex; }

  .navbar__links {
    position: absolute;
    top: 100%;
    left: 0.75rem;
    right: 0.75rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.1rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
    display: none;
  }

  .navbar__links.is-open { display: flex; }
  .navbar__links a { padding: 0.65rem 0.8rem; }
  .navbar__inner { gap: 0.6rem; }
  .navbar__actions { margin-left: auto; }

  .analytics-grid { grid-template-columns: 1fr; }
}

@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; gap: 2rem; padding: 2.5rem 1.75rem 2rem; }
  .hero__visual { min-height: 290px; }
  .panel__inner { padding: 2.25rem 1.75rem; }
  .stat-strip { padding: 0 1.75rem 1.75rem; grid-template-columns: repeat(2, 1fr); }
  .detail-grid { grid-template-columns: 1fr; }
  .site-footer__inner { grid-template-columns: 1fr 1fr; gap: 1.75rem; padding: 2rem 1.75rem 1.5rem; }
  .auth-shell { grid-template-columns: 1fr; min-height: 0; }
  .auth-shell__panel { display: none; }

  .portal-shell { grid-template-columns: 1fr; }
  .portal-topbar { display: flex; }

  .portal-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 250px;
    z-index: 80;
    transform: translateX(-100%);
    transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: var(--shadow-lg);
  }

  .portal-sidebar.is-open { transform: none; }
  .portal-content { padding: 1.25rem 1.1rem 2rem; }
}

@media (max-width: 820px) {
  .navbar__hide-mobile { display: none; }
  .steps-grid, .card-grid--3 { grid-template-columns: 1fr; }
  .form__row-2, .form__row-3 { grid-template-columns: 1fr; }
  .choice-grid, .choice-grid--2 { grid-template-columns: 1fr; }
  .bar-row { grid-template-columns: 88px 1fr 46px; }
  .timeseries { height: 140px; }
}

@media (max-width: 560px) {
  .shell { padding: 0 0.6rem 0.6rem; }
  .panel { border-radius: var(--radius-lg); }
  .panel__inner { padding: 1.6rem 1.2rem; }
  .hero { padding: 1.75rem 1.2rem 1.5rem; }
  .stat-strip { padding: 0 1.2rem 1.2rem; gap: 0.5rem; }
  .wizard__card, .form--card { padding: 1.1rem; }
  .site-footer { border-radius: var(--radius-lg); margin-inline: 0.6rem; }
  .site-footer__inner { grid-template-columns: 1fr; padding: 1.75rem 1.35rem 1.25rem; }
  .site-footer__bottom { padding: 0.9rem 1.35rem; }
  .toast-stack { top: auto; bottom: 0.75rem; right: 0.75rem; left: 0.75rem; max-width: none; }
  .wizard__actions { flex-direction: column-reverse; align-items: stretch; }
  .wizard__actions .btn { width: 100%; }
  .wizard__actions .btn--primary { margin-left: 0; }
  .navbar__brand span { display: none; }
  .exit-btn span { display: none; }
  .exit-btn { padding: 0.42rem 0.55rem; }
  .code-result__code { font-size: 1.4rem; }
  .donut-wrap { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}

@media print {
  .navbar, .site-footer, .toast-stack, .wizard__actions { display: none !important; }
}
