/* ============================================================
   SAUVEGARDE ET RESTAURATION (0.5.6.P1, SAV, lot 4) — common/sauvegarde.js
   Rubriques en MAJUSCULES, détails sur le fond le plus clair (blanc le jour ;
   la nuit, le fond de carte le plus clair), comme les états de synthèse.
   ============================================================ */
.sav { display: flex; flex-direction: column; gap: var(--s5); }
.sav .sav-rubrique > .sheethead .t { text-transform: uppercase; letter-spacing: .04em; font-size: var(--fs-sm); }
.sav .sav-rubrique > .sheethead .r { display: inline-flex; align-items: center; gap: var(--s3); }
.sav-detail { background: var(--panneau); }
html[data-theme="dark"] .sav-detail, html[data-theme="dark"] .sav-detail .tbl td { background: var(--voile2); }
.sav-detail .kv { padding: var(--s4) var(--s5); }
.sav-detail .kv dd .rg-info { margin-left: 6px; vertical-align: middle; }
.sav-alerte { margin: var(--s4) var(--s5) 0; }
.sav-acts { gap: var(--s3); }
.sav-tbl td.sav-c, .sav-tbl th.sav-c { text-align: center; }
.sav-case { display: inline-flex; align-items: center; gap: 6px; }
.sav-main { color: var(--ambre); font-size: 10px; line-height: 1; }
.sav-defaut { padding: 0 8px; min-height: 24px; }

/* Fenêtres : formulaire, choix, avertissements. */
.sav-form { display: flex; flex-direction: column; gap: var(--s4); }
.sav-err { margin-top: 0; }
.sav-choix-liste { display: flex; flex-direction: column; gap: var(--s3); }
.sav-choix { display: flex; align-items: center; gap: var(--s3); cursor: pointer; font-size: var(--fs-base); }
.sav-choix.dis { opacity: .55; cursor: default; }
.sav-nom { margin: 0; word-break: break-all; }
.sav-info { margin: 0; }
.sav-question { margin: 0; font: 600 var(--fs-lg)/1.3 var(--sans); color: var(--encre); }
.sav-sous { margin: var(--s3) 0 0; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; font-size: var(--fs-xs); color: var(--encre2); }
.sav-ligne { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s4); }
.sav-oblig input:disabled + span { color: var(--encre); }
.sav-barre { height: 10px; border-radius: var(--r-pill); background: var(--voile2); overflow: hidden; }
.sav-barre > span { display: block; height: 100%; background: var(--ok); transition: width var(--t-base); }
.sav-attente { display: flex; align-items: center; gap: var(--s4); }
.sav-roue { display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--voile2); border-top-color: var(--encre);
  animation: sav-tourne 900ms linear infinite; flex: 0 0 auto; }
@keyframes sav-tourne { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .sav-roue { animation: none; } }

/* Suivi de la restauration : par-dessus tout, connexion comprise (z-index 1000). */
.sav-suivi { position: fixed; inset: 0; z-index: 1100; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: var(--fond); overflow: auto; }
.sav-carte { position: relative; width: 520px; max-width: 100%; background: var(--panneau); color: var(--encre); border-radius: var(--r-modal);
  box-shadow: var(--shadow-lift); padding: 28px; display: flex; flex-direction: column; gap: var(--s5); }
.sav-carte h1 { margin: 0; font: 600 var(--fs-lg)/1.3 var(--sans); }
.sav-carte > .sav-roue { position: absolute; top: 30px; right: 28px; }
.sav-marque { display: flex; align-items: center; gap: var(--s3); font-weight: 600; color: var(--encre2); }
.sav-marque img { width: 22px; height: 22px; }
.sav-etapes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: var(--fs-base); }
.sav-etapes li { display: flex; align-items: center; gap: var(--s3); color: var(--encre3); }
.sav-etapes li.fait { color: var(--encre); }
.sav-etapes li.cours { color: var(--encre); font-weight: 600; }
.sav-etapes li.echec { color: var(--alerte); font-weight: 600; }
.sav-etapes li.retour { color: var(--ambre); }
.sav-pt { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid currentColor; flex: 0 0 auto; }
.sav-etapes li.fait .sav-pt { background: var(--ok); border-color: var(--ok); }
.sav-etapes li.cours .sav-pt { background: var(--ambre); border-color: var(--ambre); }
.sav-etapes li.echec .sav-pt { background: var(--alerte); border-color: var(--alerte); }
.sav-pied { display: flex; justify-content: flex-end; gap: var(--s3); }
.sav-pied .hint { margin: 0; }

/* Écran d'accueil d'un serveur neuf : même volet que l'inscription. */
.authscreen .sav-accueil .sav-question { font-size: var(--fs-md); }
.authscreen .sav-accueil .kv { padding: 0; }

/* Lot 6 : copie externe. */
.sav-copie .sav-alerte { display: flex; align-items: center; gap: var(--s4); margin: var(--s4) var(--s5) 0; }
.sav-copie .sav-alerte > span:nth-child(2) { flex: 1; }
.sav-mention { display: flex; align-items: center; gap: var(--s3); margin: var(--s4) var(--s5) 0; font-size: var(--fs-sm); color: var(--encre2); }
.sav-sous-bloc { margin: var(--s4) var(--s5) var(--s2); display: flex; align-items: center; gap: var(--s3); }
.sav-vide { margin: 0; padding: var(--s4) var(--s5); }
.sav-copie .sav-detail .kv .inp.sm { max-width: 260px; }

/* Essai à l'écran du 2026-11-17 : la marge des paragraphes de fenêtre (.modal p, 16 px) poussait le code admin hors de la vue. */
.modal .sav-form p { margin: 0; }
.modal .sav-avert { gap: var(--s3); }
.modal .sav-avert .sav-sous { margin-top: var(--s2); }

/* Choix d'un fichier : bouton, champ natif caché, nom retenu. */
.sav-fichier { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s4); }
.sav-fichier-btn { position: relative; cursor: pointer; }
.sav-fichier-in { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; pointer-events: none; }
.sav-fichier-btn:focus-within { outline: 2px solid var(--encre); outline-offset: 2px; }
.sav-fichier-nom { font-size: var(--fs-sm); color: var(--encre2); word-break: break-all; }
.authscreen .sav-libelle { display: block; margin-bottom: 6px; font-size: var(--fs-xs); color: var(--encre2); }
.modal .sav-form { padding: 2px 0 6px; }   /* le cadre des champs du bas était coupé par le corps défilant */

/* D-SAV-21 : encart « Phrase de sauvegarde » (admin Harmonia). */
.sav-phrase .sav-phrase-alerte { margin: var(--s4) var(--s5) 0; }
.sav-phrase .sav-phrase-perte { margin: var(--s3) var(--s5) var(--s4); }
