/* Import prospection → CRM — feuille de style
   Registre product, thème clair. Couleurs OKLCH (neutres teintés bleu Reanova),
   accent restreint. Typo Plus Jakarta Sans. Motion transform/opacity ease-out. */

:root {
  /* Neutres teintés vers le bleu (hue ~242) — jamais de #000 / #fff */
  --bg: oklch(0.984 0.005 242);
  --surface: oklch(0.997 0.003 242);
  --surface-2: oklch(0.966 0.006 242);
  --surface-3: oklch(0.945 0.008 242);
  --border: oklch(0.905 0.009 242);
  --border-strong: oklch(0.84 0.012 242);
  --text: oklch(0.28 0.024 256);
  --text-muted: oklch(0.52 0.02 256);
  --text-faint: oklch(0.63 0.016 256);

  /* Accent bleu Reanova (#50AFF0) */
  --brand: oklch(0.72 0.128 238);
  --brand-strong: oklch(0.6 0.14 245);
  --brand-ink: oklch(0.4 0.1 252);
  --brand-tint: oklch(0.955 0.028 238);
  --brand-tint-2: oklch(0.93 0.045 238);
  --on-brand: oklch(0.99 0.01 238);
  --ring: oklch(0.72 0.128 238 / 0.4);

  --success: oklch(0.62 0.14 150);
  --success-tint: oklch(0.95 0.04 150);
  --warn: oklch(0.7 0.14 78);
  --warn-tint: oklch(0.965 0.05 86);
  --warn-ink: oklch(0.46 0.1 70);
  --danger: oklch(0.58 0.2 27);
  --danger-tint: oklch(0.96 0.04 27);

  /* Échelle DPE officielle (A vert → G rouge) */
  --dpe-A: oklch(0.7 0.16 152);
  --dpe-B: oklch(0.78 0.16 142);
  --dpe-C: oklch(0.86 0.16 124);
  --dpe-D: oklch(0.86 0.15 98);
  --dpe-E: oklch(0.8 0.15 72);
  --dpe-F: oklch(0.7 0.17 46);
  --dpe-G: oklch(0.61 0.22 29);

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
  --r-sm: 7px; --r: 11px; --r-lg: 16px; --r-pill: 999px;

  --shadow-sm: 0 1px 2px oklch(0.4 0.05 256 / 0.06), 0 1px 3px oklch(0.4 0.05 256 / 0.05);
  --shadow: 0 4px 12px oklch(0.4 0.05 256 / 0.08), 0 2px 4px oklch(0.4 0.05 256 / 0.05);
  --shadow-lg: 0 18px 50px oklch(0.35 0.06 256 / 0.16), 0 6px 16px oklch(0.35 0.06 256 / 0.08);

  --fs-xs: 0.75rem; --fs-sm: 0.8125rem; --fs-base: 0.875rem;
  --fs-md: 1rem; --fs-lg: 1.25rem; --fs-xl: 1.6rem;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --d-fast: 130ms; --d: 240ms; --d-slow: 440ms;

  --maxw: 1240px;
  --appbar-h: 64px;
}

* { box-sizing: border-box; }
/* L'attribut `hidden` doit l'emporter sur les `display:flex/grid` des composants. */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: var(--fs-base);
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100dvh;
}
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }
button { font-family: inherit; }
.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;
}

