/* ==========================================================================
   Skin « Belle Époque » : fantasy sombre et peinte, ornements art nouveau.
   Ciel de crépuscule peint, or patiné, ivoire et cramoisi, pétales qui tombent.
   Tout est rangé sous html.epoque : sans ce skin, rien ne change.
   ========================================================================== */
html.epoque {
  --bg: #121019;
  --panel: #1d1922;
  --panel2: #262029;
  --line: #4a3d2e;
  --text: #efe6d2;
  --muted: #a99c86;
  --red: #b8323f;
  --green: #7fa36a;
  --gold: #d4b06a;
  --blue: #8fb3c4;
  --gold-d: #8a6a32;
  --serif: 'Cormorant Garamond', Garamond, Georgia, serif;
  --caps: 'Cinzel', 'Trajan Pro', Georgia, serif;
  --orn: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='%23c9a45a'%3E%3Cg transform=''%3E%3Cpath d='M3 62V16Q3 3 16 3h46' stroke-width='1.5'/%3E%3Cpath d='M8 62V20Q8 8 20 8h42' stroke-width='.7' opacity='.7'/%3E%3Cpath d='M15 15c11 0 13 12 6 14s-7-5-2-6' stroke-width='1.3'/%3E%3Cpath d='M15 15c0 11 12 13 14 6' stroke-width='1.3'/%3E%3Cpath d='M30 3c2 4 6 5 10 5M3 30c4 2 5 6 5 10' stroke-width='1'/%3E%3Ccircle cx='15' cy='15' r='2.6' fill='%23c9a45a' stroke='none'/%3E%3C/g%3E%3C/svg%3E") left top / 46px no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='%23c9a45a'%3E%3Cg transform='translate%2864 0%29 scale%28-1 1%29'%3E%3Cpath d='M3 62V16Q3 3 16 3h46' stroke-width='1.5'/%3E%3Cpath d='M8 62V20Q8 8 20 8h42' stroke-width='.7' opacity='.7'/%3E%3Cpath d='M15 15c11 0 13 12 6 14s-7-5-2-6' stroke-width='1.3'/%3E%3Cpath d='M15 15c0 11 12 13 14 6' stroke-width='1.3'/%3E%3Cpath d='M30 3c2 4 6 5 10 5M3 30c4 2 5 6 5 10' stroke-width='1'/%3E%3Ccircle cx='15' cy='15' r='2.6' fill='%23c9a45a' stroke='none'/%3E%3C/g%3E%3C/svg%3E") right top / 46px no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='%23c9a45a'%3E%3Cg transform='translate%280 64%29 scale%281 -1%29'%3E%3Cpath d='M3 62V16Q3 3 16 3h46' stroke-width='1.5'/%3E%3Cpath d='M8 62V20Q8 8 20 8h42' stroke-width='.7' opacity='.7'/%3E%3Cpath d='M15 15c11 0 13 12 6 14s-7-5-2-6' stroke-width='1.3'/%3E%3Cpath d='M15 15c0 11 12 13 14 6' stroke-width='1.3'/%3E%3Cpath d='M30 3c2 4 6 5 10 5M3 30c4 2 5 6 5 10' stroke-width='1'/%3E%3Ccircle cx='15' cy='15' r='2.6' fill='%23c9a45a' stroke='none'/%3E%3C/g%3E%3C/svg%3E") left bottom / 46px no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='%23c9a45a'%3E%3Cg transform='translate%2864 64%29 scale%28-1 -1%29'%3E%3Cpath d='M3 62V16Q3 3 16 3h46' stroke-width='1.5'/%3E%3Cpath d='M8 62V20Q8 8 20 8h42' stroke-width='.7' opacity='.7'/%3E%3Cpath d='M15 15c11 0 13 12 6 14s-7-5-2-6' stroke-width='1.3'/%3E%3Cpath d='M15 15c0 11 12 13 14 6' stroke-width='1.3'/%3E%3Cpath d='M30 3c2 4 6 5 10 5M3 30c4 2 5 6 5 10' stroke-width='1'/%3E%3Ccircle cx='15' cy='15' r='2.6' fill='%23c9a45a' stroke='none'/%3E%3C/g%3E%3C/svg%3E") right bottom / 46px no-repeat;
  --paper: linear-gradient(180deg, rgba(255, 236, 200, .045), rgba(0, 0, 0, .12)), radial-gradient(ellipse 120% 80% at 50% 0%, #2a2230 0%, #1b1720 60%, #141118 100%);
}
html.epoque body {
  font-family: var(--serif); font-size: 17px; font-weight: 500;
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(212, 176, 106, .10), transparent 70%),
    radial-gradient(ellipse 120% 90% at 50% 110%, #2b1622 0%, transparent 60%),
    linear-gradient(180deg, #17141f 0%, #121019 100%);
  background-attachment: fixed;
}
html.epoque body::after {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 1000;
  background: radial-gradient(ellipse 110% 100% at 50% 45%, transparent 62%, rgba(0, 0, 0, .45) 100%);
}

/* ---------- typographie ---------- */
html.epoque h1, html.epoque h2, html.epoque h3, html.epoque .title, html.epoque .who, html.epoque .php,
html.epoque .banner, html.epoque .tb-text b, html.epoque .code b, html.epoque button.big, html.epoque .pd-step,
html.epoque .over h2, html.epoque .afloat, html.epoque .fx-float, html.epoque .g, html.epoque .die b {
  font-family: var(--caps) !important; font-weight: 700; letter-spacing: .06em;
}
html.epoque .logo { font-family: var(--caps) !important; font-weight: 900; letter-spacing: .22em; white-space: nowrap; color: var(--text);
  text-shadow: 0 1px 0 #000, 0 0 24px rgba(212, 176, 106, .25); }
html.epoque .logo > span:not(.logo-die) { color: var(--gold); }
html.epoque h2 { color: var(--gold); font-weight: 600 !important; letter-spacing: .18em; text-transform: uppercase; font-size: 15px !important;
  display: flex; align-items: center; gap: 12px; }
html.epoque h2::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--gold-d), transparent); }
html.epoque .hint, html.epoque .waiting, html.epoque .msg, html.epoque .rules p, html.epoque .rules li { font-style: italic; }

