/* Page d'accueil (05/11, modèle fourni par le propriétaire ; notes/gare.md) : décor en HTML et CSS, le monde à gauche, la
   carte de connexion à droite (au-dessus du reste sur téléphone). Tout est rangé sous #boot : rien ne touche au jeu.
   La carte garde les formulaires et les identifiants lus par ui/boot.js et ui/chargement-accueil.js. */

/* ---------- Animations du décor ---------- */
@keyframes oxSpin { to { transform: rotate(360deg); } }
@keyframes oxSpinRev { to { transform: rotate(-360deg); } }
@keyframes oxFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes oxPulse { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
@keyframes oxDrift { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes oxTwinkle { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }
@keyframes oxWarp { 0% { transform: scale(.35); opacity: 0; } 25% { opacity: 1; } 100% { transform: scale(1.9); opacity: 0; } }
@keyframes oxBreath { 0%, 100% { transform: scale(1); opacity: .85; } 50% { transform: scale(1.12); opacity: 1; } }
@keyframes oxOrbit { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes oxShimmer { 0%, 100% { opacity: .35; } 50% { opacity: .8; } }
@keyframes oxAurora { 0%, 100% { transform: translateX(0) skewX(-8deg) scaleY(1); opacity: .55; } 50% { transform: translateX(60px) skewX(8deg) scaleY(1.25); opacity: .9; } }
@keyframes oxLightning { 0%, 92%, 100% { opacity: 0; } 93% { opacity: 1; } 94% { opacity: .1; } 95.5% { opacity: .9; } 97% { opacity: 0; } }
@keyframes oxBlink { 0%, 100% { opacity: 1; } 50% { opacity: .2; } }
@keyframes oxFlare { 0%, 100% { opacity: .75; transform: scale(1); } 50% { opacity: 1; transform: scale(1.15); } }
@keyframes oxChevron { 0%, 100% { fill: #7a3418; filter: none; } 10%, 30% { fill: #ffd27a; filter: drop-shadow(0 0 6px #f7a43c); } }
@keyframes oxStorm { from { transform: translateX(-60px); } to { transform: translateX(260px); } }
@keyframes oxShoot { 0% { transform: translate(0, 0) rotate(-30deg); opacity: 0; } 3% { opacity: 1; } 12% { transform: translate(-520px, 300px) rotate(-30deg); opacity: 0; } 100% { opacity: 0; } }
@keyframes oxNebulaDrift { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(30px, -20px) scale(1.08); } }
@media (prefers-reduced-motion: reduce) { #boot * { animation: none !important; } }

/* ---------- Cadre ---------- */
.ac-root {
  position: relative; min-height: 100%;
  font-family: 'Rajdhani', system-ui, sans-serif; color: #f3eee6;
  background: radial-gradient(ellipse 120% 80% at 50% 0%, #1a1036 0%, #0c0820 45%, #04030c 100%);
}
.ac-decor { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.ac-geante { right: 5%; top: 3%; scale: .55; pointer-events: none; }
.ac-top, .ac-main, .ac-bandeau { position: relative; } /* au-dessus de la planète */
.ac-page {
  position: relative; box-sizing: border-box; max-width: 1320px; min-height: 100vh; margin: 0 auto; padding: 32px 32px 48px;
  display: flex; flex-direction: column; gap: 32px;
  overflow-x: clip; /* la planète ne fait pas déborder la page en largeur */
  transition: opacity .4s, visibility .4s;
}
/* Connexion faite : la page s'efface sur place (rien ne bouge dans le décor), la séquence de démarrage reste au centre */
#boot.going { overflow: hidden; }
#boot.going .ac-page { opacity: 0; visibility: hidden; }
#boot .boot-seq {
  position: fixed; z-index: 2; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(560px, calc(100% - 32px));
}
#boot a { color: #7fe6f5; }
#boot a:hover { color: #fff; }

/* ---------- Haut de page ---------- */
.ac-top { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 40px; }
.ac-marque {
  font-family: 'Orbitron', sans-serif; font-weight: 900; font-size: 26px; letter-spacing: 6px;
  background: linear-gradient(90deg, #4fd8ee, #a77cf2 35%, #f05bc8 65%, #f7a43c);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.ac-liens { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
#boot .ac-liens a, .ac-liens button {
  padding: 12px 14px; border: 0; background: none; cursor: pointer;
  font: 600 15px 'Rajdhani', sans-serif; letter-spacing: 1px; text-decoration: none; color: #e9e2f5;
}
#boot .ac-liens a:hover, .ac-liens button:hover { color: #fff; }

/* ---------- Corps : le monde à gauche, la carte à droite ---------- */
.ac-main {
  display: grid; column-gap: 40px; row-gap: 28px; align-items: start;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 440px);
  grid-template-rows: auto auto auto 1fr;
  grid-template-areas: 'hero carte' 'accroche carte' 'monde carte' '. carte';
}
.ac-hero { grid-area: hero; display: flex; flex-direction: column; align-items: flex-start; gap: 28px; min-width: 0; }
.ac-accroche {
  grid-area: accroche; margin: 0; max-width: 560px;
  font-size: 21px; line-height: 1.45; font-weight: 500; color: #f4e9f2;
}
.ac-monde { grid-area: monde; display: flex; flex-direction: column; gap: 28px; min-width: 0; }

.ac-etat {
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 999px;
  background: rgba(10, 8, 18, .55); border: 1px solid rgba(247, 164, 60, .45);
  font-weight: 700; font-size: 13px; letter-spacing: 2px; text-transform: uppercase; color: #ffc77a;
}
.ac-etat i { width: 8px; height: 8px; border-radius: 50%; background: #7dffa8; box-shadow: 0 0 10px #7dffa8; animation: oxPulse 1.6s infinite; }
.ac-titre {
  margin: 0; font-family: 'Orbitron', sans-serif; font-weight: 900; font-size: clamp(40px, 5.4vw, 72px);
  line-height: 1.02; letter-spacing: 1px; color: #fff8ee; text-shadow: 0 4px 30px rgba(20, 8, 30, .6);
}
.ac-titre span {
  background: linear-gradient(90deg, #4fd8ee, #a77cf2 40%, #f05bc8 70%, #f7a43c);
  -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none;
}

/* Le portail (340 × 420 dans le modèle) se réduit d'un bloc pour tenir dans la hauteur de la fenêtre : --ac-portail */
.ac-portail-ligne { display: flex; flex-wrap: wrap; align-items: center; gap: 32px; --ac-portail: 1; }
.ac-portail { position: relative; flex: none; width: calc(340px * var(--ac-portail)); height: calc(420px * var(--ac-portail)); }
.ac-portail-echelle { position: absolute; left: 0; top: 0; width: 340px; height: 420px; transform: scale(var(--ac-portail)); transform-origin: 0 0; }

.ac-avance {
  flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 14px; padding: 20px 22px; border-radius: 16px;
  background: rgba(10, 8, 18, .62); border: 1px solid rgba(255, 255, 255, .12); backdrop-filter: blur(8px);
}
.ac-avance-tete { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.ac-avance-tete span { font: 700 13px 'Orbitron', sans-serif; letter-spacing: 2px; color: #ffc77a; }
.ac-avance-tete b { flex: none; white-space: nowrap; font: 900 22px 'Orbitron', sans-serif; color: #fff; }
.ac-avance-barre { height: 10px; border-radius: 999px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.ac-avance-barre i { display: block; width: 15%; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #4fd8ee, #a77cf2, #f05bc8); box-shadow: 0 0 14px rgba(240, 91, 200, .7); }
.ac-avance p { margin: 0; font-size: 16px; line-height: 1.4; color: #e8dff0; }

.ac-piliers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.ac-pilier { display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: 14px; background: rgba(10, 8, 18, .5); border: 1px solid rgba(79, 216, 238, .3); }
.ac-pilier:nth-child(2) { border-color: rgba(167, 124, 242, .35); }
.ac-pilier:nth-child(3) { border-color: rgba(247, 164, 60, .4); }
.ac-pilier b { font: 700 14px 'Orbitron', sans-serif; letter-spacing: 1px; color: #fff; }
.ac-pilier span { font-size: 15px; line-height: 1.35; color: #ddd3e8; }

/* ---------- Bandeau des nouveautés (rempli par ui/boot.js avec les notes de patch) ---------- */
.ac-bandeau { display: flex; align-items: center; border-radius: 12px; overflow: hidden; background: rgba(10, 8, 18, .72); border: 1px solid rgba(255, 255, 255, .1); }
.ac-bandeau > span { flex: none; padding: 14px 18px; font: 700 12px 'Orbitron', sans-serif; letter-spacing: 2px; color: #0a0812; background: #ffc77a; }
.ac-bandeau-vue { flex: 1; min-width: 0; overflow: hidden; }
.ac-fil { display: flex; width: max-content; white-space: nowrap; font-size: 16px; font-weight: 600; color: #e8dff0; animation: oxDrift 60s linear infinite; }
.ac-fil:hover { animation-play-state: paused; }
.ac-lot { display: flex; gap: 48px; padding-right: 48px; }
.ac-lot i { font-style: normal; color: #f05bc8; }
.ac-lot i:nth-of-type(4n+2) { color: #4fd8ee; }
.ac-lot i:nth-of-type(4n+3) { color: #ffc77a; }
.ac-lot i:nth-of-type(4n) { color: #a77cf2; }
@media (prefers-reduced-motion: reduce) { .ac-bandeau-vue { overflow-x: auto; scrollbar-width: none; } } /* pas de défilement seul : au doigt ou à la molette */

/* ---------- Carte de connexion ---------- */
#boot .boot-card {
  grid-area: carte; position: relative; width: 100%; max-width: 440px; justify-self: end;
  display: flex; flex-direction: column; gap: 18px; padding: 30px 28px; text-align: left;
  border-radius: 22px; background: rgba(14, 11, 26, .86); border: 1px solid rgba(79, 216, 238, .35);
  box-shadow: 0 30px 80px rgba(10, 4, 20, .6), 0 0 0 1px rgba(240, 91, 200, .12), 0 0 60px rgba(79, 216, 238, .15);
  backdrop-filter: blur(14px);
}
.ac-carte-tete h2 { margin: 0; font: 700 22px 'Orbitron', sans-serif; letter-spacing: 1px; color: #fff; }
.ac-carte-tete p { margin: 4px 0 0; font-size: 16px; color: #b9b0c9; }
.ac-carte-tete p:empty { display: none; }
#boot .boot-message { margin: 0; }
#boot .boot-note { margin: 0; text-align: center; }

#boot .boot-auth { gap: 14px; }
#boot .boot-tabs {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin: 0; padding: 5px;
  border: 0; border-radius: 12px; background: rgba(255, 255, 255, .06);
}
#boot .boot-tabs .tab {
  height: 44px; padding: 0; border: 0; border-radius: 9px; background: transparent; color: #b9b0c9; cursor: pointer;
  font: 500 13px 'Orbitron', sans-serif; letter-spacing: 1px; text-transform: none;
}
#boot .boot-tabs .tab:hover { color: #fff; }
#boot .boot-tabs .tab[aria-selected="true"] { background: rgba(79, 216, 238, .16); color: #fff; box-shadow: inset 0 0 0 1px rgba(79, 216, 238, .6); font-weight: 700; }
#boot .boot-tabs .tab:focus-visible, #boot .btn-primary:focus-visible, #boot .btn-discord:focus-visible { outline: 2px solid #4fd8ee; outline-offset: 2px; }

#boot .auth-form { gap: 14px; }
#boot .auth-form label { gap: 6px; font-size: 15px; font-weight: 600; letter-spacing: 0; color: #d6cde4; }
#boot .auth-form input:not([type="checkbox"]) {
  width: 100%; box-sizing: border-box; height: 48px; padding: 0 14px; border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .16); background: #0a0814; color: #fff;
  font: 600 17px 'Rajdhani', sans-serif;
}
#boot .auth-form input:not([type="checkbox"]):focus { outline: none; border-color: #4fd8ee; box-shadow: 0 0 0 3px rgba(79, 216, 238, .25); }
#boot .auth-form input::placeholder { color: #6f6784; font-weight: 500; }
#boot .auth-form small { font-size: 13px; color: #a79ebb; }

/* « Créer un compte » plus compact que la connexion, il a plus de champs (05/11, demandé par le propriétaire) */
#boot #form-register { gap: 10px; }
#boot #form-register label { gap: 4px; }
#boot #form-register input:not([type="checkbox"]) { height: 42px; }
#boot #form-register small:not([data-referral-bonus]) { font-size: 12px; }
#boot #form-register .ac-oeil { width: 38px; height: 38px; }
#boot #form-register .btn-primary { height: 48px; }

/* « Mot de passe » et « Oublié ? » sur une ligne ; l'œil dans le champ */
.ac-champ { display: flex; flex-direction: column; gap: 6px; }
.ac-champ-tete { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
#boot .ac-champ-tete .link-btn { margin: 0; padding: 0; font-size: 14px; color: #7fe6f5; text-decoration: underline; }
#boot .ac-champ-tete .link-btn:hover { color: #fff; }
.ac-mdp { position: relative; display: block; }
#boot .ac-mdp input { padding-right: 56px; }
.ac-oeil {
  position: absolute; right: 2px; top: 2px; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: 8px; background: transparent; color: #b9b0c9; cursor: pointer;
}
.ac-oeil:hover, .ac-oeil[aria-pressed="true"] { color: #fff; }
.ac-oeil:focus-visible { outline: 2px solid #4fd8ee; outline-offset: -2px; }
.ac-oeil svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* « J'ai un parrain » */
#boot .auth-form label.auth-check {
  flex-direction: row; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px; border-radius: 10px;
  background: rgba(247, 164, 60, .1); border: 1px dashed rgba(247, 164, 60, .5);
  font-size: 16px; color: #f3eee6; cursor: pointer;
}
#boot .auth-form .auth-check input { accent-color: #f7a43c; }
#boot .auth-form .auth-check small { margin-left: auto; font: 700 13px 'Orbitron', sans-serif; color: #ffc77a; opacity: 1; }
#boot .referral-box input { border-color: rgba(247, 164, 60, .5); }

#boot .btn-primary {
  height: 54px; padding: 0 16px; border: 0; border-radius: 12px; cursor: pointer;
  background: linear-gradient(90deg, #4fd8ee, #8fe9f6); color: #07161c;
  font: 700 16px 'Orbitron', sans-serif; letter-spacing: 2px; text-transform: uppercase;
  box-shadow: 0 8px 30px rgba(79, 216, 238, .4); transition: transform .15s, filter .15s;
}
#boot .btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
#boot #btn-enter, #boot #btn-enter-vr { margin: 0; }
#boot .auth-or { font-size: 14px; color: #8f86a3; }
#boot .auth-or::before, #boot .auth-or::after { background: rgba(255, 255, 255, .14); }
#boot .btn-discord {
  height: 50px; padding: 0 16px; border: 0; border-radius: 12px; box-shadow: none;
  font: 700 18px 'Rajdhani', sans-serif; letter-spacing: 1px;
}
#boot #btn-guest { margin: 0; padding: 6px 10px; align-self: center; font-size: 15px; color: #c9c0d9; text-align: center; }
#boot #btn-guest span { color: #9a91ad; }
#boot #btn-guest:hover { color: #fff; }
#boot .boot-noscript { margin: 0; }

/* ---------- Le portail suit la hauteur de la fenêtre (grand écran) ---------- */
/* ---------- Ordinateur : le modèle du propriétaire recomposé en 16:9 (05/11, demandé : « le format de la page n'est pas en 16:9,
   réduire la hauteur de tout pour que ça rentre, et voir aussi la planète en bas ») ---------- */
/* Dessiné pour 1600 × 900, aux tailles du modèle : le portail passe entre le texte et la carte, ce qui enlève la hauteur en trop.
   ui/accueil-echelle.js donne --ac-z, l'échelle de tout le bloc selon la fenêtre : rien n'est réduit séparément. L'horizon reste dans
   le décor, à l'échelle de la fenêtre. Une carte plus haute que la place (inscription, parrainage) défile à l'intérieur d'elle-même. */
@media (min-width: 961px) {
  .ac-page {
    zoom: var(--ac-z, 1); max-width: 2100px; height: calc(100vh / var(--ac-z, 1)); min-height: 860px;
    padding: 22px 40px; gap: 16px;
  }
  #boot .ac-geante { top: 6px; right: calc(40px + 220px - 55px); } /* au centre de la colonne de la carte */
  .ac-main {
    flex: 1; min-height: 0; column-gap: 40px; row-gap: 18px;
    grid-template-columns: minmax(0, 1fr) auto 440px;
    grid-template-rows: auto auto auto 1fr;
    grid-template-areas: 'hero portail carte' 'accroche portail carte' 'avance portail carte' 'piliers piliers carte';
  }
  .ac-hero { gap: 20px; }
  .ac-monde, .ac-portail-ligne { display: contents; }
  .ac-portail-ligne { --ac-portail: 1.12; }
  .ac-portail { grid-area: portail; align-self: center; }
  .ac-avance { grid-area: avance; }
  .ac-piliers { grid-area: piliers; align-self: end; }
  #boot .boot-card {
    align-self: start; margin-top: 44px;
    max-height: calc(100vh / var(--ac-z, 1) - 200px); overflow-y: auto; scrollbar-width: thin;
  }
  .ac-bandeau { flex: none; }
}

/* ---------- Tablette et téléphone : la carte juste sous le titre, le reste après ---------- */
@media (max-width: 960px) {
  .ac-page { padding: 16px 16px 20px; gap: 16px; }
  .ac-main {
    grid-template-columns: minmax(0, 1fr); grid-template-rows: none; row-gap: 18px;
    grid-template-areas: 'hero' 'carte' 'accroche' 'monde';
  }
  .ac-hero { gap: 12px; }
  #boot .boot-card { position: relative; top: 0; justify-self: center; padding: 22px 18px; }
  .ac-portail-ligne { justify-content: center; }
  .ac-accroche { font-size: 18px; }
}
@media (max-width: 620px) {
  #boot .ac-geante { scale: .32; right: 6px; top: 46px; } /* au-dessus du titre, sans le recouvrir (en px : la page est très haute) */
  .ac-marque { font-size: 22px; letter-spacing: 4px; }
  .ac-top { gap: 0 16px; }
  #boot .ac-liens a, .ac-liens button { padding: 8px 8px; }
  .ac-piliers { grid-template-columns: minmax(0, 1fr); }
  .ac-etat { font-size: 12px; letter-spacing: 1.5px; }
  .ac-bandeau > span { padding: 12px 12px; font-size: 10px; letter-spacing: 1px; white-space: normal; max-width: 112px; }
}
@media (max-width: 380px) { .ac-portail-ligne { --ac-portail: .85; } #boot .boot-tabs .tab { font-size: 12px; letter-spacing: 0; } }
