/*
 * Astuce Identity — charte reprise de la page de connexion d'Academy Manager (gestion.astucedev.com) :
 * mêmes couleurs (clair et sombre), typographie système, espacements, deux colonnes égales, panneau bleu,
 * logo Astuce2000 animé, sélecteur de thème, comportement mobile. Feuille autonome : aucune ressource
 * externe, aucun style en ligne (politique de contenu stricte).
 */

/* ============================ Couleurs (identiques à Academy Manager) ============================ */
:root {
  --radius: 0.65rem;
  --radius-md: calc(var(--radius) - 2px); /* rounded-md d'Academy Manager */
  --radius-lg: var(--radius);             /* rounded-lg d'Academy Manager */
  --background: oklch(0.968 0.006 256);
  --foreground: oklch(0.21 0.006 285.9);
  --card: oklch(1 0 0);
  --primary: oklch(0.55 0.18 256);
  --primary-foreground: oklch(0.98 0.01 256);
  --muted: oklch(0.967 0.001 286.4);
  --muted-foreground: oklch(0.55 0.014 285.9);
  --accent: oklch(0.967 0.001 286.4);
  --accent-foreground: oklch(0.21 0.006 285.9);
  --destructive: oklch(0.58 0.22 27);
  --border: oklch(0.92 0.004 286.3);
  --input: oklch(0.92 0.004 286.3);
  --ring: oklch(0.55 0.18 256);
  --panneau-debut: oklch(0.55 0.18 256);
  --panneau-fin: oklch(0.40 0.15 264);
  color-scheme: light;
}
.dark {
  --background: oklch(0.155 0.018 262);
  --foreground: oklch(0.96 0.001 286.4);
  --card: oklch(0.2 0.021 262);
  --primary: oklch(0.68 0.16 256);
  --primary-foreground: oklch(0.17 0.02 256);
  --muted: oklch(0.27 0.02 262);
  --muted-foreground: oklch(0.72 0.022 264);
  --accent: oklch(0.28 0.028 262);
  --accent-foreground: oklch(0.96 0.001 286.4);
  --destructive: oklch(0.66 0.2 25);
  --border: oklch(1 0 0 / 9%);
  --input: oklch(1 0 0 / 14%);
  --ring: oklch(0.68 0.16 256);
  color-scheme: dark;
}

/* ============================ Base ============================ */
*, *::before, *::after { box-sizing: border-box; border-color: var(--border); }
html, body { margin: 0; background: var(--background); color: var(--foreground); overscroll-behavior-y: contain; }
body {
  font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  line-height: 1.5; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "rlig" 1, "calt" 1;
}
h1, h2, h3, p, ul, ol { margin: 0; }
[hidden] { display: none !important; }
svg { flex-shrink: 0; }
a { color: var(--primary); text-underline-offset: 4px; text-decoration: none; font-weight: 500; }
a:hover { text-decoration: underline; }

/* ============================ Disposition : deux colonnes égales ============================ */
.page { display: grid; min-height: 100dvh; }
@media (min-width: 1024px) { .page { grid-template-columns: 1fr 1fr; } }

/* ---- Panneau de marque (gauche) ---- */
.panneau {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 2rem;
  min-height: 100dvh; overflow: hidden; padding: 2rem; color: #fff;
  background: linear-gradient(135deg, var(--panneau-debut), var(--panneau-fin));
}
@media (min-width: 1024px) { .panneau { min-height: 0; padding: 3rem; } }
.halo { position: absolute; pointer-events: none; width: 24rem; height: 24rem; border-radius: 9999px; filter: blur(40px); }
.halo-haut { right: -6rem; top: -6rem; background: rgb(255 255 255 / 10%); display: none; }
.dark .halo-haut { display: block; }
.halo-bas { left: -4rem; bottom: -8rem; background: rgb(0 0 0 / 10%); }
#marque-cible { position: relative; height: 2.75rem; width: 11rem; }
.hero { position: relative; display: flex; flex-direction: column; align-items: center; gap: 1.75rem; }
.hero .astuce-scene { width: 100%; max-width: 32rem; filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.25)); }
.milieu { display: grid; width: 100%; }
.milieu > * { grid-area: 1 / 1; }
.milieu h1 { font-size: 1.875rem; line-height: 1.25; font-weight: 600; }
.milieu .description { max-width: 28rem; font-size: 0.875rem; color: rgb(255 255 255 / 70%); }
.avant { display: flex; flex-direction: column; gap: 0.75rem; text-align: center; transition: opacity 0.5s; }
.avant .description { margin: 0 auto; }
.apres { display: flex; flex-direction: column; gap: 2rem; opacity: 0; pointer-events: none; transition: opacity 0.7s 0.3s; }
.apres .textes { display: flex; flex-direction: column; gap: 0.75rem; }
.pose .avant { opacity: 0; pointer-events: none; }
.pose .apres { opacity: 1; pointer-events: auto; }
.atouts { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 1rem; }
.atouts li { display: flex; align-items: flex-start; gap: 0.75rem; }
.atouts .pastille { margin-top: 0.125rem; display: flex; width: 2.25rem; height: 2.25rem; flex-shrink: 0; align-items: center; justify-content: center;
  border-radius: var(--radius-lg); background: rgb(255 255 255 / 15%); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.atouts .pastille svg { width: 1.125rem; height: 1.125rem; }
.atouts .atout-titre { font-size: 0.875rem; font-weight: 500; }
.atouts .atout-texte { font-size: 0.75rem; color: rgb(255 255 255 / 60%); }
.droits { position: relative; font-size: 0.75rem; color: rgb(255 255 255 / 50%); }

/* ---- Colonne du formulaire (droite) ----
   Mobile : comme sur Academy Manager, l'animation se joue d'abord en plein écran, puis le bloc
   d'authentification arrive de la droite (2,4 s après la pose du logo) et couvre la page.
   Seulement si JavaScript est actif (classe « js ») : sinon le formulaire reste toujours visible. */
.colonne {
  position: relative; display: flex; align-items: center; justify-content: center;
  padding: 3rem 1rem; background: var(--background);
}
.js .colonne {
  position: fixed; inset: 0; z-index: 20; overflow-y: auto; box-shadow: -8px 0 40px rgba(0, 0, 0, 0.3);
  transform: translateX(100%); transition: transform 0.9s cubic-bezier(.22, 1, .36, 1) 2.4s;
}
.js .pose .colonne { transform: translateX(0); }
.js .sans-animation .colonne { transition: none; }
@media (max-width: 1023px) {
  .js body:not(.pose) { background-color: var(--panneau-fin); }
  .js .sans-animation .panneau { display: none; }
  .js .sans-animation .colonne { position: relative; inset: auto; box-shadow: none; min-height: 100dvh; }
}
@media (min-width: 1024px) {
  .colonne, .js .colonne {
    position: relative; inset: auto; z-index: auto; box-shadow: none; transform: none; transition: none; overflow: visible;
    background: color-mix(in oklab, var(--muted) 20%, transparent); /* lg:bg-muted/20 d'Academy Manager */
  }
}
.contenu { width: 100%; max-width: 24rem; }
.contenu.large { max-width: 28rem; }
.entete { margin-bottom: 1.5rem; display: flex; flex-direction: column; gap: 0.25rem; }
.entete h2 { font-size: 1.5rem; line-height: 2rem; font-weight: 600; letter-spacing: -0.025em; }
.entete p { font-size: 0.875rem; color: var(--muted-foreground); }
.bas-de-page { margin-top: 2rem; text-align: center; font-size: 0.75rem; color: var(--muted-foreground); }

/* ---- Sélecteur de thème ---- */
.bascule-theme {
  position: absolute; right: 1rem; top: 1rem; display: inline-flex; align-items: center; justify-content: center;
  width: 2.25rem; height: 2.25rem; border: 0; border-radius: var(--radius-md); background: transparent; color: var(--foreground); cursor: pointer;
  transition: background-color .15s;
}
.bascule-theme:hover { background: var(--accent); color: var(--accent-foreground); }
.bascule-theme:focus-visible { outline: none; box-shadow: 0 0 0 2px color-mix(in oklch, var(--ring) 60%, transparent); }
.bascule-theme svg { width: 1rem; height: 1rem; }
.bascule-theme .soleil, .dark .bascule-theme .lune { display: none; }
.dark .bascule-theme .soleil { display: block; }

/* ============================ Formulaires ============================ */
.formulaire { display: flex; flex-direction: column; gap: 1rem; }
.champ { display: flex; flex-direction: column; gap: 0.375rem; }
label { font-size: 0.875rem; font-weight: 500; line-height: 1; }
input[type="text"], input[type="password"] {
  display: flex; height: 2.25rem; width: 100%; border-radius: var(--radius-md); border: 1px solid var(--border);
  background: transparent; color: var(--foreground); padding: 0.25rem 0.75rem; font: inherit; font-size: 1rem;
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 5%); transition: color .15s, box-shadow .15s, border-color .15s;
}
@media (min-width: 640px) { input[type="text"], input[type="password"] { font-size: 0.875rem; } }
input::placeholder { color: var(--muted-foreground); }
input:focus-visible { outline: none; box-shadow: 0 0 0 2px color-mix(in oklch, var(--ring) 60%, transparent); }
.mot-de-passe { position: relative; }
.mot-de-passe input { padding-right: 2.5rem; }
.oeil {
  position: absolute; right: 0.5rem; top: 50%; transform: translateY(-50%); display: flex; align-items: center; justify-content: center;
  width: 1.5rem; height: 1.5rem; padding: 0; border: 0; border-radius: 0.25rem; background: transparent; color: var(--muted-foreground); cursor: pointer;
}
.oeil:hover { color: var(--foreground); }
.oeil svg { width: 1rem; height: 1rem; }
.oeil .ferme, .oeil.affiche .ouvert { display: none; }
.oeil.affiche .ferme { display: block; }
.code-otp { text-align: center; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 0.3em; }
.code-activation { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 0.06em; text-transform: uppercase; }

