/* Skyblock des amis — site vitrine. Nuit d'Archipel : bleu nuit, Éther turquoise, or ancien. */

@font-face { font-family: "Cinzel"; src: url("polices/cinzel-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Cinzel"; src: url("polices/cinzel-latin-800-normal.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("polices/manrope-latin-wght-normal.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Pixelify"; src: url("polices/PixelifySans.ttf") format("truetype"); font-display: swap; }

:root {
  --nuit: #070a14;
  --nuit-2: #0c1222;
  --nuit-3: #131b31;
  --texte: #e9eef7;
  --texte-doux: #a9b4c8;
  --texte-pale: #6d7890;
  --ether: #3fe0d0;
  --ether-sombre: #1b7f86;
  --ether-clair: #b8fff6;
  --or: #e8b04a;
  --or-clair: #ffe7a3;
  --ligne: rgba(255, 255, 255, .09);
  --verre: rgba(16, 24, 44, .55);
  --rayon: 18px;
  --large: min(1240px, 100% - 48px);
  --titre: "Cinzel", "Trajan Pro", Georgia, serif;
  --corps: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --pixel: "Pixelify", ui-monospace, monospace;
  --a: var(--ether);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0;
  background: var(--nuit);
  color: var(--texte);
  font: 400 17px/1.65 var(--corps);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.chargement { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; }
::selection { background: var(--ether); color: var(--nuit); }
h1, h2, h3 { margin: 0; font-weight: 800; }
p { margin: 0; }

.conteneur { width: var(--large); margin-inline: auto; }

/* ---------- Ouverture ---------- */
.ouverture {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-content: center; justify-items: center; gap: 28px;
  background: radial-gradient(circle at 50% 50%, #0d1730 0%, var(--nuit) 60%);
  transition: opacity .9s ease, visibility .9s;
}
body:not(.chargement) .ouverture { opacity: 0; visibility: hidden; }
.ouverture-coeur { position: relative; width: 64px; height: 96px; }
.ouverture-coeur span {
  position: absolute; inset: 0;
  clip-path: polygon(50% 0, 100% 38%, 50% 100%, 0 38%);
  background: linear-gradient(160deg, var(--ether-clair), var(--ether) 45%, var(--ether-sombre));
  animation: battement 1.2s ease-in-out infinite;
}
.ouverture-coeur span:nth-child(2) { opacity: .4; filter: blur(14px); animation-delay: .1s; transform: scale(1.4); }
.ouverture-coeur span:nth-child(3) { opacity: .25; filter: blur(30px); animation-delay: .2s; transform: scale(2); }
@keyframes battement { 0%, 100% { scale: 1; } 15% { scale: 1.12; } 30% { scale: .98; } 45% { scale: 1.06; } }
.ouverture-texte { font: 600 13px/1 var(--titre); letter-spacing: .4em; text-transform: uppercase; color: var(--ether-clair); opacity: .8; }

/* ---------- Curseur lumineux et barre de progression ---------- */
.curseur {
  position: fixed; left: 0; top: 0; z-index: 90; pointer-events: none;
  width: 360px; height: 360px; margin: -180px 0 0 -180px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--a) 22%, transparent) 0%, transparent 65%);
  mix-blend-mode: screen; opacity: 0; transition: opacity .4s;
}
@media (hover: hover) and (pointer: fine) { .curseur.actif { opacity: .55; } }
.progression { position: fixed; left: 0; right: 0; top: 0; height: 2px; z-index: 60; pointer-events: none; }
.progression span { display: block; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--ether), var(--or)); box-shadow: 0 0 12px var(--ether); }

