/* Jetons repris à l'identique du site public pronolulu.com (rules_UI). */

:root {
  --bg: #05070c;
  --bg2: #080b12;
  --panel: #0c111b;

  --lime: #ccff00;
  --emerald: #00e87a;
  --red: #ff5c86;
  --grad: linear-gradient(110deg, #ccff00, #00e87a);
  --grad-soft: linear-gradient(110deg, rgba(204, 255, 0, .18), rgba(0, 232, 122, .14));

  /* Pastilles d'entité : teintes propres au produit, jamais celles d'un club, attribuées par
     api-sportmonks (src/visual-identity/palette.ts). Luminosité égale : inchangées en thème clair. */
  --marker-01: #5fcb83;
  --marker-02: #00ceb9;
  --marker-03: #00c8e7;
  --marker-04: #4fbbff;
  --marker-05: #92aaff;
  --marker-06: #c399fd;
  --marker-07: #e68dd9;
  --marker-08: #fb87a9;
  --marker-09: #ff8c75;
  --marker-10: #f19a42;
  --marker-11: #d2ad28;
  --marker-12: #a1bf4d;
  --marker-ink: #08130d;

  --ink: #f3f7fb;
  --muted: #9aa6bd;
  --faint: #7d88a0; /* AA : 4,5:1 minimum sur --bg, --bg2 et --panel */

  --glass: rgba(255, 255, 255, .045);
  --glass-brd: rgba(255, 255, 255, .16);
  --line: rgba(255, 255, 255, .12);
  --shadow: 0 30px 80px rgba(0, 0, 0, .5);
  --glow: 0 0 50px rgba(25, 240, 166, .28);
  --topbar-bg: rgba(6, 9, 15, .55);
  --halo: rgba(0, 232, 122, .15);
  /* Sombre dans les deux thèmes : ce qu'il recouvre doit reculer. */
  --scrim: rgba(2, 6, 12, .62);

  --scroll-thumb: rgba(255, 255, 255, .16);
  --scroll-thumb-hover: var(--emerald);

  --r: 16px;
  --r-lg: 24px;
  --r-xl: 34px;
  --pill: 100px;

  --disp: "Space Grotesk", sans-serif;
  --body: "Inter", sans-serif;

  /* --fs-xs est le plancher, réservé aux micro-libellés ; --fs-sm pour tout texte lu pour lui-même. */
  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-md: 1rem;
  --fs-lg: 1.25rem;
  --fs-xl: 1.5rem;
  --fs-2xl: 2rem;

  --ease: cubic-bezier(.22, 1, .36, 1);
  --dur: 220ms;

  --gap-xs: 8px;
  --gap-sm: 12px;
  --gap: 18px;
  --gap-lg: 28px;

  --content-max: 1440px;

  /* Alias de la famille « Tribune » : la structure des Tribunes avec la typographie du produit.
     Un var() non résolu invalide toute la déclaration, sans erreur en console. */

  --bg-base: var(--bg);
  --bg-surface: var(--panel);
  --bg-card: var(--panel);
  --bg-elevated: rgba(255, 255, 255, .06);
  --bg-inset: rgba(255, 255, 255, .08);
  --surface-hover: rgba(255, 255, 255, .06);

  /* --border-default (survol, état actif) reste plus marqué que --border-subtle. */
  --border-subtle: var(--line);
  --border-default: rgba(255, 255, 255, .20);

  --text-100: var(--ink);
  --text-primary: var(--ink);
  --text-60: var(--muted);
  --text-30: var(--faint);
  --text-muted: var(--faint);

  /* --yellow est le nom Tribunes de notre --lime, gardé pour copier leur CSS sans retouche. */
  --yellow: var(--lime);
  --yellow-dim: rgba(204, 255, 0, .10);
  --yellow-border: rgba(204, 255, 0, .25);
  --yellow-glow: var(--glow);
  --brand: var(--lime);
  --green: var(--emerald);
  --color-error: var(--red);

  --r-xs: 4px;
  --r-sm: 8px;
  --r-md: var(--r);
  --radius-sm: var(--r-sm);
  --radius-md: var(--r);
  --radius-lg: var(--r-lg);
  --radius-full: var(--pill);

  --space-xs: var(--gap-xs);
  --space-sm: var(--gap-sm);
  --space-md: var(--gap);
  --space-lg: var(--gap-lg);

  --font-display: var(--disp);
  --font-body: var(--body);
  --t-fast: 130ms;
  --t-base: var(--dur);

  /* Blanc dans les deux thèmes : un logo sombre transparent resterait visible. */
  --avatar-bg: #ffffff;

  --shadow-card: 0 2px 8px rgba(0, 0, 0, .18), 0 0 0 1px rgba(255, 255, 255, .03);
}

:root[data-theme="light"] {
  --bg: #eef3f0;
  --bg2: #f6faf7;
  --panel: #ffffff;
  --lime: #49c14f;
  --emerald: #2da635;
  --red: #e13a63;
  --grad: linear-gradient(110deg, #49c14f, #2da635);
  --grad-soft: linear-gradient(110deg, rgba(73, 193, 79, .16), rgba(45, 166, 53, .12));
  --ink: #08130d;
  --muted: #4a5a55;
  --faint: #5f7079; /* AA : 4,5:1 minimum sur --bg, --bg2 et --panel */
  --glass: rgba(255, 255, 255, .7);
  --glass-brd: rgba(10, 40, 30, .10);
  --line: rgba(10, 40, 30, .12);
  --shadow: 0 24px 60px rgba(20, 70, 50, .14);
  --glow: 0 0 44px rgba(8, 168, 119, .2);
  --topbar-bg: rgba(246, 250, 247, .7);
  --halo: rgba(45, 166, 53, .13);
  --scrim: rgba(8, 19, 13, .5);
  --scroll-thumb: rgba(10, 40, 30, .22);

  /* Les alias à valeur littérale doivent être redéfinis pour le thème clair. */
  --bg-elevated: rgba(10, 40, 30, .04);
  --bg-inset: rgba(10, 40, 30, .06);
  --surface-hover: rgba(10, 40, 30, .05);

  --yellow-dim: rgba(73, 193, 79, .12);
  --yellow-border: rgba(73, 193, 79, .28);

  --shadow-card: 0 2px 8px rgba(20, 70, 50, .08), 0 0 0 1px rgba(10, 40, 30, .04);

  --border-default: rgba(10, 40, 30, .24);
}

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

html {
  min-height: 100svh;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100svh;
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--disp);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -.02em;
}

a {
  color: inherit;
  text-decoration: none;
}

img, svg {
  max-width: 100%;
  display: block;
}

/* L'emporte sur toute règle d'auteur (ex. svg { display: block }) : hidden reste une affirmation du gabarit. */
[hidden] {
  display: none !important;
}

ul {
  list-style: none;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

/* Posé sur * : scrollbar-color n'est pas hérité par les conteneurs qui défilent eux-mêmes. */

* {
  scrollbar-width: thin;
  scrollbar-color: var(--scroll-thumb) transparent;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track,
::-webkit-scrollbar-corner {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--scroll-thumb);
  border-radius: var(--pill);
  border: 2px solid transparent;
  background-clip: padding-box;
  transition: background var(--dur) var(--ease);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--scroll-thumb-hover);
  background-clip: padding-box;
}

:focus-visible {
  outline: 2px solid var(--emerald);
  outline-offset: 3px;
  border-radius: 6px;
}

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

body.no-scroll {
  overflow: hidden;
}

.brand {
  font-family: var(--disp);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -.02em;
  display: inline-flex;
  align-items: baseline;
}

.brand b {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand__scope {
  margin-left: .55rem;
  padding-left: .55rem;
  border-left: 1px solid var(--line);
  font-size: .78rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: normal;
}

@media (max-width: 600px) {
  .brand__scope {
    display: none;
  }
}

.btn {
  font-family: var(--body);
  font-weight: 600;
  font-size: .98rem;
  padding: 14px 26px;
  border-radius: var(--pill);
  cursor: pointer;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
    border-color var(--dur) var(--ease), color var(--dur) var(--ease);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 52px;
  border: 1px solid transparent;
  background: none;
}

.btn-primary {
  background: var(--grad);
  color: #04140a;
  box-shadow: var(--glow);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 0 70px rgba(25, 240, 166, .5);
}

.btn-ghost {
  border-color: var(--glass-brd);
  color: var(--ink);
  background: var(--glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.btn-ghost:hover:not(:disabled) {
  border-color: var(--emerald);
  color: var(--emerald);
}

.btn:disabled {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
}

.btn--full {
  width: 100%;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.field {
  display: grid;
  gap: 6px;
}

/* minmax(0, 1fr) : un libellé long ne fait pas déborder la carte. */
.field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--gap-sm);
}

@media (max-width: 480px) {
  .field-row {
    grid-template-columns: 1fr;
  }
}

.field__label {
  font-size: .82rem;
  font-weight: 600;
  color: var(--muted);
}

.input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--glass-brd);
  border-radius: var(--r);
  background: var(--glass);
  color: var(--ink);
  transition: border-color var(--dur) var(--ease);
}

.input::placeholder {
  color: var(--faint);
}

/* Autonome (sans .input) : l'oubli de class="input select" rendait le champ illisible.
   background-color et non background, pour ne pas effacer le chevron. */
.select {
  appearance: none;
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--glass-brd);
  border-radius: var(--r);
  background-color: var(--glass);
  color: var(--ink);
  font: inherit;
  transition: border-color var(--dur) var(--ease);
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239aa6bd' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
  cursor: pointer;
}

