/* wizard.css — assistants pas-à-pas (fiche agent v109, ouverture de soirée v110).
 *
 * Toutes les animations sont neutralisées sous `prefers-reduced-motion` : un
 * parcours de saisie ne doit pas devenir pénible pour qui les supporte mal.
 */

/* ---------------------------------------------------------------- Couche */
.wz-backdrop {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: rgba(6, 8, 12, .72);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
  backdrop-filter: blur(10px) saturate(120%);
  opacity: 0; transition: opacity .28s ease;
}
.wz-backdrop.ouvert { opacity: 1; }

.wz {
  width: min(860px, 100%); max-height: min(92vh, 860px);
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 40px 90px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .03) inset;
  overflow: hidden;
  transform: translateY(22px) scale(.975);
  opacity: 0;
  transition: transform .42s cubic-bezier(.2, .9, .28, 1.06), opacity .3s ease;
}
.wz-backdrop.ouvert .wz { transform: none; opacity: 1; }

/* ---------------------------------------------------------------- En-tête */
.wz-head {
  padding: 22px 26px 0;
  background: linear-gradient(180deg, color-mix(in srgb, var(--club) 7%, transparent), transparent 70%);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.wz-head-haut { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.wz-kicker {
  font-size: 10.5px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase;
  color: var(--club); margin-bottom: 4px;
}
.wz-titre { margin: 0; font-family: var(--font-display); font-size: 25px; font-weight: 700; line-height: 1.1; }
.wz-sous { margin: 3px 0 0; font-size: 13.5px; color: var(--text-dim); }
.wz-close {
  flex-shrink: 0; width: 34px; height: 34px; display: grid; place-items: center;
  background: transparent; border: 1px solid var(--border); border-radius: 50%;
  color: var(--text-dim); cursor: pointer;
  transition: color .2s, border-color .2s, transform .2s;
}
.wz-close svg { width: 16px; height: 16px; }
.wz-close:hover { color: var(--text); border-color: var(--club); transform: rotate(90deg); }

/* ---- Jalons ---- */
.wz-jalons { display: flex; gap: 4px; list-style: none; margin: 18px 0 10px; padding: 0; }
.wz-jalon {
  flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 6px;
  opacity: .45; transition: opacity .3s ease;
}
.wz-jalon.actif, .wz-jalon.fait { opacity: 1; }
.wz-jalon.cliquable { cursor: pointer; }
.wz-pastille {
  position: relative; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface-alt); border: 1.5px solid var(--border);
  font-size: 12px; font-weight: 700; color: var(--text-dim);
  transition: background .3s, border-color .3s, color .3s, transform .3s;
}
.wz-jalon.actif .wz-pastille {
  background: var(--club); border-color: var(--club); color: var(--on-accent, #fff);
  transform: scale(1.12);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--club) 18%, transparent);
}
.wz-jalon.fait .wz-pastille { background: color-mix(in srgb, var(--ok) 22%, transparent); border-color: var(--ok); color: var(--ok); }
.wz-num, .wz-check { position: absolute; transition: opacity .25s, transform .25s; }
.wz-check { width: 15px; height: 15px; opacity: 0; transform: scale(.4); stroke-dasharray: 26; stroke-dashoffset: 26; }
.wz-jalon.fait .wz-num { opacity: 0; transform: scale(.4); }
.wz-jalon.fait .wz-check { opacity: 1; transform: none; animation: wzTrace .4s ease forwards; }
@keyframes wzTrace { to { stroke-dashoffset: 0; } }
.wz-jalon-txt {
  font-size: 10.5px; font-weight: 600; letter-spacing: .02em; color: var(--text-dim);
  text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.wz-jalon.actif .wz-jalon-txt { color: var(--text); }

/* ---- Barre de progression ---- */
/* Animation CONTINUE mais calme : trois couches superposees.
   1. un degrade qui derive lentement dans la portion remplie — l'energie du
      parcours, jamais au repos ;
   2. un liseré clair qui balaie toutes les 3,2 s, avec une longue pause ;
   3. une tete lumineuse qui respire, posee a la limite de la progression.
   Aucune ne clignote : chacune a une periode differente et un mouvement
   continu, ce qui donne du vivant sans attirer l'oeil hors du contenu. */
.wz-bar {
  height: 5px; border-radius: 5px; position: relative;
  background: var(--border);
  overflow: visible;                 /* la tete lumineuse deborde legerement */
}
.wz-bar::before {                    /* rail : la partie non parcourue */
  content: ''; position: absolute; inset: 0; border-radius: 5px;
  background: var(--border); overflow: hidden;
}
.wz-bar-fill {
  display: block; height: 100%; width: 20%;
  border-radius: 5px; position: relative; z-index: 1;
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--club) 30%, #fff) 0%,
    var(--club) 35%,
    color-mix(in srgb, var(--club) 62%, #fff) 55%,
    var(--club) 75%,
    color-mix(in srgb, var(--club) 30%, #fff) 100%);
  background-size: 260% 100%;
  animation: wzDerive 5.5s linear infinite;
  transition: width .42s cubic-bezier(.2, .9, .3, 1.02);
  box-shadow: 0 0 12px color-mix(in srgb, var(--club) 45%, transparent);
}
@keyframes wzDerive { to { background-position: -260% 0; } }

/* Liseré qui balaie, avec une longue pause entre deux passages. */
.wz-bar-fill::before {
  content: ''; position: absolute; inset: 0; border-radius: 5px; overflow: hidden;
  background: linear-gradient(100deg, transparent 38%, rgba(255,255,255,.55) 50%, transparent 62%);
  background-size: 220% 100%;
  animation: wzBalayage 3.2s cubic-bezier(.45, 0, .2, 1) infinite;
}
@keyframes wzBalayage {
  0% { background-position: 180% 0; }
  55%, 100% { background-position: -120% 0; }
}

/* Tete lumineuse : elle respire au lieu de clignoter. */
.wz-bar-fill::after {
  content: ''; position: absolute; top: 50%; right: 0;
  width: 9px; height: 9px; margin: -4.5px -3px 0 0;
  border-radius: 50%; background: #fff;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--club) 45%, transparent),
              0 0 14px 2px color-mix(in srgb, var(--club) 75%, transparent);
  animation: wzSouffle 2.6s ease-in-out infinite;
}
@keyframes wzSouffle {
  50% { transform: scale(1.28); box-shadow: 0 0 0 5px color-mix(in srgb, var(--club) 26%, transparent),
                                            0 0 20px 4px color-mix(in srgb, var(--club) 55%, transparent); }
}
/* Impulsion supplementaire au changement d'etape (classe posee par le script). */
.wz-bar-fill.wz-bar-pulse { animation: wzDerive 5.5s linear infinite, wzCoup .6s ease-out; }
@keyframes wzCoup { 0% { filter: brightness(1.9); } 100% { filter: none; } }

/* ---------------------------------------------------------------- Corps */
.wz-body { position: relative; flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 24px 26px; }
.wz-step { display: flex; flex-direction: column; gap: 16px; }
/* Les étapes glissent dans le sens de la navigation : on sent qu'on avance
   ou qu'on revient, sans avoir à lire le compteur. */
.wz-entre-droite { animation: wzEntreDroite .34s cubic-bezier(.2, .9, .3, 1.02) both; }
.wz-entre-gauche { animation: wzEntreGauche .34s cubic-bezier(.2, .9, .3, 1.02) both; }
.wz-sort-gauche { position: absolute; inset: 24px 26px auto; animation: wzSortGauche .26s ease-in forwards; }
.wz-sort-droite { position: absolute; inset: 24px 26px auto; animation: wzSortDroite .26s ease-in forwards; }
@keyframes wzEntreDroite { from { opacity: 0; transform: translateX(34px); } }
@keyframes wzEntreGauche { from { opacity: 0; transform: translateX(-34px); } }
@keyframes wzSortGauche { to { opacity: 0; transform: translateX(-34px); } }
@keyframes wzSortDroite { to { opacity: 0; transform: translateX(34px); } }

/* Apparition en cascade : le délai est posé en ligne par le script. */
.wz-champ { animation: wzMonte .38s cubic-bezier(.2, .9, .3, 1.02) both; }
@keyframes wzMonte { from { opacity: 0; transform: translateY(12px); } }

.wz-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 620px) { .wz-duo { grid-template-columns: 1fr; } }
.wz-req { color: var(--club); font-weight: 700; }
.wz-mono { font-family: var(--font-mono); letter-spacing: .02em; }
.wz-label { display: block; font-size: 13px; color: var(--text-dim); margin-bottom: 8px; }
.wz-note { margin: 2px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--text-dim); }
.wz-aide { margin: 6px 0 0; font-size: 12px; color: var(--text-dim); }
.wz-aide.set-hint-erreur { color: var(--danger); }

