/* Le Cuirassé — ton de la page (chitine olive, or terni de la Ruche, vert des Corrompus,
   violet de l'Hérésie), ambiance par section (data-mood sur <body> : worm, raid, court, heresy,
   voir js/rituals.js), étapes du raid et symboles, runes de la Cour, question de l'Écho,
   couleurs du plan et pastilles. Les deux mini-jeux sont dans css/worms.css. */

.dread {
  --bone: #b7c58a;
  --bone-hi: #eef5d2;
  --worm: #e0c06a;
  --worm-hi: #fff0c4;
  --raid: #ffb46a;
  --raid-hi: #ffe2c2;
  --court: #ff8f7a;
  --court-hi: #ffd7cc;
  --heresy: #b79bff;
  --heresy-hi: #e9e0ff;
  --hive: #c9d68c;
  --cabal: #ff7a5c;
  --page-accent: var(--bone);
  --page-accent-hi: var(--bone-hi);
}
.dread[data-mood="worm"] { --page-accent: var(--worm); --page-accent-hi: var(--worm-hi); }
.dread[data-mood="raid"] { --page-accent: var(--raid); --page-accent-hi: var(--raid-hi); }
.dread[data-mood="court"] { --page-accent: var(--court); --page-accent-hi: var(--court-hi); }
.dread[data-mood="heresy"] { --page-accent: var(--heresy); --page-accent-hi: var(--heresy-hi); }
.dread ::selection { background: rgba(183, 197, 138, .3); }
.dread main { background: radial-gradient(ellipse 70% 18% at 80% 5%, rgba(183, 197, 138, .08), transparent 70%), radial-gradient(ellipse 55% 16% at 8% 28%, rgba(255, 154, 92, .05), transparent 70%); }
.dread .sec-title { transition: text-shadow .8s; text-shadow: 0 0 34px color-mix(in srgb, var(--page-accent) 24%, transparent); }
.dread .kicker, .dread .tag { transition: color .6s; }