.select:invalid {
  color: var(--faint);
}

/* Le menu natif n'hérite pas des variables de thème. */
.select option {
  background: var(--panel);
  color: var(--ink);
}

.input:focus,
.select:focus {
  outline: none;
  border-color: var(--emerald);
}

.field__hint {
  font-size: .76rem;
  color: var(--faint);
}

.field__hint--error { color: var(--red); }

.result-list {
  height: 13rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  margin: 0;
  padding: 4px;
  list-style: none;
  border: 1px solid var(--glass-brd);
  border-radius: var(--r);
  background: var(--glass);
}

.result-list__option {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 0;
  border-radius: calc(var(--r) - 4px);
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background var(--t-fast, 150ms) var(--ease);
}

.result-list__option:hover {
  background: var(--surface-hover);
}

.result-list__option[aria-selected="true"] {
  background: var(--yellow-dim);
  color: var(--ink);
  font-weight: 600;
}

.result-list__option:focus-visible {
  outline: 2px solid var(--emerald);
  outline-offset: -2px;
}

.result-list__option--pinned {
  border-bottom: 1px solid var(--line);
  border-radius: calc(var(--r) - 4px) calc(var(--r) - 4px) 0 0;
}

.mismatch-override {
  display: grid;
  gap: var(--gap-xs);
  margin-top: var(--gap-sm);
  padding: var(--gap-sm);
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--glass);
}