/* ---------- App bar ---------- */
.appbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: var(--s5);
  min-height: var(--appbar-h);
  padding: var(--s3) var(--s5);
  background: oklch(0.997 0.003 242 / 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.appbar__brand { display: flex; align-items: center; gap: var(--s3); }
.appbar__mark {
  display: grid; place-items: center; width: 38px; height: 38px;
  border-radius: var(--r);
  background: linear-gradient(160deg, var(--brand), var(--brand-strong));
  color: var(--on-brand);
  box-shadow: 0 4px 12px oklch(0.72 0.128 238 / 0.4);
}
.appbar__mark svg { width: 21px; height: 21px; }
.appbar__titles h1 { font-size: var(--fs-md); font-weight: 800; line-height: 1.1; }
.appbar__titles p { font-size: var(--fs-xs); color: var(--text-muted); }

.stepper {
  display: flex; align-items: center; gap: var(--s2);
  list-style: none; margin: 0 auto; padding: 0;
  font-size: var(--fs-sm); color: var(--text-faint);
}
.stepper li {
  display: flex; align-items: center; gap: var(--s2);
  padding: 4px 10px 4px 4px; border-radius: var(--r-pill);
  transition: color var(--d) var(--ease-out), background var(--d) var(--ease-out);
}
.stepper li span {
  display: grid; place-items: center; width: 22px; height: 22px;
  border-radius: var(--r-pill); background: var(--surface-3); color: var(--text-faint);
  font-size: var(--fs-xs); font-weight: 700;
  transition: all var(--d) var(--ease-out);
}
.stepper li.is-current { color: var(--brand-ink); background: var(--brand-tint); }
.stepper li.is-current span { background: var(--brand); color: var(--on-brand); }
.stepper li.is-done { color: var(--text-muted); }
.stepper li.is-done span { background: var(--success); color: var(--on-brand); }

.appbar__user { display: flex; align-items: center; gap: var(--s3); }
.appbar__user-info { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; }
.appbar__user-name { font-weight: 600; font-size: var(--fs-sm); }
.appbar__user-sub { font-size: var(--fs-xs); color: var(--text-faint); }

/* ---------- Layout ---------- */
.main { max-width: var(--maxw); margin: 0 auto; padding: var(--s5); width: 100%; }
.main.has-selection { padding-bottom: 96px; } /* dégage la barre d'action flottante */
.view { animation: rise var(--d-slow) var(--ease-out) backwards; }

/* ---------- Boutons ---------- */
.btn {
  --btn-bg: var(--surface); --btn-fg: var(--text);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  padding: 10px 18px; border-radius: var(--r); border: 1px solid transparent;
  background: var(--btn-bg); color: var(--btn-fg);
  font-size: var(--fs-base); font-weight: 600; cursor: pointer;
  transition: transform var(--d-fast) var(--ease-out), background var(--d-fast) var(--ease-out),
    box-shadow var(--d-fast) var(--ease-out), border-color var(--d-fast) var(--ease-out), opacity var(--d-fast);
  white-space: nowrap; -webkit-tap-highlight-color: transparent;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.985); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); }
.btn--primary { --btn-bg: var(--brand); --btn-fg: var(--on-brand); box-shadow: 0 2px 8px oklch(0.72 0.128 238 / 0.32); }
.btn--primary:hover { --btn-bg: var(--brand-strong); box-shadow: 0 6px 18px oklch(0.72 0.128 238 / 0.4); }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--text-muted); border-color: var(--border-strong); }
.btn--ghost:hover { --btn-bg: var(--surface-2); --btn-fg: var(--text); }
.btn--sm { padding: 6px 12px; font-size: var(--fs-sm); border-radius: var(--r-sm); }
.btn--lg { padding: 13px 22px; font-size: var(--fs-md); width: 100%; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.btn .spinner { display: none; }
.btn.is-loading .btn__label { opacity: 0.7; }
.btn.is-loading .spinner { display: inline-block; }

.spinner {
  width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid oklch(1 0 0 / 0.45); border-top-color: var(--on-brand);
  animation: spin 0.7s linear infinite;
}

/* ---------- Connexion ---------- */
.view--login { display: grid; place-items: center; min-height: calc(100dvh - var(--appbar-h) - var(--s6)); }
.login-card {
  width: 100%; max-width: 430px; padding: var(--s6);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: var(--s4);
}
.login-card h2 { font-size: var(--fs-lg); }
.login-card__hint { font-size: var(--fs-sm); color: var(--text-muted); margin-top: calc(var(--s2) * -1); }
.login-card__meta { font-size: var(--fs-xs); color: var(--text-faint); }
.login-card__meta b { color: var(--text-muted); font-weight: 600; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field__label { font-size: var(--fs-sm); font-weight: 600; color: var(--text-muted); }
input[type="text"], input[type="password"], input[type="number"] {
  width: 100%; padding: 10px 12px; font-size: var(--fs-base); color: var(--text);
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r);
  transition: border-color var(--d-fast) var(--ease-out), box-shadow var(--d-fast) var(--ease-out);
}
input::placeholder { color: var(--text-faint); }
input:focus-visible { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring); }
input[type="number"] { appearance: textfield; -moz-appearance: textfield; }

.select {
  width: 100%; max-width: 340px; padding: 10px 12px; font-size: var(--fs-base); color: var(--text);
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r); cursor: pointer;
  transition: border-color var(--d-fast) var(--ease-out), box-shadow var(--d-fast) var(--ease-out);
}
.select:focus-visible { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring); }
.filters__label-sub { font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--text-faint); }