/* Secousse du champ fautif */
.wz-secoue { animation: wzSecoue .42s cubic-bezier(.36, .07, .19, .97); }
@keyframes wzSecoue {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-7px); }
  40%, 60% { transform: translateX(7px); }
}

/* ---------------------------------------------------------------- Photo */
.wz-drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  padding: 42px 24px; text-align: center; cursor: pointer;
  border: 1.5px dashed var(--border); border-radius: var(--radius-lg);
  background: var(--surface-alt);
  transition: border-color .25s, background .25s, transform .25s;
}
.wz-drop:hover { border-color: var(--club); background: color-mix(in srgb, var(--club) 5%, var(--surface-alt)); transform: translateY(-2px); }
.wz-drop svg { width: 34px; height: 34px; color: var(--club); }
.wz-drop strong { font-size: 15px; }
.wz-drop span { font-size: 12.5px; color: var(--text-dim); }

.wz-crop { display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: start; }
@media (max-width: 700px) { .wz-crop { grid-template-columns: 1fr; } }
.wz-crop-vue {
  position: relative; overflow: hidden; border-radius: var(--radius-md);
  user-select: none; touch-action: none; max-width: 100%;
  animation: wzMonte .4s ease both;
}
.wz-crop-vue img { width: 100%; display: block; }
.wz-crop-cadre {
  position: absolute; cursor: move;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, .6);
  border: 2px solid var(--club);
  transition: box-shadow .2s;
}
.wz-crop-cadre.saisi { box-shadow: 0 0 0 9999px rgba(0, 0, 0, .74); }
/* Coins d'appui, purement visuels */
.wz-crop-cadre span { position: absolute; width: 12px; height: 12px; border: 2px solid var(--club); }
.wz-crop-cadre span:nth-child(1) { top: -2px; left: -2px; border-right: 0; border-bottom: 0; }
.wz-crop-cadre span:nth-child(2) { top: -2px; right: -2px; border-left: 0; border-bottom: 0; }
.wz-crop-cadre span:nth-child(3) { bottom: -2px; left: -2px; border-right: 0; border-top: 0; }
.wz-crop-cadre span:nth-child(4) { bottom: -2px; right: -2px; border-left: 0; border-top: 0; }
.wz-crop-cote { display: flex; flex-direction: column; gap: 12px; }
.wz-crop-cote p { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--text-dim); }
.wz-crop-badge {
  align-self: flex-start; font-size: 11px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; padding: 4px 10px; border-radius: var(--pill);
  color: var(--warn); background: color-mix(in srgb, var(--warn) 15%, transparent);
}
.wz-crop-badge.ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 15%, transparent); }
.wz-crop-apercu { display: flex; align-items: center; gap: 10px; }
.wz-crop-apercu img {
  width: 66px; height: 88px; object-fit: cover; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface-alt);
}
.wz-crop-apercu span { font-size: 11.5px; color: var(--text-dim); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }

/* ---------------------------------------------------------------- Choix */
.wz-choix { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px; }
.wz-tuile {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--surface-alt); cursor: pointer;
  transition: border-color .2s, background .2s, transform .2s;
}
.wz-tuile:hover { border-color: color-mix(in srgb, var(--club) 55%, var(--border)); transform: translateY(-1px); }
.wz-tuile input { position: absolute; opacity: 0; width: 0; height: 0; }
.wz-tuile-box {
  flex-shrink: 0; width: 20px; height: 20px; border-radius: 6px;
  border: 1.5px solid var(--border); background: var(--surface);
  display: grid; place-items: center; color: transparent;
  transition: background .2s, border-color .2s, color .2s, transform .2s;
}
.wz-tuile-box svg { width: 13px; height: 13px; stroke-dasharray: 26; stroke-dashoffset: 26; }
.wz-tuile input:checked + .wz-tuile-box {
  background: var(--club); border-color: var(--club); color: var(--on-accent, #fff); transform: scale(1.06);
}
.wz-tuile input:checked + .wz-tuile-box svg { animation: wzTrace .32s ease forwards; }
.wz-tuile input:checked ~ .wz-tuile-txt { color: var(--text); }
.wz-tuile:has(input:checked) { border-color: var(--club); background: color-mix(in srgb, var(--club) 8%, var(--surface-alt)); }
.wz-tuile-txt { font-size: 13px; line-height: 1.35; color: var(--text-dim); }
.wz-autre { margin-top: 12px; animation: wzMonte .3s ease both; }

/* ---------------------------------------------------------------- Récap */
.wz-recap { display: grid; grid-template-columns: auto 1fr; gap: 26px; align-items: start; }
@media (max-width: 780px) { .wz-recap { grid-template-columns: 1fr; } }
.wz-carte-scene { min-height: 240px; display: flex; align-items: flex-start; justify-content: center; perspective: 1200px; }
/* La carte se pose : c'est l'aboutissement du parcours, elle mérite son entrée. */
.wz-carte-in { animation: wzCarte .72s cubic-bezier(.18, .9, .26, 1.04) both; }
@keyframes wzCarte {
  from { opacity: 0; transform: translateY(26px) rotateX(16deg) scale(.9); }
  to { opacity: 1; transform: none; }
}
.wz-recap-col { display: flex; flex-direction: column; gap: 14px; }
.wz-recap-nom { font-family: var(--font-display); font-size: 21px; font-weight: 700; line-height: 1.1; }
.wz-manque {
  border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent);
  background: color-mix(in srgb, var(--warn) 10%, transparent);
  border-radius: var(--radius-md); padding: 12px 14px;
}
.wz-manque strong { display: block; font-size: 13.5px; color: var(--warn); margin-bottom: 6px; }
.wz-manque ul { margin: 0; padding-left: 18px; }
.wz-manque li { font-size: 12.5px; line-height: 1.55; color: var(--text-dim); }
.wz-manque p { margin: 8px 0 0; font-size: 12px; line-height: 1.5; color: var(--text-dim); }
.wz-complet {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--ok) 40%, transparent);
  background: color-mix(in srgb, var(--ok) 10%, transparent);
  border-radius: var(--radius-md);
}
.wz-complet svg { width: 22px; height: 22px; color: var(--ok); flex-shrink: 0; }
.wz-complet strong { display: block; font-size: 13.5px; }
.wz-complet span { font-size: 12.5px; color: var(--text-dim); }

/* ---------------------------------------------------------------- Succès */
.wz-succes { align-items: center; text-align: center; padding: 26px 0 12px; gap: 12px; }
.wz-succes-rond {
  width: 78px; height: 78px; border-radius: 50%; display: grid; place-items: center;
  color: var(--ok); background: color-mix(in srgb, var(--ok) 16%, transparent);
  animation: wzPop .55s cubic-bezier(.2, 1.3, .4, 1) both;
}
.wz-succes-rond svg { width: 36px; height: 36px; stroke-dasharray: 26; stroke-dashoffset: 26; animation: wzTrace .45s .28s ease forwards; }
/* Onde qui s'écarte du rond, une seule fois */
.wz-succes-rond::after {
  content: ''; position: absolute; width: 78px; height: 78px; border-radius: 50%;
  border: 2px solid var(--ok); animation: wzOnde 1s .3s ease-out both;
}
@keyframes wzPop { from { opacity: 0; transform: scale(.5); } }
@keyframes wzOnde { to { transform: scale(1.9); opacity: 0; } }
.wz-succes h3 { margin: 6px 0 0; font-family: var(--font-display); font-size: 22px; }
.wz-succes p { margin: 0; font-size: 14px; color: var(--text-dim); }
.wz-succes-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }

/* ---------------------------------------------------------------- Pied */
.wz-foot {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 26px; border-top: 1px solid var(--border);
  background: var(--surface-alt); flex-shrink: 0;
  transition: opacity .25s, transform .25s;
}
.wz-foot.wz-cache { opacity: 0; transform: translateY(100%); pointer-events: none; }
.wz-compteur { flex: 1; text-align: center; font-size: 12px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.wz-foot .btn { min-width: 118px; justify-content: center; }
.wz-foot .btn:disabled { opacity: .4; pointer-events: none; }
.wz-final { box-shadow: 0 0 0 0 color-mix(in srgb, var(--club) 55%, transparent); animation: wzBattement 2.2s ease-in-out infinite; }
@keyframes wzBattement {
  50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--club) 0%, transparent); }
}

@media (max-width: 640px) {
  .wz-backdrop { padding: 0; }
  .wz { width: 100%; max-height: 100vh; height: 100%; border-radius: 0; }
  .wz-jalon-txt { display: none; }
  .wz-titre { font-size: 21px; }
  .wz-foot .btn { min-width: 0; flex: 1; }
}

