/* L'Épreuve — ton de la page : l'arène de Shaxx. Le rouge de ses Redjacks, l'orange des projecteurs, le gris acier des
   murs de la Tour. Ambiance par section (data-mood sur <body> : shaxx, modes, arene, cartes, drames ;
   js/components/moods.js). Shaxx et son micro, modes, arène, cartes, drames, petits mécanismes. */

.epreuve {
  --crimson: #ff5b45;
  --crimson-hi: #ffd9d2;
  --page-accent: var(--crimson);
  --page-accent-hi: var(--crimson-hi);
}
.epreuve[data-mood="shaxx"] { --page-accent: #ff5b45; --page-accent-hi: #ffd9d2; }
.epreuve[data-mood="modes"] { --page-accent: #ffa64d; --page-accent-hi: #ffe7cc; }
.epreuve[data-mood="arene"] { --page-accent: #ff4d6d; --page-accent-hi: #ffd6de; }
.epreuve[data-mood="cartes"] { --page-accent: #8fc8ff; --page-accent-hi: #e0f0ff; }
.epreuve[data-mood="drames"] { --page-accent: #ff3b3b; --page-accent-hi: #ffd0d0; }
.epreuve .kicker, .epreuve .tag, .epreuve .sub-title { transition: color .6s; }
.epreuve .kicker, .epreuve .tag { color: var(--page-accent); }
.epreuve .footer-crest, .epreuve .brand svg { color: var(--crimson); }
/* des bandes diagonales très discrètes, comme les marquages d'une arène */
.epreuve main {
  background-image:
    repeating-linear-gradient(135deg, rgba(255, 91, 69, .022) 0 2px, transparent 2px 46px),
    radial-gradient(ellipse 60% 14% at 85% 3%, rgba(255, 91, 69, .06), transparent 70%);
}
@media (min-width: 1021px) and (max-width: 1300px) { .epreuve .brand span { display: none; } }
.epreuve .d-btn svg { width: 16px; height: 16px; flex: none; }

/* ---------- Héros ---------- */
.epreuve .hero-status { display: grid; grid-template-columns: auto auto auto; column-gap: 18px; row-gap: 0; }
.epreuve .hero-status .status-label { grid-row: 1; }
.epreuve .hero-status .status-value { grid-row: 2; font-variant-numeric: tabular-nums; }
.epreuve .hero-content .actions { flex-wrap: wrap; }
.epreuve .hero-title { font-size: clamp(2.6rem, 7vw, 6.4rem); }
.epreuve .hero-title span:last-child { margin-top: .06em; padding-top: .14em; line-height: 1.25; font-size: .34em; font-weight: 900; letter-spacing: .2em;
  background: linear-gradient(90deg, #ff5b45, #ffd2a6 50%, #ff8a4a); -webkit-background-clip: text; background-clip: text; color: transparent; }
@supports not (background-clip: text) { .epreuve .hero-title span:last-child { color: var(--crimson); } }

/* ---------- Petites choses communes ---------- */
.ep-quote { margin: 12px 0; padding: 2px 0 2px 14px; border-left: 2px solid var(--page-accent); }
.ep-quote p { margin: 0; font-family: var(--font-lore); font-size: 1.12rem; font-style: italic; line-height: 1.45; color: var(--pearl); }
.ep-quote cite { display: block; margin-top: 4px; font-size: .6rem; font-style: normal; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--faint); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 7px 12px; border: 1px solid var(--line-strong); background: transparent; color: var(--muted); font: inherit; font-size: .66rem; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.chip:hover { color: var(--pearl); border-color: var(--pearl); }
.chip.is-on { background: var(--page-accent); border-color: var(--page-accent); color: var(--night); }
.pop { animation: pop-in .45s var(--ease); }
@keyframes pop-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.brief-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.brief-card { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 14px; padding: 16px; border: 1px solid var(--line); border-left: 2px solid var(--page-accent); background: var(--panel-solid); }
.brief-card img { width: 56px; height: 56px; border: 1px solid rgba(255, 255, 255, .2); background: #1b0d0b; object-fit: contain; }
.brief-card h3 { margin: 2px 0 6px; font-size: 1rem; font-weight: 800; text-transform: uppercase; color: var(--pearl); }
.brief-card p:not(.tag) { margin: 0; font-size: .86rem; line-height: 1.6; color: var(--muted); }

/* ---------- Shaxx ---------- */
.shaxx { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(22px, 3vw, 44px); align-items: start; }
.shaxx-pics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; position: sticky; top: 100px; }
.shaxx-pic { position: relative; margin: 0; overflow: hidden; border: 1px solid var(--line); background: var(--deep); }
.shaxx-pic a { display: block; }
.shaxx-pic img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform .8s var(--ease); }
.shaxx-pic a:hover img { transform: scale(1.04); }
.shaxx-pic--main { grid-column: span 4; }
.shaxx-pic--main img { aspect-ratio: 16 / 9; }
.shaxx-pic figcaption, .mode-pic figcaption, .map-pic figcaption, .drama-pic figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 10px 7px; pointer-events: none;
  background: linear-gradient(0deg, rgba(10, 6, 8, .92), rgba(10, 6, 8, 0)); font-size: .58rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #fff; }
.shaxx-pic:not(.shaxx-pic--main) figcaption { display: none; }
.shaxx-body p { margin: 0 0 14px; font-size: 1rem; line-height: 1.72; color: #d8d6de; }
.shaxx-eggs { display: grid; gap: 10px; margin: 18px 0 0; padding: 16px; list-style: none; border: 1px solid var(--line); background: rgba(24, 12, 14, .6); }
.shaxx-eggs li, .map-eggs li, .drama-eggs li { position: relative; padding-left: 16px; font-size: .9rem; line-height: 1.65; color: var(--muted); }
.shaxx-eggs li::before, .map-eggs li::before, .drama-eggs li::before { content: ''; position: absolute; left: 0; top: .62em; width: 6px; height: 6px; background: var(--page-accent); transform: rotate(45deg); }
.shaxx-eggs b, .drama-eggs b { color: var(--pearl); }

.mic { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(240px, 1fr); gap: 20px; margin-top: clamp(30px, 4vw, 54px); }
.mic-screen { position: relative; display: flex; flex-direction: column; justify-content: center; min-height: 200px; padding: clamp(20px, 3vw, 36px); overflow: hidden;
  border: 1px solid var(--line-strong); background: radial-gradient(ellipse at 30% 40%, rgba(255, 91, 69, .16), transparent 70%), #0d0709; }
.mic-label { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: .64rem; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; color: var(--faint); }
.mic-label svg { width: 16px; height: 16px; color: var(--crimson); }
.mic-line { margin: 0; font-size: clamp(1.15rem, 2.2vw, 1.6rem); font-weight: 800; line-height: 1.35; color: var(--pearl); }
.mic-src { margin: 12px 0 0; font-size: .64rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--page-accent); }
.mic-side { display: flex; flex-direction: column; justify-content: center; gap: 12px; padding: 18px; border: 1px solid var(--line); background: var(--panel-solid); }
.mic-count { margin: 0; font-size: .74rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.mic-count b { font-size: 1.2rem; color: var(--pearl); }
.mic-note { margin: 0; font-size: .78rem; line-height: 1.5; color: var(--faint); }

/* ---------- Modes ---------- */
.sub-title { margin: clamp(40px, 5vw, 64px) 0 6px; font-size: 1.2rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; color: var(--page-accent); }
.sub-intro { max-width: 760px; margin: 0 0 18px; font-size: .95rem; line-height: 1.65; color: var(--muted); }
.modes { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.mode { display: flex; flex-direction: column; padding: 18px; border: 1px solid var(--line); border-top: 2px solid var(--page-accent); background: var(--panel-solid); scroll-margin-top: 100px; }
.mode--wide { grid-column: span 2; }
.mode-pic { position: relative; margin: -18px -18px 16px; overflow: hidden; background: var(--deep); }
.mode-pic a { display: block; }
.mode-pic img { display: block; width: 100%; aspect-ratio: 21 / 8; object-fit: cover; }
.mode-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.mode-head img { width: 40px; height: 40px; padding: 4px; border: 1px solid var(--line-strong); background: #1b0d0b; object-fit: contain; }
.mode-head h3 { margin: 0; font-size: 1.1rem; font-weight: 900; text-transform: uppercase; color: var(--pearl); }
.mode-en { margin: 2px 0 0; font-size: .64rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.mode-rule { margin: 0; font-size: .92rem; line-height: 1.6; color: #d8d6de; }
.mode-note { margin: 8px 0 0; font-size: .86rem; line-height: 1.6; color: var(--muted); }
.mode-link { margin: 10px 0 0; }
.mode-link a, .drama-extra { font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--page-accent); }

/* ---------- L'arène ---------- */
.arena { display: grid; gap: 12px; }
.arena-field { position: relative; aspect-ratio: 16 / 7; min-height: 280px; overflow: hidden; border: 1px solid var(--line-strong); background: #0b0608; touch-action: none; user-select: none; }
.arena-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .5; filter: saturate(.7); transition: opacity .4s; }
.arena-field.is-on .arena-bg { opacity: .32; }
.arena-field.is-laser .arena-bg { opacity: .22; filter: saturate(.4) hue-rotate(-20deg); }
.arena-field.hit { animation: hit .45s ease-out; }
@keyframes hit { 0% { box-shadow: inset 0 0 0 0 rgba(255, 40, 40, 0); } 30% { box-shadow: inset 0 0 120px 20px rgba(255, 40, 40, .55); } 100% { box-shadow: inset 0 0 0 0 rgba(255, 40, 40, 0); } }
.arena-start { position: absolute; inset: 0; z-index: 3; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; padding: 16px; background: rgba(8, 4, 6, .45); }
.arena-start[hidden] { display: none; }
.foe { position: absolute; left: var(--x); top: var(--y); z-index: 2; display: grid; place-items: center; width: 54px; height: 54px; margin: -27px 0 0 -27px; padding: 0;
  border: 2px solid currentColor; border-radius: 50%; background: rgba(10, 6, 8, .75); cursor: crosshair; animation: foe-in .25s var(--ease); }
.foe svg { width: 28px; height: 28px; }
.foe--titan { color: #ff7a59; }
.foe--hunter { color: #8fd0ff; }
.foe--warlock { color: #ffd36b; }
.foe:hover, .foe:focus-visible { background: rgba(255, 255, 255, .14); }
.foe.down { animation: foe-down .26s ease-in forwards; pointer-events: none; }
.foe.shoot { animation: foe-shoot .4s ease-in forwards; pointer-events: none; }
.foe.gone { opacity: 0; transition: opacity .2s; pointer-events: none; }
@keyframes foe-in { from { transform: scale(.2); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes foe-down { to { transform: scale(1.6); opacity: 0; filter: brightness(3); } }
@keyframes foe-shoot { 40% { transform: scale(1.25); background: rgba(255, 40, 40, .7); } to { transform: scale(.4); opacity: 0; } }
.arena-laser { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; pointer-events: none; opacity: 0; }
.arena-field.is-laser .arena-laser { opacity: 1; }
.arena-field.is-laser { cursor: crosshair; }
.arena-laser line { stroke: #ff2d2d; stroke-width: 5; stroke-linecap: round; filter: drop-shadow(0 0 6px #ff4a2a) drop-shadow(0 0 14px #ff9a3a); }
.arena-medal { position: absolute; left: 50%; top: 50%; z-index: 4; display: grid; justify-items: center; gap: 6px; width: 210px; margin: -105px 0 0 -105px; padding: 14px;
  border: 2px dashed #ffd34d; background: rgba(20, 12, 4, .9); text-align: center; transform: rotate(-4deg); }
.arena-medal[hidden] { display: none; }
.arena-medal svg { width: 120px; height: 120px; }
.arena-medal p { margin: 0; font-family: var(--font-lore); font-size: 1.1rem; font-style: italic; color: #ffe9a8; }
.arena-medal small { font-family: var(--font-ui); font-size: .6rem; font-style: normal; letter-spacing: .14em; text-transform: uppercase; color: #c9a65a; }
.arena-medal.pop { animation: medal 4.2s ease-out forwards; }
@keyframes medal { 0% { transform: rotate(-30deg) scale(.2); opacity: 0; } 12% { transform: rotate(-4deg) scale(1.08); opacity: 1; } 18% { transform: rotate(-4deg) scale(1); } 85% { opacity: 1; } 100% { opacity: 0; } }
.arena-hud { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 26px; padding: 12px 16px; border: 1px solid var(--line); background: var(--panel-solid); }
.arena-hud p { display: flex; align-items: baseline; gap: 8px; margin: 0; }
.arena-hud span { font-size: .62rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--faint); }
.arena-hud b { font-size: 1.4rem; font-weight: 900; color: var(--pearl); font-variant-numeric: tabular-nums; }
.arena-stop { margin-left: auto; padding: 8px 14px; font-size: .64rem; }
.arena-stop[hidden] { display: none; }
.arena-shaxx { min-height: 2.8em; margin: 0; font-family: var(--font-lore); font-size: 1.3rem; font-style: italic; line-height: 1.4; color: var(--pearl); }

/* ---------- Cartes ---------- */
.map-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 0 0 18px; }
.map-count { margin: 0 0 0 auto; font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.maps { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.map { display: flex; flex-direction: column; border: 1px solid var(--line); background: var(--panel-solid); scroll-margin-top: 100px; }
.map[hidden] { display: none; }
.map-pic { position: relative; margin: 0; overflow: hidden; background: var(--deep); }
.map-pic a { display: block; }
.map-pic img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .8s var(--ease); }
.map-pic a:hover img { transform: scale(1.04); }
.map-body { padding: 14px 16px 16px; }
.map-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin: 0 0 8px; font-size: .62rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.map-tag { padding: 2px 7px; border: 1px solid; }
.map-tag--d1 { color: #ffc46b; border-color: rgba(255, 196, 107, .5); }
.map-tag--coffre { color: #c3c9db; border-color: rgba(195, 201, 219, .4); }
.map h3 { margin: 0; font-size: 1.1rem; font-weight: 900; text-transform: uppercase; color: var(--pearl); }
.map-en { margin: 2px 0 8px; font-size: .74rem; color: var(--page-accent); }
.map-note { margin: 0; font-size: .88rem; line-height: 1.6; color: #d0d4e0; }
.map-eggs { display: grid; gap: 6px; margin: 10px 0 0; padding: 10px 0 0; list-style: none; border-top: 1px dashed var(--line); }
.map-eggs li { font-size: .84rem; }
.curios { position: relative; margin-top: 18px; padding: 16px 18px; border: 1px dashed var(--line-strong); }
.curios p:not(.panel-title) { margin: 0; font-size: .9rem; line-height: 1.6; color: var(--muted); }
.map-anchor { position: absolute; top: 0; scroll-margin-top: 120px; }

/* ---------- Drames ---------- */
.dramas { position: relative; display: grid; gap: 26px; }
.dramas::before { content: ''; position: absolute; left: 89px; top: 0; bottom: 0; width: 2px; background: linear-gradient(var(--page-accent), rgba(255, 59, 59, .1)); }
.drama { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 0; scroll-margin-top: 100px; }
.drama-date { position: relative; padding: 14px 18px 0 0; text-align: right; }
.drama-date span { position: relative; z-index: 1; display: inline-block; padding: 4px 8px; background: var(--night); border: 1px solid var(--page-accent); font-size: .62rem; font-weight: 800;
  letter-spacing: .12em; text-transform: uppercase; color: var(--page-accent-hi); }
.drama-card { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.3fr); border: 1px solid var(--line); background: var(--panel-solid); }
.drama-pic { position: relative; margin: 0; overflow: hidden; background: var(--deep); }
.drama-pic a { display: block; height: 100%; }
.drama-pic img { display: block; width: 100%; height: 100%; min-height: 220px; object-fit: cover; }
.drama-pic--none { display: grid; place-items: center; min-height: 220px; background: repeating-linear-gradient(135deg, #140a0c 0 10px, #0d0709 10px 20px); }
.drama-pic--none svg { width: 64px; height: 64px; color: rgba(255, 91, 69, .5); }
.drama-body { padding: 18px 20px; }
.drama-body h3 { display: flex; align-items: center; gap: 12px; margin: 0 0 10px; font-size: 1.25rem; font-weight: 900; text-transform: uppercase; color: var(--pearl); }
.drama-icon { width: 40px; height: 40px; border: 1px solid rgba(255, 255, 255, .2); }
.drama-body > p { margin: 0 0 10px; font-size: .95rem; line-height: 1.68; color: #d8d6de; }
.drama-eggs { margin-top: 12px; border: 1px solid var(--line); background: rgba(24, 12, 14, .6); }
.drama-eggs summary { padding: 10px 14px; cursor: pointer; font-size: .68rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--pearl); }
.drama-eggs.is-read summary { color: var(--page-accent); }
.drama-eggs ul { display: grid; gap: 8px; margin: 0; padding: 4px 14px 14px; list-style: none; }
.drama-none { margin: 0; padding: 0 14px 14px; font-size: .86rem; color: var(--faint); }
.drama-extra-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 14px 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.drama-extra { padding: 9px 14px; }
.drama-extra.slap { animation: slap .35s ease-out; }
@keyframes slap { 0% { transform: none; } 30% { transform: translateX(-6px) rotate(-4deg); } 60% { transform: translateX(4px) rotate(2deg); } 100% { transform: none; } }
.drama-say { flex-basis: 100%; margin: 0; font-family: var(--font-lore); font-size: 1.05rem; font-style: italic; color: var(--pearl); }

/* ---------- Petits écrans ---------- */
@media (max-width: 1020px) {
  .shaxx, .mic { grid-template-columns: minmax(0, 1fr); }
  .shaxx-pics { position: relative; top: 0; }
  .mode--wide { grid-column: auto; }
  .drama-card { grid-template-columns: minmax(0, 1fr); }
  .drama-pic img { min-height: 0; aspect-ratio: 16 / 9; }
}
@media (max-width: 700px) {
  .brief-cards { grid-template-columns: minmax(0, 1fr); }
  .modes, .maps { grid-template-columns: minmax(0, 1fr); }
  .dramas::before { left: 8px; }
  .drama { grid-template-columns: minmax(0, 1fr); }
  .drama-date { padding: 0 0 8px 18px; text-align: left; }
  .arena-field { aspect-ratio: 4 / 5; }
  .shaxx-pics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shaxx-pic--main { grid-column: span 2; }
}
@media (prefers-reduced-motion: reduce) {
  .foe, .foe.down, .foe.shoot, .arena-field.hit, .arena-medal.pop, .pop, .drama-extra.slap { animation: none; }
}