.places-on, .places-off { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; min-height: 40px; }
.places-off .select { max-width: 280px; }
.places-badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: var(--r-pill); background: var(--success-tint); color: var(--success); font-weight: 700; font-size: var(--fs-sm); }
.places-note { color: var(--text-faint); font-size: var(--fs-xs); }
.linklike { background: none; border: 0; padding: 0; color: var(--brand-strong); font: inherit; font-size: var(--fs-sm); cursor: pointer; text-decoration: none; }
.linklike:hover { text-decoration: underline; }

/* ---------- Filtres ---------- */
.filters {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
  padding: var(--s4) var(--s5); display: flex; flex-direction: column; gap: var(--s4);
}
.filters__row { display: flex; flex-wrap: wrap; gap: var(--s5); align-items: flex-end; }
.filters__group { display: flex; flex-direction: column; gap: 7px; }
.filters__group--grow { flex: 1; min-width: 240px; }
.filters__group--loc { flex: 1; min-width: 280px; }
.filters__label { font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-faint); }

.seg {
  display: inline-flex; padding: 3px; gap: 2px; align-self: flex-start;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-pill);
  margin-bottom: 7px;
}
.seg__btn {
  border: 0; background: transparent; color: var(--text-muted);
  padding: 5px 14px; border-radius: var(--r-pill); font-size: var(--fs-sm); font-weight: 600; cursor: pointer;
  transition: background var(--d-fast) var(--ease-out), color var(--d-fast) var(--ease-out);
}
.seg__btn.is-active { background: var(--surface); color: var(--brand-ink); box-shadow: var(--shadow-sm); }

.combo { position: relative; }
.combo__menu {
  position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; right: 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r);
  box-shadow: var(--shadow-lg); overflow: hidden; max-height: 280px; overflow-y: auto;
  animation: rise var(--d-fast) var(--ease-out);
}
.combo__item {
  display: flex; justify-content: space-between; gap: var(--s3); align-items: baseline;
  padding: 9px 12px; cursor: pointer; border: 0; width: 100%; text-align: left;
  background: transparent; font-size: var(--fs-base); color: var(--text);
  transition: background var(--d-fast);
}
.combo__item:hover, .combo__item.is-active { background: var(--brand-tint); }
.combo__item b { font-weight: 600; }
.combo__item span { font-size: var(--fs-xs); color: var(--text-faint); }
.loc-input__picked {
  display: inline-flex; align-items: center; gap: 6px; align-self: flex-start;
  margin-top: 7px; padding: 4px 10px 4px 12px; font-size: var(--fs-sm);
  background: var(--brand-tint); color: var(--brand-ink); border-radius: var(--r-pill); font-weight: 600;
}

.num { width: 120px; }
.num--year { width: 86px; text-align: center; }
.years { display: flex; align-items: center; gap: var(--s2); }
.years__dash { color: var(--text-faint); }

.chips { display: flex; flex-wrap: wrap; gap: var(--s2); }
.chip {
  border: 1px solid var(--border-strong); background: var(--surface);
  color: var(--text-muted); border-radius: var(--r-pill); cursor: pointer;
  font-weight: 600; transition: all var(--d-fast) var(--ease-out);
}
.chip:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); }
.chip--dpe {
  width: 38px; height: 38px; font-size: var(--fs-md); font-weight: 800; display: grid; place-items: center;
}
.chip--dpe.is-on { color: var(--on-brand); border-color: transparent; transform: scale(1.04); box-shadow: var(--shadow-sm); }
.chip--dpe[data-e="A"].is-on { background: var(--dpe-A); }
.chip--dpe[data-e="B"].is-on { background: var(--dpe-B); }
.chip--dpe[data-e="C"].is-on { background: var(--dpe-C); color: var(--text); }
.chip--dpe[data-e="D"].is-on { background: var(--dpe-D); color: var(--text); }
.chip--dpe[data-e="E"].is-on { background: var(--dpe-E); color: var(--text); }
.chip--dpe[data-e="F"].is-on { background: var(--dpe-F); }
.chip--dpe[data-e="G"].is-on { background: var(--dpe-G); }
.chip--period { padding: 6px 13px; font-size: var(--fs-sm); }
.chip--period.is-on { background: var(--brand); color: var(--on-brand); border-color: transparent; }