.mismatch-override__title {
  font-family: var(--disp);
  font-weight: 600;
  color: var(--ink);
}

.mismatch-override__hint {
  font-size: .86rem;
  color: var(--muted);
}

.form-alert {
  padding: 10px 14px;
  border-radius: var(--r);
  border: 1px solid var(--glass-brd);
  font-size: .86rem;
  background: var(--glass);
}

.field__req {
  margin-left: 2px;
  color: var(--emerald);
  text-decoration: none;
  font-weight: 700;
}

.form-legend {
  font-size: .76rem;
  color: var(--faint);
}

.file-field__input {
  /* Masquage accessible : display:none sortirait le contrôle de l'ordre de tabulation. */
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.file-field__drop {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--gap-xs);
  min-height: 84px;
  padding: 14px;
  border: 1px dashed var(--glass-brd);
  border-radius: var(--r);
  background: var(--glass);
  color: var(--muted);
  font-size: .84rem;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}

.file-field__drop:hover,
.file-field__drop.is-dragging {
  border-color: var(--emerald);
  border-style: solid;
}

.file-field__input:focus-visible + .file-field__drop {
  outline: 2px solid var(--emerald);
  outline-offset: 3px;
}

.file-field__file {
  display: flex;
  align-items: center;
  gap: var(--gap-xs);
  padding: 12px 14px;
  border: 1px solid var(--glass-brd);
  border-radius: var(--r);
  background: var(--glass);
}