/* Accessibilité : plus aucun mouvement si le système le demande. */
@media (prefers-reduced-motion: reduce) {
  .wz, .wz-backdrop, .wz-step, .wz-champ, .wz-crop-vue, .wz-carte-in,
  .wz-succes-rond, .wz-succes-rond svg, .wz-final,
  .wz-bar-fill, .wz-bar-fill::before, .wz-bar-fill::after,
  .wz-check, .wz-tuile-box svg, .wz-entre-droite, .wz-entre-gauche,
  .wz-sort-gauche, .wz-sort-droite, .wz-secoue {
    animation: none !important; transition: none !important; transform: none !important;
  }
  .wz-check, .wz-tuile-box svg, .wz-succes-rond svg { stroke-dashoffset: 0; }
}

/* ---------------------------------------------------------------- Accès */
.wz-bascule {
  display: flex; align-items: center; gap: 16px; padding: 16px 18px;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--surface-alt);
  transition: border-color .25s, background .25s;
}
.wz-bascule.on { border-color: var(--club); background: color-mix(in srgb, var(--club) 8%, var(--surface-alt)); }
.wz-bascule-txt { flex: 1; min-width: 0; }
.wz-bascule-txt strong { display: block; font-size: 15px; margin-bottom: 3px; }
.wz-bascule-txt span { font-size: 12.5px; line-height: 1.45; color: var(--text-dim); }
/* Interrupteur : la pastille glisse, le fond s'allume. */
.wz-switch {
  flex-shrink: 0; width: 52px; height: 30px; padding: 0; cursor: pointer;
  border: 1px solid var(--border); border-radius: var(--pill);
  background: var(--surface); position: relative;
  transition: background .28s, border-color .28s;
}
.wz-switch span {
  position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--text-dim);
  transition: transform .28s cubic-bezier(.2, .9, .3, 1.2), background .28s;
}
.wz-switch.on { background: var(--club); border-color: var(--club); }
.wz-switch.on span { transform: translateX(22px); background: #fff; }
.wz-tuile-large { max-width: none; }
.wz-vide {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px;
  padding: 34px 24px; border: 1px dashed var(--border); border-radius: var(--radius-lg);
  background: var(--surface-alt);
}
.wz-vide svg { width: 32px; height: 32px; color: var(--text-dim); }
.wz-vide strong { font-size: 15px; }
.wz-vide p { margin: 0; max-width: 420px; font-size: 12.5px; line-height: 1.5; color: var(--text-dim); }
.wz-succes-compte {
  margin-top: 6px; padding: 10px 16px; border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--ok) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--ok) 32%, transparent);
}
.wz-succes-compte strong { display: block; font-family: var(--font-mono); font-size: 13px; }
.wz-succes-compte span { font-size: 12px; color: var(--text-dim); }

/* ===========================================================================
   Ouverture de soirée (v110) — mêmes fondations que l'assistant de fiche,
   avec des illustrations : c'est une nuit qu'on lance, pas un formulaire.
   =========================================================================== */
.sw-backdrop .wz-head { background: linear-gradient(180deg, color-mix(in srgb, var(--club) 10%, transparent), transparent 72%); }

/* ---- Événements Shotgun ---- */
.sw-evs { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.sw-ev {
  position: relative; display: flex; flex-direction: column; gap: 3px; text-align: left;
  padding: 12px 14px; cursor: pointer; color: var(--text);
  background: var(--surface-alt); border: 1px solid var(--border); border-radius: var(--radius-md);
  transition: border-color .2s, background .2s, transform .2s;
}
.sw-ev:hover { border-color: color-mix(in srgb, var(--club) 55%, var(--border)); transform: translateY(-2px); }
.sw-ev.actif { border-color: var(--club); background: color-mix(in srgb, var(--club) 9%, var(--surface-alt)); }
.sw-ev-t { font-weight: 700; font-size: 14px; line-height: 1.2; }
.sw-ev-d { font-size: 11.5px; color: var(--text-dim); }
.sw-ev-pv { font-size: 11.5px; color: var(--club); font-weight: 700; }
.sw-ev-live {
  position: absolute; top: 10px; right: 10px;
  font-size: 9.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ok); padding: 2px 7px; border-radius: var(--pill);
  background: color-mix(in srgb, var(--ok) 18%, transparent);
  animation: swPulse 1.9s ease-in-out infinite;
}
@keyframes swPulse { 50% { opacity: .45; } }

/* ---- Responsable ---- */
.sw-resps { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 10px; }
.sw-resp {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; text-align: left; cursor: pointer;
  color: var(--text); background: var(--surface-alt);
  border: 1px solid var(--border); border-radius: var(--radius-md);
  transition: border-color .2s, background .2s, transform .2s;
}
.sw-resp:hover { border-color: color-mix(in srgb, var(--club) 55%, var(--border)); transform: translateY(-2px); }
.sw-resp.actif { border-color: var(--club); background: color-mix(in srgb, var(--club) 9%, var(--surface-alt)); }
.sw-resp-av { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--surface); }
.sw-resp-ini {
  display: grid; place-items: center; font-family: var(--font-display);
  font-size: 17px; font-weight: 700; color: var(--text-dim); border: 1px solid var(--border);
}
.sw-resp-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sw-resp-txt strong { font-size: 14px; }
.sw-resp-txt span { font-size: 11.5px; color: var(--text-dim); }
.sw-resp-ok { width: 18px; height: 18px; color: var(--club); opacity: 0; transform: scale(.4); transition: opacity .2s, transform .2s; flex-shrink: 0; }
.sw-resp.actif .sw-resp-ok { opacity: 1; transform: none; }

