/* Odyssée, refonte de novembre 2026 : l'ÉCRAN DE CHARGEMENT (lot L12). Maquette : design-odyssee/Odyssee Chargement.dc.html
   (1a téléphone 390 px, 1b bureau). Composant : ui/odyssee/Chargement.tsx, posé par views/Play.tsx dans une
   OdysseeRacine (.is-chargement) : plein cadre dans la coque comme le hall (odyssee-socle.css §6 bis), toujours sombre
   et or. Aucune image : le ciel est celui du socle (dégradés), l'astrolabe est en CSS ; seules les cartes de l'équipe
   s'affichent, une fois chargées. Mise en page sur la largeur du conteneur (@container ody-racine).
   §1 Cadre  §2 Astrolabe  §3 Titre et équipe  §4 Barre et détail  §5 Pied : astuce, prêt, erreur
   §6 Bureau  §7 Sortie  §8 Mouvement réduit */

/* §1 Cadre : le ciel (OdysseeCiel salon, sans crête) dessous, une colonne centrée au téléphone. Le contenu apparaît
   après 450 ms : un chargement servi par le cache (moins de 0,7 s) passe au hall sans montrer qu'un écran a existé. */
.ody-chg{position:relative;display:flex;flex-direction:column;min-height:100%;overflow:hidden;background:var(--o-abysse);isolation:isolate}
.ody-chg>.ody-ciel{z-index:0}
.ody-chg-grille{position:relative;z-index:1;flex:1 0 auto;box-sizing:border-box;width:100%;max-width:520px;margin:0 auto;
  padding:28px 24px 20px;display:flex;flex-direction:column;align-items:center;
  animation:ody-chg-apparait .35s ease-out .45s both}
@keyframes ody-chg-apparait{from{opacity:0}to{opacity:1}}
.ody-chg-son{position:absolute;z-index:2;right:20px;top:18px;animation:ody-chg-apparait .35s ease-out .45s both}