/* ---------- Barre du haut ---------- */
.barre {
  position: fixed; inset: 0 0 auto; z-index: 50;
  display: flex; align-items: center; gap: 28px;
  padding: 16px max(24px, env(safe-area-inset-left));
  transition: background .4s, padding .4s, backdrop-filter .4s, border-color .4s;
  border-bottom: 1px solid transparent;
}
.barre.compacte { background: rgba(7, 10, 20, .72); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3); padding-block: 10px; border-color: var(--ligne); }
.marque { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 800 17px/1 var(--titre); letter-spacing: .04em; color: var(--texte); }
.marque svg { width: 26px; height: 26px; color: var(--ether); filter: drop-shadow(0 0 8px rgba(63, 224, 208, .6)); }
.marque em { font-style: normal; color: var(--ether); }
.menu { display: flex; gap: 6px; margin-left: auto; }
.menu a { position: relative; padding: 8px 14px; border-radius: 99px; text-decoration: none; font-size: 14.5px; font-weight: 600; color: var(--texte-doux); transition: color .25s, background .25s; }
.menu a:hover { color: var(--texte); background: rgba(255, 255, 255, .06); }
.pastille-statut { display: flex; align-items: center; gap: 8px; padding: 7px 12px; border: 1px solid var(--ligne); border-radius: 99px; font-size: 13px; color: var(--texte-doux); white-space: nowrap; }
.voyant { width: 8px; height: 8px; border-radius: 50%; background: #6d7890; flex: none; }
.voyant.en-ligne { background: #4ee39a; box-shadow: 0 0 0 0 rgba(78, 227, 154, .7); animation: pouls 2s infinite; }
.voyant.hors-ligne { background: #ff6b5e; }
@keyframes pouls { 70% { box-shadow: 0 0 0 9px rgba(78, 227, 154, 0); } 100% { box-shadow: 0 0 0 0 rgba(78, 227, 154, 0); } }

/* ---------- Boutons ---------- */
.bouton {
  --fond: rgba(255, 255, 255, .06);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 26px; border-radius: 99px; border: 1px solid var(--ligne);
  font: 700 15.5px/1 var(--corps); letter-spacing: .01em; text-decoration: none; color: var(--texte);
  background: var(--fond); cursor: pointer; isolation: isolate; overflow: hidden;
  transition: box-shadow .3s, border-color .3s, background .3s;
}
.bouton svg { width: 20px; height: 20px; transition: transform .3s; }
.bouton:hover svg { transform: translateX(3px); }
.bouton-petit { padding: 10px 18px; font-size: 14px; background: var(--ether); color: #04201d; border-color: transparent; }
.bouton-petit:hover { box-shadow: 0 0 24px rgba(63, 224, 208, .55); }
.bouton-eclat { background: linear-gradient(135deg, #63f3e3, var(--ether) 40%, #23b3a8); color: #03231f; border-color: rgba(184, 255, 246, .6); box-shadow: 0 10px 40px -8px rgba(63, 224, 208, .6), inset 0 1px 0 rgba(255, 255, 255, .6); }
.bouton-eclat::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .7) 50%, transparent 70%); transform: translateX(-120%); transition: transform .8s; }
.bouton-eclat:hover::after { transform: translateX(120%); }
.bouton-eclat:hover { box-shadow: 0 14px 60px -6px rgba(63, 224, 208, .85), inset 0 1px 0 rgba(255, 255, 255, .6); }
.bouton-fantome { backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.bouton-fantome:hover { border-color: rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .1); }
.bouton-geant { padding: 24px 44px; font-size: 19px; }
.bouton-geant svg { width: 24px; height: 24px; }
.bouton-geant:hover svg { transform: translateY(3px); }

/* ---------- Héros ---------- */
.heros { position: relative; height: 100svh; min-height: 620px; overflow: hidden; }
.scene3d { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; display: block; }
.heros-fond {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 40%, rgba(63, 224, 208, .12), transparent 70%),
    radial-gradient(ellipse 60% 50% at 20% 80%, rgba(138, 108, 255, .12), transparent 70%),
    linear-gradient(180deg, #050812 0%, #0b1530 55%, #16264a 100%);
}
.heros-voile { position: absolute; inset: 0; z-index: 2; pointer-events: none; background: linear-gradient(90deg, rgba(5, 8, 18, .78) 0%, rgba(5, 8, 18, .35) 45%, transparent 70%), linear-gradient(0deg, var(--nuit) 0%, transparent 22%); }
.heros-contenu { position: relative; z-index: 3; height: 100%; width: var(--large); margin-inline: auto; display: flex; flex-direction: column; justify-content: center; padding-top: 60px; max-width: 1240px; }
.surtitre { display: flex; align-items: center; gap: 14px; font: 600 12.5px/1 var(--corps); letter-spacing: .28em; text-transform: uppercase; color: var(--ether-clair); margin-bottom: 26px; }
.surtitre .trait { width: 44px; height: 1px; background: linear-gradient(90deg, transparent, var(--ether)); }
.titre-heros { font-family: var(--titre); font-weight: 800; font-size: clamp(48px, 9.2vw, 132px); line-height: .95; letter-spacing: -.01em; margin-bottom: 28px; }
.titre-heros .ligne { display: block; overflow: hidden; padding-bottom: .08em; }
.titre-heros .mot { display: inline-block; }
.titre-heros .accent { background: linear-gradient(100deg, var(--ether-clair), var(--ether) 45%, var(--or) 110%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 30px rgba(63, 224, 208, .35)); }
.accroche { max-width: 34em; font-size: clamp(16px, 1.45vw, 19.5px); color: var(--texte-doux); margin-bottom: 36px; }
.heros-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 30px; }
.statut-heros { display: inline-flex; align-items: center; gap: 10px; align-self: flex-start; padding: 10px 16px; border-radius: 99px; background: var(--verre); border: 1px solid var(--ligne); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); font-size: 14px; color: var(--texte-doux); }
.indice-defiler { position: absolute; z-index: 3; left: 50%; bottom: 26px; translate: -50% 0; display: grid; justify-items: center; gap: 10px; font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--texte-pale); }
.indice-defiler i { width: 1px; height: 46px; background: linear-gradient(var(--ether), transparent); animation: goutte 2s ease-in-out infinite; transform-origin: top; }
@keyframes goutte { 0% { transform: scaleY(0); opacity: 1; } 60% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }

.recit { position: absolute; inset: 0; z-index: 3; pointer-events: none; display: grid; place-items: end center; padding-bottom: 11vh; }
.recit-ligne { grid-area: 1 / 1; max-width: 18em; padding: 0 24px; text-align: center; font: 600 clamp(26px, 4.2vw, 58px)/1.15 var(--titre); color: var(--texte); text-shadow: 0 4px 40px rgba(0, 0, 0, .7); opacity: 0; }
.recit-ligne em { font-style: normal; color: var(--ether); }

/* ---------- Titres de section ---------- */
.etiquette { display: inline-flex; align-items: center; gap: 12px; font: 700 12.5px/1 var(--corps); letter-spacing: .3em; text-transform: uppercase; color: var(--a); margin-bottom: 20px; }
.etiquette::before { content: ""; width: 8px; height: 8px; rotate: 45deg; background: currentColor; box-shadow: 0 0 12px currentColor; }
.centre { text-align: center; justify-content: center; margin-inline: auto; }
.titre-section { font: 800 clamp(34px, 5vw, 68px)/1.04 var(--titre); letter-spacing: -.01em; margin-bottom: 22px; }
.titre-geant { font: 800 clamp(56px, 12vw, 190px)/.92 var(--titre); letter-spacing: -.02em; text-align: center; margin-bottom: 24px; background: linear-gradient(180deg, #fff 30%, rgba(255, 255, 255, .45)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.intro { max-width: 40em; font-size: clamp(16.5px, 1.4vw, 19px); color: var(--texte-doux); }
.revele-mots .m { display: inline-block; }

/* ---------- Le monde ---------- */
.monde { position: relative; padding: 140px 0 120px; background: linear-gradient(180deg, var(--nuit) 0%, var(--nuit-2) 100%); }
.entete-section { margin-bottom: 70px; }
.monde-grille { display: grid; grid-template-columns: 1.15fr 1fr; gap: 60px; align-items: center; margin-bottom: 140px; }
.monde-image { margin: 0; position: relative; border-radius: var(--rayon); overflow: hidden; aspect-ratio: 4 / 3.4; box-shadow: 0 40px 100px -30px rgba(63, 224, 208, .35), 0 0 0 1px var(--ligne); }
.monde-image img { width: 100%; height: 120%; object-fit: cover; }
.monde-repere { display: grid; gap: 18px; }
.repere { padding: 26px 28px; border-radius: var(--rayon); background: linear-gradient(160deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .015)); border: 1px solid var(--ligne); transition: border-color .3s, box-shadow .3s; }
.repere:hover { border-color: rgba(63, 224, 208, .35); box-shadow: -6px 0 0 -2px var(--ether), 0 20px 50px -20px rgba(63, 224, 208, .3); }
.repere h3 { font: 800 22px/1.2 var(--titre); color: var(--ether-clair); margin-bottom: 8px; }
.repere p { color: var(--texte-doux); font-size: 16px; }
.repere em { color: var(--texte); }

.voies { margin-bottom: 120px; text-align: center; }
.voies .etiquette { color: var(--or); }
.voies-grille { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 50px; perspective: 1200px; }
.voie {
  position: relative; padding: 42px 32px 36px; border-radius: 22px; text-align: left; overflow: hidden;
  background: linear-gradient(170deg, color-mix(in srgb, var(--c) 16%, #0f1730), #0b1124 70%);
  border: 1px solid color-mix(in srgb, var(--c) 30%, transparent);
  transform-style: preserve-3d; will-change: transform;
}
.voie-brillance { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--c) 35%, transparent), transparent 55%); opacity: .7; transition: opacity .3s; }
.voie-icone { position: relative; width: 64px; height: 64px; color: var(--c); margin-bottom: 26px; filter: drop-shadow(0 0 14px var(--c)); transform: translateZ(40px); }
.voie h3 { position: relative; font: 800 30px/1 var(--titre); color: var(--c); margin-bottom: 14px; transform: translateZ(30px); }
.voie p { position: relative; color: var(--texte-doux); font-size: 16px; transform: translateZ(20px); }

