/* ============================================================================
   Pages publiques (layout _LayoutHome) : accueil, histoire, connexion, inscription,
   mot de passe oublié, pages légales, crédits.
   Langage visuel du jeu : nébuleuse cyan, panneaux sombres translucides, néon cyan, boutons en majuscules.
   Ton épique : titres gravés (Cinzel), lettrine, épigraphes.
   Tout est préfixé par .home-body pour ne pas toucher aux écrans du jeu.
   ============================================================================ */

/* Cinzel : police des titres, hébergée localement (pas de Google Fonts, pour rester conforme au RGPD). Licence OFL : wwwroot/fonts/Cinzel/OFL.txt */
@font-face {
    font-family: "Cinzel";
    font-style: normal;
    font-weight: 400 900;
    font-display: swap;
    src: url("/fonts/Cinzel/Cinzel-VariableFont_wght.ttf") format("truetype");
}

.home-body {
    --h-panel: rgba(9, 13, 17, .8);
    --h-panel-strong: rgba(9, 13, 17, .94);
    --h-line: rgba(14, 208, 255, .24);
    --h-text: rgba(255, 255, 255, .88);
    --h-muted: rgba(255, 255, 255, .56);
    --h-accent: rgba(14, 208, 255, .9);
    --h-accent-solid: #0ed0ff;
    --h-glow: hsl(192deg 100% 30%);
    --era-a: #aafffc;
    --era-b: #ffb000;
    --era-c: #fa921d;
    --era-d: #ed3737;
    --era-e: #4fe38b;
    --era-f: #ffffff;
    --font-epic: "Cinzel", "Trajan Pro", Georgia, serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    font-size: 14px;
    line-height: 1.5;
    text-align: left;
}

.home-body a:focus-visible,
.home-body button:focus-visible,
.home-body input:focus-visible { outline: 2px solid var(--h-accent) !important; outline-offset: 3px; }