.file-field__name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
  font-size: .84rem;
}

.file-field__size {
  color: var(--faint);
  font-size: .76rem;
  white-space: nowrap;
}

.file-field__remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  border: 0;
  border-radius: var(--pill);
  background: none;
  color: var(--muted);
  cursor: pointer;
  transition: color var(--dur) var(--ease);
}

.file-field__remove:hover {
  color: var(--red);
}

.modal {
  width: min(420px, calc(100vw - 32px));
  /* La réinitialisation globale écrase le margin: auto qui centre un <dialog>. */
  margin: auto;
  padding: 0;
  border: 1px solid var(--glass-brd);
  border-radius: var(--r-lg);
  background: var(--panel);
  color: var(--ink);
  box-shadow: var(--shadow);
  /* Bornée avec défilement interne : sinon les boutons d'une modale haute sont inatteignables. */
  max-height: 90svh;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.modal--wide {
  width: min(560px, calc(100vw - 32px));
}

.modal__panel {
  display: grid;
  gap: var(--gap-sm);
  padding: 24px;
}

.modal__title {
  margin: 0;
  font-family: var(--disp);
  font-size: 1.15rem;
}

.modal__intro {
  margin: 0;
  color: var(--muted);
  font-size: .88rem;
}

.modal__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: var(--gap-sm);
  margin-top: 4px;
}

.modal__actions .btn {
  min-height: 44px;
  padding: 10px 18px;
  font-size: .9rem;
}

@media (max-width: 480px) {
  .modal__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .modal__actions .btn-primary {
    order: -1;
  }
}

.modal__panel--busy {
  justify-items: center;
  text-align: center;
  padding: 32px 24px;
}

.modal__loader {
  width: 36px;
  height: 36px;
  border: 3px solid var(--line);
  border-top-color: var(--emerald);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

.modal__intro--faint {
  color: var(--faint);
  font-size: .8rem;
}

@media (prefers-reduced-motion: reduce) {
  .modal__loader {
    animation: none;
    border-top-color: var(--emerald);
    opacity: .8;
  }
}

.auth-link-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--emerald);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.auth-link-button:hover {
  color: var(--lime);
}

.vz-toast-container {
  position: fixed;
  z-index: 60;
  right: 16px;
  /* Sous la barre supérieure : ne masque ni thème ni langue. */
  top: 80px;
  display: grid;
  gap: 8px;
  width: min(360px, calc(100vw - 32px));
}

.vz-toast {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
  padding: 12px 14px;
  border: 1px solid var(--glass-brd);
  border-radius: var(--r);
  background: var(--panel);
  box-shadow: var(--shadow);
  color: var(--ink);
  font-size: .86rem;
  cursor: pointer;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.vz-toast.show {
  opacity: 1;
  transform: none;
}

.vz-toast.hide {
  opacity: 0;
  transform: translateY(-8px);
}

.vz-toast__icon {
  display: inline-flex;
  width: 20px;
  height: 20px;
  flex: none;
}

.vz-toast__icon svg {
  width: 100%;
  height: 100%;
}

.vz-toast__msg {
  flex: 1;
  min-width: 0;
}

.vz-toast--success .vz-toast__icon { color: var(--emerald); }
.vz-toast--error   .vz-toast__icon { color: var(--red); }
.vz-toast--warning .vz-toast__icon { color: var(--lime); }
.vz-toast--info    .vz-toast__icon { color: var(--muted); }

.vz-toast--success { border-color: var(--emerald); }
.vz-toast--error   { border-color: var(--red); }

.vz-toast__progress {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 100%;
  background: var(--emerald);
  transform-origin: left;
  animation: vz-toast-progress linear forwards;
}

.vz-toast--error .vz-toast__progress { background: var(--red); }

@keyframes vz-toast-progress {
  from { transform: scaleX(1); }
  to   { transform: scaleX(0); }
}

@media (prefers-reduced-motion: reduce) {
  .vz-toast { transition: none; }
  .vz-toast__progress { animation: none; }
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 100;
  background: var(--grad);
  color: #04140a;
  padding: 10px 16px;
  border-radius: var(--r);
  font-weight: 700;
  font-size: .85rem;
}

.skip-link:focus {
  left: 16px;
}

.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;
}

