/* =========================================================
   Poudlard : l'Ère oubliée
   Château la nuit, bougies, parchemin et encre.
   ========================================================= */

:root {
  --nuit: #0e0a07;
  --nuit-2: #17110c;
  --texte: #eadfc6;
  --texte-doux: #b3a283;
  --or: #d6a94e;
  --or-pale: #f0d595;
  --cuivre: #cd6f57;
  --trait: rgba(214, 169, 78, .22);

  --papier: #e8dabb;
  --encre: #2a1c11;
  --encre-douce: #5b4530;

  --gryffondor: #7a1c1c;
  --serpentard: #17482c;
  --serdaigle: #1d3373;
  --poufsouffle: #9a6410;

  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  --grain-papier: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .2 0 0 0 0 .1 0 0 0 .16 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  --fibres: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.0125 .04' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .3 0 0 0 0 .12 0 0 0 .35 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)'/%3E%3C/svg%3E");

  --titre: "IM Fell English", "Iowan Old Style", Georgia, serif;
  --titre-sc: "IM Fell English SC", "IM Fell English", Georgia, serif;
  --corps: "EB Garamond", Garamond, Georgia, serif;
  --plume: "Pinyon Script", cursive;
}

/* ---------- Bases ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--corps);
  font-size: 1.18rem;
  line-height: 1.65;
  color: var(--texte);
  background: var(--grain), radial-gradient(ellipse at 50% 0%, #1f160e 0%, var(--nuit) 60%) fixed, var(--nuit);
  background-size: 220px, auto, auto;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--or); text-decoration: none; }
h1, h2, h3 { font-family: var(--titre); font-weight: 400; line-height: 1.15; }
em { font-style: italic; }
.petit { font-size: 1rem; }
.discret { color: var(--texte-doux); }
.centre { text-align: center; }
::selection { background: rgba(214, 169, 78, .35); color: #fff; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-block;
  font-family: var(--titre-sc);
  font-size: 1.05rem;
  letter-spacing: .04em;
  padding: .7em 1.5em .6em;
  color: var(--encre);
  background: linear-gradient(180deg, var(--or-pale), var(--or) 70%);
  border: 1px solid #a57f33;
  border-radius: 3px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .35) inset, 0 6px 18px rgba(0, 0, 0, .45);
  cursor: pointer;
  transition: transform .2s, box-shadow .3s, filter .3s;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.06); box-shadow: 0 0 0 1px rgba(240, 213, 149, .4), 0 0 28px rgba(214, 169, 78, .45); }
.btn--ghost { background: rgba(14, 10, 7, .35); color: var(--or-pale); border-color: rgba(214, 169, 78, .55); box-shadow: none; }
.btn--small { font-size: .9rem; padding: .45em 1em .38em; }

/* ---------- Menu ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: .7rem clamp(1rem, 4vw, 2.5rem);
  background: linear-gradient(180deg, rgba(14, 10, 7, .95), rgba(14, 10, 7, .8));
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--trait);
}
.nav__logo { font-family: var(--titre); font-size: 1.35rem; color: var(--or-pale); font-style: italic; }
.nav__links { display: flex; align-items: center; gap: 1.6rem; }
.nav__links a:not(.btn) { font-family: var(--titre-sc); color: var(--texte); font-size: 1.05rem; position: relative; }
.nav__links a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 1px;
  background: var(--or); transform: scaleX(0); transition: transform .3s;
}
.nav__links a:not(.btn):hover::after, .nav__links a[aria-current="page"]::after { transform: scaleX(1); }
.nav__links a[aria-current="page"] { color: var(--or-pale); }
.nav__toggle { display: none; background: none; border: 0; color: var(--or); font-family: var(--titre-sc); font-size: 1.1rem; cursor: pointer; }

/* ---------- Bannière d'accueil ---------- */
.hero {
  position: relative;
  min-height: 94vh;
  display: grid; place-items: center;
  text-align: center;
  padding: 5rem 1.25rem 7rem;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(ellipse at 50% 45%, rgba(14, 10, 7, .5), rgba(14, 10, 7, .88) 75%),
    linear-gradient(180deg, rgba(14, 10, 7, .55), rgba(14, 10, 7, .3) 45%, var(--nuit) 100%),
    url("images/lore-intro.jpg") center 30% / cover no-repeat,
    var(--nuit);
}
.hero__contenu { position: relative; z-index: 2; max-width: 780px; }
.hero__surtitre { font-family: var(--titre-sc); letter-spacing: .18em; font-size: .95rem; color: var(--cuivre); }
.hero h1 {
  font-size: clamp(3.4rem, 12vw, 7.5rem);
  color: var(--or-pale);
  margin: .15em 0 .1em;
  background: linear-gradient(100deg, #b98a35 20%, #fff0c4 45%, #d6a94e 55%, #b98a35 80%);
  background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 3px 14px rgba(0, 0, 0, .9)) drop-shadow(0 0 30px rgba(214, 169, 78, .25));
  animation: reflet 9s ease-in-out infinite;
}
@keyframes reflet { 0%, 100% { background-position: 100% 0; } 50% { background-position: 0 0; } }
.hero h1 span {
  display: flex; align-items: center; justify-content: center; gap: .8em;
  font-family: var(--corps); font-size: .2em; font-weight: 500; text-transform: uppercase;
  letter-spacing: .42em; margin-top: .55em;
  -webkit-text-fill-color: var(--or-pale); color: var(--or-pale);
}
.hero h1 span::before, .hero h1 span::after { /* petits traits de part et d'autre */
  content: ""; width: 2.2em; height: 1px; background: currentColor; opacity: .6;
}
.hero__texte { font-size: 1.35rem; line-height: 1.55; color: var(--texte); max-width: 520px; margin: 1.6rem auto 0; text-shadow: 0 2px 10px #000; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; margin: 2.4rem 0 1.6rem; }
.hero__etat { font-size: 1.02rem; color: var(--texte-doux); text-shadow: 0 1px 6px #000; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--cuivre); margin-right: .45em; vertical-align: middle; box-shadow: 0 0 8px var(--cuivre); animation: pulse 2.4s infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* Bougies flottantes (créées par magie.js) */
.bougies { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.bougie {
  --h: 34px;
  position: absolute;
  width: calc(var(--h) / 4); height: var(--h);
  background: linear-gradient(90deg, #a8916a, #e8d6ae 45%, #b9a27a);
  box-shadow: 0 -6px 14px rgba(255, 190, 90, .25);
  border-radius: 2px 2px 1px 1px;
  animation: flotter 8s ease-in-out infinite alternate;
}
.bougie::before { /* flamme */
  content: ""; position: absolute; left: 50%; bottom: 100%;
  width: 7px; height: 13px; margin-left: -3.5px; margin-bottom: 1px;
  border-radius: 50% 50% 50% 50% / 65% 65% 35% 35%;
  background: radial-gradient(ellipse at 50% 75%, #fff 0 18%, #ffd36b 40%, #ff9a2e 70%, transparent 72%);
  transform-origin: 50% 100%;
  animation: vaciller .14s infinite alternate;
}
.bougie::after { /* halo */
  content: ""; position: absolute; left: 50%; bottom: 100%;
  width: 70px; height: 70px; margin: 0 0 -28px -35px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 196, 100, .35), transparent 65%);
  animation: lueur 3s ease-in-out infinite alternate;
}
@keyframes flotter { from { transform: translateY(0) rotate(-1deg); } to { transform: translateY(-22px) rotate(1deg); } }
@keyframes vaciller { from { transform: scaleY(1) skewX(-2deg); } to { transform: scaleY(1.12) skewX(3deg); } }
@keyframes lueur { from { opacity: .7; } to { opacity: 1; } }

/* ---------- Sections ---------- */
.section { position: relative; padding: clamp(4rem, 9vw, 7rem) clamp(1rem, 4vw, 2rem); max-width: 1160px; margin: 0 auto; }
.section--sombre { max-width: none; background: rgba(0, 0, 0, .28); border-block: 1px solid var(--trait); }
.section--sombre > * { max-width: 1160px; margin-left: auto; margin-right: auto; }
.surtitre { text-align: center; font-family: var(--titre-sc); letter-spacing: .2em; font-size: .9rem; color: var(--cuivre); margin-bottom: .4rem; }
.titre { text-align: center; color: var(--or-pale); font-size: clamp(2.1rem, 5vw, 3.2rem); }
.chapeau { text-align: center; font-style: italic; color: var(--texte-doux); max-width: 620px; margin: .9rem auto 0; }

.fleuron + .chapeau { margin: -1.6rem auto 3rem; }

/* Trait décoratif sous les titres */
.fleuron {
  border: 0; height: 22px; width: min(280px, 70%); margin: 1.1rem auto 2.8rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 280 22'%3E%3Cg fill='none' stroke='%23d6a94e' stroke-width='1'%3E%3Cpath d='M0 11h104c6 0 8-7 13-7s5 7 0 7'/%3E%3Cpath d='M280 11H176c-6 0-8-7-13-7s-5 7 0 7'/%3E%3C/g%3E%3Cpath d='M140 2l3 9-3 9-3-9z' fill='%23d6a94e'/%3E%3Ccircle cx='127' cy='11' r='1.8' fill='%23d6a94e'/%3E%3Ccircle cx='153' cy='11' r='1.8' fill='%23d6a94e'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---------- Parchemin ---------- */
.parchemin {
  position: relative;
  color: var(--encre);
  background: var(--fibres), var(--grain-papier), radial-gradient(ellipse at 50% 40%, #f4e9d0 0%, var(--papier) 55%, #cdb88e 100%);
  background-size: 400px, 220px, auto;
  border-radius: 2px;
  box-shadow:
    inset 0 0 70px rgba(110, 70, 25, .45),
    inset 0 0 8px rgba(80, 50, 20, .4),
    0 18px 50px rgba(0, 0, 0, .55);
}
.parchemin a { color: #7a3d14; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.parchemin strong { color: #3d2410; }

/* ---------- La Gazette (accueil) ---------- */
.gazette { max-width: 1060px; margin: 0 auto; padding: clamp(1.5rem, 4vw, 3rem); transform: rotate(-.4deg); }
.gazette__tete { text-align: center; border-bottom: 3px double var(--encre); padding-bottom: .6rem; }
.gazette__nom { font-family: var(--titre); font-size: clamp(2.2rem, 7vw, 4.4rem); letter-spacing: .02em; color: var(--encre); }
.gazette__infos {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: .3rem 1rem;
  font-family: var(--titre-sc); font-size: .9rem; color: var(--encre-douce);
  border-top: 1px solid var(--encre); margin-top: .5rem; padding-top: .35rem;
}
.gazette__une { font-family: var(--titre); text-align: center; font-size: clamp(1.6rem, 4vw, 2.5rem); margin: 1.6rem 0 .4rem; }
.gazette__sous-titre { text-align: center; font-style: italic; color: var(--encre-douce); margin-bottom: 1.8rem; }
.gazette__colonnes { display: grid; grid-template-columns: repeat(3, 1fr); }
.gazette__colonnes article { padding: 0 1.4rem; }
.gazette__colonnes article + article { border-left: 1px solid rgba(42, 28, 17, .35); }
.gazette__colonnes article:first-child { padding-left: 0; }
.gazette__colonnes article:last-child { padding-right: 0; }
.gazette h3 { font-size: 1.45rem; margin-bottom: .5rem; }
.gazette article p { font-size: 1.12rem; text-align: justify; hyphens: auto; }
.gazette article:first-child p:first-of-type::first-letter {
  float: left; font-family: var(--titre); font-size: 3.6rem; line-height: .8; margin: .3rem .45rem 0 0; color: #6e1d14;
}
.gazette__citation { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid rgba(42, 28, 17, .35); text-align: center; font-style: italic; font-size: 1.3rem; }

/* ---------- Maisons ---------- */
.maisons { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; }
.maison {
  --c: #333; --liseré: var(--or);
  position: relative;
  padding: 1.6rem 1.3rem;
  text-align: center;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--c), rgba(0, 0, 0, .6));
  border: 1px solid rgba(255, 255, 255, .07);
  border-top: 3px solid var(--liseré);
  overflow: hidden;
  transition: transform .4s, box-shadow .4s;
}
.maison:hover { transform: translateY(-6px); box-shadow: 0 14px 40px rgba(0, 0, 0, .6), 0 0 40px color-mix(in srgb, var(--c) 70%, transparent); }
.maison h3 { font-size: 1.7rem; margin-bottom: .5rem; }
.maison__blason { font-style: italic; opacity: .9; }
.maison__fantome { font-size: 1rem; opacity: .75; margin-top: .7rem; }
.maison--gryffondor { --c: var(--gryffondor); }
.maison--serpentard { --c: var(--serpentard); --liseré: #c9c9c9; }
.maison--serdaigle { --c: var(--serdaigle); --liseré: #b6925b; }
.maison--poufsouffle { --c: var(--poufsouffle); --liseré: #1b1b1b; }
.maison--photo {
  min-height: 440px;
  display: flex; flex-direction: column; justify-content: flex-end;
  background:
    linear-gradient(180deg, transparent 28%, rgba(0, 0, 0, .55) 58%, var(--c) 100%),
    var(--img) center 15% / cover no-repeat,
    var(--c);
}
.maison--photo h3, .maison--photo p { text-shadow: 0 2px 8px rgba(0, 0, 0, .95); }

/* Statuts de sang */
.sang { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 3.5rem; }
.sang div { padding-top: 1rem; border-top: 1px solid var(--trait); }
.sang strong { display: block; font-family: var(--titre); font-size: 1.4rem; font-weight: 400; color: var(--or-pale); margin-bottom: .2rem; }
.sang span { color: var(--texte-doux); }

/* ---------- Registre des rôles ---------- */
.registre { max-width: 980px; margin: 0 auto; padding: clamp(1.5rem, 4vw, 3rem); transform: rotate(.3deg); }
.registre__colonnes { display: grid; grid-template-columns: 1.15fr 1fr; gap: 2.5rem; }
.registre h3 { font-size: 1.5rem; border-bottom: 1px solid var(--encre); padding-bottom: .3rem; margin-bottom: .6rem; }
.registre ul { list-style: none; }
.registre li { display: flex; align-items: baseline; gap: .5rem; padding: .3rem 0; }
.registre li::after { content: ""; order: 1; flex: 1; border-bottom: 1px dotted rgba(42, 28, 17, .5); transform: translateY(-4px); }
.registre li .places { order: 2; font-style: italic; color: #7a3d14; white-space: nowrap; }
.registre li .complet { order: 2; font-family: var(--titre-sc); font-size: .95rem; color: #6e1d14; border: 1px solid #6e1d14; padding: 0 .4rem; transform: rotate(-3deg); }
.registre__note { margin-top: 1.2rem; font-size: 1.05rem; color: var(--encre-douce); }
.registre__matieres { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid rgba(42, 28, 17, .3); }
.registre__matieres p { font-size: 1.08rem; }

/* ---------- Étapes ---------- */
.etapes { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; counter-reset: e; }
.etapes li { counter-increment: e; position: relative; padding-top: 3.6rem; }
.etapes li::before {
  content: counter(e, upper-roman);
  position: absolute; top: 0; left: 0;
  font-family: var(--titre); font-size: 2.6rem; color: var(--or); opacity: .85;
}
.etapes h3 { font-size: 1.35rem; color: var(--or-pale); margin-bottom: .3rem; }
.etapes p { color: var(--texte-doux); font-size: 1.08rem; }
.etapes a { text-decoration: underline; text-underline-offset: 3px; }
.actions-centre { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; margin-top: 3rem; }

/* ---------- Pied de page ---------- */
.footer { text-align: center; padding: 4.5rem 1.25rem 3.5rem; color: var(--texte-doux); border-top: 1px solid var(--trait); }
.footer__nom { font-family: var(--titre); font-style: italic; color: var(--or-pale); font-size: 1.5rem; }
.footer p { max-width: 560px; margin: .5rem auto 0; }
.signature { font-family: var(--plume); font-size: 2rem; color: var(--or); margin-top: 1rem !important; }
.lumos-btn {
  margin-top: 1.6rem; background: none; border: 0; cursor: pointer;
  font-family: var(--corps); font-style: italic; font-size: 1rem; color: var(--texte-doux);
}
.lumos-btn:hover { color: var(--or-pale); }
.mentions { font-size: .9rem; opacity: .6; margin-top: 1.5rem !important; }

/* ---------- Effets magiques ---------- */
.reveal { opacity: 0; filter: blur(6px); transform: translateY(18px); transition: opacity 1.1s ease, filter 1.1s ease, transform 1.1s ease; }
.reveal.visible { opacity: 1; filter: none; transform: none; }
.gazette.reveal.visible { transform: rotate(-.4deg); }
.registre.reveal.visible { transform: rotate(.3deg); }

.etincelle {
  position: fixed; z-index: 100; pointer-events: none;
  width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%;
  background: radial-gradient(circle, #fff 0 25%, #ffe29a 45%, transparent 70%);
  box-shadow: 0 0 6px 1px rgba(255, 214, 120, .8);
  animation: poussiere .9s ease-out forwards;
}
@keyframes poussiere {
  to { transform: translate(var(--dx), var(--dy)) scale(.2); opacity: 0; }
}

.halo { position: fixed; inset: 0; z-index: 50; pointer-events: none; opacity: 0; transition: opacity .8s;
  background: radial-gradient(circle 260px at var(--x, 50%) var(--y, 40%), rgba(255, 226, 160, .16), transparent 70%); }
body.lumos .halo { opacity: 1; }
body.lumos { --texte-doux: #d2c3a3; }
body.lumos .hero { filter: brightness(1.35); transition: filter .8s; }

.murmure {
  position: fixed; left: 50%; bottom: 12%; z-index: 120; pointer-events: none;
  font-family: var(--plume); font-size: 2.6rem; color: var(--or-pale);
  text-shadow: 0 0 20px rgba(214, 169, 78, .8);
  animation: murmure 2.2s ease forwards;
}
@keyframes murmure {
  0% { opacity: 0; transform: translate(-50%, 10px); }
  20%, 70% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, -14px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; filter: none; transform: none; }
}

/* =========================================================
   Pages intérieures
   ========================================================= */
.page-tete {
  text-align: center;
  padding: clamp(4rem, 9vw, 6rem) 1.25rem 3.5rem;
  background: radial-gradient(ellipse at 50% 0%, rgba(214, 169, 78, .16), transparent 65%);
}
.page-tete h1 { font-size: clamp(2.8rem, 8vw, 4.6rem); color: var(--or-pale); margin: .2em 0 .3em; }
.page-tete p.chapeau { font-size: 1.3rem; }

/* ---------- Lore ---------- */
.manuscrit { max-width: 760px; margin: 0 auto; padding: clamp(1.8rem, 5vw, 3.4rem) clamp(1.4rem, 5vw, 3.6rem); font-size: 1.28rem; }
.manuscrit p + p { margin-top: 1rem; }
.lettrine::first-letter { float: left; font-family: var(--titre); font-size: 4.6rem; line-height: .78; margin: .35rem .55rem 0 0; color: #6e1d14; }
.figure { max-width: 1040px; margin: 3.5rem auto 0; }
.figure img { width: 100%; height: auto; border: 1px solid var(--trait); border-radius: 2px; box-shadow: 0 25px 60px rgba(0, 0, 0, .7); }
.figure figcaption { text-align: center; font-style: italic; color: var(--texte-doux); margin-top: .8rem; font-size: 1.02rem; }

.maisons--lore .maison { text-align: left; padding: 0 0 1.4rem; }
.maisons--lore .maison h3 { padding: 1.1rem 1.4rem 0; }
.maison__img { aspect-ratio: 4 / 5; overflow: hidden; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.maison__img img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; transition: transform .8s; }
.maison:hover .maison__img img { transform: scale(1.05); }
.maison dl { padding: 0 1.4rem; display: grid; grid-template-columns: auto 1fr; gap: .25rem .8rem; font-size: 1.05rem; }
.maison dt { font-family: var(--titre-sc); font-size: .9rem; opacity: .7; padding-top: .15rem; }

.section--ombre { background: radial-gradient(ellipse at 50% 100%, rgba(23, 72, 44, .28), transparent 70%), #0a0705; }
.factions { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.faction { padding: 2rem; border-radius: 3px; }
.faction h3 { font-size: 1.8rem; margin-bottom: .6rem; }
.faction p { color: var(--texte-doux); }
.faction--sombre { background: linear-gradient(135deg, rgba(23, 72, 44, .4), rgba(0, 0, 0, .6)); border: 1px solid rgba(143, 214, 164, .15); }
.faction--sombre h3 { color: #9fd8ae; }
.faction--clair { background: linear-gradient(135deg, rgba(214, 169, 78, .14), rgba(0, 0, 0, .4)); border: 1px solid var(--trait); }
.faction--clair h3 { color: var(--or-pale); }
.presage { text-align: center; font-style: italic; font-size: 1.35rem; color: var(--texte-doux); margin-top: 3rem; }

.frise { list-style: none; display: grid; grid-template-columns: repeat(7, 1fr); position: relative; margin-top: .5rem; }
.frise::before { content: ""; position: absolute; top: 1.7rem; left: 7%; right: 7%; height: 1px; background: linear-gradient(90deg, transparent, var(--or), transparent); }
.frise li { position: relative; display: flex; flex-direction: column; align-items: center; gap: .3rem; text-align: center; }
.frise b {
  display: grid; place-items: center; width: 3.4rem; height: 3.4rem; border-radius: 50%;
  font-family: var(--titre); font-weight: 400; font-size: 1.3rem;
  background: var(--nuit); border: 1px solid var(--or); color: var(--or-pale);
}
.frise span { color: var(--texte-doux); font-size: 1rem; }
.frise i { font-size: .95rem; color: var(--cuivre); }
.frise .cle b { background: var(--or); color: var(--encre); box-shadow: 0 0 22px rgba(214, 169, 78, .55); }
.apres-frise { text-align: center; max-width: 620px; margin: 2.5rem auto 0; font-size: 1.25rem; }
.apres-frise strong { color: var(--or-pale); font-weight: 500; }

.metiers { text-align: center; font-family: var(--titre); font-size: clamp(1.4rem, 3.5vw, 2rem); line-height: 1.9; color: var(--texte); max-width: 780px; margin: 0 auto; }
.metiers span { color: var(--or); padding: 0 .4rem; }
.metiers em { color: #9fd8ae; }

/* ---------- Règlement ---------- */
.regles-grille { display: grid; grid-template-columns: 230px 1fr; gap: 3.5rem; max-width: 1100px; margin: 0 auto; padding: 3rem clamp(1rem, 4vw, 2rem) 5rem; }
.sommaire { position: sticky; top: 5.5rem; align-self: start; }
.sommaire p { font-family: var(--titre-sc); color: var(--or); margin-bottom: .6rem; }
.sommaire ol { list-style: none; counter-reset: s; border-left: 1px solid var(--trait); }
.sommaire li { counter-increment: s; }
.sommaire a { display: block; padding: .3rem 0 .3rem 1rem; color: var(--texte-doux); }
.sommaire a::before { content: counter(s, upper-roman) ". "; color: var(--cuivre); }
.sommaire a:hover { color: var(--or-pale); }
.regle { padding: 2.2rem 0; border-bottom: 1px solid var(--trait); scroll-margin-top: 5.5rem; }
.regle:first-child { padding-top: 0; }
.regle h2 { font-size: 2rem; color: var(--or-pale); margin-bottom: .8rem; }
.regle h2 small { font-size: .7em; color: var(--cuivre); margin-right: .35em; }
.regle__intro { font-style: italic; color: var(--texte-doux); margin-bottom: 1rem; }
.regle ol { padding-left: 1.4rem; }
.regle li { margin-bottom: .55rem; }
.regle li::marker { color: var(--or); font-family: var(--titre); }
.regle strong { color: var(--or-pale); font-weight: 500; }
.glossaire { display: grid; gap: 1rem; }
.glossaire dt { font-family: var(--titre); font-size: 1.35rem; color: var(--or-pale); }
.glossaire dd { color: var(--texte-doux); padding-left: 1rem; border-left: 1px solid var(--trait); }
.sanctions { list-style: none; padding: 0 !important; }
.sanctions li { display: grid; grid-template-columns: 210px 1fr; gap: 1rem; padding: .7rem 0; border-bottom: 1px dashed var(--trait); }
.sanctions b { font-family: var(--titre); font-weight: 400; font-size: 1.2rem; color: var(--or-pale); }
.sanctions li:last-child b { color: var(--cuivre); }
.regles__fin { font-family: var(--plume); font-size: 2.2rem; color: var(--or); text-align: right; margin-top: 2rem; }

/* ---------- Whitelist : la lettre ---------- */
.etat-wl { display: inline-block; margin-top: 1rem; font-style: italic; }
.etat-wl.is-soon { color: var(--cuivre); }
.etat-wl.is-open { color: #9fd8ae; }
.etat-wl.is-open .dot { background: #9fd8ae; box-shadow: 0 0 8px #9fd8ae; }

.lettre { max-width: 820px; margin: 0 auto; padding: clamp(3.5rem, 7vw, 5rem) clamp(1.3rem, 6vw, 4rem) 3rem; }
.sceau {
  position: absolute; top: -38px; left: 50%; transform: translateX(-50%) rotate(-8deg);
  width: 86px; height: 86px;
  display: grid; place-items: center;
  border-radius: 48% 52% 46% 54% / 52% 47% 53% 48%;
  background: radial-gradient(circle at 38% 32%, #c4413a, #8a1c19 55%, #5c0f0d);
  box-shadow: 0 6px 14px rgba(0, 0, 0, .55), inset 0 0 0 7px rgba(0, 0, 0, .12), inset 2px 3px 6px rgba(255, 255, 255, .25);
  font-family: var(--titre); font-size: 2.6rem; color: rgba(60, 8, 6, .85);
  text-shadow: 1px 1px 0 rgba(255, 140, 120, .35);
}
.lettre__entete { text-align: center; margin-bottom: 2rem; }
.lettre__entete h2 { font-size: clamp(1.8rem, 5vw, 2.6rem); }
.lettre__entete p { font-style: italic; color: var(--encre-douce); }
.lettre__intro { font-size: 1.22rem; margin-bottom: 2rem; }
.lettre fieldset { border: 0; margin-bottom: 2.2rem; }
.lettre legend { font-family: var(--titre); font-size: 1.6rem; margin-bottom: .8rem; }
.lettre legend small { font-family: var(--corps); font-style: italic; font-size: .65em; color: var(--encre-douce); }
.lettre label { display: block; margin-bottom: 1.1rem; font-size: 1.12rem; color: var(--encre); }
.lettre .requis::after { content: " *"; color: #8a1c19; }
.ligne { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.lettre input:not([type="checkbox"]), .lettre select, .lettre textarea {
  display: block; width: 100%; margin-top: .2rem;
  padding: .45rem .2rem;
  font: inherit; font-size: 1.12rem; font-style: italic; color: #1e3a6e;
  background: transparent;
  border: 0; border-bottom: 1px solid rgba(42, 28, 17, .45);
  border-radius: 0;
  transition: border-color .2s, background .2s;
}
.lettre textarea {
  resize: vertical; line-height: 2rem; padding-top: .3rem;
  background: repeating-linear-gradient(transparent 0 calc(2rem - 1px), rgba(42, 28, 17, .2) calc(2rem - 1px) 2rem);
  background-attachment: local;
  border: 0;
}
.lettre select { cursor: pointer; }
.lettre select option { background: var(--papier); color: var(--encre); font-style: normal; }
.lettre :is(input, select, textarea):focus { outline: none; border-color: #7a3d14; background-color: rgba(255, 255, 255, .18); }
.lettre .invalide { border-color: #a3271f !important; background-color: rgba(163, 39, 31, .08) !important; }
.compteur { float: right; font-size: .95rem; font-style: italic; color: var(--encre-douce); }
.compteur.ok { color: #2f6b3d; }
.coche { display: flex !important; gap: .7rem; align-items: flex-start; }
.coche input { margin-top: .4rem; width: 1.05rem; height: 1.05rem; accent-color: #7a3d14; flex: none; }
.coche input.invalide { outline: 2px solid #a3271f; outline-offset: 2px; }
.erreur { margin: 1rem 0; padding: .7rem 1rem; border-left: 3px solid #a3271f; background: rgba(163, 39, 31, .1); color: #7d1e17; }
.lettre__actions { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; margin-top: 1.5rem; }
.lettre__actions .btn--ghost { color: var(--encre); border-color: rgba(42, 28, 17, .4); background: transparent; }
.lettre__signature { text-align: right; margin-top: 2.5rem; }
.lettre__signature span { display: block; font-family: var(--plume); font-size: 2rem; color: var(--encre); }

.resultat { max-width: 820px; margin: 3rem auto 0; padding: 2rem; border: 1px solid var(--trait); border-radius: 3px; background: rgba(0, 0, 0, .3); scroll-margin-top: 6rem; }
.resultat h3 { font-size: 1.8rem; color: var(--or-pale); text-align: center; }
.resultat > p { text-align: center; color: var(--texte-doux); margin: .4rem 0 1rem; }
.resultat textarea { width: 100%; padding: 1rem; font-family: Consolas, monospace; font-size: .9rem; color: var(--texte); background: rgba(0, 0, 0, .4); border: 1px solid var(--trait); border-radius: 2px; resize: vertical; }
.resultat .lettre__actions { justify-content: center; }

/* =========================================================
   Écrans moyens et téléphones
   ========================================================= */
@media (max-width: 1000px) {
  .maisons { grid-template-columns: repeat(2, 1fr); }
  .etapes { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  .nav__toggle { display: block; }
  .nav__links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 1.1rem; padding: 1.6rem;
    background: var(--nuit-2); border-bottom: 1px solid var(--trait);
  }
  .nav__links.is-open { display: flex; }
  .hero {
    background:
      linear-gradient(180deg, rgba(14, 10, 7, .6), rgba(14, 10, 7, .72) 60%, var(--nuit) 100%),
      url("images/lore-intro.jpg") 62% 30% / cover no-repeat,
      var(--nuit);
  }
  .gazette, .registre, .gazette.reveal.visible, .registre.reveal.visible { transform: none; }
  .gazette__colonnes { grid-template-columns: 1fr; }
  .gazette__colonnes article { padding: 1.2rem 0 0 !important; }
  .gazette__colonnes article + article { border-left: 0; border-top: 1px solid rgba(42, 28, 17, .35); margin-top: 1.2rem; }
  .registre__colonnes, .sang, .factions, .ligne { grid-template-columns: 1fr; }
  .ligne { gap: 0; }
  .frise { grid-template-columns: repeat(4, 1fr); row-gap: 1.5rem; }
  .frise::before { display: none; }
  .regles-grille { grid-template-columns: 1fr; gap: 2rem; }
  .sommaire { position: static; }
  .sanctions li { grid-template-columns: 1fr; gap: 0; }
}
@media (max-width: 520px) {
  .maisons, .etapes { grid-template-columns: 1fr; }
  .maison--photo { min-height: 400px; }
}
