/* Écran de démarrage de l'accueil, thème « Los Santos »
   (includes/boot-screen.php, assets/js/boot.js). Affiché seulement quand
   <html> porte .ef-boot-on (décidé dans <head>). La ville est dessinée dans
   le canvas .efb-scene. Étapes posées par le script sur #ef-boot : is-s1 (la
   ville apparaît), is-s2 (le logo), is-s3 (bienvenue), is-out (sortie).
   Couleur du thème du logo : --globe-a-rgb (halo derrière le logo). */

#ef-boot { display: none; }
html.ef-boot-on, html.ef-boot-on body { overflow: hidden; }
html.ef-boot-on #ef-boot { display: block; }

.efb {
  --globe-a-rgb: 41, 182, 216;
  --globe-b-rgb: 251, 188, 5;
  --efb-ink: #f5f6f8;
  --efb-dim: rgba(245, 246, 248, .78);
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  overflow: hidden;
  background: #070a16;
  color: var(--efb-ink);
  font-family: 'Sora', 'Segoe UI', Arial, sans-serif;
  transition: opacity .7s ease, transform .9s cubic-bezier(.6, 0, .2, 1), filter .7s ease;
}

/* ---- La ville ------------------------------------------------------------------ */
.efb-scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  transition: opacity .5s ease;
}
.efb.is-s1 .efb-scene { opacity: 1; }

/* Voile qui assombrit le centre quand le logo arrive (lisibilité). */
.efb-veil {
  position: absolute;
  inset: 0;
  background: radial-gradient(70% 60% at 50% 46%, rgba(5, 8, 20, .1), rgba(5, 8, 20, .6));
  opacity: 0;
  transition: opacity 1s ease;
  pointer-events: none;
}
.efb.is-s2 .efb-veil { opacity: 1; }

/* ---- Centre : logo et bienvenue ---------------------------------------------- */
.efb-center {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
  padding: 0 16px;
  text-align: center;
  pointer-events: none;
}
.efb-mark { position: relative; display: grid; place-items: center; }
.efb-mark.has-theme { margin-bottom: 22px; }
.efb-mark::before {
  content: "";
  position: absolute;
  width: 150%;
  height: 190%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(var(--globe-a-rgb), .25), transparent 65%);
  opacity: 0;
  transition: opacity 1.2s ease .2s;
}
.efb.is-s2 .efb-mark::before { opacity: 1; }
.efb-logo {
  position: relative;
  display: block;
  opacity: 0;
  transform: translateY(18px) scale(.86);
  filter: blur(10px);
  transition: opacity .7s ease, transform .9s cubic-bezier(.2, 1.3, .4, 1), filter .7s ease;
}
.efb.is-s2 .efb-logo { opacity: 1; transform: none; filter: none; }
.efb-mark img {
  position: relative;
  display: block;
  width: min(500px, 78vw);
  max-width: none;
  height: auto;
  margin: 0;
  filter: drop-shadow(0 10px 34px rgba(0, 0, 0, .6));
}
/* Étiquette du thème (et tout habillage ajouté par un autre script) :
   apparaît juste après le logo. */
.efb-mark > :not(.efb-logo) { opacity: 0; transition: opacity .6s ease .7s; }
.efb.is-s2 .efb-mark > :not(.efb-logo) { opacity: 1; }

.efb-welcome { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.efb-hello {
  margin: 0;
  font-weight: 600;
  font-size: clamp(28px, 4vw, 48px);
  letter-spacing: -.02em;
  line-height: 1.1;
  text-shadow: 0 3px 24px rgba(0, 0, 0, .65);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .2, 1);
}
.efb-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0; padding: 0; list-style: none; }
.efb-chips li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(10, 14, 30, .45);
  border: 1px solid rgba(255, 255, 255, .18);
  backdrop-filter: blur(6px);
  font-weight: 300;
  font-size: 15px;
  color: var(--efb-dim);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .5s ease, transform .5s ease;
}
.efb-chips strong { font-weight: 600; color: var(--efb-ink); }
.efb-led { width: 7px; height: 7px; border-radius: 50%; background: #30d158; box-shadow: 0 0 8px #30d158; }
.efb-led-warn { background: #ffb340; box-shadow: 0 0 8px #ffb340; }
.efb-led-bad { background: #ff453a; box-shadow: 0 0 8px #ff453a; }
.efb-meta {
  margin: 4px 0 0;
  font-weight: 400;
  font-size: 13px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(245, 246, 248, .85);
  text-shadow: 0 2px 10px rgba(0, 0, 0, .6);
  opacity: 0;
  transition: opacity .6s ease .6s;
}
.efb-weather { display: inline-flex; align-items: center; gap: 6px; text-transform: none; letter-spacing: .06em; }
.efb-weather .wx-icon { flex: none; }

.efb.is-s3 .efb-hello { opacity: 1; transform: none; }
.efb.is-s3 .efb-chips li { opacity: 1; transform: none; }
.efb.is-s3 .efb-chips li:nth-child(1) { transition-delay: .2s; }
.efb.is-s3 .efb-chips li:nth-child(2) { transition-delay: .32s; }
.efb.is-s3 .efb-chips li:nth-child(3) { transition-delay: .44s; }
.efb.is-s3 .efb-meta { opacity: 1; }

/* Bouton Passer */
.efb-skip {
  position: absolute;
  right: 32px;
  bottom: 28px;
  z-index: 5;
  min-height: 44px;
  padding: 10px 22px;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 999px;
  background: rgba(0, 0, 0, .25);
  color: var(--efb-ink);
  font: 400 14px/1 'Sora', 'Segoe UI', Arial, sans-serif;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: background .2s ease, border-color .2s ease;
}
.efb-skip:hover, .efb-skip:focus-visible { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .55); outline: none; }

/* Sortie : l'écran s'ouvre sur l'accueil */
.efb.is-out { opacity: 0; transform: scale(1.04); filter: blur(6px); pointer-events: none; }

@media (max-width: 640px) {
  .efb-skip { right: 50%; transform: translateX(50%); }
  .efb-chips li { font-size: 13px; }
}

/* Mouvements réduits : ville fixe, simple apparition */
@media (prefers-reduced-motion: reduce) {
  .efb *, .efb { animation: none !important; transition: opacity .3s ease !important; }
  .efb-logo, .efb-hello, .efb-chips li { transform: none; filter: none; }
}