/* ---- Salles ---- */
.sw-salles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.sw-salle {
  position: relative; overflow: hidden; cursor: pointer; color: var(--text);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 20px 14px 14px; border-radius: var(--radius-lg);
  border: 1px solid var(--border); background: var(--surface-alt);
  transition: border-color .25s, transform .25s, box-shadow .25s;
}
/* Chaque salle a son ambiance : le dégradé s'allume quand elle est ouverte. */
.sw-salle::before {
  content: ''; position: absolute; inset: 0; opacity: 0; transition: opacity .35s;
  background: radial-gradient(120% 90% at 50% 0%, var(--sc, var(--club)), transparent 68%);
}
.sw-salle.on::before { opacity: .22; }
.sw-salle.on { border-color: var(--sc, var(--club)); transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0,0,0,.32); }
.sw-salle:not(.on) { opacity: .5; }
.sw-salon { --sc: #E8B85B; }
.sw-planete { --sc: #A46BF5; }
.sw-club { --sc: #FF2D46; }
.sw-autre { --sc: #5FD68A; }
.sw-salle-illu { position: relative; color: var(--sc, var(--club)); transition: transform .35s; }
.sw-salle-illu svg { width: 44px; height: 44px; display: block; }
.sw-salle.on .sw-salle-illu { transform: scale(1.06); }
.sw-salle-nom { position: relative; font-family: var(--font-display); font-size: 17px; font-weight: 700; letter-spacing: .03em; }
.sw-salle-style { position: relative; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-dim); }
.sw-salle-etat { position: relative; display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 11px; color: var(--text-dim); }
.sw-salle-etat i { font-style: normal; }
.sw-pt { width: 7px; height: 7px; border-radius: 50%; background: var(--text-dim); transition: background .25s, box-shadow .25s; }
.sw-salle.on .sw-pt { background: var(--sc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sc) 25%, transparent); }

/* ---- Vigipirate ---- */
.sw-vigis { display: flex; flex-direction: column; gap: 10px; }
.sw-vigi {
  display: flex; align-items: center; gap: 14px; padding: 13px 16px; text-align: left; cursor: pointer;
  color: var(--text); background: var(--surface-alt);
  border: 1px solid var(--border); border-radius: var(--radius-md);
  transition: border-color .22s, background .22s, transform .22s;
}
.sw-vigi:hover { transform: translateX(3px); border-color: color-mix(in srgb, var(--vc) 60%, var(--border)); }
.sw-vigi.actif { border-color: var(--vc); background: color-mix(in srgb, var(--vc) 11%, var(--surface-alt)); }
.sw-vigi-bouclier { color: var(--vc); flex-shrink: 0; transition: transform .3s; }
.sw-vigi-bouclier svg { width: 30px; height: 30px; display: block; }
.sw-vigi.actif .sw-vigi-bouclier { transform: scale(1.1); filter: drop-shadow(0 0 8px color-mix(in srgb, var(--vc) 55%, transparent)); }
.sw-vigi-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sw-vigi-txt strong { font-size: 14.5px; }
.sw-vigi-txt span { font-size: 12px; line-height: 1.4; color: var(--text-dim); }

/* ---- Récapitulatif ---- */
.sw-recap {
  position: relative; overflow: hidden; border-radius: var(--radius-lg);
  padding: 30px 22px 24px; text-align: center;
  background: linear-gradient(160deg, #12151C, #0A0C11);
  border: 1px solid var(--border);
}
.sw-recap-nuit { position: absolute; inset: 0; pointer-events: none; }
.sw-lune {
  position: absolute; top: 16px; right: 26px; width: 34px; height: 34px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #F3F6FF, #9AA6C4);
  box-shadow: 0 0 26px rgba(180, 200, 255, .35);
}
/* Ciel étoilé : un seul élément, des ombres portées en guise d'étoiles. */
.sw-etoiles {
  position: absolute; top: 20px; left: 8%; width: 2px; height: 2px; border-radius: 50%; background: #fff;
  box-shadow: 20px 14px 0 #fff, 62px 6px 0 rgba(255,255,255,.7), 104px 30px 0 rgba(255,255,255,.5),
              150px 10px 0 #fff, 196px 34px 0 rgba(255,255,255,.6), 240px 18px 0 rgba(255,255,255,.45),
              300px 8px 0 rgba(255,255,255,.7), 46px 44px 0 rgba(255,255,255,.4);
  animation: swScintille 4s ease-in-out infinite;
}
@keyframes swScintille { 50% { opacity: .45; } }
.sw-recap-titre { position: relative; font-family: var(--font-display); font-size: 27px; font-weight: 700; line-height: 1.1; color: #fff; }
.sw-recap-ev { position: relative; margin-top: 5px; font-size: 12.5px; color: #A9B2C6; }
.sw-recap-lignes { display: flex; flex-direction: column; }
.sw-lig { display: flex; align-items: baseline; gap: 14px; padding: 10px 2px; border-bottom: 1px solid var(--border); }
.sw-lig:last-child { border-bottom: none; }
.sw-lig > span { width: 168px; flex-shrink: 0; font-size: 12.5px; color: var(--text-dim); }
.sw-lig > strong { font-size: 14px; display: flex; align-items: center; gap: 8px; min-width: 0; }
.sw-pastille-vig { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
@media (max-width: 620px) { .sw-lig { flex-direction: column; gap: 2px; } .sw-lig > span { width: auto; } }

/* ---- Écran de lancement ---- */
.sw-lancee { align-items: center; text-align: center; gap: 8px; padding: 34px 0 20px; position: relative; }
.sw-halo {
  position: absolute; top: 6px; width: 190px; height: 190px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--club) 42%, transparent), transparent 68%);
  animation: swHalo 2.4s ease-out infinite;
}
@keyframes swHalo { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(1.5); opacity: 0; } }
.sw-lancee-titre {
  position: relative; font-size: 11px; font-weight: 800; letter-spacing: .22em;
  text-transform: uppercase; color: var(--club);
  animation: wzMonte .5s ease both;
}
.sw-lancee-nom {
  position: relative; font-family: var(--font-display); font-size: 34px; font-weight: 700; line-height: 1.05;
  animation: wzMonte .55s .1s ease both;
}
.sw-lancee-sous { position: relative; margin: 2px 0 14px; font-size: 13.5px; color: var(--text-dim); animation: wzMonte .55s .18s ease both; }
.sw-lancee .btn { position: relative; animation: wzMonte .55s .26s ease both; }

@media (prefers-reduced-motion: reduce) {
  .sw-halo, .sw-etoiles, .sw-ev-live, .sw-lancee-titre, .sw-lancee-nom, .sw-lancee-sous, .sw-lancee .btn {
    animation: none !important;
  }
  .sw-halo { opacity: .25; }
}

/* Bandeau « niveau actuellement en vigueur » (étape Vigipirate). */
.sw-actuel {
  display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; margin-bottom: 14px;
  border: 1px solid color-mix(in srgb, var(--vc) 42%, transparent);
  background: color-mix(in srgb, var(--vc) 10%, transparent);
  border-radius: var(--radius-md);
}
.sw-actuel strong { display: block; font-size: 13.5px; color: var(--vc); margin-bottom: 3px; }
.sw-actuel span { font-size: 12px; line-height: 1.5; color: var(--text-dim); }
.sw-actuel-pt {
  flex-shrink: 0; width: 10px; height: 10px; border-radius: 50%; margin-top: 4px;
  background: var(--vc); box-shadow: 0 0 0 0 var(--vc);
  animation: swBalise 2.2s ease-out infinite;
}
@keyframes swBalise {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--vc) 60%, transparent); }
  100% { box-shadow: 0 0 0 9px color-mix(in srgb, var(--vc) 0%, transparent); }
}
.sw-vigi-tag {
  font-style: normal; font-size: 9.5px; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; margin-left: 8px; padding: 2px 7px; border-radius: var(--pill);
  color: var(--vc); background: color-mix(in srgb, var(--vc) 16%, transparent);
  vertical-align: middle;
}
.sw-vigi.national { border-style: dashed; }
.sw-vigi.national.actif { border-style: solid; }