.auth-shell {
  /* height et non min-height : l'enveloppe ne doit pas grandir au-delà de l'écran. */
  height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.auth-main {
  display: grid;
  align-items: center;
  /* align-content centre le groupe carte + bandeau au lieu d'écarter chaque rangée. */
  align-content: center;
  justify-items: center;
  padding: var(--gap) clamp(16px, 4vw, 32px);
  /* min-height: 0 et overflow: hidden laissent la carte se contraindre au lieu de pousser le pied. */
  min-height: 0;
  overflow: hidden;
}

.auth-card {
  width: min(520px, 100%);
  padding: clamp(20px, 3.5vw, 30px);
  border: 1px solid var(--glass-brd);
  border-radius: var(--r-lg);
  background: var(--panel);
  box-shadow: var(--shadow);
  /* Contexte propre : sinon le décor .pitch (z-index 0) se peint par-dessus. */
  position: relative;
  z-index: 1;
  /* Dernier recours : la carte défile, jamais la page. */
  max-height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.auth-form {
  display: grid;
  gap: var(--gap-sm);
}

.auth-card__title {
  font-size: 1.35rem;
  margin-bottom: var(--gap-xs);
}

.auth-card__intro {
  font-size: .86rem;
  color: var(--muted);
  margin-bottom: var(--gap-sm);
}

.auth-card__footer {
  margin-top: var(--gap);
  padding-top: var(--gap-sm);
  border-top: 1px solid var(--line);
  font-size: .82rem;
  color: var(--muted);
}

.auth-card__footer a {
  color: var(--emerald);
}

.auth-card__footer a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-height: 700px) {
  .auth-card {
    padding: 16px;
  }

  .auth-card__intro {
    margin-bottom: var(--gap-sm);
  }
}

/* Troisième rangée présente même vide : elle borne la rangée centrale. */
.foot {
  min-height: var(--gap);
}

.steps {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 6px;
  margin-top: var(--gap-xs);
  margin-bottom: var(--gap-xs);
}

.steps__segment {
  height: 3px;
  border-radius: 2px;
  background: var(--line);
  transition: background var(--dur) var(--ease);
}

.steps__segment.is-done {
  background: var(--grad);
}

.step {
  display: grid;
  gap: var(--gap-sm);
  border: 0;
  padding: 0;
  min-inline-size: 0;
}

.step__legend {
  font-size: .82rem;
  font-weight: 600;
  color: var(--muted);
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: .84rem;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 0;
}

.check input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--emerald);
  cursor: pointer;
}