/* ---------- Héros ---------- */
.dread .hero-title span:last-child { margin-top: .18em; font-size: .36em; font-weight: 500; letter-spacing: .3em; color: var(--page-accent-hi); }
.hero-fact { margin: 0; font-size: .7rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.hero-fact b { color: var(--page-accent-hi); }

/* ---------- Sections ---------- */
.dread .steps { margin-bottom: clamp(30px, 4vw, 44px); }
.dread .quarters + .raid, .dread .raid + .quarters, .dread .raid + .raid, .dread .duo + .quarters, .dread .quarters + .duo, .dread .quarters + .steps { margin-top: clamp(30px, 4vw, 44px); }
.keys-sec { background: radial-gradient(ellipse 60% 22% at 50% 4%, rgba(232, 244, 255, .1), transparent 70%); }
.court-sec { background: radial-gradient(ellipse 60% 22% at 84% 6%, rgba(255, 210, 122, .09), transparent 70%), radial-gradient(ellipse 50% 20% at 8% 62%, rgba(20, 30, 60, .5), transparent 70%); }
.heresy-sec { background: radial-gradient(ellipse 60% 26% at 16% 8%, rgba(255, 154, 92, .08), transparent 70%); }
.secrets-sec { background: radial-gradient(ellipse 60% 45% at 30% 30%, color-mix(in srgb, var(--page-accent) 7%, transparent), transparent 70%); }
.dread .secrets-layout .games { gap: 28px; }
/* photo cliquable d'une carte large : le lien remplit la colonne comme le ferait l'image seule */
.dread .quarter--wide .quarter-photo > a { height: 100%; }
.dread .quarter--wide .quarter-photo > a > img { height: 100%; object-fit: cover; }
/* un filet de Lumière entre deux sections */
.light-rule { position: relative; height: 1px; margin: 0; border: 0; overflow: visible; background: linear-gradient(90deg, transparent, rgba(232, 244, 255, .7) 30%, #fff 50%, rgba(232, 244, 255, .7) 70%, transparent); box-shadow: 0 0 22px rgba(232, 244, 255, .55); }
.light-rule::after { content: ''; position: absolute; left: 50%; top: -5px; width: 11px; height: 11px; margin-left: -5.5px; border-radius: 50%; background: #fff; box-shadow: 0 0 18px 4px rgba(232, 244, 255, .9); animation: light-pulse 4s ease-in-out infinite; }
@keyframes light-pulse { 50% { transform: scale(.55); opacity: .6; } }
/* deux colonnes : un portrait et son texte */
.duo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); background: var(--panel-solid); border: 1px solid var(--line); }
.duo-photo { position: relative; min-height: 380px; margin: 0; overflow: hidden; }
.duo-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.duo .duo-photo > a { position: absolute; inset: 0; display: block; }
.duo-photo figcaption { position: absolute; left: 0; bottom: 0; padding: 6px 12px; background: rgba(6, 8, 16, .78); font-size: .6rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.duo-body { padding: clamp(22px, 3vw, 36px); }
.duo-body h3 { margin: 4px 0 14px; font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; letter-spacing: .02em; text-transform: uppercase; color: var(--pearl); }
.duo-body > p:not(.tag) { margin: 0 0 14px; font-size: .95rem; line-height: 1.65; color: var(--muted); }
.duo-line { margin: 0 0 12px; padding: 12px 16px; border-left: 3px solid var(--page-accent); background: color-mix(in srgb, var(--page-accent) 7%, transparent); }
.duo-line q { quotes: '« ' ' »'; font-family: var(--font-lore); font-style: italic; font-size: 1.2rem; line-height: 1.4; color: #e9e3d6; }
.duo-line cite { display: block; margin-top: 4px; font-size: .62rem; font-style: normal; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: var(--page-accent-hi); }
.arms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: clamp(30px, 4vw, 44px); }
.arm-note { margin: 8px 0 0; font-size: .82rem; line-height: 1.5; color: var(--muted); }

.inline-link { color: var(--page-accent-hi); border-bottom: 1px solid currentColor; }

/* ---------- Les trois symboles (js/rituals.js) ---------- */
.glyph-panel { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px 30px; align-items: center; margin-bottom: 22px; padding: 22px 24px; border: 1px solid color-mix(in srgb, var(--raid) 45%, transparent); background: linear-gradient(90deg, rgba(40, 26, 10, .55), var(--panel-solid)); }
.glyph-panel h3 { margin: 4px 0 8px; font-size: 1.4rem; font-weight: 800; text-transform: uppercase; color: var(--pearl); }
.glyph-note { margin: 0; font-family: var(--font-lore); font-style: italic; font-size: 1.12rem; color: #e9e3d6; }
.glyph-note.ok { color: var(--raid-hi); } .glyph-note.bad { color: #ffb08a; }
.glyph-targets { display: flex; gap: 12px; margin: 0; padding: 0; list-style: none; counter-reset: gt; }
.glyph-target { position: relative; display: grid; place-items: center; width: 70px; height: 70px; border: 1px solid var(--line-strong); background: rgba(6, 8, 14, .6); color: #8a8f99; counter-increment: gt; transition: color .4s, border-color .4s, box-shadow .4s; }
.glyph-target img { width: 46px; height: 46px; opacity: .55; transition: opacity .4s, filter .4s; }
.glyph-target.lit img { opacity: 1; filter: drop-shadow(0 0 6px rgba(255, 180, 106, .9)); }
.glyph-target.lit { color: var(--raid-hi); border-color: var(--raid); box-shadow: 0 0 20px rgba(255, 180, 106, .45); }
.glyph { position: absolute; right: 12px; bottom: 12px; display: grid; place-items: center; width: 46px; height: 46px; padding: 0; border: 1px solid rgba(255, 255, 255, .18); border-radius: 50%; background: rgba(6, 8, 14, .7); color: rgba(233, 227, 214, .5); cursor: pointer; transition: color .3s, border-color .3s, box-shadow .3s; }
.glyph img { width: 30px; height: 30px; opacity: .45; transition: opacity .3s, filter .3s; }
.glyph--second { right: 64px; }
.glyph:hover img, .glyph:focus-visible img { opacity: .9; }
.glyph.lit img { opacity: 1; filter: drop-shadow(0 0 6px rgba(255, 180, 106, .95)); }
.glyph:hover, .glyph:focus-visible { color: #fff; border-color: #fff; }
.glyph.lit { color: var(--raid-hi); border-color: var(--raid); box-shadow: 0 0 16px rgba(255, 180, 106, .6); }
.glyph.flash { animation: glyph-flash .5s; }
@keyframes glyph-flash { 40% { box-shadow: 0 0 26px #fff; color: #fff; } }

/* ---------- Étapes du raid ---------- */
.raid-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin: 0 0 clamp(30px, 4vw, 44px); padding: 0; list-style: none; }
.raid-step { position: relative; display: flex; flex-direction: column; border: 1px solid var(--line); background: var(--panel-solid); }
.raid-step figure { position: relative; margin: 0; aspect-ratio: 16 / 9; overflow: hidden; }
.raid-step figure img { width: 100%; height: 100%; object-fit: cover; }
.raid-step > div { padding: 16px 18px 62px; }
.raid-step h3 { margin: 4px 0 8px; font-size: 1.12rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; color: var(--pearl); }
.raid-step p:not(.tag) { margin: 0; font-size: .88rem; line-height: 1.6; color: var(--muted); }
.raid-step--last { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); border-color: color-mix(in srgb, var(--raid) 50%, transparent); }
.raid-step--last figure { aspect-ratio: auto; min-height: 260px; }
.raid-step--last > div { padding: 24px 26px; align-self: center; }

/* ---------- Runes de la Cour ---------- */
.runes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 0 0 clamp(30px, 4vw, 44px); padding: 0; list-style: none; }
.rune { position: relative; padding: 22px 22px 20px; border: 1px solid var(--line); border-top: 2px solid var(--court); background: var(--panel-solid); }
.rune-mark { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; color: var(--court-hi); }
.rune-mark > svg { width: 46px; height: 46px; }
.rune h3 { margin: 4px 0 6px; font-family: var(--font-lore); font-style: italic; font-weight: 500; font-size: 1.5rem; color: var(--court-hi); }
.rune p:not(.tag) { margin: 0; font-size: .9rem; color: var(--muted); }

/* ---------- La question de l'Écho (js/rituals.js) ---------- */
.heir { margin-top: 16px; padding: 16px 18px; border: 1px solid color-mix(in srgb, var(--heresy) 55%, transparent); background: color-mix(in srgb, var(--heresy) 8%, transparent); }
.heir-note { margin: 0 0 14px; font-family: var(--font-lore); font-style: italic; font-size: 1.15rem; line-height: 1.4; color: #e9e3d6; }
.heir-note[data-kind="ok"] { color: var(--heresy-hi); }
.heir-note[data-kind="bad"] { color: #ffb08a; }
.heir-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.heir[data-state="refused"] .heir-actions { display: none; }
.heir-duo { margin-top: clamp(30px, 4vw, 44px); }

/* ---------- Once de méchanceté ---------- */
.malice-steps { margin: 10px 0 12px; padding-left: 20px; font-size: .88rem; line-height: 1.6; color: var(--muted); }
.malice-steps li::marker { color: var(--exotic); font-weight: 800; }

/* ---------- Plan (brique commune : css/components/depths.css) ---------- */
.dread .depths { aspect-ratio: 10 / 11; }
.stratum--dehors { background: linear-gradient(180deg, #0b0c12, #1a1a14); }
.stratum--ponts { background: linear-gradient(180deg, #23241a 0%, #2c2c1c 60%, #262414 100%); }
.stratum--entrailles { background: linear-gradient(180deg, #1c1a12 0%, #161810 50%, #10140f 100%); }
.stratum--trone { background: linear-gradient(180deg, #160f0a 0%, #120a0c 50%, #0a0608 100%); }
.hull { fill: rgba(183, 197, 138, .08); stroke: rgba(238, 245, 210, .45); stroke-width: 1; stroke-linejoin: round; }
.dish { fill: none; stroke: rgba(160, 230, 255, .55); stroke-width: 1; }
.spines { stroke: rgba(238, 245, 210, .4); stroke-width: 1; }
.veins { fill: none; stroke: rgba(183, 197, 138, .35); stroke-width: 1.2; stroke-dasharray: 4 3; }
.way-line { stroke: rgba(231, 235, 245, .3); }
.way-line--rift { stroke: rgba(240, 180, 90, .85); stroke-dasharray: 1 5; stroke-linecap: round; }
.room-node--zone { color: #f4f0df; }
.room-node--far { color: #c9d6e6; }
.room-node--cabal { color: var(--cabal); }
.room-node--hive { color: var(--hive); }
.room-node--court { color: var(--court); }
.room-node--raid { color: var(--raid); }
.room-node--hidden { color: #ff9a8a; }
.dread .room-label { text-shadow: 0 1px 6px rgba(0, 0, 0, .95), 0 0 2px rgba(0, 0, 0, .9); }

/* ---------- Pastilles ---------- */
.dread .spot[hidden] { display: none; }
.spot[data-secret="winks"] { color: #fff4dc; border-color: rgba(224, 192, 106, .85); }
.spot[data-secret="fragments"] { color: #f2f6de; border-color: rgba(183, 197, 138, .95); box-shadow: 0 0 14px rgba(183, 197, 138, .5); }
.spot[data-secret="memories"] { color: #e9e0ff; border-color: rgba(183, 155, 255, .9); box-shadow: 0 0 14px rgba(183, 155, 255, .5); }
.spot[data-secret="court"] { color: #ffd7cc; border-color: rgba(255, 143, 122, .9); }
.spot[data-secret="keys"], .spot[data-secret="chests"] { color: #ffe9b8; border-color: rgba(224, 192, 106, .95); }

@media (max-width: 1200px) {
  .raid-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1020px) {
  .duo { grid-template-columns: minmax(0, 1fr); }
  .duo-photo { min-height: 0; aspect-ratio: 16 / 10; }
  .raid-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .raid-step--last { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 680px) {
  .dread .depths { aspect-ratio: 10 / 15; }
  .raid-steps, .runes { grid-template-columns: minmax(0, 1fr); }
  .glyph-panel { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .light-rule::after, .glyph.flash { animation: none; }
}