.chiffres { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; border-top: 1px solid var(--ligne); border-bottom: 1px solid var(--ligne); }
.chiffre { display: flex; flex-direction: column-reverse; padding: 40px 24px; border-left: 1px solid var(--ligne); }
.chiffre:first-child { border-left: 0; }
.chiffre dd { margin: 0 0 8px; font: 800 clamp(48px, 6vw, 84px)/1 var(--titre); background: linear-gradient(180deg, var(--ether-clair), var(--ether)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.chiffre dt { color: var(--texte-pale); font-size: 14.5px; }

/* ---------- Les ères ---------- */
.eres { position: relative; padding: 140px 0 40px; background: var(--nuit-2); transition: background-color 1s; }
.eres::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse 70% 40% at 50% 0%, color-mix(in srgb, var(--a) 14%, transparent), transparent 70%); transition: background 1s; }
.eres-intro { position: relative; width: var(--large); margin: 0 auto 80px; }
.eres-intro .titre-geant { background-image: linear-gradient(180deg, #fff 20%, color-mix(in srgb, var(--a) 70%, transparent)); }

.frise { position: fixed; left: 26px; top: 50%; z-index: 40; translate: 0 -50%; display: grid; gap: 6px; opacity: 0; pointer-events: none; transition: opacity .5s; }
.frise.visible { opacity: 1; pointer-events: auto; }
.frise a { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--texte-pale); font-size: 13px; }
.frise b { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--ligne); font: 800 11.5px/1 var(--titre); background: rgba(7, 10, 20, .6); backdrop-filter: blur(6px); transition: all .4s; }
.frise span { opacity: 0; translate: -6px 0; transition: all .3s; white-space: nowrap; font-weight: 600; }
.frise a:hover span { opacity: 1; translate: 0 0; }
.frise a.actif { color: var(--texte); }
.frise a.actif b { border-color: var(--a); background: var(--a); color: var(--nuit); box-shadow: 0 0 20px var(--a); }

.ere { --a: #3fe0d0; --b: #0c1222; --c2: #b8fff6; position: relative; padding: 120px 0 150px; }
.ere-chiffre {
  position: absolute; z-index: 0; top: 40px; right: 2vw; pointer-events: none;
  font: 800 clamp(180px, 34vw, 520px)/.8 var(--titre); letter-spacing: -.04em;
  color: transparent; -webkit-text-stroke: 1.5px color-mix(in srgb, var(--a) 40%, transparent); opacity: .5;
}
.ere-tete { position: relative; z-index: 1; width: var(--large); margin: 0 auto 60px; display: grid; grid-template-columns: 1fr 1fr; gap: 40px 60px; align-items: end; }
.ere-rite { display: inline-flex; align-items: center; gap: 10px; font: 700 12.5px/1 var(--corps); letter-spacing: .26em; text-transform: uppercase; color: var(--a); margin-bottom: 18px; }
.ere-rite i { width: 30px; height: 1px; background: var(--a); }
.ere-nom { font: 800 clamp(52px, 8vw, 120px)/.95 var(--titre); letter-spacing: -.02em; }
.ere-devise { margin-top: 14px; font: 600 clamp(18px, 1.8vw, 24px)/1.3 var(--titre); color: var(--a); }
.ere-accroche { font-size: clamp(17px, 1.5vw, 20.5px); color: var(--texte-doux); }

.ere-scene { position: relative; z-index: 1; width: var(--large); margin: 0 auto 70px; height: clamp(380px, 62vw, 720px); }
.ere-cadre { position: absolute; margin: 0; overflow: hidden; border-radius: var(--rayon); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .08); background: #000; }
.ere-cadre img { width: 100%; height: 100%; object-fit: cover; scale: 1.15; }
.ere-cadre figcaption { position: absolute; left: 14px; bottom: 12px; padding: 6px 12px; border-radius: 99px; background: rgba(5, 8, 18, .7); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); font-size: 12.5px; color: var(--texte); }
.ere-cadre.principal { inset: 0 16% 12% 0; box-shadow: 0 40px 120px -30px color-mix(in srgb, var(--a) 55%, transparent), 0 0 0 1px rgba(255, 255, 255, .1); }
.ere-cadre.second { width: 38%; aspect-ratio: 16 / 10; right: 0; top: 8%; }
.ere-cadre.troisieme { width: 30%; aspect-ratio: 16 / 10; right: 9%; bottom: 0; }
.ere:nth-of-type(even) .ere-cadre.principal { inset: 0 0 12% 16%; }
.ere:nth-of-type(even) .ere-cadre.second { right: auto; left: 0; }
.ere:nth-of-type(even) .ere-cadre.troisieme { right: auto; left: 9%; }
.ere:nth-of-type(even) .ere-chiffre { right: auto; left: 2vw; }