/* Rappel d'une valeur saisie plus tôt (étape Accès). */
.sw-rappel {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 11px 14px; border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--surface-alt);
}
.sw-rappel-k { font-size: 12.5px; color: var(--text-dim); }
.sw-rappel-v { flex: 1; min-width: 140px; font-family: var(--font-mono); font-size: 13px; }
.sw-rappel-v em { font-family: var(--font-body); font-style: normal; color: var(--warn); }

@media (prefers-reduced-motion: reduce) { .sw-actuel-pt { animation: none !important; } }

/* ===========================================================================
   Saisie d'une entrée au registre (v118) — incident-wizard.js
   =========================================================================== */
.iw-backdrop .wz-head { background: linear-gradient(180deg, color-mix(in srgb, var(--club) 8%, transparent), transparent 72%); }

/* ---- Doublon ---- */
.iw-doublon {
  border: 1px solid color-mix(in srgb, var(--warn) 42%, transparent);
  background: color-mix(in srgb, var(--warn) 10%, transparent);
  border-radius: var(--radius-md); padding: 11px 14px;
}
.iw-doublon strong { display: block; font-size: 13px; color: var(--warn); margin-bottom: 5px; }
.iw-doublon ul { margin: 0; padding-left: 18px; }
.iw-doublon li { font-size: 12.5px; line-height: 1.5; color: var(--text-dim); }

/* ---- Catégories ---- */
.iw-cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); gap: 10px; }
.iw-cat {
  position: relative; overflow: hidden; cursor: pointer; color: var(--text); text-align: left;
  display: flex; flex-direction: column; gap: 4px; padding: 13px 14px 12px;
  border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-alt);
  transition: border-color var(--dur-fast), transform var(--dur-fast), background var(--dur-fast);
}
/* Le filet de gauche porte la couleur de la gravité par défaut : on lit le
   niveau de l'événement avant même son nom. */
.iw-cat::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--cc); transform: scaleY(.35); transform-origin: center;
  transition: transform var(--dur-base) cubic-bezier(.2, .9, .3, 1.05);
}
.iw-cat:hover { border-color: color-mix(in srgb, var(--cc) 55%, var(--border)); transform: translateY(-2px); }
.iw-cat:hover::before, .iw-cat.actif::before { transform: scaleY(1); }
.iw-cat.actif { border-color: var(--cc); background: color-mix(in srgb, var(--cc) 10%, var(--surface-alt)); }
.iw-cat-ico { color: var(--cc); }
.iw-cat-ico svg { width: 22px; height: 22px; display: block; }
.iw-cat-nom { font-size: 13.5px; font-weight: 600; line-height: 1.25; }
.iw-cat-grav { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-dim); }
.iw-cat-sens {
  position: absolute; top: 9px; right: 9px; font-size: 9px; font-weight: 800;
  letter-spacing: .08em; text-transform: uppercase; color: var(--warn);
  background: color-mix(in srgb, var(--warn) 16%, transparent); padding: 2px 6px; border-radius: var(--pill);
}

/* ---- Zones ---- */
.iw-zones { display: flex; flex-wrap: wrap; gap: 9px; }
.iw-zone {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer; color: var(--text-dim);
  padding: 10px 16px; border: 1px solid var(--border); border-radius: var(--pill);
  background: var(--surface-alt); font-size: 13.5px;
  transition: border-color var(--dur-fast), color var(--dur-fast), background var(--dur-fast), transform var(--dur-fast);
}
.iw-zone:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--club) 50%, var(--border)); }
.iw-zone.actif { border-color: var(--club); color: var(--text); background: color-mix(in srgb, var(--club) 12%, var(--surface-alt)); }
.iw-zone-pt { width: 7px; height: 7px; border-radius: 50%; background: var(--border); transition: background var(--dur-fast), box-shadow var(--dur-fast); }
.iw-zone.salle .iw-zone-pt { background: var(--text-dim); }
.iw-zone.actif .iw-zone-pt { background: var(--club); box-shadow: 0 0 0 3px color-mix(in srgb, var(--club) 25%, transparent); }