.check a {
  color: var(--emerald);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-form__actions {
  display: flex;
  gap: var(--gap-xs);
  margin-top: var(--gap-sm);
}

.auth-form__actions .btn {
  flex: 1;
}

.shell {
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.shell--centered {
  place-items: center;
  padding: clamp(1rem, 4vw, 3rem);
}

.panel {
  width: min(100%, 34rem);
  padding: clamp(1.25rem, 4vw, 2.5rem);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}

.panel__title {
  font-family: var(--disp);
  margin: 0 0 .5rem;
}

.panel--wide {
  width: 100%;
}

.state {
  margin: 0;
  padding: var(--gap-lg) var(--gap);
  border: 1px dashed var(--line);
  border-radius: var(--r);
  color: var(--muted);
  font-size: .9rem;
  text-align: center;
}

.state--error {
  border-style: solid;
  border-color: var(--red);
  color: var(--red);
}

.panel__intro {
  color: var(--muted);
  margin: 0 0 1.5rem;
}

.panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}

.panel__actions:not(:last-child) {
  margin-bottom: var(--gap-sm);
}

.error-code {
  font-family: var(--disp);
  font-size: clamp(2.5rem, 12vw, 4rem);
  line-height: 1;
  color: var(--faint);
  margin: 0 0 .5rem;
}

.app-main {
  width: min(var(--content-max), 100%);
  margin-inline: auto;
  padding: var(--gap) clamp(16px, 3vw, 40px) var(--gap-lg);
}

.page-head {
  margin-bottom: var(--gap);
}

.page-head__title {
  margin: 0 0 4px;
  font-family: var(--disp);
  font-size: clamp(1.4rem, 3vw, 1.9rem);
}

.page-head__intro {
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
}

.app-main .panel {
  width: 100%;
  margin-bottom: var(--gap);
}

.app-form {
  display: grid;
  gap: var(--gap-sm);
  max-width: 32rem;
}

.range-picker {
  display: grid;
  gap: var(--gap-sm);
  margin-bottom: var(--gap);
}

.range-picker__presets {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap-xs);
  margin: 0;
  padding: 0;
  border: 0;
}

.range-picker__preset {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 var(--gap-sm);
  border: 1px solid var(--line);
  border-radius: var(--pill);
  font-size: .84rem;
  cursor: pointer;
}

.range-picker__preset:has(input:checked) {
  border-color: var(--emerald);
  color: var(--ink);
}

.range-picker__preset:has(input:focus-visible) {
  outline: 2px solid var(--emerald);
  outline-offset: 3px;
}

.range-picker__custom {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap-sm);
}

.highlight-list {
  display: grid;
  gap: var(--gap-xs);
  margin: 0;
  padding: 0;
  list-style: none;
}

.highlight-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px var(--gap-sm);
  padding: var(--gap-sm) 0;
  border-bottom: 1px solid var(--line);
}

.highlight-item:last-child {
  border-bottom: 0;
}

.highlight-item__label {
  font-size: .76rem;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.highlight-item__extract {
  grid-column: 1;
  font-size: .88rem;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.highlight-item__count {
  grid-row: 1 / span 2;
  grid-column: 2;
  align-self: center;
  font-family: var(--disp);
  font-size: 1.3rem;
  font-variant-numeric: tabular-nums;
}

@keyframes vz-slide-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

@keyframes vz-slide-down {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: none; }
}

@keyframes vz-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes vz-pop-in {
  from { opacity: 0; transform: scale(.7); }
  60%  { transform: scale(1.08); }
  to   { opacity: 1; transform: scale(1); }
}

/* La réinitialisation globale écrase le margin: auto natif des dialogues. */

dialog[open] {
  margin: auto;
}

dialog::backdrop {
  background: var(--scrim);
}

/* Second facteur et réinitialisation : écrans d'authentification secondaires. */
.form-notice {
  padding: 10px 14px;
  border-radius: var(--r);
  border: 1px solid var(--emerald);
  font-size: .86rem;
  background: var(--glass);
}

/* Cible tactile de 44 px, sans changer l'allure d'un lien. */
.auth-link-target {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.auth-link-button.auth-link-target {
  text-align: left;
}

.mfa-code-input {
  font-variant-numeric: tabular-nums;
  letter-spacing: .2em;
}

.mfa-qr {
  display: grid;
  place-items: center;
  width: min(220px, 100%);
  padding: var(--gap-xs);
  border-radius: var(--r);
  /* Fond clair dans les deux thèmes : un lecteur de QR exige le contraste d'origine. */
  background: #ffffff;
}

.mfa-qr svg {
  width: 100%;
  height: auto;
}

.mfa-secret {
  font-family: ui-monospace, monospace;
  font-size: var(--fs-sm);
  overflow-wrap: anywhere;
  color: var(--muted);
}

.backup-codes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
  gap: var(--gap-xs);
  padding: 0;
  list-style: none;
  font-family: ui-monospace, monospace;
  font-size: var(--fs-sm);
}

.backup-codes li {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  text-align: center;
}