.ere-corps { position: relative; z-index: 1; width: var(--large); margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr; gap: 50px; }
.ere-liste { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.ere-liste li { position: relative; padding: 22px 22px 22px 24px; border-radius: 14px; background: linear-gradient(160deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .01)); border: 1px solid var(--ligne); transition: border-color .3s, background .3s, box-shadow .3s; }
.ere-liste li:hover { border-color: color-mix(in srgb, var(--a) 50%, transparent); background: color-mix(in srgb, var(--a) 8%, transparent); box-shadow: 0 16px 40px -18px color-mix(in srgb, var(--a) 60%, transparent); }
.ere-liste li::before { content: ""; position: absolute; left: 0; top: 24px; width: 3px; height: 20px; border-radius: 0 3px 3px 0; background: var(--a); box-shadow: 0 0 12px var(--a); }
.ere-liste h3 { font: 700 16.5px/1.3 var(--corps); margin-bottom: 6px; color: var(--texte); }
.ere-liste p { font-size: 14.5px; line-height: 1.55; color: var(--texte-doux); }
.ere-identite { padding: 28px; border-radius: 18px; border: 1px solid color-mix(in srgb, var(--a) 28%, transparent); background: linear-gradient(170deg, color-mix(in srgb, var(--a) 10%, transparent), transparent 70%); align-self: start; position: sticky; top: 100px; }
.ere-identite h3 { font: 700 12px/1 var(--corps); letter-spacing: .22em; text-transform: uppercase; color: var(--texte-pale); margin: 0 0 12px; }
.ere-identite h3:not(:first-child) { margin-top: 24px; }
.nuancier { display: flex; gap: 8px; }
.nuancier span { flex: 1; height: 54px; border-radius: 10px; background: var(--s); position: relative; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
.nuancier span::after { content: attr(data-hex); position: absolute; left: 0; right: 0; bottom: -18px; text-align: center; font: 11px/1 var(--pixel); color: var(--texte-pale); }
.ere-identite p { font-size: 14.5px; color: var(--texte-doux); }
.ere-identite .embleme { color: var(--texte); font-weight: 600; }

/* Transition entre deux ères : le rite */
.passage { position: relative; height: 1px; width: var(--large); margin: 0 auto; background: linear-gradient(90deg, transparent, var(--ligne), transparent); }

/* ---------- Les ciels ---------- */
.ciels { position: relative; background: var(--nuit); }
.ciels-epingle { height: 100svh; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.ciels-entete { width: var(--large); margin: 0 auto 36px; --a: var(--or); }
.ciels-entete .titre-section { margin: 0; }
.ciels-piste { display: flex; gap: 28px; padding-left: max(24px, (100vw - 1240px) / 2); width: max-content; will-change: transform; }
.ciel-carte { position: relative; margin: 0; flex: none; width: clamp(300px, 46vw, 720px); aspect-ratio: 16 / 10; border-radius: 20px; overflow: hidden; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .8), 0 0 0 1px var(--ligne); }
.ciel-carte img { width: 100%; height: 100%; object-fit: cover; scale: 1.2; }
.ciel-carte figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 60px 24px 20px; background: linear-gradient(transparent, rgba(0, 0, 0, .75)); font: 600 20px/1.2 var(--titre); }
.ciel-carte figcaption b { display: block; margin-bottom: 6px; font: 700 11.5px/1 var(--corps); letter-spacing: .26em; text-transform: uppercase; color: var(--or-clair); }