.disclosure {
  align-self: flex-start; border: 0; background: transparent; color: var(--brand-strong);
  font-size: var(--fs-sm); font-weight: 600; cursor: pointer; padding: 4px 0; display: inline-flex; gap: 4px; align-items: center;
}
.disclosure__chevron { transition: transform var(--d) var(--ease-out); }
.disclosure[aria-expanded="true"] .disclosure__chevron { transform: rotate(180deg); }
.chips--periods { margin-top: var(--s2); }

.filters__actions { display: flex; gap: var(--s3); }

/* ---------- Résultats ---------- */
.results { margin-top: var(--s5); }
.results__bar {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s4);
  padding: 0 var(--s1) var(--s3);
}
.results__count { font-size: var(--fs-md); }
.results__count strong { font-weight: 800; font-variant-numeric: tabular-nums; }
.results__sub { color: var(--text-faint); font-size: var(--fs-sm); margin-left: var(--s2); }
.checkbox { display: inline-flex; align-items: center; gap: var(--s2); font-size: var(--fs-sm); color: var(--text-muted); cursor: pointer; user-select: none; }
.checkbox input { width: 17px; height: 17px; accent-color: var(--brand); cursor: pointer; }

.table-wrap {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  overflow: auto; box-shadow: var(--shadow-sm); max-height: calc(100dvh - 320px);
}
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-base); }
.table thead th {
  position: sticky; top: 0; z-index: 2; background: var(--surface-2);
  text-align: left; font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em;
  color: var(--text-faint); padding: 11px var(--s3); border-bottom: 1px solid var(--border); white-space: nowrap;
}
.table tbody td { padding: 9px var(--s3); border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr { transition: background var(--d-fast) var(--ease-out); }
.table tbody tr:hover { background: var(--surface-2); }
.table tbody tr.is-selected { background: var(--brand-tint); }
.table tbody tr.is-selected:hover { background: var(--brand-tint-2); }
.table tbody tr:last-child td { border-bottom: 0; }
.col-check { width: 44px; text-align: center; }
.col-check input { width: 17px; height: 17px; accent-color: var(--brand); cursor: pointer; }
.col-cp { width: 72px; }
.col-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.col-periode { white-space: nowrap; color: var(--text-muted); }
.td-adresse { font-weight: 600; }
.td-adresse .dpe-count {
  display: inline-block; margin-left: var(--s2); padding: 1px 7px; border-radius: var(--r-pill);
  background: var(--surface-3); color: var(--text-faint); font-size: var(--fs-xs); font-weight: 600;
}
.td-commune { color: var(--text-muted); }

.row-anim { animation: rise var(--d) var(--ease-out) backwards; animation-delay: var(--row-delay, 0ms); }

tr.is-existing { color: var(--text-faint); }
tr.is-existing .td-adresse { font-weight: 500; }
.badge-existing {
  display: inline-flex; align-items: center; gap: 4px; margin-left: var(--s2);
  padding: 1px 8px; border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: 600;
  background: var(--warn-tint); color: var(--warn-ink);
}
.td-syndic { max-width: 260px; display: flex; align-items: center; gap: 6px; }
.td-syndic__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.syndic-search { flex-shrink: 0; text-decoration: none; opacity: 0.5; font-size: 0.9em; line-height: 1; transition: opacity var(--d-fast) var(--ease-out); }
.syndic-search:hover { opacity: 1; }
.badge-missing {
  display: inline-flex; align-items: center; padding: 1px 8px; border-radius: var(--r-pill);
  font-size: var(--fs-xs); font-weight: 500; background: var(--surface-3); color: var(--text-faint);
}

.dpe-pill {
  display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: var(--r-sm);
  font-weight: 800; font-size: var(--fs-sm); color: var(--on-brand);
}
.dpe-pill[data-e="A"] { background: var(--dpe-A); }
.dpe-pill[data-e="B"] { background: var(--dpe-B); }
.dpe-pill[data-e="C"] { background: var(--dpe-C); color: var(--text); }
.dpe-pill[data-e="D"] { background: var(--dpe-D); color: var(--text); }
.dpe-pill[data-e="E"] { background: var(--dpe-E); color: var(--text); }
.dpe-pill[data-e="F"] { background: var(--dpe-F); }
.dpe-pill[data-e="G"] { background: var(--dpe-G); }
.dpe-pill[data-e="?"] { background: var(--surface-3); color: var(--text-faint); }

/* États vides / squelette */
.state { text-align: center; padding: var(--s7) var(--s5); color: var(--text-muted); }
.state__icon { font-size: 2.2rem; margin-bottom: var(--s3); opacity: 0.9; }
.state__title { font-size: var(--fs-md); font-weight: 700; color: var(--text); margin-bottom: 4px; }
.state__text { font-size: var(--fs-sm); max-width: 420px; margin: 0 auto; }
.skeleton { display: flex; flex-direction: column; gap: 1px; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--border); }
.skeleton::before, .skeleton span { content: ""; height: 42px; background: var(--surface-2); animation: pulse 1.3s var(--ease-out) infinite; }