/* ---- Les faits ---- */
.iw-faits { position: relative; }
.iw-faits textarea {
  width: 100%; box-sizing: border-box; resize: vertical; min-height: 190px;
  font-size: 15px; line-height: 1.6; padding: 14px 16px 30px;
  background: var(--surface-alt); border: 1px solid var(--border); border-radius: var(--radius-md); color: var(--text);
  transition: border-color var(--dur-base), box-shadow var(--dur-base);
}
.iw-faits textarea:focus { outline: none; border-color: var(--club); box-shadow: 0 0 0 3px color-mix(in srgb, var(--club) 16%, transparent); }
.iw-compte { position: absolute; right: 14px; bottom: 10px; font-size: 11.5px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.iw-deonto {
  display: flex; gap: 13px; padding: 13px 15px; border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--club) 32%, transparent);
  background: color-mix(in srgb, var(--club) 7%, transparent);
}
.iw-deonto svg { width: 22px; height: 22px; color: var(--club); flex-shrink: 0; }
.iw-deonto strong { display: block; font-size: 13.5px; margin-bottom: 3px; }
.iw-deonto span { font-size: 12.5px; line-height: 1.55; color: var(--text-dim); }

.iw-pieces { gap: 10px; }
.iw-pers { display: flex; flex-direction: column; gap: 12px; margin-bottom: 12px; }
.iw-pers-bloc {
  border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--surface-alt); padding: 13px 15px;
  animation: wzMonte var(--dur-base) cubic-bezier(.2, .9, .3, 1.04) both;
}

/* ---- Échelle de gravité ---- */
.iw-echelle { display: flex; gap: 8px; }
.iw-cran {
  flex: 1; cursor: pointer; color: var(--text-dim); text-align: left;
  display: flex; flex-direction: column; gap: 5px; padding: 11px 12px;
  border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-alt);
  transition: border-color var(--dur-fast), color var(--dur-fast), transform var(--dur-fast);
}
.iw-cran:hover { transform: translateY(-2px); }
.iw-cran.actif { border-color: var(--gc); color: var(--text); background: color-mix(in srgb, var(--gc) 11%, var(--surface-alt)); }
/* La barre grandit avec le cran choisi : l'échelle se lit d'un coup d'œil. */
.iw-cran-barre { height: 5px; border-radius: 5px; background: var(--gc); opacity: .35; transition: opacity var(--dur-base), transform var(--dur-base); transform-origin: left; }
.iw-cran.actif .iw-cran-barre { opacity: 1; transform: scaleY(1.6); }
.iw-cran-lbl { font-size: 13px; font-weight: 600; line-height: 1.25; }
.iw-cran-sig { font-size: 10px; letter-spacing: .05em; text-transform: uppercase; color: var(--warn); }
@media (max-width: 620px) { .iw-echelle { flex-direction: column; } }

/* ---- Aperçu de l'entrée telle qu'elle paraîtra ---- */
.iw-apercu {
  position: relative; border: 1px solid var(--border); border-left: 3px solid var(--gc);
  border-radius: var(--radius-md); background: var(--surface-alt); padding: 14px 16px;
  transition: border-color var(--dur-base);
}
.iw-apercu-tete { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin-bottom: 7px; }
.iw-apercu-h { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-dim); }
.iw-apercu-cat { font-family: var(--font-display); font-size: 16px; font-weight: 700; }
.iw-apercu-zone {
  font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-dim);
  border: 1px solid var(--border); border-radius: var(--pill); padding: 2px 8px;
}
.iw-apercu-txt { margin: 0; font-size: 13.5px; line-height: 1.6; white-space: pre-wrap; }
.iw-apercu-txt em { color: var(--warn); font-style: normal; }
.iw-apercu-pied { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; font-size: 11.5px; color: var(--text-dim); }
.iw-apercu-etat {
  color: var(--warn); background: color-mix(in srgb, var(--warn) 15%, transparent);
  padding: 1px 8px; border-radius: var(--pill); font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
}

/* ---- Écran final ---- */
.iw-fin { align-items: center; text-align: center; gap: 10px; padding: 30px 0 16px; }
.iw-fin-sceau {
  width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; position: relative;
  color: var(--ok); background: color-mix(in srgb, var(--ok) 15%, transparent);
  animation: iwSceau .6s cubic-bezier(.2, 1.35, .4, 1) both;
}
.iw-fin-sceau svg { width: 32px; height: 32px; }
.iw-fin-sceau::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--ok);
  animation: iwOnde 1.1s .25s ease-out both;
}
@keyframes iwSceau { from { opacity: 0; transform: scale(.5); } }
@keyframes iwOnde { to { transform: scale(1.9); opacity: 0; } }
.iw-fin h3 { margin: 6px 0 0; font-family: var(--font-display); font-size: 21px; }
.iw-fin p { margin: 0; font-size: 13.5px; color: var(--text-dim); max-width: 420px; }
.iw-fin-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 12px; }

@media (prefers-reduced-motion: reduce) {
  .iw-cat::before, .iw-cran-barre, .iw-fin-sceau, .iw-fin-sceau::after, .iw-pers-bloc {
    animation: none !important; transition: none !important;
  }
}