/* ---------- panneaux : papier sombre, double filet d'or, coins en volutes ---------- */
html.epoque .turn, html.epoque .qrbox, html.epoque .arena, html.epoque .podium {
  border-radius: 4px !important; border: 1px solid var(--gold-d) !important;
  box-shadow: inset 0 0 0 4px var(--bg), inset 0 0 0 5px rgba(212, 176, 106, .35), 0 18px 50px rgba(0, 0, 0, .55) !important;
}
html.epoque .turn, html.epoque .qrbox { background: var(--orn), var(--paper) !important; }
html.epoque .turn.mine { border-color: var(--gold) !important;
  box-shadow: inset 0 0 0 4px var(--bg), inset 0 0 0 5px var(--gold), 0 0 50px color-mix(in srgb, var(--c) 35%, transparent), 0 18px 50px rgba(0, 0, 0, .55) !important; }
html.epoque .who { color: var(--text); text-shadow: 0 2px 0 #000; }
html.epoque .round, html.epoque .chip { font-family: var(--caps); letter-spacing: .1em; border-radius: 2px; border-color: var(--gold-d); }

/* ---------- dés : os ivoire cerclé d'or, points d'encre ---------- */
html.epoque .die { border-radius: calc(var(--s) * .16); background: radial-gradient(circle at 30% 25%, #fbf3df, #e2d2ae 70%, #c8b386);
  box-shadow: inset 0 0 0 2px rgba(138, 106, 50, .55), inset 0 -5px 8px rgba(80, 50, 20, .25), 0 8px 18px rgba(0, 0, 0, .55); }
html.epoque .die i { background: radial-gradient(circle at 40% 35%, #4a1c22, #1c0b0e); }
html.epoque .die.locked { background: radial-gradient(circle at 30% 25%, #f4dc9a, #c9a24e 65%, #8a6a32);
  box-shadow: inset 0 0 0 2px #fff3c4, 0 0 0 2px var(--gold-d), 0 0 22px rgba(212, 176, 106, .55); }
html.epoque .die.locked::after { content: '✦'; color: var(--gold); text-shadow: 0 0 6px #000; top: -14px; right: -6px; font-size: 18px; }
html.epoque .die.sel { box-shadow: 0 0 0 3px var(--gold), 0 0 24px rgba(212, 176, 106, .6), 0 14px 22px rgba(0, 0, 0, .55); }
html.epoque .die.hit, html.epoque .die.atk { background: radial-gradient(circle at 30% 25%, #e7a2a0, #a8323c 65%, #5e1219); }
html.epoque .die.hit i, html.epoque .die.atk i { background: #fbf3df; }
html.epoque .die.hidden { background: radial-gradient(circle at 30% 25%, #3a3140, #1d1922); box-shadow: inset 0 0 0 1px var(--gold-d); }

/* ---------- boutons : laiton gravé, capitales romaines ---------- */
html.epoque button.big { border-radius: 3px; font-size: 17px; letter-spacing: .16em; text-transform: uppercase; color: #2a1c08;
  background: linear-gradient(180deg, #f0d79a 0%, #d4b06a 45%, #a9843f 100%);
  box-shadow: inset 0 0 0 1px #fff0c2, inset 0 0 0 3px rgba(90, 60, 20, .5), 0 5px 0 #5e4519, 0 10px 24px rgba(0, 0, 0, .5); text-shadow: 0 1px 0 rgba(255, 240, 200, .6); }
html.epoque button.big:active { box-shadow: inset 0 0 0 1px #fff0c2, inset 0 0 0 3px rgba(90, 60, 20, .5), 0 1px 0 #5e4519; }
html.epoque button.big.danger { color: #fbeee0; text-shadow: 0 1px 0 #000; background: linear-gradient(180deg, #c2505a, #8e1f2a 55%, #5a0f17);
  box-shadow: inset 0 0 0 1px #e8a3a3, inset 0 0 0 3px rgba(0, 0, 0, .35), 0 5px 0 #3a0910, 0 10px 24px rgba(0, 0, 0, .5); }
html.epoque button.big.good { color: #f3f0e0; text-shadow: 0 1px 0 #000; background: linear-gradient(180deg, #8fae78, #5b7a4a 55%, #374d2c);
  box-shadow: inset 0 0 0 1px #cfe3b8, inset 0 0 0 3px rgba(0, 0, 0, .35), 0 5px 0 #1f2c18, 0 10px 24px rgba(0, 0, 0, .5); }
html.epoque button.ghost, html.epoque button.target, html.epoque button.mini, html.epoque .sound-btn, html.epoque button.mode, html.epoque .hp-btn {
  border-radius: 3px !important; border: 1px solid var(--gold-d) !important; background: linear-gradient(180deg, #2a2330, #1d1922) !important; }
html.epoque button.target b, html.epoque button.mode b { font-family: var(--caps); letter-spacing: .08em; }
html.epoque button.mode.on, html.epoque .hp-btn.on { border-color: var(--gold) !important; box-shadow: inset 0 0 0 1px var(--gold), 0 0 18px rgba(212, 176, 106, .3); }

/* ---------- cartes joueurs : cartouche à filet, ruban de couleur ---------- */
html.epoque .pcard { border-radius: 3px; border: 1px solid var(--line); border-left: 1px solid var(--line); padding-left: 16px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--c) 18%, transparent), transparent 40%), var(--paper); }
html.epoque .pcard::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px;
  background: linear-gradient(180deg, var(--c), color-mix(in srgb, var(--c) 45%, #000)); box-shadow: 1px 0 0 var(--gold-d); }
html.epoque .pcard.current { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 0 26px rgba(212, 176, 106, .25); }
html.epoque .pcard.current::before { content: '✦'; color: var(--gold); font-size: 18px; }
html.epoque .pcard.is-dead { background: #141118; }
html.epoque .pname { font-family: var(--caps); font-weight: 700; letter-spacing: .06em; font-size: 15px; }
html.epoque .pname small { font-family: var(--serif); font-style: italic; letter-spacing: 0; }
html.epoque .php { color: var(--text); text-shadow: 0 2px 0 #000; }
html.epoque .php.neg { color: #e06a70; }
html.epoque .hpbar { height: 6px; border-radius: 0; background: #0c0a10; box-shadow: inset 0 0 0 1px var(--gold-d); }
html.epoque .hpbar div { background: linear-gradient(90deg, color-mix(in srgb, var(--c) 60%, #000), var(--c)); }
html.epoque .badge { border-radius: 2px; font-family: var(--serif); font-style: italic; font-size: 13px; }

/* ---------- jauge des totaux ---------- */
html.epoque .g { border-radius: 2px; }
html.epoque .g.atk { background: linear-gradient(180deg, #6e1c24, #4a1016); color: #f3c9c4; }
html.epoque .g.regen { background: linear-gradient(180deg, #3e5a3a, #2b4029); color: #d6ebc6; }
html.epoque .g.miss { background: #241f2a; color: #a69cad; }
html.epoque .g.now { outline-color: var(--gold); box-shadow: 0 0 14px rgba(212, 176, 106, .55); }
html.epoque .o { border-radius: 2px; font-family: var(--caps); letter-spacing: .06em; }

/* ---------- bandeaux de résultat ---------- */
html.epoque .banner { border-radius: 2px; letter-spacing: .1em;
  box-shadow: inset 0 0 0 3px rgba(10, 8, 14, .5), inset 0 0 0 4px rgba(212, 176, 106, .45), 0 10px 30px rgba(0, 0, 0, .45); }

/* ---------- journal : chronique en italique ---------- */
html.epoque .log li { border-radius: 0; background: transparent; border-left: 0; border-bottom: 1px solid rgba(212, 176, 106, .15);
  font-style: italic; font-size: 16px; padding: 8px 4px 8px 20px; position: relative; }
html.epoque .log li::before { content: '❧'; position: absolute; left: 0; top: 8px; color: var(--gold-d); font-style: normal; }
html.epoque .log li.attack::before { color: var(--red); }
html.epoque .log li.good::before { color: var(--green); }
html.epoque .log li.legend { color: var(--gold); }

/* ---------- arène : ciel de crépuscule peint, cité en ruine, brume, dalles ---------- */
html.epoque .arena, html.epoque .ep-hero {
  background:
    var(--orn),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 300' preserveAspectRatio='none'%3E%3Cpath d='M0 300V215l60-10 40 14 70-30 30 8 20-60 12 0 10 50 60-20 90 34 50-12 40 18 30-4V120l8-30 8 30v70l40 10 60-30 30 8 14-90 6-20 6 20 12 96 50 14 70-28 40 12 30-50 10 0 12 46 60 20 60-24 50 18 40-10 70 26 42-8V300Z' fill='%232a1f2e'/%3E%3Cpath d='M0 300V250l90-14 110 20 130-26 120 22 140-18 150 24 120-20 130 18 110-12 100 16V300Z' fill='%231a1420'/%3E%3C/svg%3E") center 74% / 100% 40% no-repeat,
    radial-gradient(ellipse 30% 22% at 62% 56%, rgba(255, 214, 160, .55), transparent 70%),
    radial-gradient(ellipse 80% 40% at 30% 18%, rgba(190, 120, 150, .35), transparent 70%),
    linear-gradient(180deg, #1c2236 0%, #3b3350 28%, #8a5a6a 50%, #d39a78 62%, #e8bf8f 70%, #2a1f2e 74%) !important;
}
html.epoque .arena::before {
  background:
    linear-gradient(180deg, transparent 52%, rgba(236, 200, 170, .22) 66%, transparent 76%),
    radial-gradient(ellipse 2.5% 34% at 62% 40%, rgba(255, 236, 200, .45), transparent 80%) !important;
  animation: ep-mist 14s ease-in-out infinite alternate;
}
@keyframes ep-mist { from { opacity: .7; transform: translateX(-1%); } to { opacity: 1; transform: translateX(1%); } }
html.epoque .arena-floor { height: 26%; border-top: 1px solid rgba(212, 176, 106, .55);
  background:
    linear-gradient(180deg, rgba(232, 191, 143, .22), transparent 30%),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, .35) 0 1px, transparent 1px 12%),
    linear-gradient(180deg, #2d2330, #15111a);
}
html.epoque .hero-svg { filter: sepia(.28) saturate(.82) contrast(1.06) drop-shadow(0 0 1px rgba(255, 220, 170, .7)) drop-shadow(0 8px 10px rgba(0, 0, 0, .55)); }
html.epoque .hero .hname, html.epoque .shero .hname, html.epoque .pd-name { font-family: var(--caps); letter-spacing: .08em; font-weight: 700; }
html.epoque .hero .spot { background: radial-gradient(ellipse, rgba(255, 220, 160, .55), transparent 70%); }
html.epoque .shero .ring { display: none; } /* l'ombre au sol du sprite suffit : pas de second halo */
html.epoque .afloat, html.epoque .fx-float { text-shadow: 0 2px 0 #000, 0 0 18px rgba(0, 0, 0, .8) !important; }

/* bandeau de début de tour */
html.epoque .turn-banner { border-top: 1px solid var(--gold); border-bottom: 1px solid var(--gold);
  background: linear-gradient(90deg, transparent, rgba(18, 16, 25, .92) 18%, rgba(18, 16, 25, .92) 82%, transparent); }
html.epoque .tb-text b { color: var(--text); letter-spacing: .06em; text-wrap: balance; font-size: clamp(16px, 2vw, 34px) !important; }
html.epoque .tb-text small { font-family: var(--serif); font-style: italic; text-transform: none; letter-spacing: .02em; color: var(--gold); }

/* ---------- salon ---------- */
html.epoque .code b { color: var(--gold); letter-spacing: .3em; text-shadow: 0 2px 0 #000, 0 0 22px rgba(212, 176, 106, .35); }
html.epoque .qr { border-radius: 2px; box-shadow: 0 0 0 1px var(--gold-d), 0 0 0 6px #efe6d2; }
html.epoque .opt { border-radius: 3px; }
html.epoque .opt b { font-family: var(--caps); letter-spacing: .06em; }

/* ---------- fin de partie ---------- */
html.epoque .over h2 { color: var(--gold); letter-spacing: .2em; text-shadow: 0 3px 0 #000, 0 0 40px rgba(212, 176, 106, .35); justify-content: center; font-size: 56px !important; }
html.epoque .over h2::after { display: none; }
html.epoque .pd-step { border-radius: 2px 2px 0 0; color: #2a1c08; background: linear-gradient(180deg, #f0d79a, #b8913f 60%, #7a5a26);
  box-shadow: inset 0 0 0 1px #fff0c2, 0 -4px 30px rgba(212, 176, 106, .3); }

/* ---------- téléphone ---------- */
html.epoque header { border-bottom: 1px solid var(--gold-d); }
html.epoque header .nm { font-family: var(--caps); letter-spacing: .06em; }
html.epoque header .hp { font-family: var(--caps); font-weight: 700; color: var(--gold); }
html.epoque header .hp small { font-family: var(--serif); font-style: italic; }
html.epoque .join input { border-radius: 3px; border: 1px solid var(--gold-d); background: var(--panel); font-family: var(--caps); letter-spacing: .2em; }
html.epoque .when { border-radius: 3px; font-style: italic; }

/* ---------- pétales qui tombent ---------- */
#petals { position: fixed; inset: 0; pointer-events: none; z-index: 999; overflow: hidden; }
#petals i { position: absolute; top: -4vh; left: var(--x); width: calc(14px * var(--s)); height: calc(9px * var(--s));
  border-radius: 0 100% 0 100%; opacity: .75; background: linear-gradient(135deg, #e7a9a8, #a8323c);
  animation: ep-fall var(--t) linear var(--d) infinite; }
#petals i:nth-child(3n) { background: linear-gradient(135deg, #f3e3c0, #c9a45a); opacity: .55; }
@keyframes ep-fall {
  0% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(var(--w), 55vh) rotate(260deg); }
  100% { transform: translate(calc(var(--w) * -0.4), 112vh) rotate(520deg); }
}
@media (prefers-reduced-motion: reduce) { #petals { display: none; } html.epoque .arena::before { animation: none; } }

/* ---------- illustrations peintes : usure par la lumière et la couleur ---------- */
html.epoque .hero-svg.painted { filter: drop-shadow(0 0 1.5px rgba(255, 220, 170, .55)) drop-shadow(0 10px 12px rgba(0, 0, 0, .6)); }
html.epoque .hero-svg.painted[data-l="2"] { filter: saturate(.85) brightness(.95) drop-shadow(0 0 1.5px rgba(255, 220, 170, .45)) drop-shadow(0 10px 12px rgba(0, 0, 0, .6)); }
html.epoque .hero-svg.painted[data-l="3"] { filter: saturate(.65) brightness(.85) sepia(.25) drop-shadow(0 0 2px rgba(184, 50, 63, .7)) drop-shadow(0 10px 12px rgba(0, 0, 0, .6)); }
html.epoque .hero-svg.painted[data-l="4"] { filter: saturate(.3) brightness(.7) contrast(1.1) drop-shadow(0 0 3px rgba(184, 50, 63, .8)) drop-shadow(0 10px 12px rgba(0, 0, 0, .6)); }
html.epoque .hero-svg.painted.zombie { filter: hue-rotate(70deg) saturate(.7) brightness(.85) drop-shadow(0 0 4px rgba(127, 200, 90, .7)) drop-shadow(0 10px 12px rgba(0, 0, 0, .6)) !important; }

/* calme : seul le héros dont c'est le tour respire ; les autres restent immobiles */
html.epoque .hero .fig, html.epoque .shero .fig, html.epoque .hero.zombie .fig { animation: none; }
html.epoque .hero.targeted .body { animation: none; }
html.epoque .hero.active .hero-svg.painted .h-body { transform-box: view-box; transform-origin: 50px 124px; animation: ep-breathe 3.8s ease-in-out infinite; }
@keyframes ep-breathe { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.006, 1.012); } }
/* sprites plus petits : marge au-dessus pour les sauts et les coups, rien ne sort du cadre */
html.epoque .hero { height: 66%; }
html.epoque .hero.active { transform: scale(1.04); }
html.epoque .shero { height: 60%; bottom: 9%; }
.shero.ghost { pointer-events: none; z-index: 1; filter: blur(1px) sepia(.6) brightness(1.3); }
.shero.ghost .ring, .shero.ghost .hname { display: none; }
@media (prefers-reduced-motion: reduce) { html.epoque .hero-svg.painted .h-body { animation: none; } }

/* héros avec images d'usure dessinées : pas de filtre d'assombrissement, sauf en PV négatifs */
html.epoque .hero-svg.painted.worn[data-l] { filter: drop-shadow(0 0 1.5px rgba(255, 220, 170, .5)) drop-shadow(0 10px 12px rgba(0, 0, 0, .6)); }
html.epoque .hero-svg.painted.worn[data-l="4"] { filter: saturate(.6) brightness(.8) drop-shadow(0 0 3px rgba(184, 50, 63, .8)) drop-shadow(0 10px 12px rgba(0, 0, 0, .6)); }

/* fin de partie : titre qui passe à la ligne au lieu de déborder, gagnant entièrement dans le cadre du podium */
html.epoque .over h2 { display: block; font-size: clamp(30px, 4.6vw, 56px) !important; letter-spacing: .12em; text-wrap: balance; overflow-wrap: anywhere; }
.pd-hero.winner .pd-fig svg { width: auto; max-width: 100%; margin: 0 auto;
  max-height: calc(clamp(260px, 42vh, 460px) - clamp(40px, 7vh, 80px) - clamp(16px, 1.8vw, 28px) - 60px); }

/* ---------- portraits en médaillon : cadre d'or, liseré à la couleur du joueur ---------- */
.portrait { display: block; aspect-ratio: 1; border-radius: 50%; overflow: hidden; position: relative;
  background-color: #1b1720; background-repeat: no-repeat; background-size: 260% auto;
  box-shadow: 0 0 0 1px #000, 0 0 0 2px var(--gold-d, #8a6a32), 0 0 0 4px var(--c), 0 0 0 5px #000, 0 4px 12px rgba(0, 0, 0, .6); }
.portrait::after { content: ''; position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 50% 30%, transparent 55%, rgba(0, 0, 0, .45) 100%); }
.portrait.zombie { filter: hue-rotate(70deg) saturate(.7); }
html.epoque .pcard { padding-right: 76px; min-height: 84px; }
html.epoque .pcard > .portrait { position: absolute; right: 12px; top: 50%; width: 54px; transform: translateY(-50%); }
html.epoque .pcard.current > .portrait { box-shadow: 0 0 0 1px #000, 0 0 0 2px var(--gold), 0 0 0 4px var(--c), 0 0 0 5px #000, 0 0 18px rgba(212, 176, 106, .55); }
html.epoque .pcard.current::before { right: 70px; }
html.epoque .pcard .pname { padding-right: 18px; }
html.epoque .pcard.is-dead > .portrait { filter: grayscale(1) brightness(.6); }
html.epoque .tb-portrait { width: clamp(70px, 7vw, 120px); }
html.epoque .tb-portrait .portrait { width: 100%; }
.mini-portrait { width: 34px; flex: none; display: block; }
.mini-portrait .portrait { width: 100%; box-shadow: 0 0 0 1px #000, 0 0 0 2px var(--c), 0 2px 6px rgba(0, 0, 0, .6); }
@media (max-width: 1100px) {
  /* téléphone : le nom garde toute la largeur, le médaillon se range à côté des PV */
  html.epoque .pcard { padding-right: 12px; min-height: 0; }
  html.epoque .pcard > .portrait { width: 36px; right: 9px; top: 32px; transform: none; }
  html.epoque .pcard.current::before { right: 9px; }
  html.epoque .pcard .pname { font-size: 13px; letter-spacing: .02em; padding-right: 16px; }
  html.epoque .pcard .hpbar { margin-right: 44px; }
}

html.epoque .hp-btn span small { display: block; font-style: italic; font-size: 11px; color: var(--muted); }

/* effets dessinés (épée, éclair, fiole, tombe, main, projectiles) : teinte chaude pour s'accorder aux illustrations peintes */
html.epoque .fx-sword svg, html.epoque .fx-bolt svg, html.epoque .fx-potion svg, html.epoque .fx-tomb svg, html.epoque .fx-hand svg,
html.epoque .tomb svg, html.epoque .afx svg, html.epoque .pd-fig .tomb, html.epoque .confetti i {
  filter: sepia(.45) saturate(.75) contrast(1.05) drop-shadow(0 3px 4px rgba(0, 0, 0, .5));
}
html.epoque .confetti i { filter: sepia(.5) saturate(.7); }
html.epoque .hp-btn { padding: 12px 4px 8px; gap: 8px; }
html.epoque .hp-btn .portrait { width: 62px; }
html.epoque .hp-btn span { font-family: var(--caps); font-size: 12px; letter-spacing: .04em; }

/* ==========================================================================
   Salon de la TV : tableau de crépuscule avec la compagnie, billet d'expédition (QR), règles
   ========================================================================== */
body.in-lobby .top .logo { visibility: hidden; }
.lobby.ep-lobby { display: block; }
.ep-hero { position: relative; height: clamp(240px, 33vh, 420px); border-radius: 4px; overflow: hidden; border: 1px solid var(--gold-d);
  box-shadow: inset 0 0 0 4px var(--bg), inset 0 0 0 5px rgba(212, 176, 106, .35), 0 18px 50px rgba(0, 0, 0, .55); }
.ep-hero::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 120% 90% at 50% 40%, transparent 55%, rgba(10, 8, 14, .55) 100%); }
.ep-title { position: absolute; left: 0; right: 0; top: 5%; text-align: center; z-index: 2; }
.ep-title small { display: block; font-family: var(--serif); font-style: italic; font-size: clamp(15px, 1.4vw, 24px); color: #f3dfc0; text-shadow: 0 2px 6px rgba(0, 0, 0, .6); }
.ep-title h1 { margin: 2px 0 0; font-family: var(--caps) !important; font-weight: 900; font-size: clamp(50px, 5.6vw, 104px); letter-spacing: .28em; padding-left: .28em;
  color: #f6ecd8; text-shadow: 0 3px 0 rgba(0, 0, 0, .45), 0 0 40px rgba(255, 220, 170, .35); line-height: 1; text-transform: uppercase; }
.ep-title h1 span { color: var(--gold); }
.ep-title em { display: block; margin-top: 8px; font-family: var(--serif); font-size: clamp(13px, 1.1vw, 19px); color: #e7cfae; letter-spacing: .08em; }
.ep-party { position: absolute; left: 4%; right: 4%; bottom: 8%; height: 38%; display: flex; align-items: flex-end; justify-content: center; gap: 2%; z-index: 1; }
.ep-member { flex: 0 1 calc(min(150px, 92% / var(--n))); height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  animation: ep-arrive .9s cubic-bezier(.2, .8, .2, 1) both; }
.ep-member .ep-fig { width: 100%; flex: 1; display: flex; align-items: flex-end; min-height: 0; }
.ep-member .ep-fig svg { width: 100%; max-height: 100%; height: auto; filter: drop-shadow(0 0 1.5px rgba(255, 220, 170, .5)) drop-shadow(0 10px 12px rgba(0, 0, 0, .6)); }
.ep-member span { margin-top: 4px; font-family: var(--caps); font-weight: 700; letter-spacing: .06em; font-size: clamp(11px, 1vw, 16px); color: var(--c); text-shadow: 0 2px 4px #000;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ep-member.ghost .ep-fig { flex: 0 0 78%; margin: 0 26%; width: 48%; border: 1px dashed rgba(246, 236, 216, .55); border-radius: 50% 50% 10px 10px / 22% 22% 10px 10px;
  background: radial-gradient(ellipse at 50% 22%, rgba(246, 236, 216, .22) 0 14%, transparent 15%), linear-gradient(180deg, rgba(246, 236, 216, .08), rgba(246, 236, 216, .02));
  animation: ep-ghost 2.6s ease-in-out infinite; }
.ep-member.ghost span { color: #d9c7aa; font-family: var(--serif); font-style: italic; font-weight: 500; letter-spacing: 0; }
@keyframes ep-arrive { from { opacity: 0; transform: translateY(12%); } to { opacity: 1; transform: none; } }
@keyframes ep-ghost { 50% { opacity: .3; } }
.ep-shore { position: absolute; left: 0; right: 0; bottom: 0; height: 14%; z-index: 0; border-top: 1px solid rgba(212, 176, 106, .45);
  background: linear-gradient(180deg, rgba(232, 191, 143, .2), transparent 40%), linear-gradient(180deg, #2d2330, #15111a); }

.ep-row { display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr) minmax(0, 1fr); gap: 28px; margin-top: 24px; align-items: start; }
html.epoque .qrbox.ep-ticket { padding: 26px 24px 22px !important; text-align: center;
  background: var(--orn), linear-gradient(180deg, #f3e7cf, #e6d4b0) !important; color: #2a1c10; }
.ep-ticket-head { font-family: var(--caps); font-weight: 700; letter-spacing: .3em; text-transform: uppercase; font-size: 13px; color: #7a2a2a; margin-bottom: 12px;
  display: flex; align-items: center; gap: 10px; }
.ep-ticket-head::before, .ep-ticket-head::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, #9a7a45, transparent); }
.ep-ticket .qr { max-width: 260px; background: #fffaf0; box-shadow: 0 0 0 1px #9a7a45, 0 0 0 5px #fffaf0, 0 0 0 6px #9a7a45 !important; border-radius: 2px; }
.ep-ticket .code { color: #5a4630; font-family: var(--serif); font-style: italic; margin-top: 18px; }
.ep-ticket .code b { color: #7a2a2a !important; text-shadow: none !important; font-size: 40px; letter-spacing: .26em; padding-left: .26em; }
.ep-ticket .waiting { color: #4a3a28; font-style: italic; }
.ep-ticket .waiting b, .ep-ticket .help b { color: #2a1c10; }
.ep-ticket .help { color: #4a3a28; }
.ep-ticket .help summary { color: #2a1c10; }
.ep-roster .board { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)) !important; }
.ep-rules .rules { font-size: 16px; line-height: 1.45; columns: 1; }
.ep-rules .rules h3 { font-family: var(--caps); letter-spacing: .1em; color: var(--gold); font-size: 14px; margin: 14px 0 4px; }
@media (max-width: 1100px) {
  .ep-row { grid-template-columns: 1fr; }
}
.ep-roster .opts .opt small { display: none; }
.ep-roster .opts .opt { padding-top: 8px; padding-bottom: 8px; }
.ep-roster .opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }

/* ---------- accueil du téléphone : même tableau, billet ivoire ---------- */
.ep-hero.ep-hero-phone { height: 230px; margin: 14px 0 0; }
.ep-hero-phone .ep-title { top: 16%; }
.ep-hero-phone .ep-title h1 { font-size: 46px; letter-spacing: .22em; padding-left: .22em; }
.ep-hero-phone .ep-title small { font-size: 15px; }
.ep-hero-phone .ep-title em { font-size: 13px; }
.join.ep-card { position: relative; margin: -34px 10px 0; padding: 22px 18px 20px; gap: 12px; border-radius: 3px; z-index: 2; align-items: stretch;
  background: var(--orn), linear-gradient(180deg, #f3e7cf, #e3cfa8); color: #2a1c10;
  box-shadow: 0 0 0 1px #9a7a45, 0 0 0 5px #f3e7cf, 0 0 0 6px #9a7a45, 0 18px 40px rgba(0, 0, 0, .6); }
.ep-card .ep-ticket-head { margin-bottom: 0; }
.ep-card .ep-label { font-family: var(--serif); font-style: italic; color: #5a4630; text-align: center; font-size: 16px; }
.ep-card .ep-table { margin: 0; text-align: center; font-family: var(--serif); color: #5a4630; font-style: italic; }
.ep-card .ep-table b { font-family: var(--caps); font-style: normal; color: #7a2a2a; letter-spacing: .2em; }
html.epoque .ep-card input { max-width: none; background: #fffaf0; color: #2a1c10; border: 1px solid #9a7a45; font-family: var(--caps); letter-spacing: .12em; }
html.epoque .ep-card input::placeholder { color: #85704e; }
html.epoque .ep-card input:focus { border-color: #7a2a2a; box-shadow: 0 0 0 2px rgba(122, 42, 42, .25); }
.ep-card button.big { max-width: none; }
.ep-card .msg { color: #5a4630; margin: 0; font-style: italic; }

/* télé (grand écran vu de loin) : journal et noms un peu plus grands */
@media (min-width: 1600px) {
  html.epoque .log li { font-size: 18px; }
  html.epoque .pcard .pname { font-size: 17px; }
  html.epoque .badge { font-size: 14px; }
}