/* ---------- Barre du site ---------- */
.home-body .site { background: var(--h-panel); border-bottom: 1px solid var(--h-line); }
.home-body .site-in { max-width: 1240px; margin: 0 auto; padding: 10px clamp(12px, 2vw, 28px); display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; }
.home-body .brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; text-shadow: none; }
.home-body .brand img { width: 44px; height: 44px; object-fit: contain; }
.home-body .brand span { font-family: var(--font-epic); font-size: 26px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; text-shadow: 0 0 12px var(--h-glow); }
.home-body .site-nav { display: flex; align-items: center; gap: 6px 26px; flex-wrap: wrap; }
.home-body .site-nav a { color: #fff; font-size: 16px; text-decoration: none; text-shadow: none; padding: 4px 0; border-bottom: 1px solid transparent; transition: border-color .15s, color .15s; }
.home-body .site-nav a:hover { color: #fff !important; border-bottom-color: var(--h-accent); }
.home-body .site-nav a.cur { border-bottom-color: var(--h-accent); text-shadow: 0 0 8px var(--h-glow); }
.home-body .site-nav a.site-cta { padding: 5px 16px; border: 1px solid var(--h-line); border-bottom: 1px solid rgba(14, 207, 255, .55); border-radius: .25rem; background: linear-gradient(to top, rgba(14, 207, 255, .14), rgba(14, 207, 255, .03)); text-transform: uppercase; letter-spacing: .08em; font-size: 13px; }
.home-body .site-nav a.site-cta:hover { box-shadow: 0 0 8px var(--h-accent); }

.home-body .site-main { flex: 1 0 auto; width: 100%; max-width: 1240px; margin: 28px auto 40px; padding: 0 clamp(8px, 1.5vw, 16px); }

/* ---------- Pied de page légal ---------- */
.home-body .legal { background: var(--h-panel); border-top: 1px solid var(--h-line); }
.home-body .legal-in { max-width: 1240px; margin: 0 auto; padding: 10px clamp(12px, 2vw, 28px); display: flex; flex-wrap: wrap; gap: 6px 24px; font-size: 13px; }
.home-body .legal-in a { color: #fff; text-shadow: none; }
.home-body .legal-in a:hover { color: var(--h-accent-solid) !important; }
.home-body .legal-copy { margin-left: auto; color: var(--h-muted); }

/* ---------- Éléments communs ---------- */
.home-body .backGround { background-color: var(--h-panel); }
.home-body h1, .home-body h2, .home-body h3 { font-family: var(--font-epic); text-transform: uppercase; letter-spacing: .06em; text-align: left; line-height: 1.2; padding: 0; margin: 0 0 .5em; font-weight: 700; flex-grow: 0; word-wrap: normal; text-shadow: 0 0 18px rgba(14, 208, 255, .3); }
/* style.css impose Titillium Web à tout le body avec !important : les titres gravés doivent le surcharger explicitement */
.home-body h1, .home-body h2, .home-body h3, .home-body .brand span, .home-body .hist-meta dd.big,
.home-body .hist-text blockquote, .home-body .hist-pg span, .home-body .gal-slide figcaption strong { font-family: var(--font-epic) !important; }
.home-body h1 { font-size: clamp(26px, 4vw, 44px); }
.home-body h2 { font-size: clamp(20px, 2.4vw, 28px); }
.home-body h3 { font-size: 20px; }
.home-body hr { border: 0; height: 1px; opacity: .85; margin: 1rem 0; }

.home-body .btn-glow,
.home-body .btn-primary,
.home-body .btn-ghost {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    padding: 11px 26px; border: 0; border-bottom: 1px solid rgba(14, 207, 255, .55); border-radius: .25rem;
    color: #fff; text-transform: uppercase; letter-spacing: .1em; font-weight: 500; font-size: 14px; text-decoration: none;
    text-shadow: 0 0 5px var(--h-glow); backdrop-filter: blur(3px); cursor: pointer;
    background: linear-gradient(to top, rgba(14, 207, 255, .2), rgba(14, 207, 255, .05));
    transition: box-shadow .15s, background .15s;
}
.home-body .btn-ghost { background: linear-gradient(to top, rgba(14, 207, 255, .08), rgba(14, 207, 255, .02)); border-bottom-color: rgba(14, 207, 255, .3); }
.home-body .btn-glow:hover, .home-body .btn-primary:hover, .home-body .btn-ghost:hover { color: #fff !important; box-shadow: 0 0 10px var(--h-accent); background: linear-gradient(to top, rgba(14, 207, 255, .3), rgba(14, 207, 255, .08)); }
.home-body .btn-lg { padding: 13px 28px; font-size: 15px; }

/* Cadres façon écran tactique : quatre coins lumineux */
.home-body .hud { position: relative; }
.home-body .hud > .k { position: absolute; z-index: 3; width: 18px; height: 18px; border: 0 solid var(--h-accent); filter: drop-shadow(0 0 4px var(--h-glow)); pointer-events: none; }
.home-body .k.tl { top: 8px; left: 8px; border-top-width: 2px; border-left-width: 2px; }
.home-body .k.tr { top: 8px; right: 8px; border-top-width: 2px; border-right-width: 2px; }
.home-body .k.bl { bottom: 8px; left: 8px; border-bottom-width: 2px; border-left-width: 2px; }
.home-body .k.br { bottom: 8px; right: 8px; border-bottom-width: 2px; border-right-width: 2px; }

/* ---------- Formulaires (Bootstrap form-floating repris au style du jeu) ---------- */
.home-body .form-control, .home-body .form-select {
    background-color: rgba(255, 255, 255, .04); color: #fff; border: 1px solid var(--h-line); border-radius: .25rem; box-shadow: none;
}
.home-body .form-control:focus { background-color: rgba(14, 207, 255, .07); color: #fff; border-color: var(--h-accent); box-shadow: 0 0 8px rgba(14, 208, 255, .35); }
.home-body .form-floating > label { color: var(--h-muted); }
.home-body .form-floating > .form-control:focus ~ label,
.home-body .form-floating > .form-control:not(:placeholder-shown) ~ label { color: var(--h-accent); }
.home-body .form-floating > .form-control:focus ~ label::after,
.home-body .form-floating > .form-control:not(:placeholder-shown) ~ label::after { background: transparent !important; }
.home-body .form-control:-webkit-autofill { -webkit-text-fill-color: #fff; box-shadow: 0 0 0 100px #0b1a21 inset; }
.home-body .text-danger, .home-body .field-validation-error, .home-body .validation-summary-errors { color: #ff6b6b !important; font-size: 13px; }
.home-body .alert { background: rgba(14, 207, 255, .08); border: 1px solid var(--h-line); color: #fff; }
.home-body .form-check-input { background-color: rgba(255, 255, 255, .06); border-color: var(--h-line); }
.home-body .form-check-input:checked { background-color: var(--h-accent-solid); border-color: var(--h-accent-solid); }

/* ---------- Carte d'authentification (connexion, inscription, mot de passe...) ---------- */
.home-body .auth { display: flex; justify-content: center; padding: clamp(8px, 4vh, 48px) 0; }
.home-body .auth-card { width: min(100%, 460px); background: var(--h-panel-strong); border: 1px solid var(--h-line); padding: clamp(22px, 4vw, 38px); box-shadow: 0 0 40px -12px rgba(14, 208, 255, .35); }
.home-body .auth-card.wide { width: min(100%, 620px); }
.home-body .auth-kicker { font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--h-accent); margin-bottom: 6px; text-shadow: 0 0 6px var(--h-glow); }
.home-body .auth-card h1 { font-size: clamp(24px, 3.4vw, 32px); margin-bottom: .2em; }
.home-body .auth-lead { color: var(--h-muted); margin: 0 0 22px; font-size: 14px; }
.home-body .auth-card .form-floating { margin-bottom: 14px; }
.home-body .auth-card .btn-primary { width: 100%; margin-top: 10px; }
.home-body .auth-hint { font-size: 12px; color: var(--h-muted); margin: 4px 0 0; }
.home-body .auth-links { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; text-align: center; font-size: 14px; }
.home-body .auth-check { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; align-items: start; margin-top: 18px; font-size: 13px; line-height: 1.5; color: var(--h-text); }
.home-body .auth-check .form-check-input { margin-top: 3px; width: 18px; height: 18px; cursor: pointer; }
.home-body .auth-check label { cursor: pointer; }
.home-body .auth-check .text-danger { grid-column: 2; }
.home-body .auth-sep { height: 1px; background: var(--h-accent); box-shadow: 0 0 5px var(--h-glow); opacity: .6; margin: 22px 0 18px; }
.home-body .auth-card p { color: var(--h-text); }

/* Pages Identity non refondues : la colonne étroite héritée de Bootstrap (col-md-2) devient une carte lisible */
@media (min-width: 768px) {
    .home-body .row > .col-md-2.offset-md-5.backGround { flex: 0 0 auto; width: min(100%, 460px); margin-left: auto; margin-right: auto; }
}
.home-body .row > .backGround.p-3 { border: 1px solid var(--h-line); padding: 1.5rem !important; }

/* ---------- Pages à contenu (CGU, RGPD, mentions, crédits) ---------- */
.home-body .container.backGround { border: 1px solid var(--h-line); padding: clamp(14px, 2.5vw, 32px); }
.home-body .container.backGround.Home { font-size: 15px; }   /* remplace le 0.7vw hérité, illisible sur petit écran */
.home-body .container.backGround h1 { margin-bottom: .3em; }
.home-body .container.backGround h2 { font-size: 20px; margin-top: 1.2em; text-align: left; padding: 0; }
.home-body .container.backGround p, .home-body .container.backGround li { color: var(--h-text); font-weight: 300; }

/* ---------- Accueil ---------- */
.home-hero { background: var(--h-panel); border: 1px solid var(--h-line); padding: clamp(18px, 3vw, 40px); }
.home-hero-text { columns: 2 380px; column-gap: clamp(24px, 4vw, 56px); margin-top: 6px; }
.home-hero-text p { break-inside: avoid; }
.home-hero .gal { margin-top: 36px; }
.home-hero .kicker { font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: var(--h-accent); margin-bottom: 14px; text-shadow: 0 0 6px var(--h-glow); }
.home-hero h1 { font-size: clamp(24px, 3.3vw, 42px); line-height: 1.15; letter-spacing: .05em; margin-bottom: .7em; max-width: none; text-wrap: balance; }
.home-hero p { font-size: 17px; font-weight: 300; line-height: 1.7; color: var(--h-text); margin: 0 0 1em; }
.home-hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
/* Galerie de captures */
.gal { min-width: 0; }
.gal-stage { position: relative; overflow: hidden; border: 1px solid var(--h-line); background: #02080a; aspect-ratio: 1920 / 915; box-shadow: 0 0 40px -14px rgba(14, 208, 255, .45); }
.gal-slide { position: absolute; inset: 0; margin: 0; }
.gal-slide[hidden] { display: none; }
.gal-slide.is-on { animation: galIn .7s ease both; }
.gal-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gal-slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(5, 9, 12, .92) 0%, rgba(5, 9, 12, .35) 28%, transparent 52%); pointer-events: none; }
.gal-slide figcaption { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; padding: 0 clamp(16px, 3vw, 30px) clamp(26px, 4vw, 34px); display: flex; flex-direction: column; gap: 2px; pointer-events: none; }
.gal-slide figcaption strong { font-family: var(--font-epic); font-size: clamp(15px, 1.7vw, 20px); letter-spacing: .08em; text-transform: uppercase; font-weight: 600; text-shadow: 0 2px 10px rgba(0, 0, 0, .9), 0 0 14px rgba(14, 208, 255, .4); }
.gal-slide figcaption span { font-size: 13px; font-weight: 300; color: rgba(255, 255, 255, .8); text-shadow: 0 1px 6px rgba(0, 0, 0, .9); }
@keyframes galIn { from { opacity: 0; transform: scale(1.025); } to { opacity: 1; transform: none; } }
.gal-nav { position: absolute; z-index: 4; top: 50%; transform: translateY(-50%); width: 38px; height: 52px; display: grid; place-items: center; padding: 0; color: #fff; border: 0; cursor: pointer; background: rgba(5, 9, 12, .55); backdrop-filter: blur(3px); border-bottom: 1px solid rgba(14, 207, 255, .45); opacity: 0; transition: opacity .2s, box-shadow .15s; }
.gal-nav.prev { left: 10px; }
.gal-nav.next { right: 10px; }
.gal-nav svg { width: 16px; height: 16px; }
.gal-stage:hover .gal-nav, .gal-nav:focus-visible { opacity: 1; }
.gal-nav:hover { box-shadow: 0 0 8px var(--h-accent); }
@media (hover: none) { .gal-nav { opacity: .85; } }
.gal-slide img { cursor: zoom-in; }
.gal-zoom { position: absolute; z-index: 4; top: 10px; left: 10px; width: 34px; height: 34px; display: grid; place-items: center; padding: 0; color: #fff; border: 0; cursor: pointer; background: rgba(5, 9, 12, .55); backdrop-filter: blur(3px); border-bottom: 1px solid rgba(14, 207, 255, .45); opacity: .75; transition: opacity .2s, box-shadow .15s; }
.gal-zoom svg { width: 15px; height: 15px; }
.gal-zoom:hover, .gal-zoom:focus-visible { opacity: 1; box-shadow: 0 0 8px var(--h-accent); }

/* Agrandissement d'une capture */
.gal-lb { border: 0; padding: 0; background: transparent; max-width: none; max-height: none; width: 100vw; height: 100vh; color: #fff; }
.gal-lb::backdrop { background: rgba(2, 6, 9, .94); backdrop-filter: blur(4px); }
.gal-lb[open] { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: clamp(12px, 3vw, 36px); animation: galIn .3s ease both; }
.gal-lb img { max-width: 100%; max-height: calc(100vh - 130px); object-fit: contain; border: 1px solid var(--h-line); box-shadow: 0 0 50px -10px rgba(14, 208, 255, .5); background: #02080a; }
.gal-lb-cap { text-align: center; }
.gal-lb-cap strong { display: block; font-family: var(--font-epic) !important; font-size: 18px; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; }
.gal-lb-cap span { font-size: 14px; font-weight: 300; color: var(--h-muted); }
.gal-lb button { position: absolute; display: grid; place-items: center; padding: 0; color: #fff; border: 0; cursor: pointer; background: rgba(5, 9, 12, .6); border-bottom: 1px solid rgba(14, 207, 255, .5); }
.gal-lb button:hover { box-shadow: 0 0 8px var(--h-accent); }
.gal-lb .lb-close { top: 16px; right: 16px; width: 42px; height: 42px; }
.gal-lb .lb-prev, .gal-lb .lb-next { top: 50%; transform: translateY(-50%); width: 44px; height: 64px; }
.gal-lb .lb-prev { left: 16px; }
.gal-lb .lb-next { right: 16px; }
.gal-lb svg { width: 18px; height: 18px; }
.gal-count { position: absolute; z-index: 4; top: 12px; right: 14px; font-size: 12px; letter-spacing: .14em; color: var(--h-muted); font-variant-numeric: tabular-nums; background: rgba(5, 9, 12, .55); padding: 2px 10px; }
.gal-count b { color: var(--h-accent); font-weight: 500; }
.gal-seg { display: flex; gap: 6px; list-style: none !important; margin: 12px 0 0; padding: 0; }
.gal-seg li { flex: 1; }
.gal-seg button { position: relative; display: block; width: 100%; height: 14px; padding: 0; border: 0; background: none; cursor: pointer; backdrop-filter: none; box-shadow: none; }
.gal-seg button::before { content: ""; position: absolute; left: 0; right: 0; top: 5px; height: 3px; background: rgba(255, 255, 255, .16); }
.gal-seg button i { position: absolute; left: 0; top: 5px; height: 3px; width: 100%; background: var(--h-accent-solid); box-shadow: 0 0 6px var(--h-glow); transform: scaleX(0); transform-origin: left; }
.gal-seg button.done i { transform: scaleX(1); opacity: .55; }
.gal-seg button.on i { opacity: 1; }
.gal-seg button:hover::before { background: rgba(14, 208, 255, .4); }

.home-x { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.home-x article { background: var(--h-panel); border: 1px solid var(--h-line); padding: 22px 22px 24px; transition: border-color .2s, box-shadow .2s; }
.home-x article:hover { border-color: var(--h-accent); box-shadow: 0 0 16px -4px rgba(14, 208, 255, .5); }
.home-x i { font-size: 22px; color: var(--h-accent); text-shadow: 0 0 10px var(--h-glow); margin-bottom: 14px; display: block; }
.home-x h2 { font-size: 18px; margin-bottom: .4em; }
.home-x p { margin: 0; font-weight: 300; font-size: 15px; line-height: 1.6; color: var(--h-text); }

.home-lore { position: relative; margin-top: 14px; border: 1px solid var(--h-line); overflow: hidden; background: #02080a; }
.home-lore .neb { position: absolute; inset: -4%; background: url("/img/bg.webp") center / cover; background-position: 35% 30%; filter: saturate(1.15) brightness(1.1); }
.home-lore::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to right, rgba(5, 9, 12, .94) 20%, rgba(5, 9, 12, .35)); }
.home-lore-in { position: relative; z-index: 2; padding: clamp(24px, 4vw, 54px); max-width: 680px; }
.home-lore .epi { font-style: italic; font-weight: 300; font-size: clamp(17px, 2vw, 21px); line-height: 1.55; margin: 0 0 18px; padding-left: 16px; border-left: 1px solid var(--h-accent); color: rgba(255, 255, 255, .9); }
.home-lore p.txt { font-weight: 300; font-size: 16px; line-height: 1.7; color: var(--h-text); margin: 0 0 22px; }

/* ---------- Histoire ---------- */
.hist { background: var(--h-panel); border: 1px solid var(--h-line); }
.hist-top { position: sticky; top: 0; z-index: 20; background: var(--h-panel-strong); backdrop-filter: blur(8px); padding: 0 clamp(12px, 2vw, 28px); border-bottom: 1px solid var(--h-line); box-shadow: 0 6px 16px -10px rgba(14, 208, 255, .5); }
.hist-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-top: 12px; }
.home-body .hist-head h1 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: .3em; text-shadow: 0 0 8px var(--h-glow); }
.hist-counter { font-size: 12px; color: var(--h-muted); font-variant-numeric: tabular-nums; letter-spacing: .12em; text-transform: uppercase; }
.hist-counter strong { color: var(--h-accent); font-weight: 500; }
.hist-frise { display: flex; align-items: stretch; gap: 4px; padding: 6px 0 10px; }
.hist-arrow { flex: 0 0 34px; align-self: center; height: 34px; border-radius: 50%; display: grid; place-items: center; padding: 0; background: linear-gradient(to top, rgba(14, 207, 255, .12), rgba(14, 207, 255, .03)); border: 0; border-bottom: 1px solid rgba(14, 207, 255, .4); color: #fff; }
.hist-arrow:hover:not(:disabled) { box-shadow: 0 0 6px var(--h-accent); }
.hist-arrow:disabled { opacity: .3; cursor: default; }
.hist-arrow svg { width: 15px; height: 15px; }
.hist-rail { flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; cursor: grab; -webkit-mask-image: linear-gradient(to right, transparent 0, #000 26px, #000 calc(100% - 26px), transparent 100%); mask-image: linear-gradient(to right, transparent 0, #000 26px, #000 calc(100% - 26px), transparent 100%); }
.hist-rail::-webkit-scrollbar { display: none; }
.hist-rail.drag { cursor: grabbing; }
.hist-track, .hist-nodes { list-style: none !important; margin: 0; padding: 0; }
.hist-track { display: flex; width: max-content; padding: 0 26px; }
.hist-era { display: flex; flex-direction: column; padding-right: 18px; margin-right: 18px; border-right: 1px solid var(--h-line); }
.hist-era:last-child { border-right: 0; margin-right: 0; padding-right: 0; }
.hist-era-name { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; font-weight: 500; color: var(--c); padding-bottom: 8px; white-space: nowrap; text-shadow: 0 0 6px color-mix(in srgb, var(--c) 60%, transparent); }
.hist-era-name small { color: var(--h-muted); font-weight: 300; letter-spacing: .06em; margin-left: 8px; text-shadow: none; }
.hist-nodes { display: flex; position: relative; }
.hist-nodes::before { content: ""; position: absolute; left: 0; right: 0; top: 7px; height: 1px; background: var(--c); opacity: .5; box-shadow: 0 0 5px var(--c); }
.home-body .hist-node { position: relative; width: 62px; flex: 0 0 62px; display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--h-muted); text-decoration: none; text-shadow: none; padding-bottom: 2px; }
.hist-dot { width: 15px; height: 15px; transform: rotate(45deg) scale(.82); background: #05090c; border: 1.5px solid var(--c); transition: transform .2s, background .2s, box-shadow .2s; z-index: 1; }
.hist-node.est .hist-dot { border-style: dashed; }
.hist-yr { font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; transition: color .15s; }
.home-body .hist-node:hover { color: #fff !important; }
.hist-node:hover .hist-dot { transform: rotate(45deg) scale(1.05); box-shadow: 0 0 8px var(--c); }
.hist-node.on .hist-dot { background: #fff; border-color: #fff; transform: rotate(45deg) scale(1.2); box-shadow: 0 0 0 4px rgba(14, 208, 255, .25), 0 0 16px rgba(14, 208, 255, .9); }
.hist-node.on .hist-yr { color: #fff; font-weight: 500; text-shadow: 0 0 6px var(--h-glow); }
.hist-node.seen .hist-dot { background: var(--c); }
.hist-tip { position: absolute; top: calc(100% + 4px); left: 50%; transform: translateX(-50%) translateY(-4px); background: rgba(9, 13, 17, .97); border: 1px solid var(--h-line); border-radius: 4px; padding: 5px 10px; font-size: 13px; color: #fff; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .15s, transform .15s; z-index: 5; }
.hist-node:hover .hist-tip, .hist-node:focus-visible .hist-tip { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Chapitre (sans JavaScript, tous les chapitres sont affichés à la suite) */
.hist-chap { padding: 26px clamp(12px, 2vw, 28px) 32px; scroll-margin-top: 120px; }
.hist-chap + .hist-chap { border-top: 1px solid var(--h-line); }
.hist.is-live .hist-chap { animation: histRise .45s ease both; }
.hist.is-live .hist-chap[hidden] { display: none; }
@keyframes histRise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.hist-hero { position: relative; overflow: hidden; border: 1px solid var(--h-line); aspect-ratio: 21 / 8; min-height: 250px; max-width: 100%; background: #02080a; }
.hist-hero .neb { position: absolute; inset: -4%; background: url("/img/bg.webp") center / cover; background-position: var(--bp, 50% 50%); filter: hue-rotate(var(--hue, 0deg)) saturate(1.15) brightness(1.1); }
.hist-hero canvas, .hist-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hist-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(5, 9, 12, .96) 6%, rgba(5, 9, 12, .45) 55%, rgba(5, 9, 12, .1)); }
.hist-hero-text { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; padding: 26px clamp(22px, 4vw, 44px); }
.hist-eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: 12px; letter-spacing: .24em; text-transform: uppercase; font-weight: 500; color: var(--c); text-shadow: 0 0 8px color-mix(in srgb, var(--c) 70%, transparent); }
.hist-eyebrow i { width: 34px; height: 1px; background: var(--c); box-shadow: 0 0 6px var(--c); display: inline-block; }
.home-body .hist-hero h2 { margin: 10px 0 0; font-size: clamp(28px, 5vw, 56px); line-height: 1.08; letter-spacing: .05em; text-wrap: balance; color: #fff; text-shadow: 0 2px 18px rgba(0, 0, 0, .8), 0 0 28px rgba(14, 208, 255, .35); }
.hist-epi { margin: 14px 0 0; max-width: 60ch; font-size: clamp(15px, 1.6vw, 18px); font-style: italic; font-weight: 300; line-height: 1.5; color: rgba(255, 255, 255, .82); padding-left: 16px; border-left: 1px solid var(--h-accent); text-wrap: pretty; }
.hist-placeholder { position: absolute; z-index: 3; top: 16px; right: 40px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--h-muted); border: 1px dashed rgba(14, 208, 255, .4); padding: 4px 12px; background: rgba(5, 9, 12, .55); }

.hist-sep { height: 1px; border: 0; margin: 28px 0 0; background: var(--h-accent); box-shadow: 0 0 5px var(--h-glow); opacity: .8; }
.hist-body { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 44px; margin-top: 30px; align-items: start; }
.hist-side { position: sticky; top: 150px; display: flex; flex-direction: column; gap: 20px; }
.hist-meta { margin: 0; }
.hist-meta dt { font-size: 11px; font-weight: 400; letter-spacing: .18em; text-transform: uppercase; color: var(--h-accent); margin-bottom: 5px; text-shadow: 0 0 5px var(--h-glow); }
.hist-meta dd { margin: 0 0 20px; font-size: 15px; color: var(--h-text); }
.hist-meta dd.big { font-family: var(--font-epic); font-size: 28px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.15; color: #fff; letter-spacing: .02em; }
.hist-meta dd.est-note { font-size: 12px; color: var(--h-muted); margin-top: -14px; }
.hist-tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none !important; margin: 0; padding: 0; }
.hist-tags li { font-size: 11px; padding: 3px 10px; text-transform: uppercase; letter-spacing: .06em; color: rgba(247, 247, 247, .9); border-bottom: 1px solid rgba(14, 207, 255, .4); border-radius: .25rem; background: linear-gradient(to top, rgba(14, 207, 255, .1), rgba(14, 207, 255, .025)); }
.hist-flash { font-size: 12px; color: var(--era-b); border: 1px solid rgba(255, 176, 0, .4); padding: 6px 10px; text-transform: uppercase; letter-spacing: .06em; }

.hist-read { min-width: 0; }
.hist-text p { font-weight: 300; font-size: 18px; line-height: 1.85; margin: 0 0 1.2em; color: var(--h-text); text-wrap: pretty; hyphens: auto; }
.hist-text p:first-child::first-letter { font-family: var(--font-epic); font-weight: 700; font-size: 3.7em; line-height: .8; float: left; padding: 8px 12px 0 0; color: var(--h-accent); text-shadow: 0 0 14px var(--h-glow); }
.hist-text blockquote { margin: 1.6em 0; padding: 4px 0 4px 22px; border-left: 2px solid var(--h-accent); box-shadow: -4px 0 10px -6px var(--h-accent); font-family: var(--font-epic); font-size: 21px; line-height: 1.5; letter-spacing: .02em; color: #fff; max-width: 52ch; }

.hist-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 44px; }
.home-body .hist-pg { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 14px 20px; color: #fff; text-decoration: none; text-shadow: none; border-bottom: 1px solid rgba(14, 207, 255, .4); border-radius: .25rem; background: linear-gradient(to top, rgba(14, 207, 255, .1), rgba(14, 207, 255, .025)); transition: box-shadow .15s; }
.home-body .hist-pg:hover { color: #fff !important; box-shadow: 0 0 6px var(--h-accent); }
.hist-pg.next { text-align: right; align-items: flex-end; }
.hist-pg small { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--h-accent); }
.hist-pg span { font-family: var(--font-epic); font-size: 18px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.hist-pg em { font-style: normal; font-size: 12px; color: var(--h-muted); font-variant-numeric: tabular-nums; }
.hist-pg.vide { visibility: hidden; }
.hist-hint { text-align: center; font-size: 12px; color: var(--h-muted); padding: 0 0 20px; margin: 0; letter-spacing: .06em; }
.hist-hint kbd { font-family: inherit; border: 1px solid var(--h-line); border-bottom-width: 2px; border-radius: 3px; padding: 0 6px; background: rgba(14, 207, 255, .06); color: #fff; }
.hist:not(.is-live) .hist-hint, .hist:not(.is-live) .hist-arrow, .hist:not(.is-live) .hist-counter { display: none; }

@media (max-width: 991px) {
    .home-x { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
    .hist-body { grid-template-columns: 1fr; gap: 20px; }
    .hist-side { position: static; flex-direction: row; flex-wrap: wrap; gap: 6px 28px; }
    .hist-meta dd { margin-bottom: 10px; }
    .hist-meta dd.est-note { margin-top: -6px; }
    .hist-hero { aspect-ratio: 4 / 3.4; }
    .hist-placeholder { right: 36px; top: 14px; }
    .hist-arrow { display: none !important; }
    .hist-pager { grid-template-columns: 1fr; }
    .hist-text p { font-size: 17px; }
    .home-body .brand span { font-size: 21px; }
}
@media (max-width: 560px) {
    .home-x { grid-template-columns: 1fr; }
    .home-body .site-nav { gap: 6px 16px; }
    .home-body .site-nav a { font-size: 15px; }
    .home-body .legal-copy { margin-left: 0; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    .hist.is-live .hist-chap, .gal-slide.is-on, .gal-lb[open] { animation: none; }
    .hist-dot, .hist-tip { transition: none; }
}
