/* ─── preloader.css — écran de chargement initial (préchargement assets) ────
   Extrait de preloader.js le 2026-07-11 (découpage sans risque, cf. CONTEXT.md §21) :
   CSS injecté via template literal JS (injectStyles), ~82 lignes, aucune closure —
   anti-pattern déjà corrigé sur eda.css et startupMenu.css.
   Chargé statiquement via @import dans css/style.css, plus aucune injection JS au runtime. */

#preloader-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  background:
    radial-gradient(circle at 50% 15%, rgba(115, 190, 255, 0.10), transparent 34%),
    linear-gradient(135deg, #071019 0%, #111827 46%, #05070b 100%);
  transition: opacity 0.55s ease;
}

#preloader-overlay.fade-out {
  opacity: 0;
  pointer-events: none;
}

#preloader-logo {
  width: min(308px, 50.4vw);
  object-fit: contain;
  filter: drop-shadow(0 14px 28px rgba(0,0,0,0.55));
  margin-bottom: 20px;
  display: block;
  user-select: none;
  pointer-events: none;
}

#preloader-hex-ring {
  width: 64px;
  height: 64px;
  margin-bottom: 28px;
  animation: preloader-hex-spin 2.4s linear infinite;
  opacity: 0.72;
}

@keyframes preloader-hex-spin {
  from { transform: rotate(0deg);   }
  to   { transform: rotate(360deg); }
}

#preloader-bar-wrap {
  width: min(320px, 64vw);
  height: 3px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 14px;
}

#preloader-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  border-radius: 2px;
  transition: width 0.18s ease-out;
}

/* 2026-08-01 — demande explicite : compteur "X fichiers/Y fichiers · X Mo/Y Mo"
   directement sous la barre de progression (avant le libellé "Chargement… X %"). */
#preloader-count {
  font-family: system-ui, sans-serif;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: rgba(180, 210, 255, 0.55);
  margin-bottom: 8px;
}

#preloader-label {
  font-family: system-ui, sans-serif;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(180, 210, 255, 0.42);
  margin-bottom: 6px;
}

#preloader-filename {
  font-family: system-ui, sans-serif;
  font-size: 10px;
  letter-spacing: 0.06em;
  color: rgba(180, 210, 255, 0.22);
  max-width: min(320px, 64vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}

/* 2026-08-06 — demande explicite : en thème Médiéval uniquement, ces 3 textes
   (compteur fichiers/Mo, libellé "Chargement…", nom du fichier en cours)
   deviennent difficilement lisibles à cause du halo clair EnchantedLand posé
   globalement sur `body` ([data-theme="ancien"] body { text-shadow: 0 0 4px
   rgba(255,250,235,0.8), 0 1px 2px rgba(255,250,235,0.6); }, cf.
   css/themes/medieval.css) — `text-shadow` est une propriété héritée, donc ce
   halo se propage ici aussi bien qu'aucune règle de ce fichier ne le pose
   explicitement. À cette taille de police (10-11px) et sur ce fond sombre, le
   glow clair brouille le texte au lieu de l'accentuer — même symptôme déjà
   rencontré sur .population-tag (cf. medieval.css, 8e round). Thème Bleu
   sidéral non concerné (aucun text-shadow global de ce type côté bleu.css) —
   volontairement laissé inchangé, ne pas ajouter cette règle en dehors du
   scope [data-theme="ancien"]. */
[data-theme="ancien"] #preloader-count,
[data-theme="ancien"] #preloader-label,
[data-theme="ancien"] #preloader-filename {
  text-shadow: none;
}