.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; width: 100%; height: 2.25rem; padding: 0.5rem 1rem;
  border-radius: var(--radius-md); border: 1px solid transparent; font: inherit; font-size: 0.875rem; font-weight: 500; white-space: nowrap;
  cursor: pointer; text-decoration: none; transition: all .15s; outline: none;
}
.bouton:hover { text-decoration: none; }
.bouton:focus-visible { box-shadow: 0 0 0 2px color-mix(in oklch, var(--ring) 60%, transparent); }
.bouton svg { width: 1rem; height: 1rem; }
.bouton.principal { background: var(--primary); color: var(--primary-foreground); box-shadow: 0 1px 2px 0 rgb(0 0 0 / 5%); }
.bouton.principal:hover { background: color-mix(in oklch, var(--primary) 90%, transparent); }
.bouton.secondaire { border-color: var(--border); background: var(--background); color: var(--foreground); box-shadow: 0 1px 2px 0 rgb(0 0 0 / 5%); }
.bouton.secondaire:hover { background: var(--accent); color: var(--accent-foreground); }
.bouton[disabled] { pointer-events: none; opacity: 0.5; }
.lien-secondaire { margin-top: 1rem; text-align: center; font-size: 0.875rem; color: var(--muted-foreground); }
.aide { font-size: 0.75rem; color: var(--muted-foreground); }