/* ---------------------------------------------------------------------------
   Fiche incident (consultation)
   ---------------------------------------------------------------------------
   Meme langage que le formulaire de saisie : on reprend `wz-kicker`,
   `wz-titre`, `wz-close` et surtout les classes `iw-apercu*` pour le recit.
   Ce qui suit ne fait qu'assembler ces briques dans la modale — aucune de ces
   regles ne redefinit l'apparence du recit lui-meme, sinon les deux ecrans
   finiraient par diverger. */
.fi { display: flex; flex-direction: column; min-height: 0; }

.fi-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: 22px 26px 16px; border-bottom: 1px solid var(--border);
}
.fi-head-txt { min-width: 0; }
/* Le titre porte la couleur de gravite en filet lateral : on situe la gravite
   avant meme d'avoir lu le libelle. */
.fi-head-txt .wz-titre { border-left: 3px solid var(--gc); padding-left: 10px; margin-left: -13px; }
.fi .wz-sous { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.fi-pt { display: inline-flex; align-items: center; gap: 5px; }
.fi-pt::before {
  content: ''; width: 3px; height: 3px; border-radius: 50%;
  background: currentColor; opacity: .55;
}

.fi-body {
  flex: 1; min-height: 0; overflow-y: auto;
  padding: 20px 26px; display: flex; flex-direction: column; gap: 16px;
}

.fi-sect { display: flex; flex-direction: column; gap: 8px; }
.fi-h {
  margin: 0; font-size: 11px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--text-dim);
}
.fi-liste { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 5px; font-size: 13.5px; }

/* L'etat « validee » reprend la pastille de l'apercu, en couleur de reussite :
   la meme forme dit le meme genre d'information. */
.iw-apercu-etat.ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 15%, transparent); }

.fi-actions {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end;
  padding: 16px 26px; border-top: 1px solid var(--border); background: var(--surface-alt);
}

@media (max-width: 560px) {
  .fi-head { padding: 18px 18px 14px; }
  .fi-body { padding: 16px 18px; }
  .fi-actions { padding: 14px 18px; }
  .fi-actions .btn { flex: 1 1 auto; justify-content: center; }
}

/* ---------------------------------------------------------------------------
   Etape « Signature » (fiche-wizard)
   ---------------------------------------------------------------------------
   Le carre blanc est le MEME element du debut a la fin : pave de saisie, puis
   surface de rejeu. C'est ce qui evite qu'il saute d'un cadre a l'autre entre
   la signature et son redessin. Les deux canvas s'y superposent exactement. */
.fw-sig { display: flex; flex-direction: column; gap: 10px; }
.fw-sig-boite {
  position: relative; width: 100%; aspect-ratio: 5 / 2;
  background: #fff; border-radius: var(--radius-md);
  box-shadow: 0 8px 26px rgba(0, 0, 0, .35), 0 0 0 1px rgba(0, 0, 0, .08);
  overflow: hidden;
}
.fw-sig-boite > canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
/* Le calque d'effets ne doit jamais intercepter le doigt : sinon on ne peut
   plus signer du tout. */
.fw-sig-fx { pointer-events: none; }
.fw-sig-hint {
  position: absolute; inset: auto 0 14px; text-align: center;
  font-size: 12.5px; color: #9aa1ad; pointer-events: none;
  transition: opacity .25s ease;
}
.fw-sig-hint.parti { opacity: 0; }

.fw-sig-outils { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fw-sig-nom { font-size: 12.5px; color: var(--text-dim); }

/* Rien ne quitte le flux pendant la sequence finale : on efface en opacite.
   Retirer le pied de page (ou la note) faisait rétrécir la fenetre, qui se
   recentrait, et le carre blanc bougeait juste au mauvais moment. */
.fw-efface { opacity: 0; pointer-events: none; transition: opacity .28s ease; }

/* La note et le visuel de validation sont EMPILES dans la meme case : la
   hauteur du bloc vaut celle du plus grand des deux des l'affichage, donc
   l'echange de l'un par l'autre ne deplace rien. */
.fw-pied { display: grid; }
.fw-pied > * { grid-area: 1 / 1; margin: 0; transition: opacity .3s ease; }
.fw-pied-note { font-size: 12.5px; line-height: 1.55; color: var(--text-dim); }
/* Centre et large : c'est l'aboutissement du geste, pas une ligne de statut.
   Comme les deux blocs partagent la case, la hauteur retenue est celle du plus
   grand — donc celle-ci. Elle est constante des l'affichage : agrandir le
   visuel final ne fait donc bouger le carre de signature a aucun moment. */
.fw-pied-fin {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 12px; padding: 6px 0;
  opacity: 0; pointer-events: none;
}
.fw-pied.fini .fw-pied-note { opacity: 0; }
.fw-pied.fini .fw-pied-fin { opacity: 1; }

.fw-pied-fin .mc-cere-check { width: 62px; height: 62px; flex: none; overflow: visible; }
.fw-pied-fin .mc-cere-check-v { stroke-width: 4.5; }
.fw-fin-txt { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.fw-fin-txt strong { font-size: 24px; font-family: var(--font-display); line-height: 1.15; }
.fw-fin-txt span { font-size: 13.5px; color: var(--text-dim); }

@media (max-width: 560px) {
  .fw-pied-fin .mc-cere-check { width: 52px; height: 52px; }
  .fw-fin-txt strong { font-size: 20px; }
}
.fw-pied.fini .mc-cere-check-o { animation: mcCereTrait .5s cubic-bezier(.4, 0, .2, 1) both; }
.fw-pied.fini .mc-cere-check-v { animation: mcCereTrait .34s cubic-bezier(.4, 0, .2, 1) .38s both; }
.fw-pied.fini .fw-fin-txt { animation: mcCereTxt .4s ease-out .5s both; }

@media (prefers-reduced-motion: reduce) {
  .fw-pied .mc-cere-check-o, .fw-pied .mc-cere-check-v { stroke-dashoffset: 0; animation: none !important; }
  .fw-fin-txt { animation: none !important; }
}
