:root {
  color-scheme: dark;
  --ink: #f5e9d0;
  --muted: #d3c1a8;
  --gold: #edcb85;
  --line: #806641;
  --base: #141214;
  --display: Georgia, 'Times New Roman', serif;
  --hero-desktop: url('assets/fond-accueil-sans-bordure.jpg');
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--base); color: var(--ink); font: 1rem/1.55 system-ui, sans-serif; }
a { color: inherit; text-underline-offset: .23em; }
a:hover, button.text-button:hover { color: var(--gold); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid #ffe29b; outline-offset: 5px; }
.skip { position: absolute; top: .5rem; left: .5rem; transform: translateY(-200%); z-index: 3; padding: .5rem; background: var(--base); }
.skip:focus { transform: none; }
h1, h2, h3, legend { font-family: var(--display); font-weight: 700; line-height: 1.08; text-wrap: balance; }
h1 { font-size: clamp(2.75rem, 7vw, 6.5rem); margin: .25em 0; }
h2, legend { font-size: clamp(2rem, 4.5vw, 3.15rem); margin: 0 0 .6em; }
h3 { font-size: 1.45rem; }
.masthead { min-height: 4.6rem; display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .6rem max(4vw, 1rem); border-bottom: 1px solid var(--line); background: #171316; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font: bold clamp(1rem, 2.6vw, 1.6rem)/1 var(--display); text-decoration: none; color: var(--gold); }
.brand img { width: clamp(2rem, 5vw, 3rem); height: 3.3rem; object-fit: contain; }
.masthead nav { display: flex; align-items: center; gap: clamp(1rem, 4vw, 3rem); font-size: .9rem; }
.masthead nav a { padding-block: .6rem; }
.hero, .signup-banner {
  background: linear-gradient(0deg, #161219, transparent 58%), radial-gradient(ellipse at center, #14121bdb 5%, #1a131a38 65%, #1a131a14 90%), var(--hero-desktop) center 48% / cover no-repeat, #30262b;
}
.hero { position: relative; display: grid; place-items: center; min-height: min(48rem, 83svh); padding: clamp(3rem, 10vh, 7rem) 1.15rem 5.5rem; text-align: center; border-bottom: 1px solid var(--line); }
.hero-content { max-width: 66rem; }
.eyebrow { color: var(--gold); letter-spacing: .14em; text-transform: uppercase; font-size: .76rem; font-weight: 750; }
.hero-content > p:not([class]), .history > p:not([class]) { font-size: clamp(1.05rem, 2.2vw, 1.3rem); max-width: 36rem; margin: 0 auto 1.65rem; text-wrap: pretty; }
.button { display: inline-block; border: 1px solid #f5d188; background: linear-gradient(#f1d18c, #bf8b38); color: #211508; padding: .78rem 1.45rem; border-radius: 4px; font: 700 clamp(1.05rem, 2.3vw, 1.34rem)/1.25 var(--display); text-align: center; text-decoration: none; box-shadow: 0 3px 0 #5d401f, 0 8px 25px #0007; cursor: pointer; }
.button:hover { color: #211508; background: #f5d391; }
.platforms { margin: 1rem 0 0; color: var(--muted); font-size: .84rem; }
.hero-link { position: absolute; bottom: 1.4rem; color: var(--muted); font-size: .88rem; }
.hero-link:hover { color: var(--gold); }
.content-section, .signup { max-width: 74rem; margin-inline: auto; padding: clamp(2rem, 6vw, 5rem) clamp(1rem, 4vw, 3rem); text-align: center; }
.pillars, .armies, .characters { display: grid; gap: 1rem; }
.pillars { grid-template-columns: repeat(3, 1fr); }
.pillars article, .card { border: 1px solid var(--line); background: linear-gradient(155deg, #2d2425, #18151a); border-radius: 6px; padding: 1.3rem; }
.pillars span { font-size: 1.9rem; color: var(--gold); }
.pillars h3 { margin: .45em 0; }
.pillars p, .history p:not(.eyebrow) { color: var(--muted); }
.history { text-align: center; padding: 3.5rem 1rem 4rem; background: #20191d; border-block: 1px solid #503d30; }
footer { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.4rem; padding: 1.7rem 1rem; color: var(--muted); font-size: .82rem; }
.signup-banner { text-align: center; padding: 3rem 1rem; border-bottom: 1px solid #503d30; }
.signup-banner h1 { font-size: clamp(2.4rem, 6vw, 4.8rem); }
.signup { padding-top: 1.4rem; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); max-width: 36rem; padding: 0; margin: 0 auto 2.3rem; list-style: none; gap: .4rem; }
.steps li { padding: .55rem .3rem; font-size: .85rem; border-bottom: 2px solid #68503c; color: var(--muted); }
.steps [aria-current] { border-color: var(--gold); color: var(--gold); font-weight: bold; }
.characters { max-width: 32rem; margin: auto; grid-template-columns: repeat(2, 1fr); }
.armies { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { min-width: 0; cursor: pointer; display: flex; flex-direction: column; gap: .5rem; }
.card strong { font: bold 1.45rem/1.1 var(--display); }
.card img { width: 100%; aspect-ratio: 4 / 5; border-radius: 3px; object-fit: cover; object-position: center top; }
.card small { color: var(--gold); }
.card:hover { outline: 2px solid var(--gold); outline-offset: -2px; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { margin: 0 auto; }
.form-intro { color: var(--muted); margin: .6rem 0 1.2rem; }
.actions { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 1.6rem; }
.text-button { background: none; border: 0; text-decoration: underline; cursor: pointer; padding: .65rem 0; }
@media (max-width: 720px) {
  .masthead { flex-wrap: wrap; }
  .masthead nav { gap: .9rem; }
  .hero { min-height: min(43rem, 82svh); }
  .pillars { grid-template-columns: 1fr; }
  .armies { grid-template-columns: 1fr; gap: .7rem; }
  .card { padding: .85rem; }
  .actions { flex-direction: column-reverse; }
  .actions .button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.brand img { height: auto; }
.account { text-align: left; max-width: 31rem; margin: 0 auto; }
.account h2 { text-align: center; }
.account-panel { padding: clamp(1rem, 4vw, 2rem); background: #231d21; border: 1px solid var(--line); border-radius: 6px; }
.field { display: grid; gap: .3rem; margin-bottom: 1rem; }
.field input { width: 100%; min-height: 2.8rem; padding: .55rem .7rem; background: #151216; border: 1px solid #9c805a; border-radius: 4px; color: var(--ink); font: inherit; }
.field small, .selection { color: var(--muted); }
.check { display: flex; align-items: baseline; gap: .45rem; margin: .85rem 0; }
.check input { accent-color: var(--gold); width: 1rem; height: 1rem; flex: 0 0 1rem; }
.account .button { width: 100%; margin-top: .85rem; }
.account details { margin-bottom: 1rem; }
.account summary { cursor: pointer; }
.account details .field { margin-top: .55rem; }
.selection { text-align: center; margin: -1rem 0 1.25rem; }
.back-link { display: inline-block; margin-top: 1rem; }

.discovery-intro { max-width: 44rem; margin: 0 auto 2.3rem; color: var(--muted); }
 .chapter { margin: 2.6rem 0; }
.chapter > h3 { font-size: clamp(1.5rem, 3.5vw, 2.15rem); margin: 0 0 1rem; }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.game-card { overflow: hidden; border-radius: 6px; border: 1px solid var(--line); text-align: left; background: #231c20; }
.game-card img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.game-card div { padding: 1rem; }
.game-card h4 { font: bold 1.3rem/1.15 var(--display); margin: 0; }
.game-card p, .capture-note { color: var(--muted); }
.game-card p { margin: .55rem 0 0; }
.capture-note { font-size: .85rem; }
.help-panel { max-width: 42rem; text-align: left; }
.help-panel section { padding: 1.4rem; margin: 0 0 1.4rem; border: 1px solid var(--line); border-radius: 6px; background: #231c20; scroll-margin-top: 1rem; }
.help-panel h2 { font-size: 2rem; }
.characters { max-width: 40rem; }
.characters .card, .army-card { padding: 0; overflow: hidden; }
.characters .card strong { width: 100%; padding: .6rem; }
.army-card span { font-size: .93rem; }
#army-step .actions { justify-content: flex-start; align-items: flex-start; }
@media (max-width: 720px) {
  .feature-grid { grid-template-columns: 1fr; }
  .masthead nav { flex-wrap: wrap; }
  .hero { background-position: center, center, 46% center; }
}

.masthead {
  padding: .75rem clamp(1rem, 5vw, 5rem);
  background: linear-gradient(180deg, #231e22, #171519);
  border-color: #5b4935;
}
.brand { gap: .75rem; font-weight: 600; letter-spacing: .045em; }
.brand img { width: 3.1rem; border-radius: .32rem; }
.brand span { text-shadow: 0 2px 7px #080609; }
.masthead nav { gap: clamp(.35rem, 1.1vw, 1.15rem); }
.masthead nav a { text-decoration: none; border-radius: 5px; padding: .65rem .65rem; }
.masthead nav a:hover { background: #e9c38316; }
.masthead .nav-login { border: 1px solid #96734b; color: var(--gold); padding-inline: .85rem; }
.hero-art { display: none; }
.characters { max-width: 34rem; }
.characters .card, .army-card { border-color: #a58659; background: linear-gradient(160deg, #352a24, #1c1820); box-shadow: 0 10px 24px #08060970; }
.signup-progress { max-width: 36rem; margin: 0 auto; text-align: left; }
.signup-progress label { display: block; color: var(--gold); font-size: .85rem; margin-bottom: .35rem; }
.signup-progress progress { display: block; width: 100%; height: .5rem; accent-color: #dfb465; border: 0; border-radius: 1rem; overflow: hidden; background: #443529; }
.signup-progress progress::-webkit-progress-bar { background: #443529; }
.signup-progress progress::-webkit-progress-value { background: linear-gradient(90deg, #ae783e, #f1d08d); }
.steps li { border-bottom: 0; }
.steps [aria-current] { color: var(--gold); }
.questions { max-width: 49rem; padding-top: 0; }
.questions details { text-align: left; border-top: 1px solid #5b4935; padding: .85rem 0; }
.questions summary { cursor: pointer; color: var(--gold); font-weight: 650; }
.questions p { margin: .65rem 0 0; color: var(--muted); }
.game-card img { aspect-ratio: 16 / 10; }

@media (max-width: 720px) {
  .masthead { flex-direction: column; align-items: stretch; gap: .4rem; }
  .brand { justify-content: center; font-size: 1.43rem; }
  .brand img { width: 2.65rem; }
  .masthead nav { justify-content: center; font-size: .79rem; gap: .15rem; }
  .masthead nav a { padding: .53rem .42rem; }
  .masthead .nav-login { padding-inline: .54rem; }
  .masthead .explore { display: inline; }
  .hero { display: flex; flex-direction: column; min-height: 0; background: #161219; padding: 0 0 1.55rem; }
  .hero-art {
    display: block;
    width: 100%;
    aspect-ratio: 1680 / 1000;
    background: linear-gradient(0deg, #161219, transparent 25%), var(--hero-desktop) center / 100% auto no-repeat;
  }
  .hero-content { padding: 0 1rem; }
  .hero-content .eyebrow { margin: .35rem 0 .5rem; }
  .hero-content h1 { font-size: clamp(2.25rem, 9vw, 3.6rem); }
  .hero-content > p:not([class]) { margin-bottom: 1rem; }
  .hero-link { position: static; margin-top: .9rem; }
}

/* Les images conservent leurs dimensions naturelles, sans recadrage. */
.characters .card { align-items: center; padding: .65rem; }
.characters .card img { width: min(100%, 10rem); }
.characters .card img, .army-card img {
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
}
.army-card {
  display: grid;
  grid-template-columns: minmax(0, 34%) minmax(0, 1fr);
  align-items: center;
  padding: .6rem;
  gap: clamp(.6rem, 2vw, 1.3rem);
  text-align: left;
}
.army-card img { display: block; width: 100%; }
.army-details { display: grid; align-content: center; gap: .5rem; padding: .2rem .35rem .2rem 0; }
.army-details strong { font-size: clamp(1.13rem, 2.4vw, 1.55rem); }
.army-details span { color: var(--muted); }
.army-details small { color: var(--gold); }
.questions details { padding: 0; }
.questions summary { padding: .85rem 0; }
.questions p { margin: 0 0 1rem; }

#connexion { margin-bottom: 2rem; }
#rol-fenetre, #rol-resultat {
  width: min(39rem, calc(100vw - 1.5rem));
  max-height: calc(100dvh - 1.5rem);
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid #a58659;
  border-radius: .65rem;
  background: #211a1e;
  color: var(--ink);
  box-shadow: 0 18px 75px #0009;
}
#rol-fenetre::backdrop, #rol-resultat::backdrop { background: #0c0a0dde; }
.rol-fenetre-entete {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .7rem;
  padding: .85rem 1.2rem;
  background: linear-gradient(#403021, #30231f);
  border-bottom: 1px solid #795e41;
}
.rol-fenetre-entete h2 { margin: 0; font-size: clamp(1.35rem, 5vw, 1.9rem); }
.rol-fenetre-entete button {
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid #a58659;
  border-radius: .3rem;
  background: #261a17;
  color: var(--gold);
  cursor: pointer;
}
.rol-fenetre-corps, .rol-fenetre-liens { padding: 1rem 1.2rem; overflow-wrap: anywhere; }
.rol-fenetre-corps .account-panel { padding: 0; border: 0; background: transparent; }
.rol-fenetre-corps :is(input, textarea, select, table, img) { max-width: 100%; }
.rol-fenetre-corps :is(input, textarea, select) { font: inherit; }
.rol-fenetre-corps :is(button, input[type="submit"]) { cursor: pointer; }
.rol-fenetre-corps [role="alert"] { color: #ffbba6; }
.rol-partenaires { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; margin: 0 1rem 1.5rem; font-size: .8rem; color: var(--muted); }

:root {
  --texte: 'Avenir Next', Avenir, 'Segoe UI', system-ui, sans-serif;
  --display: var(--texte);
}
body { font-family: var(--texte); }
h1, h2, h3, h4, legend { letter-spacing: -.035em; }
.brand { letter-spacing: -.025em; }
.hero {
  background-image:
    linear-gradient(0deg, #161219 1%, #16121914 40%, transparent 74%),
    radial-gradient(ellipse at 50% 55%, #14121baa 0%, #14121b66 26%, transparent 64%),
    var(--hero-desktop);
}
.hero-content h1 {
  font-size: clamp(2.35rem, 5vw, 4.4rem);
  line-height: 1.06;
  text-shadow: 0 2px 18px #15121bee, 0 1px 3px #15121b;
}
.hero-content .eyebrow, .hero-content > p { text-shadow: 0 1px 5px #100e17, 0 1px 15px #100e17; }
.hero-blason { display: none; }
.button { letter-spacing: -.015em; }
@media (min-width: 960px) {
  .hero { padding-top: 2.7rem; padding-bottom: 4.8rem; }
  .hero-blason {
    display: block;
    width: clamp(7.2rem, 10.6vw, 10rem);
    height: auto;
    margin: 0 auto .8rem;
    clip-path: polygon(50% 0%, 61% 7%, 90% 15%, 87% 31%, 95% 45%, 89% 54%, 91% 69%, 67% 80%, 51% 99%, 35% 84%, 12% 72%, 15% 57%, 5% 46%, 13% 34%, 10% 16%, 38% 7%);
  }
  .hero-content .eyebrow { margin: 0 0 .5rem; }
}
@media (max-width: 720px) {
  .hero { background: #161219; }
  .hero-content h1 { font-size: clamp(2rem, 8.7vw, 3rem); }
}

#rol-fenetre, #rol-resultat {
  width: min(34rem, calc(100% - 1.5rem));
  max-height: calc(100vh - 1.5rem);
  max-height: calc(100dvh - 1.5rem);
  border: 1px solid #92734e;
  border-radius: 1rem;
  background: #221d21;
}
#rol-fenetre[data-section="connexion"] { width: min(27rem, calc(100% - 1.5rem)); }
#rol-fenetre::backdrop, #rol-resultat::backdrop { background: #0c0a0dbf; }
.rol-fenetre-entete {
  padding: .95rem clamp(1rem, 4vw, 1.5rem);
  border-bottom-color: #6e5438;
  background: linear-gradient(105deg, #392b27, #292123);
}
.rol-fenetre-entete h2 { font-size: clamp(1.33rem, 4.5vw, 1.75rem); font-weight: 700; }
.rol-fenetre-entete h2:focus { outline: none; }
.rol-fenetre-entete button {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  border-color: #91724e;
  font: 1.35rem/1 var(--texte);
  background: #241b1e;
}
.rol-fenetre-entete button:hover { background: #574031; }
.rol-fenetre-entete button:focus-visible { outline-width: 2px; outline-offset: 2px; }
.rol-fenetre-corps { padding: 1.25rem clamp(1rem, 4vw, 1.5rem) 1.45rem; }
.rol-fenetre-corps :is(.rol-login-intro, .rol-ajax-intro) { margin: 0 0 1.2rem; color: var(--muted); }
.rol-fenetre-corps :is(.field, .rol-ajax-formulaire label) {
  display: grid;
  gap: .35rem;
  font-size: .95rem;
  font-weight: 650;
}
.rol-fenetre-corps .rol-ajax-formulaire { display: grid; gap: 1rem; }
.rol-fenetre-corps :is(input:not([type="submit"]), textarea) {
  display: block;
  width: 100%;
  min-height: 2.85rem;
  padding: .63rem .75rem;
  border: 1px solid #856b55;
  border-radius: .5rem;
  background: #171419;
  color: var(--ink);
  font: 400 1rem/1.4 var(--texte);
}
.rol-fenetre-corps textarea { resize: vertical; min-height: 7rem; }
.rol-fenetre-corps :is(input, textarea):focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.rol-fenetre-corps :is(.button, button, input[type="submit"]) {
  width: 100%;
  min-height: 2.85rem;
  padding: .55rem .9rem;
  border: 1px solid #e7c383;
  border-radius: .5rem;
  background: linear-gradient(#f0d091, #c49a57);
  color: #251b11;
  font: 700 1rem/1.3 var(--texte);
  box-shadow: none;
}
.rol-fenetre-corps :is(.button, button, input[type="submit"]):hover { background: #f2d393; }
.rol-fenetre-corps :is(button, input[type="submit"]):disabled { opacity: .6; cursor: wait; }
.rol-login-aide { margin: 1rem 0 0; text-align: center; color: var(--gold); font-size: .9rem; }
.rol-ajax-note { margin: 0; font-size: .9rem; color: var(--muted); }
.rol-ajax-carte { border: 1px solid #634d3f; border-radius: .65rem; padding: 1rem; background: #2c2327; }
.rol-ajax-carte + .rol-ajax-carte { margin-top: .85rem; }
.rol-ajax-carte h3 { margin: 0; font-size: 1.04rem; color: var(--gold); }
.rol-ajax-carte p { margin: .4rem 0 .8rem; }
.rol-ajax-carte ol { padding-inline-start: 1.25rem; }
.rol-ajax-carte button[type="button"] { background: transparent; border-color: #9a7a53; color: var(--gold); }
.rol-ajax-carte button[type="button"]:hover { background: #46362f; }

/* Matières du forum et garnitures de l’accueil. */
:root {
  --pierre-rol: url('assets/pierre-forum.jpg');
  --parchemin-rol: url('assets/parchemin-forum.jpg');
  --laiton: #a78351;
  --cuir: #2b2120;
}
body {
  background: linear-gradient(#151319ed, #151319ed), var(--pierre-rol) center top / 42rem auto repeat, #151319;
}
.masthead {
  position: relative;
  background: linear-gradient(#1d1920e8, #171419fa), var(--pierre-rol) center / 40rem auto, #1d1920;
  border-bottom: 1px solid var(--laiton);
  box-shadow: inset 0 -4px 0 #0b090b, inset 0 -5px 0 #6e553870;
}
.hero {
  box-shadow: inset 0 -1px 0 var(--laiton);
}
.hero-content { position: relative; }
.hero-content .eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  line-height: 1.5;
}
.hero-content .eyebrow::before,
.hero-content .eyebrow::after {
  content: '';
  width: clamp(.9rem, 5vw, 4.2rem);
  height: 1px;
  flex-shrink: 0;
  background: linear-gradient(90deg, transparent, #d7ae73);
}
.hero-content .eyebrow::after { transform: scaleX(-1); }
.hero .button, .history .button {
  position: relative;
  max-width: 100%;
  padding-inline: 2rem;
  border-radius: .3rem;
  border-color: #f0d29a;
  box-shadow: inset 0 0 0 2px #55391940, 0 3px 0 #5d401f, 0 8px 25px #0007;
}
.hero .button::before, .hero .button::after,
.history .button::before, .history .button::after {
  content: '';
  position: absolute;
  top: calc(50% - .15rem);
  width: .3rem;
  height: .3rem;
  background: #634221;
  transform: rotate(45deg);
}
.hero .button::before, .history .button::before { left: .9rem; }
.hero .button::after, .history .button::after { right: .9rem; }

.chapter > h3,
.questions > h2 {
  display: grid;
  grid-template-columns: minmax(.6rem, 1fr) auto minmax(.6rem, 1fr);
  align-items: center;
  gap: clamp(.55rem, 2vw, 1.4rem);
}
.chapter > h3::before, .chapter > h3::after,
.questions > h2::before, .questions > h2::after {
  content: '';
  height: 5px;
  background: linear-gradient(90deg, transparent, #916e489e);
  clip-path: polygon(0 40%, 94% 40%, 98% 0, 100% 50%, 98% 100%, 94% 60%, 0 60%);
}
.chapter > h3::after, .questions > h2::after { transform: scaleX(-1); }
.game-card {
  border-color: #846641;
  background: linear-gradient(135deg, #342725e8, #1e181ce8), var(--parchemin-rol) center / 24rem auto, var(--cuir);
  box-shadow: 0 8px 27px #08060a60;
}
.game-card img { border-bottom: 1px solid #92724d; }
.game-card div { position: relative; }
.game-card div::before {
  content: '';
  position: absolute;
  top: -.26rem;
  left: calc(50% - .24rem);
  width: .42rem;
  height: .42rem;
  border: 1px solid #c49b6b;
  background: #342725;
  transform: rotate(45deg);
}
.game-card p { color: #dfcdb5; }

.history {
  background: linear-gradient(90deg, #1e171ceb, #30201beb 48%, #1e171ceb), var(--pierre-rol) center / 42rem auto, #24191b;
  border-block: 1px solid #846641;
  box-shadow: inset 0 4px 0 #1d1418, inset 0 5px 0 #78573791, inset 0 -4px 0 #1d1418, inset 0 -5px 0 #78573791;
}
#rol-fenetre, #rol-resultat {
  background: linear-gradient(#241b22f5, #20191ef5), var(--parchemin-rol) center / 22rem auto, #221d21;
  box-shadow: inset 0 0 0 2px #b9925b20, 0 18px 75px #0009;
}
.rol-fenetre-entete {
  background: linear-gradient(105deg, #422f25f2, #2a1e22f5), var(--pierre-rol) center / 30rem auto, #2d2122;
}
.rol-fenetre-entete h2 { color: #f3dbb4; }
@media (max-width: 720px) {
  .chapter > h3, .questions > h2 { grid-template-columns: minmax(.4rem, 1fr) minmax(0, auto) minmax(.4rem, 1fr); }
  .hero-content .eyebrow { gap: .45rem; }
}

/* La connexion reprend le blason, la pierre du forum et le parchemin. */
#rol-fenetre[data-section="connexion"] {
  width: min(27rem, calc(100% - 1.5rem));
  border-radius: .55rem;
  border-color: #bc9561;
  background: linear-gradient(135deg, #2c211df0, #201819f3),
    var(--pierre-rol) center / 31rem auto, #241b19;
  box-shadow: inset 0 0 0 3px #3f2c24, inset 0 0 0 4px #85644077, 0 22px 80px #000a;
}
#rol-fenetre[data-section="connexion"] .rol-fenetre-entete {
  border-bottom: 1px solid #927244;
  background: linear-gradient(120deg, #39261fe8, #211b1be8),
    var(--pierre-rol) center / 26rem auto, #2b211e;
}
#rol-fenetre[data-section="connexion"] .rol-fenetre-entete button {
  border-radius: .3rem;
  background: #2a201c;
}
#rol-fenetre[data-section="connexion"] .rol-fenetre-entete button:hover {
  background: #4a3527;
}
#rol-fenetre[data-section="connexion"] .rol-fenetre-corps {
  padding: .8rem clamp(1rem, 5vw, 1.65rem) 1.5rem;
}
.rol-login-blason {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .8rem;
  margin: .1rem 0 1rem;
}
.rol-login-blason img {
  display: block;
  width: clamp(3.7rem, 10vw, 5.5rem);
  height: auto;
  clip-path: polygon(50% 0%, 61% 7%, 90% 15%, 87% 31%, 95% 45%, 89% 54%, 91% 69%, 67% 80%, 51% 99%, 35% 84%, 12% 72%, 15% 57%, 5% 46%, 13% 34%, 10% 16%, 38% 7%);
}
.rol-login-blason::before, .rol-login-blason::after {
  content: '';
  width: min(24%, 5.2rem);
  height: 5px;
  background: linear-gradient(90deg, transparent, #b58b52);
  clip-path: polygon(0 40%, 94% 40%, 98% 0, 100% 50%, 98% 100%, 94% 60%, 0 60%);
}
.rol-login-blason::after { transform: scaleX(-1); }
#rol-fenetre[data-section="connexion"] .field { color: #f4deb7; }
#rol-fenetre[data-section="connexion"] .field input {
  color-scheme: light;
  color: #2c2016;
  caret-color: #2c2016;
  border-color: #b29164;
  border-radius: .28rem;
  background: linear-gradient(#eee0c4ef, #e3cba1ed),
    var(--parchemin-rol) center / 27rem auto, #ead6b3;
  box-shadow: inset 0 1px 5px #4e35202b;
}
#rol-fenetre[data-section="connexion"] .account-panel .button {
  border-radius: .25rem;
  border-color: #f3d7a6;
  background: linear-gradient(#f2d397, #c19858);
  box-shadow: inset 0 0 0 2px #69451f47, 0 2px 0 #69451f;
}
#rol-fenetre[data-section="connexion"] .account-panel .button:hover { background: #f0d49c; }

@keyframes rol-voile-connexion {
  from { opacity: 0; }
  to { opacity: 1; }
}
@media (prefers-reduced-motion: no-preference) {
  #rol-fenetre[data-section="connexion"][open]::backdrop {
    animation: rol-voile-connexion 460ms ease-out both;
  }
}

/* Rivets de navigation et reliure des questions. */
.masthead nav a {
  display: inline-flex;
  align-items: center;
  gap: .42em;
}
.masthead nav a::before {
  content: '';
  width: .26rem;
  height: .26rem;
  flex: 0 0 .26rem;
  transform: rotate(45deg);
  border: 1px solid #ba955f;
  background: #775637;
}
.masthead nav a:hover::before { background: var(--gold); }

.questions {
  position: relative;
  max-width: 54rem;
}
.questions > h2 { margin-bottom: 1.2rem; }
.questions details {
  margin: .6rem 0;
  border: 1px solid #755b40;
  border-radius: .38rem;
  background: linear-gradient(110deg, #302322ed, #211b1fee),
    var(--parchemin-rol) center / 24rem auto, var(--cuir);
}
.questions details[open] {
  border-color: #aa8351;
  box-shadow: inset .2rem 0 0 #85623f;
}
.questions summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1.55rem;
  align-items: center;
  gap: .65rem;
  padding: .85rem clamp(.8rem, 3vw, 1.2rem);
  color: #eed6ad;
  list-style: none;
}
.questions summary::-webkit-details-marker { display: none; }
.questions summary::after {
  content: '';
  justify-self: center;
  width: .42rem;
  height: .42rem;
  border-right: 1px solid #dbb577;
  border-bottom: 1px solid #dbb577;
  transform: translateY(-.12rem) rotate(45deg);
}
.questions details[open] summary::after { transform: translateY(.12rem) rotate(225deg); }
.questions summary:hover { color: #fff0d1; }
.questions details > p {
  margin: 0 clamp(.8rem, 3vw, 1.2rem);
  padding: .8rem 0 1rem;
  border-top: 1px solid #6c5139;
}
.discovery, .history { position: relative; }
.discovery::after, .history::after {
  content: '';
  position: absolute;
  bottom: -.28rem;
  left: calc(50% - .28rem);
  width: .52rem;
  height: .52rem;
  border: 1px solid #c6a36f;
  background: #392a24;
  transform: rotate(45deg);
}
.capture-note { color: #cbb594; }
@media (max-width: 720px) {
  .masthead nav a { gap: .32em; }
  .masthead nav a::before { width: .21rem; height: .21rem; flex-basis: .21rem; }
}

@media (prefers-reduced-motion: no-preference) {
  #rol-fenetre[open]::backdrop { animation: rol-voile-connexion 460ms ease-out both; }
}
#rol-fenetre:is([data-section="assistance"], [data-section="contact"]) .rol-fenetre-corps[aria-busy] {
  min-height: min(16rem, 50vh);
}
#rol-fenetre[data-section="connexion"] { width: min(34rem, calc(100% - 1.5rem)); }
#connexion .account-panel, #rol-fenetre[data-section="connexion"] .account-panel {
  display: grid;
  grid-template-columns: clamp(3.9rem, 19vw, 8rem) minmax(0, 1fr);
  align-items: center;
  gap: clamp(.65rem, 4vw, 1.35rem);
}
.rol-login-blason {
  flex-direction: column;
  gap: .65rem;
  margin: 0;
}
.rol-login-blason img { width: min(100%, 7.1rem); }
.rol-login-blason::before, .rol-login-blason::after {
  width: 85%;
  clip-path: polygon(0 50%, 45% 35%, 50% 0, 55% 35%, 100% 50%, 55% 65%, 50% 100%, 45% 65%);
  background: linear-gradient(90deg, transparent, #b58b52, transparent);
}
.rol-login-champs .field { margin-bottom: .65rem; }
#rol-fenetre[data-section="connexion"] .field input { min-height: 2.55rem; padding: .45rem .62rem; }
.rol-login-aide { margin-top: .7rem; }

/* Le registre des questions s’affiche d’un seul tenant. */
.questions { max-width: 57rem; }
.questions-registre {
  padding: clamp(.7rem, 3vw, 1.65rem);
  border: 1px solid #a57b4a;
  border-radius: .55rem;
  background: linear-gradient(105deg, #423023f2, #2a1c1cf0),
    var(--pierre-rol) center / 30rem auto, #2b201e;
  box-shadow: inset 0 0 0 3px #211719, inset 0 0 0 4px #795a3a, 0 12px 36px #07040780;
}
.questions-registre details {
  margin: 0;
  border: 1px solid #977243;
  border-radius: .22rem;
  background: linear-gradient(105deg, #362723, #251b1f);
}
.questions-registre details + details { margin-top: .5rem; }
.questions-registre details[open] {
  border-color: #c5a06a;
  background: linear-gradient(#efe1c3de, #dfc599ed), var(--parchemin-rol) center / 27rem, #e5ceaa;
  box-shadow: 0 5px 13px #0b060a55;
}
.questions-registre summary {
  min-height: 3.15rem;
  grid-template-columns: 1.45rem minmax(0, 1fr) 1.05rem;
  gap: clamp(.45rem, 2vw, .9rem);
  padding: .6rem clamp(.65rem, 3vw, 1rem);
  text-align: left;
}
.questions-registre summary::before {
  content: '';
  width: .55rem;
  height: .55rem;
  justify-self: center;
  transform: rotate(45deg);
  border: 1px solid #d7b478;
  background: linear-gradient(#a67942, #69472a);
  box-shadow: 0 0 0 2px #38251c, 0 0 0 3px #977143;
}
.questions-registre details[open] summary {
  color: #382619;
  border-bottom: 1px solid #b78d56;
}
.questions-registre details[open] summary::before {
  border-color: #f3cb85;
  background: linear-gradient(#b25843, #743420);
}
.questions-registre details[open] summary::after { border-color: #795027; }
.questions-registre details > p {
  color: #36271f;
  text-align: left;
  margin: 0;
  padding: .85rem clamp(.8rem, 4vw, 2rem) 1rem;
  border-top: 0;
}
.questions-registre details > p a { color: #603516; font-weight: 700; }
.questions-registre details > p a:hover { color: #361908; }
.questions-registre details[open] :focus-visible { outline-color: #693b21; outline-offset: -3px; }