/* Séparateur « Ou continuer avec » et fournisseurs externes (désactivés pour l'instant). */
.separateur { display: flex; align-items: center; gap: 0.75rem; margin: 1.5rem 0 1rem; font-size: 0.75rem; color: var(--muted-foreground); }
.separateur::before, .separateur::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.fournisseurs { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.fournisseur { height: auto; flex-direction: column; gap: 0.125rem; padding: 0.5rem; }
.fournisseur .nom { display: inline-flex; align-items: center; gap: 0.5rem; }
.fournisseur .nom svg { width: 1.125rem; height: 1.125rem; }
.fournisseur .bientot { font-size: 0.6875rem; font-weight: 500; color: var(--muted-foreground); }

/* ============================ Messages ============================ */
.alerte { display: flex; gap: 0.625rem; margin-bottom: 1.5rem; padding: 0.75rem; border: 1px solid; border-radius: var(--radius-lg); font-size: 0.875rem; }
.alerte > svg { margin-top: 0.125rem; width: 1rem; height: 1rem; }
.alerte .corps p + p, .alerte .corps ul { margin-top: 0.25rem; }
.alerte ul { padding-left: 1.1rem; font-size: 0.8125rem; }
.alerte.erreur { border-color: color-mix(in oklch, var(--destructive) 40%, transparent); background: color-mix(in oklch, var(--destructive) 10%, transparent); color: var(--destructive); }
.alerte.attention { border-color: rgb(252 211 77 / 60%); background: #fffbeb; color: #78350f; }
.dark .alerte.attention { border-color: rgb(146 64 14 / 60%); background: rgb(69 26 3 / 40%); color: #fde68a; }
.alerte.succes { border-color: rgb(110 231 183 / 60%); background: #ecfdf5; color: #065f46; }
.dark .alerte.succes { border-color: rgb(6 95 70 / 60%); background: rgb(2 44 34 / 40%); color: #a7f3d0; }
.alerte.info { border-color: color-mix(in oklch, var(--primary) 35%, transparent); background: color-mix(in oklch, var(--primary) 8%, transparent); color: var(--foreground); }
.alerte.info > svg { color: var(--primary); }

/* ============================ Activation ============================ */
.etapes { display: flex; gap: 0.5rem; list-style: none; padding: 0; margin: 0 0 1.5rem; }
.etapes li { flex: 1; display: flex; flex-direction: column; gap: 0.375rem; font-size: 0.6875rem; color: var(--muted-foreground); }
.etapes li::before { content: ""; height: 0.25rem; border-radius: 9999px; background: var(--border); }
.etapes li.faite::before, .etapes li.active::before { background: var(--primary); }
.etapes li.active { color: var(--foreground); font-weight: 500; }
.etapes .pastille { display: none; }
.regles { list-style: disc; padding: 0.75rem 0.75rem 0.75rem 1.75rem; border: 1px solid var(--border); border-radius: 0.5rem;
  background: color-mix(in oklch, var(--muted) 50%, transparent); font-size: 0.75rem; color: var(--muted-foreground); }
.regles li + li { margin-top: 0.25rem; }
.regles strong { color: var(--foreground); font-weight: 500; }
.options { display: flex; flex-direction: column; gap: 0.75rem; }
.option { border: 1px solid var(--border); border-radius: 0.5rem; background: var(--card); padding: 1rem; }
.option.recommandee { border-color: color-mix(in oklch, var(--primary) 45%, transparent); }
.option-tete { display: flex; align-items: center; gap: 0.625rem; }
.option-tete h3 { font-size: 0.9375rem; font-weight: 600; }
.option-tete svg { width: 1.125rem; height: 1.125rem; color: var(--primary); }
.option p { margin-top: 0.375rem; font-size: 0.8125rem; color: var(--muted-foreground); }
.option .bouton { margin-top: 0.875rem; }
.badge { margin-left: auto; font-size: 0.6875rem; font-weight: 600; color: var(--primary); background: color-mix(in oklch, var(--primary) 12%, transparent); padding: 0.125rem 0.5rem; border-radius: 9999px; }
.totp { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; margin-bottom: 1rem; }
.qr { width: 11rem; height: 11rem; padding: 0.5rem; border-radius: 0.5rem; border: 1px solid var(--border); background: #fff; }
.qr svg { display: block; width: 100%; height: 100%; }
.cle-manuelle { text-align: center; font-size: 0.75rem; color: var(--muted-foreground); }
.cle-manuelle code { display: block; margin-top: 0.25rem; font-size: 0.8125rem; letter-spacing: 0.05em; color: var(--foreground); word-break: break-all; }
.codes-secours { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.375rem 1rem; margin: 0 0 1rem; padding: 0.875rem 0.875rem 0.875rem 2.25rem;
  border: 1px dashed var(--input); border-radius: 0.5rem; background: color-mix(in oklch, var(--muted) 50%, transparent); }
.codes-secours code { font: 600 0.875rem/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 0.04em; }
.case { display: flex; align-items: flex-start; gap: 0.625rem; font-weight: 400; line-height: 1.4; }
.case input { margin: 0.1rem 0 0; width: 1rem; height: 1rem; accent-color: var(--primary); }
details.repli { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--border); }
details.repli summary { cursor: pointer; font-size: 0.875rem; font-weight: 500; color: var(--primary); }
details.repli .formulaire { margin-top: 1rem; }
.note { font-size: 0.875rem; color: var(--muted-foreground); margin-bottom: 1.5rem; }
@media (max-width: 420px) { .codes-secours { grid-template-columns: 1fr; } }

/* ============================ Logo Astuce2000 animé ============================
   Animation d'origine (v5) reprise d'Academy Manager : le A se dessine, les lettres se posent,
   l'ampoule s'allume, les rayons clignotent, les ornements s'écartent pour le slogan. Une seule fois.
   Positions des pièces : classes ci-dessous (aucun style en ligne). */
@property --rev { syntax: "<number>"; inherits: false; initial-value: 0; }
.astuce-scene { --bx: 57.16%; --by: 63.21%; }
.astuce-scene .stage { position: relative; width: 100%; aspect-ratio: 1600 / 829; isolation: isolate; container-type: inline-size; }
.astuce-scene .pc { position: absolute; display: block; height: auto; will-change: transform, opacity; }
.astuce-scene .p-flourish { left: 15.25%; top: 2.4125%; width: 82.0625%; }
.astuce-scene .p-l1 { left: 47.25%; top: 22.6779%; width: 4%; --d: 0.410s; }
.astuce-scene .p-l2 { left: 49.625%; top: 15.3197%; width: 4.4375%; --d: 0.464s; }
.astuce-scene .p-l3 { left: 53.5625%; top: 11.2183%; width: 5.125%; --d: 0.554s; }
.astuce-scene .p-l4 { left: 58.75%; top: 7.7201%; width: 4.375%; --d: 0.654s; }
.astuce-scene .p-l5 { left: 63.625%; top: 5.7901%; width: 4.4375%; --d: 0.757s; }
.astuce-scene .p-l6 { left: 71.1875%; top: 1.0856%; width: 5.3125%; --d: 0.924s; }
.astuce-scene .p-l7 { left: 76.9375%; top: 1.2063%; width: 5.5%; --d: 1.046s; }
.astuce-scene .p-l8 { left: 82.625%; top: 1.0856%; width: 5.3125%; --d: 1.163s; }
.astuce-scene .p-l9 { left: 88.1875%; top: 0%; width: 5.25%; --d: 1.279s; }
.astuce-scene .p-bulb { left: 52.75%; top: 47.6478%; width: 8.875%; }
.astuce-scene .p-rays { left: 48.6875%; top: 37.2738%; width: 20.1875%; }
.astuce-scene .p-ma1 { left: 68.3125%; top: 61.7612%; width: 10.1875%; --d: 2.050s; }
.astuce-scene .p-ma2 { left: 79.1875%; top: 61.6405%; width: 7.125%; --d: 2.180s; }
.astuce-scene .p-tagline { left: 13.875%; top: 80.9409%; width: 72.5%; }
.astuce-scene .p-decoL { left: 0%; top: 83.7153%; width: 10.75%; }
.astuce-scene .p-decoR { left: 89.1875%; top: 83.7153%; width: 10.8125%; }
.astuce-scene .flourish { z-index: 2;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(var(--rev) * 100% - 7%), transparent calc(var(--rev) * 100%));
          mask-image: linear-gradient(90deg, #000 calc(var(--rev) * 100% - 7%), transparent calc(var(--rev) * 100%)); }
.astuce-scene .letter { z-index: 3; transform-origin: 50% 50%; }
.astuce-scene .bulb { z-index: 2; transform-origin: 50% 86%; filter: brightness(.58) saturate(.7); }
.astuce-scene .rays { z-index: 1; opacity: 0; }
.astuce-scene .ma { z-index: 3; }
.astuce-scene .tagline { z-index: 2; transform-origin: 50% 50%; opacity: 0; }
.astuce-scene .decoL, .astuce-scene .decoR { z-index: 4; opacity: 0; }
.astuce-scene .ambient, .astuce-scene .glow { position: absolute; left: var(--bx); top: var(--by); transform: translate(-50%, -50%); border-radius: 50%; pointer-events: none; }
.astuce-scene .ambient { width: 58%; aspect-ratio: 1; opacity: 0; z-index: 1; filter: blur(8px);
  background: radial-gradient(circle, rgba(255,210,74,.5) 0%, rgba(255,210,74,.16) 40%, transparent 66%); }
.astuce-scene .glow { width: 23%; aspect-ratio: 1; opacity: 0; z-index: 4; mix-blend-mode: screen;
  background: radial-gradient(circle, rgba(255,255,255,.95) 0%, rgba(255,243,180,.85) 24%, rgba(255,206,74,.5) 48%, rgba(255,206,74,0) 72%); }
.astuce-scene .play .flourish { animation: as-draw 1.80s linear 0.15s both; }
.astuce-scene .play .letter { animation: as-drop 0.45s cubic-bezier(.2,1.45,.35,1) both; animation-delay: var(--d); }
.astuce-scene .play .bulb { animation: as-pop .8s cubic-bezier(.18,.9,.25,1.12) both 1.90s, as-shake .7s ease-in-out 4.55s forwards, as-lightOn .55s ease-out 5.25s both; }
.astuce-scene .play .rays { animation: as-blink 1.0s ease both 5.25s, as-raysTwk 2.8s ease-in-out 6.25s infinite; }
.astuce-scene .play .ma { animation: as-slideUp .6s cubic-bezier(.2,.85,.2,1) both; animation-delay: var(--d); }
.astuce-scene .play .decoL { animation: as-partL 1.2s cubic-bezier(.6,0,.28,1) both; animation-delay: 2.35s; }
.astuce-scene .play .decoR { animation: as-partR 1.2s cubic-bezier(.6,0,.28,1) both; animation-delay: 2.35s; }
.astuce-scene .play .tagline { animation: as-tagIn .8s cubic-bezier(.2,.7,.2,1) both; animation-delay: 3.55s; }
.astuce-scene .play .ambient { animation: as-ambIn .6s ease-out 5.25s both, as-ambBr 3.6s ease-in-out 6.15s infinite; }
.astuce-scene .play .glow { animation: as-glowIn .7s cubic-bezier(.2,.8,.25,1) 5.25s both, as-breathe 3.6s ease-in-out 6.15s infinite; }
/* Logo déjà posé (écrans suivants) : état final de l'animation, ampoule et rayons toujours vivants. */
.astuce-scene .fige .pc { opacity: 1; transform: none; }
.astuce-scene .fige .flourish { -webkit-mask-image: none; mask-image: none; }
.astuce-scene .fige .bulb { filter: none; }
.astuce-scene .fige .rays { animation: as-raysTwk 2.8s ease-in-out infinite; }
.astuce-scene .fige .ambient { animation: as-ambBr 3.6s ease-in-out infinite; }
.astuce-scene .fige .glow { animation: as-breathe 3.6s ease-in-out infinite; }
.astuce-scene .nib, .astuce-scene .sweep { display: none; }
@keyframes as-draw { from { --rev: 0 } to { --rev: 1.1 } }
@keyframes as-lightOn { 0% { filter: brightness(.58) saturate(.7) } 22% { filter: brightness(1.6) saturate(1.15) } 100% { filter: brightness(1) saturate(1) } }
@keyframes as-shake {
  0% { transform: translate(0,0) rotate(0) } 10% { transform: translate(-3%,-11%) rotate(-8deg) } 22% { transform: translate(3%,10%) rotate(8deg) }
  34% { transform: translate(-3%,-10%) rotate(-9deg) } 46% { transform: translate(3%,10%) rotate(9deg) } 58% { transform: translate(-2%,-8%) rotate(-6deg) }
  70% { transform: translate(2%,6%) rotate(5deg) } 82% { transform: translate(-1%,-4%) rotate(-3deg) } 92% { transform: translate(1%,2%) rotate(1deg) } 100% { transform: translate(0,0) rotate(0) }
}
@keyframes as-tagIn { 0% { opacity: 0; transform: translateY(14px) scale(.985) } 100% { opacity: 1; transform: translateY(0) scale(1) } }
@keyframes as-drop { 0% { opacity: 0; transform: translateY(-46px) scale(1.04) } 70% { opacity: 1 } 100% { opacity: 1; transform: translateY(0) scale(1) } }
@keyframes as-pop { 0% { opacity: 0; transform: scale(.5) } 60% { opacity: 1; transform: scale(1.07) } 100% { transform: scale(1) } }
@keyframes as-blink { 0% { opacity: 0 } 10% { opacity: 1 } 18% { opacity: .12 } 30% { opacity: 1 } 40% { opacity: .25 } 52% { opacity: 1 } 64% { opacity: .45 } 78% { opacity: 1 } 100% { opacity: 1 } }
@keyframes as-raysTwk { 0%, 100% { opacity: .78 } 50% { opacity: 1 } }
@keyframes as-slideUp { 0% { opacity: 0; transform: translateY(26px) } 100% { opacity: 1; transform: translateY(0) } }
@keyframes as-partL { 0% { opacity: 0; transform: translateX(42cqw) } 17% { opacity: 1; transform: translateX(42cqw) } 100% { opacity: 1; transform: translateX(0) } }
@keyframes as-partR { 0% { opacity: 0; transform: translateX(-42cqw) } 17% { opacity: 1; transform: translateX(-42cqw) } 100% { opacity: 1; transform: translateX(0) } }
@keyframes as-glowIn { 0% { opacity: 0; transform: translate(-50%,-50%) scale(.2) } 60% { opacity: 1; transform: translate(-50%,-50%) scale(1.15) } 100% { opacity: .82; transform: translate(-50%,-50%) scale(1) } }
@keyframes as-breathe { 0%, 100% { opacity: .72; transform: translate(-50%,-50%) scale(.97) } 50% { opacity: 1; transform: translate(-50%,-50%) scale(1.08) } }
@keyframes as-ambIn { 0% { opacity: 0 } 100% { opacity: .8 } }
@keyframes as-ambBr { 0%, 100% { opacity: .55 } 50% { opacity: .92 } }
/* Encre blanche sur le panneau bleu ; l'ampoule et les rayons gardent leur jaune. */
.astuce-encre-blanche .pc:not(.bulb):not(.rays) { filter: brightness(0) invert(1); }
/* Réglage système « réduire les animations » : l'état final, sans rien jouer. */
@media (prefers-reduced-motion: reduce) {
  .astuce-scene .pc, .astuce-scene .ambient, .astuce-scene .glow { animation: none !important; }
  .astuce-scene .pc { opacity: 1 !important; transform: none !important; }
  .astuce-scene .flourish { -webkit-mask-image: none !important; mask-image: none !important; }
  .astuce-scene .bulb { filter: none !important; }
  .js .colonne { transition: none !important; }
}

/* Choix de la casquette (connexion demandée par une application). */
.choix-casquette { cursor: pointer; display: block; font-weight: 400; line-height: 1.4; }
.choix-casquette input { margin: 0; width: 1rem; height: 1rem; accent-color: var(--primary); }
.choix-casquette:has(input:checked) { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }

/* ============================ Mon compte ============================ */
.compte-page { min-height: 100dvh; background: color-mix(in oklab, var(--muted) 35%, var(--background)); }
.barre { color: #fff; background: linear-gradient(135deg, var(--panneau-debut), var(--panneau-fin)); box-shadow: 0 1px 3px rgb(0 0 0 / 15%); }
.barre-interieur { max-width: 64rem; margin: 0 auto; padding: 0.75rem 1rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.barre-marque { width: 8.5rem; }
.barre-actions { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; }
.barre-nom { display: none; align-items: center; gap: 0.375rem; margin-right: 0.5rem; color: rgb(255 255 255 / 85%); }
@media (min-width: 640px) { .barre-nom { display: inline-flex; } }
.barre-theme, .barre .bascule-theme { position: static; color: #fff; }
.barre .bascule-theme:hover { background: rgb(255 255 255 / 15%); }
.bouton.barre-bouton { background: rgb(255 255 255 / 15%); color: #fff; border-color: rgb(255 255 255 / 25%); }
.bouton.barre-bouton:hover { background: rgb(255 255 255 / 25%); }
.compte { max-width: 64rem; margin: 0 auto; padding: 2rem 1rem 3rem; display: flex; flex-direction: column; gap: 1.5rem; }
.compte .entete { margin-bottom: 0; }
.compte .entete h1 { font-size: 1.5rem; line-height: 2rem; font-weight: 600; letter-spacing: -0.025em; }
.compte .alerte { margin-bottom: 0; }
.grille-compte { display: grid; gap: 1.5rem; }
@media (min-width: 900px) { .grille-compte { grid-template-columns: 1fr 1fr; } }
.carte { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--card); padding: 1.25rem 1.5rem; box-shadow: 0 1px 2px 0 rgb(0 0 0 / 5%); }
.carte h2 { font-size: 1rem; font-weight: 600; margin-bottom: 1rem; }
.carte-tete h2 { margin-bottom: 0.25rem; }
.carte-tete { margin-bottom: 1rem; }
.discret { color: var(--muted-foreground); font-size: 0.8125rem; }
.details { margin: 0; display: grid; gap: 0.75rem 1.5rem; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); }
.details > div { min-width: 0; }
.details .large { grid-column: 1 / -1; }
.details dt { font-size: 0.75rem; color: var(--muted-foreground); }
.details dd { margin: 0.125rem 0 0; font-size: 0.875rem; overflow-wrap: anywhere; }
.pastille-icone { display: inline-flex; width: 2.25rem; height: 2.25rem; flex-shrink: 0; align-items: center; justify-content: center;
  border-radius: var(--radius-lg); background: color-mix(in oklab, var(--primary) 12%, transparent); color: var(--primary); }
.pastille-icone svg { width: 1.125rem; height: 1.125rem; }
.methodes { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 0.875rem; }
.methodes li { display: flex; align-items: center; gap: 0.75rem; }
.methodes li > div { display: flex; flex-direction: column; font-size: 0.875rem; }
.methodes li > .bouton { margin-left: auto; }
.methodes li span:not(.pastille-icone) { font-size: 0.8125rem; color: var(--muted-foreground); }
.sessions { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 0.75rem; }
.session { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1rem; display: flex; flex-direction: column; gap: 0.875rem; }
.session.actuelle { border-color: color-mix(in oklab, var(--primary) 55%, transparent); background: color-mix(in oklab, var(--primary) 4%, var(--card)); }
.session-tete { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.session-titre { flex: 1; min-width: 12rem; display: flex; align-items: center; flex-wrap: wrap; gap: 0.25rem 0.5rem; font-size: 0.9375rem; }
.session-ip { width: 100%; font-size: 0.75rem; color: var(--muted-foreground); }
.badge { display: inline-flex; align-items: center; border-radius: 9999px; padding: 0.0625rem 0.5rem; font-size: 0.6875rem; font-weight: 600;
  background: var(--primary); color: var(--primary-foreground); }
.puce { display: inline-flex; margin: 0 0.375rem 0.25rem 0; border-radius: 9999px; padding: 0.125rem 0.625rem; font-size: 0.75rem;
  border: 1px solid color-mix(in oklab, var(--primary) 35%, transparent); color: var(--primary); background: color-mix(in oklab, var(--primary) 8%, transparent); }
.bouton.petit { height: 2rem; padding: 0 0.75rem; font-size: 0.8125rem; }
.bouton.danger { background: var(--destructive); color: #fff; border-color: transparent; }
.bouton.danger:hover { background: color-mix(in oklch, var(--destructive) 88%, black); }
.zone-sensible { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.zone-sensible > div { flex: 1; min-width: 16rem; font-size: 0.875rem; }
.compte .bas-de-page { margin-top: 0.5rem; }
.compte .bouton, .barre .bouton { width: auto; }

/* ============================ Console d'administration (phase 8) ============================
   Même charte que la connexion et « Mon compte » (couleurs d'Academy Manager, clair et sombre) :
   bandeau bleu en haut, menu latéral, contenu en cartes et tableaux. */
.console-page, .js body.console-page { min-height: 100dvh; background: color-mix(in oklab, var(--muted) 35%, var(--background)); }
.menu-ouvert .console-contenu { filter: brightness(0.92); }
.console-page .bouton { width: auto; }
.console-barre {
  position: sticky; top: 0; z-index: 30; height: 3.75rem; display: flex; align-items: center; gap: 0.75rem; padding: 0 1rem;
  color: #fff; background: linear-gradient(135deg, var(--panneau-debut), var(--panneau-fin)); box-shadow: 0 1px 3px rgb(0 0 0 / 20%);
}
.console-marque { display: flex; align-items: center; gap: 0.875rem; color: #fff; text-decoration: none; }
.console-marque:hover { text-decoration: none; }
.console-marque .astuce-scene { width: 7.25rem; }
.console-titre { font-size: 0.9375rem; font-weight: 600; letter-spacing: -0.01em; padding-left: 0.875rem; border-left: 1px solid rgb(255 255 255 / 30%); white-space: nowrap; }
.console-barre-droite { margin-left: auto; display: flex; align-items: center; gap: 0.5rem; font-size: 0.8125rem; }
.console-barre .bascule-theme { position: static; color: #fff; }
.console-barre .bascule-theme:hover { background: rgb(255 255 255 / 15%); }
.puce-session { display: none; align-items: center; gap: 0.375rem; height: 2rem; padding: 0 0.625rem; border-radius: 9999px; font-size: 0.75rem; font-weight: 500;
  color: #fff; background: rgb(255 255 255 / 12%); border: 1px solid rgb(255 255 255 / 18%); white-space: nowrap; }
a.puce-session { background: rgb(255 255 255 / 92%); color: var(--panneau-fin); }
a.puce-session:hover { text-decoration: none; background: #fff; }
.puce-session.ok svg { color: #a7f3d0; }
.puce-session svg { width: 0.875rem; height: 0.875rem; }
@media (min-width: 1180px) { .puce-session { display: inline-flex; } }
.console-compte { display: none; align-items: center; gap: 0.5rem; padding: 0 0.5rem; }
.console-compte > svg { width: 1.125rem; height: 1.125rem; opacity: 0.85; }
.console-compte > span { display: flex; flex-direction: column; line-height: 1.15; }
.console-compte strong { font-size: 0.8125rem; font-weight: 600; }
.console-role { font-size: 0.6875rem; color: rgb(255 255 255 / 75%); }
@media (min-width: 760px) { .console-compte { display: inline-flex; } }
.console-bouton-menu { display: inline-flex; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem; border: 0; border-radius: var(--radius-md);
  background: transparent; color: #fff; cursor: pointer; }
.console-bouton-menu:hover { background: rgb(255 255 255 / 15%); }
.console-bouton-menu svg { width: 1.25rem; height: 1.25rem; }
@media (min-width: 1024px) { .console-bouton-menu { display: none; } }
@media (max-width: 640px) { .console-titre { display: none; } }

.console-corps { display: grid; grid-template-columns: 1fr; min-height: calc(100dvh - 3.75rem); }
@media (min-width: 1024px) { .console-corps { grid-template-columns: 15.5rem minmax(0, 1fr); } }
.console-menu {
  position: fixed; z-index: 25; top: 3.75rem; bottom: 0; left: 0; width: 16rem; overflow-y: auto; padding: 1rem 0.75rem;
  display: flex; flex-direction: column; gap: 1.25rem; background: var(--card); border-right: 1px solid var(--border);
  transform: translateX(-100%); transition: transform .25s ease; box-shadow: 4px 0 24px rgb(0 0 0 / 12%);
}
.menu-ouvert .console-menu { transform: translateX(0); }
@media (min-width: 1024px) {
  .console-menu { position: sticky; top: 3.75rem; height: calc(100dvh - 3.75rem); width: auto; transform: none; box-shadow: none; transition: none; }
}
.menu-titre { padding: 0 0.75rem; margin-bottom: 0.375rem; font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-foreground); }
.menu-section ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.125rem; }
.console-menu a { position: relative; display: flex; align-items: center; gap: 0.625rem; padding: 0.5rem 0.75rem; border-radius: var(--radius-md);
  font-size: 0.875rem; font-weight: 500; color: var(--foreground); text-decoration: none; transition: background-color .15s; }
.console-menu a svg { width: 1.0625rem; height: 1.0625rem; color: var(--muted-foreground); }
.console-menu a:hover { background: var(--accent); text-decoration: none; }
.console-menu a.actif { background: color-mix(in oklab, var(--primary) 12%, transparent); color: var(--primary); font-weight: 600; }
.console-menu a.actif svg { color: var(--primary); }
.console-menu a.actif::before { content: ""; position: absolute; left: -0.75rem; top: 0.375rem; bottom: 0.375rem; width: 3px; border-radius: 0 3px 3px 0; background: var(--primary); }
.menu-pied { margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 0.75rem; }
.menu-pied .discret { padding: 0 0.75rem; font-size: 0.75rem; line-height: 1.45; }

.console-contenu { min-width: 0; width: 100%; max-width: 84rem; padding: 1.5rem 1rem 3rem; display: flex; flex-direction: column; gap: 1.25rem; }
@media (min-width: 768px) { .console-contenu { padding: 1.75rem 2rem 3rem; } }
.console-entete { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.console-entete h1 { font-size: 1.5rem; line-height: 2rem; font-weight: 600; letter-spacing: -0.025em; }
.console-entete p { font-size: 0.875rem; color: var(--muted-foreground); }
.console-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.console-contenu > .alerte, .pile > .alerte, .carte .alerte { margin-bottom: 0; }
.carte > .alerte + * { margin-top: 1rem; }
.fil { display: flex; align-items: center; gap: 0.375rem; font-size: 0.8125rem; color: var(--muted-foreground); margin-bottom: -0.5rem; }
.fil svg { width: 0.875rem; height: 0.875rem; }
.fil a { color: var(--muted-foreground); font-weight: 400; }
.fil span { color: var(--foreground); }
.pile { display: flex; flex-direction: column; gap: 1rem; }
.grille-deux { display: grid; gap: 1.25rem; }
@media (min-width: 1100px) { .grille-deux { grid-template-columns: 1fr 1fr; } }
.grille-formulaire { display: grid; gap: 1.25rem; align-items: start; }
@media (min-width: 1100px) { .grille-formulaire { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); } }
.carte-tete-ligne { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.8125em; }
.nowrap { white-space: nowrap; }

/* ---- Statistiques ---- */
.grille-stats { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.grille-stats.deux { grid-template-columns: repeat(auto-fit, minmax(16rem, 22rem)); }
.stat { display: flex; align-items: flex-start; gap: 0.875rem; color: var(--foreground); text-decoration: none; transition: border-color .15s, box-shadow .15s; }
a.stat:hover { text-decoration: none; border-color: color-mix(in oklab, var(--primary) 45%, transparent); box-shadow: 0 4px 14px rgb(0 0 0 / 6%); }
.stat-icone { display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; border-radius: var(--radius-lg); }
.stat-icone svg { width: 1.25rem; height: 1.25rem; }
.stat-icone.primaire { background: color-mix(in oklab, var(--primary) 13%, transparent); color: var(--primary); }
.stat-icone.violet { background: color-mix(in oklab, oklch(0.55 0.2 290) 14%, transparent); color: oklch(0.55 0.2 290); }
.stat-icone.vert { background: color-mix(in oklab, oklch(0.6 0.15 155) 15%, transparent); color: oklch(0.55 0.15 155); }
.stat-icone.orange { background: color-mix(in oklab, oklch(0.7 0.17 60) 18%, transparent); color: oklch(0.6 0.17 55); }
.dark .stat-icone.violet { color: oklch(0.75 0.15 290); } .dark .stat-icone.vert { color: oklch(0.78 0.14 155); } .dark .stat-icone.orange { color: oklch(0.8 0.15 70); }
.stat-titre { font-size: 0.8125rem; color: var(--muted-foreground); }
.stat-valeur { font-size: 1.75rem; font-weight: 650; line-height: 2.1rem; letter-spacing: -0.02em; }
.stat-detail { font-size: 0.75rem; color: var(--muted-foreground); }

/* ---- Étiquettes ---- */
.etiquette { display: inline-flex; align-items: center; gap: 0.25rem; vertical-align: middle; border-radius: 9999px; padding: 0.0625rem 0.5rem; font-size: 0.6875rem; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.etiquette.succes { background: #ecfdf5; color: #047857; border-color: rgb(110 231 183 / 60%); }
.etiquette.info { background: color-mix(in oklab, var(--primary) 10%, transparent); color: var(--primary); border-color: color-mix(in oklab, var(--primary) 30%, transparent); }
.etiquette.primaire { background: var(--primary); color: var(--primary-foreground); }
.etiquette.attention { background: #fffbeb; color: #92400e; border-color: rgb(252 211 77 / 70%); }
.etiquette.danger { background: color-mix(in oklch, var(--destructive) 10%, transparent); color: var(--destructive); border-color: color-mix(in oklch, var(--destructive) 35%, transparent); }
.etiquette.neutre { background: var(--muted); color: var(--muted-foreground); border-color: var(--border); }
.dark .etiquette.succes { background: rgb(2 44 34 / 50%); color: #6ee7b7; border-color: rgb(6 95 70 / 70%); }
.dark .etiquette.attention { background: rgb(69 26 3 / 50%); color: #fcd34d; border-color: rgb(146 64 14 / 70%); }
.puce.role { gap: 0.25rem; align-items: center; }
.puce-retrait { display: inline-flex; }
.puce-retrait button { display: inline-flex; padding: 0; border: 0; background: transparent; color: inherit; cursor: pointer; opacity: 0.7; }
.puce-retrait button:hover { opacity: 1; color: var(--destructive); }
.puce-retrait svg { width: 0.75rem; height: 0.75rem; }

/* ---- Tableaux ---- */
.tableau-cadre { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--card); box-shadow: 0 1px 2px 0 rgb(0 0 0 / 5%); }
.carte .tableau-cadre { box-shadow: none; }
.tableau { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.tableau th { height: 2.5rem; padding: 0 0.875rem; text-align: left; font-size: 0.75rem; font-weight: 600; color: var(--muted-foreground);
  background: color-mix(in oklab, var(--muted) 55%, var(--card)); border-bottom: 1px solid var(--border); white-space: nowrap; }
.tableau td { padding: 0.75rem 0.875rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tableau tbody tr:last-child td { border-bottom: 0; }
.tableau tbody tr:hover td { background: color-mix(in oklab, var(--muted) 45%, transparent); }
.tableau tr.retire td { opacity: 0.6; }
.tableau td.vide { padding: 2rem; text-align: center; color: var(--muted-foreground); }
.tableau td.actions { text-align: right; white-space: nowrap; }
.tableau td.actions .operation { display: inline-flex; margin-left: 0.375rem; }
.tableau td.permissions { max-width: 38rem; }
.tableau p { margin-top: 0.125rem; }
.details-journal { max-width: 30rem; }
.detail { display: inline-flex; gap: 0.25rem; margin: 0 0.375rem 0.25rem 0; padding: 0.0625rem 0.4375rem; border-radius: 0.375rem; background: var(--muted); font-size: 0.75rem; }
.detail span { color: var(--muted-foreground); }
.lien-compte { display: inline-flex; align-items: center; gap: 0.625rem; color: var(--foreground); font-weight: 400; }
.lien-compte:hover { text-decoration: none; }
.lien-compte:hover strong { color: var(--primary); }
.lien-compte > span:last-child { display: flex; flex-direction: column; line-height: 1.25; }
.lien-compte strong { font-weight: 600; font-size: 0.875rem; }
.lien-compte .discret { font-size: 0.75rem; }
.avatar { display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; width: 2rem; height: 2rem; border-radius: 9999px;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.02em; color: var(--primary); background: color-mix(in oklab, var(--primary) 13%, transparent); }
.avatar.grand { width: 3.5rem; height: 3.5rem; font-size: 1.125rem; }

/* ---- Filtres et pagination ---- */
.filtres { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.75rem; padding: 0.875rem 1rem; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--card); }
.filtre { display: flex; flex-direction: column; gap: 0.3rem; font-weight: 400; }
.filtre > span { font-size: 0.75rem; font-weight: 500; color: var(--muted-foreground); }
.filtre.recherche { flex: 1; min-width: 15rem; }
.champ-icone { position: relative; display: block; }
.champ-icone svg { position: absolute; left: 0.625rem; top: 50%; transform: translateY(-50%); width: 1rem; height: 1rem; color: var(--muted-foreground); }
.champ-icone input[type="search"] { padding-left: 2.125rem; }
.filtres-boutons { display: flex; gap: 0.5rem; }
select, input[type="search"], input[type="email"], input[type="date"], input[type="number"] {
  height: 2.25rem; width: 100%; border-radius: var(--radius-md); border: 1px solid var(--border); background: var(--card); color: var(--foreground);
  padding: 0.25rem 0.75rem; font: inherit; font-size: 0.875rem; box-shadow: 0 1px 2px 0 rgb(0 0 0 / 5%);
}
select:focus-visible, input[type="search"]:focus-visible, input[type="email"]:focus-visible, input[type="date"]:focus-visible, input[type="number"]:focus-visible { outline: none; box-shadow: 0 0 0 2px color-mix(in oklch, var(--ring) 60%, transparent); }
.filtre select { min-width: 10rem; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.pages { display: flex; align-items: center; gap: 0.75rem; font-size: 0.8125rem; }

/* ---- Boutons et opérations ---- */
.operation { display: inline-flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.bouton.attention { background: #f59e0b; color: #1f1300; }
.bouton.attention:hover { background: #d97706; color: #fff; }
.bouton.danger-leger { border-color: color-mix(in oklch, var(--destructive) 45%, transparent); background: transparent; color: var(--destructive); }
.bouton.danger-leger:hover { background: color-mix(in oklch, var(--destructive) 10%, transparent); }
.champ-motif { height: 2rem !important; width: 13rem !important; font-size: 0.8125rem !important; }
.champ-nombre { height: 2rem; width: 7.5rem; }
.boutons-ligne { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.formulaire .boutons-ligne { justify-content: flex-end; margin-top: 0.5rem; }
.champs-deux { display: grid; gap: 1rem; }
@media (min-width: 640px) { .champs-deux { grid-template-columns: 1fr 1fr; } }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-size: 0.875rem; font-weight: 500; margin-bottom: 0.5rem; }
.choix-ligne { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.choix-grille { display: grid; gap: 0.5rem 1.25rem; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); }
.case.attestation { font-size: 0.8125rem; }
.lien-plus { display: inline-flex; align-items: center; gap: 0.25rem; margin-top: 1rem; font-size: 0.875rem; }
.lien-plus svg { width: 0.875rem; height: 0.875rem; }

/* ---- Tableau de bord ---- */
.graphique { width: 100%; height: auto; max-height: 13rem; }
.graphique .barre-reussie { fill: var(--primary); }
.graphique .barre-echouee { fill: var(--destructive); }
.graphique .axe { stroke: var(--border); stroke-width: 1; }
.graphique text { fill: var(--muted-foreground); font-size: 10px; font-family: inherit; }
.legende { display: inline-block; width: 0.625rem; height: 0.625rem; border-radius: 2px; margin: 0 0.25rem 0 0.5rem; vertical-align: middle; }
.legende.reussie { background: var(--primary); } .legende.echouee { background: var(--destructive); }
.liste-roles { list-style: none; padding: 0; display: flex; flex-direction: column; }
.liste-roles li { display: flex; align-items: center; gap: 0.75rem; padding: 0.625rem 0; border-bottom: 1px solid var(--border); font-size: 0.875rem; }
.liste-roles li span:first-child { flex: 1; }
.integrite { display: flex; align-items: center; gap: 0.5rem; margin-top: 1rem; font-size: 0.8125rem; font-weight: 500; }
.integrite svg { width: 1rem; height: 1rem; }
.integrite.ok { color: #047857; } .dark .integrite.ok { color: #6ee7b7; }
.integrite.ko { color: var(--destructive); }
.console-contenu > .integrite { margin-top: 0; }
.alertes-liste { list-style: none; padding: 0; display: flex; flex-direction: column; }
.alertes-liste li { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; padding: 0.5rem 0; border-bottom: 1px solid var(--border); font-size: 0.8125rem; }
.alertes-liste li:last-child { border-bottom: 0; }

/* ---- Fiche utilisateur ---- */
.fiche-entete { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.fiche-identite { flex: 1; min-width: 16rem; }
.fiche-identite h2 { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin: 0; font-size: 1.25rem; }
.fiche-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; justify-content: flex-end; }
.note-soi { display: flex; align-items: center; gap: 0.5rem; font-size: 0.8125rem; color: var(--muted-foreground); }
.note-soi svg { width: 1rem; height: 1rem; color: var(--primary); }
.onglets { display: flex; gap: 0.25rem; border-bottom: 1px solid var(--border); overflow-x: auto; }
.onglets a { padding: 0.625rem 0.875rem; margin-bottom: -1px; border-bottom: 2px solid transparent; font-size: 0.875rem; font-weight: 500; color: var(--muted-foreground); white-space: nowrap; }
.onglets a:hover { color: var(--foreground); text-decoration: none; }
.onglets a.actif { color: var(--primary); border-bottom-color: var(--primary); }
.details.compact { margin-bottom: 1rem; }
.encadre { display: flex; gap: 0.75rem; margin-top: 1.25rem; padding: 1rem; border-radius: var(--radius-lg); border: 1px dashed color-mix(in oklab, var(--primary) 45%, transparent); background: color-mix(in oklab, var(--primary) 5%, transparent); font-size: 0.875rem; }
.encadre > svg { width: 1.125rem; height: 1.125rem; color: var(--primary); margin-top: 0.125rem; }
.encadre .boutons-ligne { margin-top: 0.75rem; }
.liste-droits { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 0.75rem; }
.droit { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 0.875rem 1rem; display: flex; flex-direction: column; gap: 0.625rem; }
.droit.retire { opacity: 0.6; }
.droit-tete { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.droit-tete strong { font-size: 0.9375rem; }
.droit-roles { display: flex; align-items: center; gap: 0.25rem; flex-wrap: wrap; }
.ajout-role { display: inline-flex; gap: 0.375rem; margin-left: 0.5rem; }
.ajout-role select { height: 2rem; width: auto; font-size: 0.8125rem; }
.ligne-ajout { display: flex; gap: 0.5rem; margin-top: 1rem; }
.ligne-ajout select { width: auto; }
.ajouts { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 1.25rem; }
.ajout-droit { border: 1px solid var(--border); border-radius: var(--radius-lg); }
.ajout-droit summary { display: flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1rem; cursor: pointer; font-size: 0.875rem; font-weight: 500; color: var(--primary); list-style: none; }
.ajout-droit summary::-webkit-details-marker { display: none; }
.ajout-droit summary svg { width: 1rem; height: 1rem; }
.ajout-droit[open] summary { border-bottom: 1px solid var(--border); }
.ajout-droit .formulaire { padding: 1rem; }
.zone-danger { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; border-color: color-mix(in oklch, var(--destructive) 40%, transparent); }
.zone-danger > div { flex: 1; min-width: 18rem; }
.zone-danger h2 { margin-bottom: 0.25rem; color: var(--destructive); }
.aide-carte h2 { margin-bottom: 0.75rem; }
.regles-liste { padding-left: 1.1rem; display: flex; flex-direction: column; gap: 0.5rem; font-size: 0.8125rem; color: var(--muted-foreground); }
.exigences { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 0.875rem; }
.exigences li { display: flex; gap: 0.75rem; font-size: 0.875rem; }
.exigences li > svg { width: 1.125rem; height: 1.125rem; margin-top: 0.125rem; color: #059669; }
.exigences li:has(.discret) strong { font-weight: 600; }

/* ---- Applications ---- */
.grille-apps { display: grid; gap: 1.25rem; }
@media (min-width: 1100px) { .grille-apps { grid-template-columns: 1fr 1fr; } }
.app-tete { display: flex; align-items: center; gap: 0.875rem; margin-bottom: 1rem; }
.app-tete > div { flex: 1; min-width: 0; }
.app-tete h2 { margin: 0; }
.client { margin-bottom: 0.5rem; }

/* ---- Boîte de confirmation ---- */
.dialogue { width: min(28rem, calc(100vw - 2rem)); padding: 0; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--card); color: var(--foreground);
  box-shadow: 0 20px 50px rgb(0 0 0 / 25%); }
.dialogue::backdrop { background: rgb(15 23 42 / 55%); backdrop-filter: blur(2px); }
.dialogue-corps { display: flex; flex-direction: column; gap: 0.75rem; padding: 1.5rem; }
.dialogue-icone { display: inline-flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; border-radius: 9999px;
  color: var(--destructive); background: color-mix(in oklch, var(--destructive) 12%, transparent); }
.dialogue-icone svg { width: 1.25rem; height: 1.25rem; }
.dialogue h2 { font-size: 1.0625rem; font-weight: 600; }
.dialogue p { font-size: 0.875rem; color: var(--muted-foreground); }
.dialogue-boutons { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 0.5rem; }

/* ---- Fiche d'activation (écran et impression) ---- */
.fiche-activation { max-width: 46rem; padding: 2rem 2.25rem; border: 2px solid var(--foreground); border-radius: 0.75rem; background: #fff; color: #111; }
.fiche-activation header { display: flex; align-items: center; gap: 1.25rem; margin-bottom: 1.25rem; }
.fiche-activation header .astuce-scene { width: 8rem; }
.fiche-activation h2 { font-size: 1.375rem; margin: 0; }
.fiche-activation header p { color: #444; font-size: 0.875rem; }
.fiche-personne { font-size: 1.125rem; font-weight: 600; margin-bottom: 1rem; }
.fiche-activation dl { display: grid; grid-template-columns: max-content 1fr; gap: 0.625rem 1.25rem; margin: 0 0 1.25rem; font-size: 0.9375rem; }
.fiche-activation dt { color: #444; }
.fiche-activation dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.fiche-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.5rem; letter-spacing: 0.12em; text-align: center; padding: 0.875rem 1rem;
  border: 1px dashed #111; border-radius: 0.375rem; margin-bottom: 1.25rem; }
.fiche-activation ol { padding-left: 1.25rem; margin-bottom: 1.25rem; line-height: 1.65; font-size: 0.875rem; }
.fiche-alerte { border-left: 4px solid #b00020; background: #fff5f5; padding: 0.75rem 0.875rem; font-size: 0.8125rem; line-height: 1.55; }
.fiche-alerte strong { color: #b00020; }
.fiche-pied { margin-top: 1rem; font-size: 0.6875rem; color: #666; }
.fiche-activation .astuce-encre-blanche .pc:not(.bulb):not(.rays) { filter: none; }

@media print {
  @page { size: A4; margin: 16mm; }
  html, body, .console-page { background: #fff !important; }
  .console-barre, .console-menu, .console-entete, .fil, .console-contenu > .alerte, .dialogue { display: none !important; }
  .console-corps { display: block; }
  .console-contenu { padding: 0; max-width: none; }
  .fiche-activation { border-color: #000; max-width: none; }
}

/* ---- Console : compléments (journal en français, saisie des durées, demandes en attente) ---- */
.details-fr { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 0.125rem 0.625rem; font-size: 0.8125rem; }
.details-fr > div { display: contents; }
.details-fr dt { color: var(--muted-foreground); }
.details-fr dd { margin: 0; }
details.technique { margin-top: 0.375rem; font-size: 0.75rem; }
details.technique summary { cursor: pointer; color: var(--muted-foreground); }
details.technique summary:hover { color: var(--primary); }
details.technique dl { margin: 0.375rem 0 0; display: grid; grid-template-columns: max-content 1fr; gap: 0.125rem 0.625rem; }
details.technique dl > div { display: contents; }
details.technique dt { color: var(--muted-foreground); }
details.technique dd { margin: 0; overflow-wrap: anywhere; }
details.technique pre { margin: 0; padding: 0.5rem; border-radius: 0.375rem; background: var(--muted); font-size: 0.6875rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.saisie-duree { display: inline-flex; align-items: center; gap: 0.375rem; }
.saisie-duree select { height: 2rem; width: auto; font-size: 0.8125rem; }
.puce.en-attente { border-style: dashed; color: #92400e; border-color: rgb(217 119 6 / 70%); background: #fffbeb; }
.dark .puce.en-attente { color: #fcd34d; background: rgb(69 26 3 / 45%); }
.carte-tete h2 svg { width: 1.0625rem; height: 1.0625rem; vertical-align: -0.15em; margin-right: 0.375rem; color: var(--primary); }

/* ---- Activation : rappel du compte concerné (nom et identifiant) ---- */
.compte-activation { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.25rem; padding: 0.75rem 0.875rem; border-radius: var(--radius-lg);
  border: 1px solid color-mix(in oklab, var(--primary) 35%, transparent); background: color-mix(in oklab, var(--primary) 7%, var(--card)); font-size: 0.8125rem; }
.compte-activation > div { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.compte-activation-titre { font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--primary); }
.compte-activation strong { font-size: 0.9375rem; }
.compte-activation code { font-weight: 600; color: var(--foreground); overflow-wrap: anywhere; }

/* ---- Console : fenêtre de confirmation d'identité (opérations sensibles) ---- */
.dialogue-icone.info { color: var(--primary); background: color-mix(in oklab, var(--primary) 12%, transparent); }
.confirmation-operation { display: flex; flex-direction: column; gap: 0.125rem; padding: 0.75rem 0.875rem; border-radius: var(--radius-lg);
  border: 1px solid color-mix(in oklch, var(--destructive) 30%, transparent); background: color-mix(in oklch, var(--destructive) 6%, transparent); font-size: 0.875rem; }
.confirmation-operation span, .confirmation-compte span { font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted-foreground); }
.confirmation-compte { display: flex; align-items: center; gap: 0.75rem; padding: 0.625rem 0.875rem; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--muted); font-size: 0.875rem; }
.confirmation-compte > svg { width: 1.25rem; height: 1.25rem; color: var(--primary); }
.confirmation-compte > div { display: flex; flex-direction: column; line-height: 1.3; }
.confirmation-compte code { font-size: 0.8125rem; color: var(--muted-foreground); }
.console-page .bouton.large { width: 100%; }
.aide.centre { text-align: center; margin-top: -0.25rem; }
.confirmation-identite .separateur { margin: 0.25rem 0; }
.confirmation-identite .alerte { margin-bottom: 0; }

/* ---- Console : motifs dans les fenêtres, formulaire compact d'accès, mise en route, paramètres groupés ---- */
.dialogue textarea { width: 100%; min-height: 3.5rem; padding: 0.5rem 0.75rem; border-radius: var(--radius-md); border: 1px solid var(--border);
  background: var(--card); color: var(--foreground); font: inherit; font-size: 0.875rem; resize: vertical; }
.dialogue textarea:focus-visible { outline: none; box-shadow: 0 0 0 2px color-mix(in oklch, var(--ring) 60%, transparent); }
.dialogue textarea[aria-invalid="true"] { border-color: var(--destructive); }
#confirmation-operation { white-space: pre-line; }
.acces-compact { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.75rem; padding: 0.875rem 1rem; border: 1px solid var(--border); border-radius: var(--radius-lg); background: color-mix(in oklab, var(--muted) 35%, var(--card)); }
.acces-compact .filtre select, .acces-compact .filtre input { min-width: 11rem; }
.acces-compact .aide.large { flex-basis: 100%; margin: 0; }
.sous-titre-carte { font-size: 0.875rem; font-weight: 600; margin-bottom: 0.5rem; }
.mise-en-route { border-color: color-mix(in oklab, var(--primary) 35%, transparent); }
.etapes-compte { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.etapes-compte > li { display: flex; gap: 0.875rem; padding: 0.875rem 0; border-bottom: 1px solid var(--border); }
.etapes-compte > li:last-child { border-bottom: 0; }
.etapes-compte .numero { display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; width: 1.75rem; height: 1.75rem; border-radius: 9999px;
  font-size: 0.8125rem; font-weight: 700; color: var(--primary); background: color-mix(in oklab, var(--primary) 12%, transparent); }
.etapes-compte .faite .numero { color: #fff; background: #059669; }
.etapes-compte .numero svg { width: 1rem; height: 1rem; }
.etape-corps { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.5rem; font-size: 0.875rem; }
.etape-corps .ligne-ajout { margin-top: 0; }
tr.modifie td { background: color-mix(in oklab, var(--primary) 7%, transparent) !important; }
tr.modifie td:first-child { box-shadow: inset 3px 0 0 var(--primary); }
.barre-enregistrement { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  margin-top: 1rem; padding: 0.75rem 1rem; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--card); box-shadow: 0 -4px 14px rgb(0 0 0 / 6%); }
.acces-compact .large { flex-basis: 100%; margin: 0; }
.carte > .alerte.info:only-of-type { margin-top: 0.5rem; }

/* ---- Connexion : poste partagé ---- */
.poste-partage { font-size: 0.875rem; }
.poste-partage > span { display: flex; flex-direction: column; gap: 0.125rem; }
.poste-partage .aide { font-weight: 400; }
.badge.partage { background: #f59e0b; color: #1f1300; }

/* ---- Console : supervision ---- */
.etat-global { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; padding: 1.125rem 1.375rem; border-radius: var(--radius-lg); border: 1px solid; }
.etat-global > div { flex: 1; min-width: 14rem; }
.etat-global h2 { font-size: 1.125rem; font-weight: 650; }
.etat-global p { font-size: 0.875rem; }
.etat-global-icone svg { width: 2rem; height: 2rem; }
.etat-global.ok { background: #ecfdf5; border-color: rgb(110 231 183 / 70%); color: #065f46; }
.etat-global.attention { background: #fffbeb; border-color: rgb(252 211 77 / 70%); color: #78350f; }
.etat-global.critique { background: color-mix(in oklch, var(--destructive) 10%, var(--card)); border-color: color-mix(in oklch, var(--destructive) 45%, transparent); color: var(--destructive); }
.dark .etat-global.ok { background: rgb(2 44 34 / 45%); color: #a7f3d0; border-color: rgb(6 95 70 / 70%); }
.dark .etat-global.attention { background: rgb(69 26 3 / 45%); color: #fde68a; border-color: rgb(146 64 14 / 70%); }
.etat-global .discret { color: inherit; opacity: 0.8; }
.liste-alertes { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 0.75rem; }
.alerte-exploitation { border: 1px solid var(--border); border-left-width: 4px; border-radius: var(--radius-lg); padding: 0.75rem 1rem; display: flex; flex-direction: column; gap: 0.375rem; font-size: 0.875rem; }
.alerte-exploitation.critique { border-left-color: var(--destructive); }
.alerte-exploitation.attention { border-left-color: #f59e0b; }
.alerte-exploitation.info { border-left-color: var(--primary); }
.alerte-tete { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.que-faire span { font-weight: 600; margin-right: 0.25rem; }
.grille-supervision { display: grid; gap: 1.25rem; }
@media (min-width: 1100px) { .grille-supervision { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.grille-supervision h2 svg, .carte-tete h2 svg { width: 1.0625rem; height: 1.0625rem; vertical-align: -0.15em; margin-right: 0.375rem; color: var(--primary); }

/* ============================ Gestion des clés de sécurité (jalon G1) ============================ */
.cle-securite h2 { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.cle-securite h2 svg, #titre-archive svg { width: 1.125rem; height: 1.125rem; }
.definitions { display: grid; gap: 0.5rem; margin: 0 0 1rem; font-size: 0.875rem; }
.definitions > div { display: grid; grid-template-columns: 12rem 1fr; gap: 0.75rem; align-items: baseline; }
.definitions dt { color: var(--muted-foreground); }
.definitions dd { margin: 0; }
@media (max-width: 640px) { .definitions > div { grid-template-columns: 1fr; gap: 0.125rem; } }
.sous-titre { font-size: 0.875rem; font-weight: 600; margin: 1rem 0 0.5rem; }
.actions-carte { display: flex; gap: 0.75rem; justify-content: flex-end; flex-wrap: wrap; margin-top: 1rem; }
.liste-consequences { padding-left: 1.1rem; display: flex; flex-direction: column; gap: 0.4rem; font-size: 0.875rem; }
.carte-danger { border-color: color-mix(in oklch, var(--destructive) 40%, var(--border)); }
.carte-danger h2 { color: var(--destructive); display: flex; gap: 0.5rem; align-items: center; }
.choix { display: flex; gap: 0.6rem; align-items: flex-start; font-weight: 400; font-size: 0.875rem; margin: 0.4rem 0; cursor: pointer; }
.choix input { margin-top: 0.2rem; accent-color: var(--primary); }
.formulaire-rotation fieldset { border: 0; padding: 0; }
.formulaire-rotation legend { font-weight: 600; font-size: 0.875rem; margin-bottom: 0.25rem; }
.etapes-cles { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 0.75rem; }
.etapes-cles li { display: flex; gap: 0.75rem; font-size: 0.875rem; }
.etapes-cles li > svg { width: 1.125rem; height: 1.125rem; margin-top: 0.125rem; flex: none; color: var(--muted-foreground); }
.etapes-cles li > div { display: flex; flex-direction: column; gap: 0.125rem; }
.etapes-cles .etape-faite > svg { color: #059669; }
.etapes-cles .etape-echec > svg, .etapes-cles .etape-echec strong { color: var(--destructive); }
.etapes-cles .etape-en_cours > svg { color: var(--primary); animation: pulsation-cle 1.2s ease-in-out infinite; }
.etapes-cles .etape-a_venir strong { color: var(--muted-foreground); font-weight: 500; }
@keyframes pulsation-cle { 50% { opacity: 0.3; } }
@media (prefers-reduced-motion: reduce) { .etapes-cles .etape-en_cours > svg { animation: none; } }
.resultat-archive { margin-top: 0.75rem; }
.grille-deux > .cle-securite { min-width: 0; }
.cle-securite .tableau-cadre { overflow-x: auto; }
.etapes-cles + .aide { margin-top: 1rem; }

/* « Mon compte » › Adresse électronique (après G1) */
.bloc-courriel { margin: 1.25rem 0; padding-top: 1rem; border-top: 1px solid var(--bordure, rgba(127, 127, 127, .25)); }
.bloc-courriel h3 { margin: 0 0 .5rem; font-size: 1rem; }
.actions-ligne { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .5rem; }
.actions-ligne form { margin: 0; }

/* Suivi de session : avertissement avant fermeture, reconnexion (politique d'ergonomie du 03/12/2026) */
.dialogue-session .dialogue-icone { font-size: 1.4rem; }
.session-decompte { font-weight: 600; font-variant-numeric: tabular-nums; margin: .25rem 0 0; }