/* §2 Astrolabe (maquette : disque, deux anneaux, réticule qui tourne, 72 crans allumés au poids, aiguille, centre). */
.ody-chg-astrolabe{--d:min(280px,33svh);--r:calc(var(--d) * -.45);position:relative;flex:none;width:var(--d);height:var(--d)}
.ody-chg-astrolabe>i,.ody-chg-astrolabe>span{position:absolute;display:block}
.ody-chg-disque{inset:2%;border-radius:50%;background:radial-gradient(circle,#2a1f72 0%,#150d4a 46%,var(--o-nuit) 100%);box-shadow:0 18px 60px #01020acc}
.ody-chg-anneau{inset:12%;border-radius:50%;border:1px solid color-mix(in srgb,var(--o-or) 40%,transparent)}
.ody-chg-anneau.is-tirets{inset:21%;border:1px dashed color-mix(in srgb,var(--o-lilas) 25%,transparent)}
.ody-chg-reticule{inset:16.5%;border-radius:50%;animation:ody-chg-tourne 70s linear infinite}
.ody-chg-reticule>i{position:absolute;width:8px;height:8px;margin:-4px;transform:rotate(45deg);background:var(--o-or);box-shadow:0 0 8px var(--o-or)}
.ody-chg-reticule>i:nth-child(1){left:50%;top:0}.ody-chg-reticule>i:nth-child(2){left:100%;top:50%}
.ody-chg-reticule>i:nth-child(3){left:50%;top:100%}.ody-chg-reticule>i:nth-child(4){left:0;top:50%}
@keyframes ody-chg-tourne{to{transform:rotate(360deg)}}
.ody-chg-astrolabe>.ody-chg-cran{left:50%;top:50%;width:2px;height:8px;margin:-4px 0 0 -1px;border-radius:1px;
  background:color-mix(in srgb,var(--o-lilas) 25%,transparent);transform:rotate(calc(var(--i) * 5deg)) translateY(var(--r));transition:background-color .2s,box-shadow .2s}
.ody-chg-astrolabe>.ody-chg-cran.is-grand{height:14px;margin-top:-7px}
.ody-chg-astrolabe>.ody-chg-cran.is-allume{background:var(--o-or-clair);box-shadow:0 0 6px var(--o-or)}
.ody-chg-aiguille{left:50%;top:50%;width:2px;height:calc(var(--d) * .37);margin:calc(var(--d) * -.37) 0 0 -1px;transform-origin:50% 100%;
  transform:rotate(var(--aiguille));transition:transform .12s linear;background:linear-gradient(to top,transparent 34%,var(--o-or-clair))}
.ody-chg-aiguille>i{position:absolute;left:-4px;top:-5px;width:10px;height:10px;transform:rotate(45deg);background:#fffaf0;box-shadow:0 0 12px var(--o-or-clair)}
.ody-chg-astrolabe>.ody-chg-centre{inset:30%;box-sizing:border-box;padding-top:calc(var(--d) * .107);border-radius:50%;border:1.5px solid var(--o-or);background:var(--o-nuit);display:flex;align-items:baseline;justify-content:center;gap:2px}
.ody-chg-centre b{font-family:var(--o-police-titre);font-weight:800;font-size:calc(var(--fs-3xl) * 1.22);line-height:1;color:var(--o-or-clair)}
.ody-chg-centre small{font-family:var(--o-police-titre);font-weight:700;font-size:var(--fs-md);color:var(--o-or)}

/* §3 Titre et équipe */
.ody-chg-texte{display:flex;flex-direction:column;align-items:center;flex:1 0 auto;align-self:stretch;min-width:0}
/* impeccable-disable-next-line gradient-text -- titre en or dégradé dessiné par la maquette (1a, 1b), comme le titre du départ. */
.ody-chg-titre{margin:22px 0 0;font-family:var(--o-police-titre);font-weight:800;font-size:calc(var(--fs-3xl) * 1.1);line-height:1.05;letter-spacing:.06em;
  background-image:linear-gradient(100deg,#b8892b,#fff1b8 25%,var(--o-or) 50%,#fff6d0 75%,#b8892b);-webkit-background-clip:text;background-clip:text;color:transparent}
.ody-chg-sous{margin:6px 0 0;min-height:1.45em;font-size:var(--fs-md);line-height:1.45;color:var(--o-texte-2);text-align:center;text-wrap:balance}
.ody-chg-equipe{margin-top:16px;display:flex;flex-direction:column;align-items:center;gap:8px;opacity:0;transform:translateY(8px);transition:opacity .5s,transform .5s}
.ody-chg-equipe.is-visible{opacity:1;transform:none}
.ody-chg-equipe>div{display:flex;gap:8px}
.ody-chg-carte{width:46px;height:60px;border-radius:7px;overflow:hidden;background:color-mix(in srgb,var(--o-nuit) 60%,transparent);box-shadow:0 0 0 1px #ffffff40}
/* Carte sensible, floutage demandé (ui/sensitive.ts) : la photo est chargée mais l'écran ne la montre pas, seule la pastille. */
.ody-chg-carte.is-voilee{display:grid;place-items:center;background:var(--o-nuit-2)}
.ody-chg-carte.is-voilee>i{font-style:normal;font-family:var(--o-police-action);font-weight:700;font-size:var(--fs-xs);color:var(--o-texte-2)}
.ody-chg-carte img{display:block;width:100%;height:100%;object-fit:cover;object-position:center 20%;animation:ody-chg-apparait .4s ease-out both}

/* §4 Barre et détail : la barre suit le poids ; son reflet passe en boucle tant que le chargement court, même quand
   les octets n'arrivent plus (connexion lente). */
.ody-chg-barre-bloc{margin-top:auto;padding-top:22px;align-self:stretch;display:flex;flex-direction:column;gap:9px}
.ody-chg-ligne{display:flex;justify-content:space-between;align-items:baseline;gap:12px}
.ody-chg-etape{font-family:var(--o-police-action);font-weight:700;font-size:var(--fs-md);color:var(--o-texte)}
.ody-chg-etape.is-erreur{color:var(--o-corail)}
/* Le compteur d'octets ouvre le détail par groupe (réglage discret, maquette : `detail`) : une cible de 44 px de haut. */
.ody-chg-mo{all:unset;box-sizing:border-box;flex:none;display:inline-flex;align-items:center;gap:6px;min-height:var(--o-cible);margin:-14px 0;cursor:pointer;font-family:var(--o-police-surtitre);font-size:var(--fs-xs);color:var(--o-texte-3)}
.ody-chg-mo:hover{color:var(--o-texte-2)}
.ody-chg-mo:focus-visible{outline:2px solid var(--o-cyan-clair);outline-offset:2px;border-radius:4px}
.ody-chg-mo>i{width:6px;height:6px;border:solid currentColor;border-width:0 1.5px 1.5px 0;transform:translateY(-2px) rotate(45deg);transition:transform .2s}
.ody-chg-mo[aria-expanded="true"]>i{transform:translateY(1px) rotate(-135deg)}
.ody-chg-barre{--h:6px;position:relative;height:var(--h);border-radius:calc(var(--h) / 2);background:var(--o-filet)}
.ody-chg-remplie{position:absolute;inset:0;border-radius:inherit;overflow:hidden;transform-origin:0 50%;transform:scaleX(var(--part));transition:transform .2s linear;
  background:linear-gradient(90deg,#b8892b,var(--o-or) 60%,var(--o-or-clair));box-shadow:0 0 12px color-mix(in srgb,var(--o-or) 60%,transparent)}
.ody-chg-reflet{position:absolute;top:0;bottom:0;left:-30%;width:30%;background:linear-gradient(90deg,transparent,#ffffffb3,transparent);animation:ody-chg-reflet 1.8s linear infinite}
@keyframes ody-chg-reflet{from{transform:translateX(0)}to{transform:translateX(433%)}}
/* Le reflet vit dans une barre mise à l'échelle : il traverse la part remplie. Barre presque vide : rien ne brille
   encore, alors le losange de tête bat doucement pour dire que le chargement court. */
.ody-chg-pointe{position:absolute;left:calc(var(--part) * 100%);top:50%;width:12px;height:12px;margin:-6px 0 0 -6px;transform:rotate(45deg);
  background:#fffaf0;box-shadow:0 0 12px var(--o-or-clair);transition:left .2s linear}
[data-phase="charge"] .ody-chg-pointe{animation:ody-chg-bat 1.4s ease-in-out infinite alternate}
@keyframes ody-chg-bat{from{opacity:1}to{opacity:.45}}
.ody-chg-detail{margin:6px 0 0;padding:0;list-style:none;display:grid;grid-template-columns:minmax(0,1fr);gap:6px 28px}
.ody-chg-detail li{display:flex;align-items:center;gap:9px;min-width:0;opacity:.62}
.ody-chg-detail li.is-fait,.ody-chg-detail li.is-encours{opacity:1}
.ody-chg-detail li>i{flex:none;box-sizing:border-box;width:9px;height:9px;transform:rotate(45deg);border:1.5px solid color-mix(in srgb,var(--o-lilas) 50%,transparent)}
.ody-chg-detail li.is-fait>i{border:0;background:var(--o-or-clair)}
.ody-chg-detail li.is-encours>i{border:0;background:var(--o-cyan)}
.ody-chg-detail li.is-encours>span{color:var(--o-cyan-clair)}
.ody-chg-detail span{flex:1;min-width:0;font-size:var(--fs-sm);font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ody-chg-detail small{flex:none;font-family:var(--o-police-surtitre);font-size:var(--fs-xs);color:var(--o-texte-3)}

/* §5 Pied : hauteur fixe, l'astuce, le message de fin et l'erreur se remplacent sans faire sauter la barre. */
.ody-chg-pied{align-self:stretch;min-height:96px;margin-top:14px;display:flex;flex-direction:column;justify-content:flex-end}
.ody-chg-astuce{all:unset;box-sizing:border-box;cursor:pointer;display:flex;flex-direction:column;gap:6px;padding:14px 0 4px;border-top:1px solid var(--o-filet);min-height:var(--o-cible)}
.ody-chg-astuce:focus-visible{outline:2px solid var(--o-cyan-clair);outline-offset:3px;border-radius:4px}
.ody-chg-astuce-texte{min-height:2.9em;font-size:var(--fs-md);line-height:1.45;color:var(--o-texte);text-wrap:pretty;animation:ody-chg-monte .35s ease-out both}
@keyframes ody-chg-monte{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
.ody-chg-pret{display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center}
.ody-chg-entree{font-family:var(--o-police-action);font-weight:700;font-size:var(--fs-base);color:var(--o-or-clair);animation:ody-chg-monte .4s ease-out both}
.ody-chg-note{font-size:var(--fs-sm);color:var(--o-texte-3)}
.ody-chg-erreur{display:flex;flex-direction:column;gap:10px}
.ody-chg-erreur p{margin:0;font-size:var(--fs-sm);line-height:1.4;color:var(--o-texte-2);text-wrap:pretty}
.ody-chg-erreur>div{display:flex;gap:8px}
.ody-chg-erreur .ody-bouton-or{flex:1}

/* §6 Bureau (maquette 1b) : l'astrolabe à gauche (360 px), le texte à droite, aligné à gauche. */
@container ody-racine (min-width:860px){
  .ody-chg-grille{max-width:1180px;padding:40px 90px 40px 80px;display:grid;grid-template-columns:400px minmax(0,1fr);gap:80px;align-items:center}
  .ody-chg-astrolabe{--d:360px;justify-self:center}
  .ody-chg-centre b{font-size:calc(var(--fs-3xl) * 1.6)}
  .ody-chg-centre small{font-size:var(--fs-lg)}
  .ody-chg-texte{align-items:flex-start;align-self:center;flex:none;gap:0}
  .ody-chg-titre{margin:0;font-size:calc(var(--fs-3xl) * 1.66)}
  .ody-chg-sous{margin-top:14px;font-size:var(--fs-base);text-align:left}
  .ody-chg-barre-bloc{margin-top:24px;padding-top:0;gap:10px}
  .ody-chg-etape{font-size:var(--fs-base)}
  .ody-chg-barre{--h:8px}
  .ody-chg-detail{grid-template-columns:repeat(3,minmax(0,1fr));gap:9px 28px}
  .ody-chg-pointe{width:14px;height:14px;margin:-7px 0 0 -7px}
  .ody-chg-equipe{order:1;margin-top:12px;align-items:flex-start}
  .ody-chg-carte{width:58px;height:76px}
  .ody-chg-pied{order:2;min-height:100px;margin-top:10px}
  .ody-chg-astuce-texte{font-size:var(--fs-base)}
  .ody-chg-pret{flex-direction:row;gap:20px;text-align:left}
  .ody-chg-erreur .ody-bouton-or{flex:none;padding-inline:34px}
  .ody-chg-son{right:26px;top:22px}
}

/* §7 Sortie : un voile d'abysse monte en 0,6 s, puis le hall prend la place. */
.ody-chg-voile{position:absolute;inset:0;z-index:3;pointer-events:none;background:var(--o-abysse);opacity:0;transition:opacity .6s ease-in}
.ody-chg.is-sortie .ody-chg-voile{opacity:1}

/* §8 Mouvement réduit : réglage du système ET « Reflets animés » du site. Plus rien ne tourne ni ne brille ; la
   barre et l'aiguille sautent à leur valeur. */
@media (prefers-reduced-motion:reduce){
  .ody-chg-reticule,.ody-chg-reflet,.ody-chg-pointe,.ody-chg-grille,.ody-chg-son,.ody-chg-astuce-texte,.ody-chg-entree,.ody-chg-carte img{animation:none!important}
  .ody-chg-remplie,.ody-chg-pointe,.ody-chg-aiguille,.ody-chg-cran,.ody-chg-equipe,.ody-chg-voile{transition:none}
}
body.prefs-reduce-motion :is(.ody-chg-reticule,.ody-chg-reflet,.ody-chg-pointe,.ody-chg-grille,.ody-chg-son,.ody-chg-astuce-texte,.ody-chg-entree,.ody-chg-carte img){animation:none!important}
body.prefs-reduce-motion :is(.ody-chg-remplie,.ody-chg-pointe,.ody-chg-aiguille,.ody-chg-cran,.ody-chg-equipe,.ody-chg-voile){transition:none}