.alert { padding: 10px 14px; border-radius: var(--r); font-size: var(--fs-sm); }
.alert--error { background: var(--danger-tint); color: var(--danger); }
.alert--warn { background: var(--warn-tint); color: var(--warn-ink); margin-bottom: var(--s3); }

/* ---------- Barre d'action sélection ---------- */
.actionbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex; justify-content: center; padding: var(--s4);
  pointer-events: none;
  animation: slideUp var(--d) var(--ease-out);
}
.actionbar__inner {
  pointer-events: auto; display: flex; align-items: center; gap: var(--s4);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-pill);
  box-shadow: var(--shadow-lg); padding: 9px 9px 9px var(--s5);
}
.actionbar__count { font-size: var(--fs-base); color: var(--text-muted); }
.actionbar__count strong { color: var(--text); font-weight: 800; font-variant-numeric: tabular-nums; }

/* ---------- Overlay import / compte-rendu ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: var(--s5);
  background: oklch(0.3 0.04 256 / 0.42); animation: fade var(--d) var(--ease-out);
}
.panel {
  width: 100%; max-width: 540px; background: var(--surface); border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg); padding: var(--s6); animation: rise var(--d) var(--ease-out);
}
.panel h2 { font-size: var(--fs-lg); margin-bottom: var(--s3); }
.panel__status { font-variant-numeric: tabular-nums; color: var(--text-muted); margin-bottom: var(--s3); }
.progress { height: 10px; background: var(--surface-3); border-radius: var(--r-pill); overflow: hidden; }
.progress__fill {
  display: block; height: 100%; width: 100%; border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--brand), var(--brand-strong));
  transform: scaleX(0); transform-origin: left; transition: transform var(--d) var(--ease-out);
}

.report-stats { display: flex; gap: var(--s5); margin-bottom: var(--s5); }
.report-stat { display: flex; flex-direction: column; gap: 2px; }
.report-stat__num { font-size: var(--fs-xl); font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.report-stat__label { font-size: var(--fs-sm); color: var(--text-muted); }
.report-stat--ok .report-stat__num { color: var(--success); }
.report-stat--skip .report-stat__num { color: var(--text-faint); }
.report-stat--err .report-stat__num { color: var(--danger); }
.report-list { max-height: 230px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--s5); }
.report-item { display: flex; align-items: center; gap: var(--s3); font-size: var(--fs-sm); padding: 7px 11px; border-radius: var(--r-sm); background: var(--surface-2); }
.report-item__icon { flex-shrink: 0; }
.report-item__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report-item a { color: var(--brand-strong); text-decoration: none; font-weight: 600; }
.report-item a:hover { text-decoration: underline; }
.report-item--err { background: var(--danger-tint); color: var(--danger); }
.panel__actions { display: flex; justify-content: flex-end; }

/* ---------- Toasts ---------- */
.toast-zone { position: fixed; top: calc(var(--appbar-h) + var(--s3)); right: var(--s5); z-index: 60; display: flex; flex-direction: column; gap: var(--s2); }
.toast {
  background: var(--text); color: var(--surface); padding: 10px 16px; border-radius: var(--r);
  box-shadow: var(--shadow-lg); font-size: var(--fs-sm); font-weight: 500; max-width: 320px;
  animation: slideIn var(--d) var(--ease-out);
}
.toast--error { background: var(--danger); }
.toast--success { background: var(--success); }

/* ---------- Animations ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes slideIn { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .stepper { display: none; }
  .appbar { gap: var(--s3); }
}
@media (max-width: 600px) {
  .main { padding: var(--s4); }
  .filters { padding: var(--s4); }
  .appbar__titles p { display: none; }
  .table-wrap { max-height: none; }
}

/* ---------- Accessibilité : mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .btn:hover { transform: none; }
}