/* ---------- Rejoindre ---------- */
.rejoindre { position: relative; padding: 160px 0 120px; overflow: hidden; background: radial-gradient(ellipse 80% 50% at 50% 30%, rgba(63, 224, 208, .1), transparent 70%), linear-gradient(180deg, var(--nuit) 0%, #0a1326 100%); }
.rejoindre .entete-section { margin-bottom: 50px; }
.telechargement { position: relative; display: grid; justify-items: center; gap: 14px; margin-bottom: 110px; }
.telechargement-halo { position: absolute; top: -60px; width: 520px; height: 220px; border-radius: 50%; background: radial-gradient(ellipse, rgba(63, 224, 208, .35), transparent 70%); filter: blur(20px); pointer-events: none; animation: respire 4s ease-in-out infinite; }
@keyframes respire { 50% { opacity: .55; transform: scale(1.1); } }
.sous-bouton { color: var(--texte-pale); font-size: 14px; }
.lien-discret { color: var(--ether); font-size: 14.5px; text-underline-offset: 4px; }

.rejoindre-grille { display: grid; grid-template-columns: 1fr 1.1fr; gap: 60px; align-items: center; margin-bottom: 80px; }
.etapes { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.etape { display: flex; gap: 20px; padding: 24px; border-radius: 16px; border: 1px solid var(--ligne); background: rgba(255, 255, 255, .025); }
.etape-num { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; font: 800 20px/1 var(--titre); color: var(--nuit); background: linear-gradient(135deg, var(--ether-clair), var(--ether)); box-shadow: 0 0 24px rgba(63, 224, 208, .4); }
.etape h3 { font: 700 18px/1.3 var(--corps); margin-bottom: 6px; }
.etape p { color: var(--texte-doux); font-size: 15px; }
.lanceur { margin: 0; border-radius: 16px; overflow: hidden; transform-style: preserve-3d; box-shadow: 0 50px 120px -30px rgba(63, 224, 208, .45), 0 0 0 1px rgba(255, 255, 255, .12); }
.serveur-grille { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.fiche-serveur { padding: 32px; border-radius: 18px; background: var(--verre); border: 1px solid var(--ligne); backdrop-filter: blur(10px); }
.fiche-serveur h3 { font: 800 24px/1.2 var(--titre); margin-bottom: 18px; color: var(--ether-clair); }
.fiche-serveur p { color: var(--texte-doux); font-size: 15.5px; margin-bottom: 12px; }
.fiche-serveur dl { margin: 0; display: grid; gap: 2px; }
.fiche-serveur dl div { display: grid; grid-template-columns: 90px 1fr; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--ligne); align-items: center; }
.fiche-serveur dl div:last-child { border-bottom: 0; }
.fiche-serveur dt { color: var(--texte-pale); font-size: 14px; }
.fiche-serveur dd { margin: 0; font-size: 15.5px; }
code { font: 14px/1.4 ui-monospace, "Cascadia Code", Consolas, monospace; color: var(--ether-clair); }
.copier { display: inline-flex; align-items: center; gap: 12px; max-width: 100%; padding: 8px 10px 8px 14px; border-radius: 10px; border: 1px solid var(--ligne); background: rgba(0, 0, 0, .3); color: inherit; font: inherit; cursor: pointer; text-align: left; transition: border-color .25s; }
.copier:hover { border-color: rgba(63, 224, 208, .5); }
.copier code { overflow-wrap: anywhere; }
.copier-etat { flex: none; padding: 4px 9px; border-radius: 6px; background: rgba(255, 255, 255, .08); font-size: 12px; font-weight: 700; color: var(--texte-doux); }
.copier.copie .copier-etat { background: var(--ether); color: var(--nuit); }
.copier-bloc { display: flex; width: 100%; margin-bottom: 12px; }
.fiche-serveur a { color: var(--ether); }

/* ---------- Pied ---------- */
.pied { padding: 60px 24px 50px; text-align: center; border-top: 1px solid var(--ligne); color: var(--texte-pale); font-size: 13.5px; background: #05070e; }
.pied-marque { font: 800 24px/1 var(--titre); color: var(--texte); margin-bottom: 14px; }
.pied-marque em { font-style: normal; color: var(--ether); }

/* ---------- Révélations (état initial seulement si les animations tournent) ---------- */
.anime .revele, .anime .ere-liste li, .anime .etape { opacity: 0; transform: translateY(40px); }
.anime .revele-image { clip-path: inset(18% 12% 18% 12% round 24px); }

/* ---------- Tablette et téléphone ---------- */
@media (max-width: 1380px) { .frise { display: none; } }
@media (max-width: 1100px) {

  .menu { display: none; }
}
@media (max-width: 900px) {
  body { font-size: 16px; }
  .monde-grille, .rejoindre-grille, .serveur-grille, .ere-tete, .ere-corps { grid-template-columns: 1fr; }
  .monde-grille { gap: 32px; margin-bottom: 100px; }
  .voies-grille { grid-template-columns: 1fr; }
  .chiffres { grid-template-columns: repeat(2, 1fr); }
  .chiffre:nth-child(3) { border-left: 0; }
  .chiffre:nth-child(n+3) { border-top: 1px solid var(--ligne); }
  .ere { padding: 80px 0 100px; }
  .ere-tete { gap: 20px; margin-bottom: 40px; }
  .ere-scene { height: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .ere-cadre, .ere:nth-of-type(even) .ere-cadre { position: relative; inset: auto !important; left: auto !important; right: auto !important; top: auto !important; bottom: auto !important; width: auto !important; aspect-ratio: 16 / 10; }
  .ere-cadre.principal { grid-column: 1 / -1; }
  .ere-identite { position: static; }
  .ere-chiffre { top: 20px; font-size: 46vw; }
  .monde, .rejoindre { padding: 100px 0 80px; }
}
@media (max-width: 640px) {
  :root { --large: calc(100% - 32px); }
  .barre { padding: 12px 16px; gap: 12px; }
  .barre.compacte { padding-block: 8px; }
  .marque span { display: none; }
  .pastille-statut { margin-left: auto; }
  .pastille-statut .texte { max-width: 9.5em; overflow: hidden; text-overflow: ellipsis; }
  .heros-voile { background: linear-gradient(0deg, rgba(5, 8, 18, .92) 0%, rgba(5, 8, 18, .55) 45%, rgba(5, 8, 18, .1) 75%); }
  .heros-contenu { justify-content: flex-end; padding-bottom: 40px; }
  .titre-heros { margin-bottom: 18px; }
  .accroche { margin-bottom: 24px; }
  .surtitre { font-size: 11px; letter-spacing: .2em; margin-bottom: 18px; }
  .heros-actions { margin-bottom: 18px; gap: 10px; }
  .heros-actions .bouton { padding: 13px 20px; }
  .heros-actions .bouton { flex: 1 1 100%; }
  .indice-defiler { display: none; }
  .ere-liste { grid-template-columns: 1fr; }
  .chiffre { padding: 28px 14px; }
  .bouton-geant { padding: 20px 28px; font-size: 17px; width: 100%; }
  .telechargement-halo { width: 320px; }
  .etape { padding: 18px; gap: 14px; }
  .fiche-serveur { padding: 22px; }
  .fiche-serveur dl div { grid-template-columns: 1fr; gap: 4px; }
  .ciel-carte { width: 78vw; aspect-ratio: 4 / 5; }
  .ciels-piste { gap: 16px; }
  .ere-cadre figcaption { font-size: 11px; left: 8px; bottom: 8px; }
}

/* ---------- Mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .ciels-epingle { height: auto; padding: 100px 0; }
  .ciels-piste { width: auto; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 16px; scroll-snap-type: x mandatory; }
  .ciel-carte { scroll-snap-align: start; }
  .ciel-carte img, .ere-cadre img { scale: 1; }
}

/* Titres géants découpés en mots : le dégradé est posé sur chaque mot */
.titre-geant .m { background: linear-gradient(180deg, #fff 25%, color-mix(in srgb, var(--a) 75%, #fff)); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: .06em; }
.titre-heros .accent { padding-right: .04em; }

/* Bandeau des ères, entre le monde et les ères */
.bandeau { position: relative; overflow: hidden; padding: 34px 0; background: var(--nuit-2); border-block: 1px solid var(--ligne); }
.bandeau-piste { display: flex; align-items: center; gap: 40px; width: max-content; will-change: transform; }
.bandeau span { font: 800 clamp(44px, 7vw, 104px)/1 var(--titre); color: transparent; -webkit-text-stroke: 1.5px rgba(184, 255, 246, .55); white-space: nowrap; transition: color .4s; }
.bandeau span:nth-of-type(3n+2) { color: var(--ether); -webkit-text-stroke: 0; text-shadow: 0 0 40px rgba(63, 224, 208, .5); }
.bandeau i { font-style: normal; font-size: 26px; color: var(--or); }

/* Galerie de vignettes sous chaque ère */
.ere-galerie { position: relative; z-index: 1; width: var(--large); margin: 40px auto 60px; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.vignette { position: relative; padding: 0; border: 0; border-radius: 12px; overflow: hidden; aspect-ratio: 16 / 10; cursor: zoom-in; background: #000; box-shadow: 0 0 0 1px var(--ligne); font: inherit; color: inherit; transition: box-shadow .3s; }
.vignette img { width: 100%; height: 100%; object-fit: cover; transition: scale .6s cubic-bezier(.2, .8, .2, 1), filter .4s; filter: saturate(.85) brightness(.9); }
.vignette span { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 12px 10px; text-align: left; font-size: 13px; font-weight: 600; background: linear-gradient(transparent, rgba(0, 0, 0, .8)); opacity: 0; translate: 0 8px; transition: opacity .3s, translate .3s; }
.vignette:hover img, .vignette:focus-visible img { scale: 1.08; filter: none; }
.vignette:hover span, .vignette:focus-visible span { opacity: 1; translate: 0 0; }
.vignette:hover { box-shadow: 0 0 0 1px var(--a), 0 18px 40px -16px color-mix(in srgb, var(--a) 60%, transparent); }
.vignette:focus-visible { outline: 2px solid var(--a); outline-offset: 3px; }
@media (hover: none) { .vignette span { opacity: 1; translate: 0 0; font-size: 11.5px; } }
@media (max-width: 640px) { .ere-galerie { grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 0; } }

.visionneuse { padding: 0; border: 0; background: transparent; max-width: min(1500px, 94vw); max-height: 92vh; overflow: visible; color: var(--texte); }
.visionneuse::backdrop { background: rgba(3, 5, 12, .88); backdrop-filter: blur(8px); }
.visionneuse[open] { animation: zoomer .45s cubic-bezier(.2, .8, .2, 1); }
@keyframes zoomer { from { opacity: 0; scale: .92; } }
.visionneuse figure { margin: 0; }
.visionneuse img { max-height: 84vh; width: auto; border-radius: 14px; box-shadow: 0 40px 120px rgba(0, 0, 0, .8); cursor: zoom-out; }
.visionneuse figcaption { margin-top: 12px; text-align: center; font: 600 17px/1.3 var(--titre); }
.visionneuse .fermer { position: absolute; top: -16px; right: -16px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--ligne); background: var(--nuit-3); color: var(--texte); font-size: 24px; line-height: 1; cursor: pointer; }

/* Sans accélération matérielle : pas de flous ni de verre dépoli (très coûteux en rendu logiciel) */
.sans-accel *, .sans-accel *::before, .sans-accel *::after { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
.sans-accel .recit-ligne, .sans-accel .heros-contenu, .sans-accel .ere-nom, .sans-accel .titre-heros .accent { filter: none !important; }
.sans-accel .curseur, .sans-accel .ouverture-coeur span:nth-child(n+2) { display: none; }
.sans-accel .barre.compacte { background: rgba(7, 10, 20, .94); }

.alerte-accel {
  position: fixed; z-index: 80; right: 20px; bottom: 20px; width: min(440px, calc(100vw - 32px));
  display: flex; gap: 14px; align-items: flex-start; padding: 18px 44px 18px 18px;
  border-radius: 16px; border: 1px solid rgba(232, 176, 74, .5); background: #141a2c;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .6); font-size: 14.5px; line-height: 1.5; color: var(--texte-doux);
  opacity: 0; translate: 0 20px; transition: opacity .4s, translate .4s;
}
.alerte-accel.visible { opacity: 1; translate: 0 0; }
.alerte-icone { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: rgba(232, 176, 74, .15); font-size: 18px; }
.alerte-texte strong { display: block; color: var(--or-clair); font-size: 15.5px; margin-bottom: 4px; }
.alerte-texte p { margin: 0 0 6px; }
.alerte-texte b { color: var(--texte); }
.alerte-comment { padding: 8px 10px; border-radius: 8px; background: rgba(255, 255, 255, .05); }
.alerte-texte code { font-size: 12.5px; }
.alerte-fermer { position: absolute; top: 10px; right: 10px; width: 28px; height: 28px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .08); color: var(--texte); font-size: 18px; line-height: 1; cursor: pointer; }
.alerte-fermer:hover { background: rgba(255, 255, 255, .16); }
@media (max-width: 640px) { .alerte-accel { right: 16px; bottom: 16px; font-size: 13.5px; } }

/* =====================================================================
   Les ères en 3D : la scène reste collée à l'écran, le texte défile par-dessus
   ===================================================================== */
.monde-grille { grid-template-columns: 1fr; margin-bottom: 120px; }
.monde-repere { grid-template-columns: repeat(3, 1fr); }
.eres { padding-bottom: 0; }
.eres-scene { position: sticky; top: 0; height: 100vh; height: 100svh; z-index: 0; overflow: hidden; background: #05070e; }
.eres-scene canvas { display: block; width: 100%; height: 100%; }
.eres-voile { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(5, 8, 18, .72) 0%, rgba(5, 8, 18, .35) 34%, transparent 55%), linear-gradient(0deg, rgba(5, 8, 18, .5), transparent 22%), linear-gradient(180deg, rgba(5, 8, 18, .55), transparent 18%); }
.eres-calque { position: relative; z-index: 1; margin-top: -100vh; margin-top: -100svh; }

.ere { width: var(--large); margin: 0 auto; padding: 22vh 0 10vh; }
.ere > * { max-width: 540px; }
.ere-panneau, .ere .ere-identite, .ciel-legende > * {
  padding: 30px 32px; border-radius: 20px; background: rgba(7, 10, 20, .62);
  border: 1px solid color-mix(in srgb, var(--a) 30%, rgba(255, 255, 255, .08));
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8); backdrop-filter: blur(10px) saturate(1.2); -webkit-backdrop-filter: blur(10px) saturate(1.2);
}
.ere .ere-tete { display: block; margin: 0; }
.ere .ere-nom { font-size: clamp(48px, 6vw, 92px); text-shadow: 0 0 40px color-mix(in srgb, var(--a) 50%, transparent); }
.ere .ere-accroche { margin-top: 18px; font-size: 17px; }
.ere-respire { height: 55vh; }
.ere .ere-liste { grid-template-columns: 1fr; gap: 12px; }
.ere .ere-liste li { background: rgba(7, 10, 20, .6); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.ere .ere-identite { position: static; }

.passage { position: relative; height: 150vh; width: auto; margin: 0; background: none; }
.passage-titre { position: sticky; top: 34vh; display: grid; justify-items: center; text-align: center; pointer-events: none; opacity: 0; }
.passage-titre span { font: 700 14px/1 var(--corps); letter-spacing: .4em; text-transform: uppercase; color: var(--a); margin-bottom: 14px; text-shadow: 0 0 20px var(--a); }
.passage-titre b { font: 800 clamp(60px, 13vw, 210px)/.9 var(--titre); color: #fff; text-shadow: 0 0 60px color-mix(in srgb, var(--a) 70%, transparent), 0 6px 40px rgba(0, 0, 0, .6); }

.ciels-bloc { width: var(--large); margin: 0 auto; padding-bottom: 20vh; --a: var(--or); }
.ciel-legende { min-height: 85vh; display: flex; align-items: center; }
.ciel-legende > * { max-width: 460px; }
.ciel-legende p { font-size: 18px; color: var(--texte); }
.ciel-legende b { display: block; margin-bottom: 8px; font: 700 12px/1 var(--corps); letter-spacing: .26em; text-transform: uppercase; color: var(--or-clair); }
.ciel-entete .titre-section { margin-bottom: 14px; }
.ciel-entete .intro { font-size: 17px; }

@media (max-width: 900px) {
  .monde-repere { grid-template-columns: 1fr; }
  .eres-voile { background: linear-gradient(0deg, rgba(5, 8, 18, .55), transparent 40%), linear-gradient(180deg, rgba(5, 8, 18, .5), transparent 25%); }
  .ere { padding-top: 16vh; }
  .ere > * { max-width: none; }
  .ere-panneau, .ere .ere-identite, .ciel-legende > * { padding: 22px; background: rgba(7, 10, 20, .74); }
  .ere-respire { height: 70vh; }
  .passage { height: 130vh; }
}
.eres, .eres-calque, .passage { overflow-x: clip; }
@media (max-width: 640px) {
  .passage-titre b { font-size: clamp(40px, 12vw, 60px); }
  .passage-titre span { letter-spacing: .25em; }
}
