/* HS « Édition Sorcier » (thème Harry Potter) — d'après le design board « Grimoire Sorcier » (Claude Design).
   Ne s'applique que sous [data-wz] : <body> pour le compte concerné, #chat pour l'admin dans sa discussion avec elle.
   Les animations sont préfixées wz- pour ne jamais remplacer celles du reste de l'app. */
@font-face { font-family: 'Cinzel'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(/fonts/cinzel-latin-variable.woff2) format('woff2'); }
@font-face { font-family: 'Cinzel Decorative'; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/cinzel-decorative-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'IM Fell English'; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/im-fell-english-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'IM Fell English'; font-style: italic; font-weight: 400; font-display: swap; src: url(/fonts/im-fell-english-latin-400-italic.woff2) format('woff2'); }

/* ---------- Jetons ---------- */
[data-wz], .wzi {
  --void: #050407; --night: #0d0b10; --wz-panel: #151219;
  --parchment-hi: #f6ebd0; --parchment: #efe2c2; --parchment-2: #ddc99c;
  --ink: #2b1b10; --ink-soft: #6b5340;
  --wz-text: #f1e9d8; --wz-muted: #b3a998;
  --ember: #ff7a2e; --online: #3ccf73; --wz-danger: #ff9b8a;
  --font-title: 'Cinzel Decorative', serif;
  --font-head: 'Cinzel', serif;
  --font-body: 'IM Fell English', Georgia, serif;
  --sh-bubble: 0 2px 6px rgb(0 0 0 / .35);
  --sh-card: 0 4px 14px rgb(0 0 0 / .45);
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  /* Gryffondor par défaut (avant le choix) */
  --house: #740001; --house-2: #d3a625; --house-on: #fff3d6; --house-glow: #ff9a3c; --house-deep: #2a0003; --house-line: #d3a625; --house-ink: #740001;
}
[data-house="gryffondor"]  { --house: #740001; --house-2: #d3a625; --house-on: #fff3d6; --house-glow: #ff9a3c; --house-deep: #2a0003; --house-line: #d3a625; --house-ink: #740001; }
[data-house="serpentard"]  { --house: #1a472a; --house-2: #c0c7cf; --house-on: #eef3ef; --house-glow: #5fd38d; --house-deep: #07170d; --house-line: #c0c7cf; --house-ink: #1a472a; }
[data-house="serdaigle"]   { --house: #0e1a40; --house-2: #b08d57; --house-on: #e8eefc; --house-glow: #6aa8ff; --house-deep: #050a1c; --house-line: #c9a46a; --house-ink: #0e1a40; }
[data-house="poufsouffle"] { --house: #ecb939; --house-2: #372e29; --house-on: #1d1712; --house-glow: #ffd54a; --house-deep: #1b1609; --house-line: #ecb939; --house-ink: #6a4f08; }
[data-house="mangemort"]   { --house: #0f1416; --house-2: #36d6e7; --house-on: #dcfbff; --house-glow: #8ff3ff; --house-deep: #020607; --house-line: #36d6e7; --house-ink: #09535c; }

/* Les couleurs de HS prennent celles du thème (sombre, quelle que soit l'apparence choisie) */
[data-wz] {
  --accent: var(--house); --accent-ink: var(--house-on);
  --bg: var(--night); --panel: var(--wz-panel); --panel-2: #1f1a24; --line: #2e2733;
  --text: var(--wz-text); --muted: var(--wz-muted); --danger: var(--wz-danger);
  --theirs: var(--parchment); --mine: var(--house); --chat-bg: var(--night);
  color-scheme: dark; font-family: var(--font-body);
}
body[data-wz] { background: var(--night); color: var(--wz-text); }

/* ---------- Discussion : en-tête ---------- */
[data-wz] #chat > header.bar, #chat[data-wz] > header.bar {
  position: relative; background: linear-gradient(180deg, #000, var(--house-deep) 70%); border-bottom: 2px solid var(--house); box-shadow: 0 1px 0 var(--house-2);
}
[data-wz] #chat > header.bar .icon-btn, #chat[data-wz] > header.bar .icon-btn { color: var(--house-line); }
[data-wz] #peer-name { font-family: var(--font-head); font-weight: 600; letter-spacing: .05em; color: var(--wz-text); }
[data-wz] #peer-status { font-style: italic; color: var(--wz-muted); }
[data-wz] #peer-status.typing { color: var(--house-glow); }
[data-wz] .peer-note { background: var(--parchment); color: var(--ink); font-style: italic; border-radius: 10px; transform: rotate(-2deg); box-shadow: 0 2px 5px rgb(0 0 0 / .45); }
[data-wz] #chat > header.bar .avatar { box-shadow: 0 0 0 2px var(--house), 0 0 0 3px var(--house-2); }
.wz-crest { width: 28px; height: 32px; object-fit: contain; flex-shrink: 0; filter: drop-shadow(0 2px 3px rgb(0 0 0 / .6)); }
.wz-mark { display: inline-block; width: 24px; height: 30px; flex-shrink: 0; -webkit-mask: url(/sorcier/mangemort.png) center / contain no-repeat; mask: url(/sorcier/mangemort.png) center / contain no-repeat;
  background: linear-gradient(180deg, #b9fbff, #36d6e7 55%, #0f8fa0); filter: drop-shadow(0 0 5px rgb(54 214 231 / .6)); }

/* Barres épinglés / programmés */
[data-wz] .pin-bar, [data-wz] .sched-bar { background: var(--house-deep); color: var(--wz-text); border-bottom: 1px solid color-mix(in srgb, var(--house-line) 35%, transparent); }
[data-wz] .pin-bar strong, [data-wz] .sched-bar strong { font-family: var(--font-head); letter-spacing: .1em; color: var(--house-line); }

/* ---------- Messages ---------- */
[data-wz] #messages { position: relative; }
[data-wz] .bubble { font-family: var(--font-body); font-size: 16px; line-height: 1.35; }
/* opacité des bulles : le réglage des paramètres (--bubble-pct) s'applique aussi au thème */
[data-wz] .msg.theirs .bubble { background: linear-gradient(170deg, color-mix(in srgb, var(--parchment-hi) var(--bubble-pct, 100%), transparent), color-mix(in srgb, var(--parchment) var(--bubble-pct, 100%), transparent) 60%, color-mix(in srgb, var(--parchment-2) var(--bubble-pct, 100%), transparent)); color: var(--ink); border-radius: 4px 14px 14px 14px; box-shadow: var(--sh-bubble); }
[data-wz] .msg.theirs .meta { color: var(--ink-soft); }
[data-wz] .msg.mine .bubble { background: color-mix(in srgb, var(--house) var(--bubble-pct, 100%), transparent); color: var(--house-on); border: 1px solid var(--house-2); border-radius: 14px 4px 14px 14px; box-shadow: var(--sh-bubble); }
[data-wz] .msg.mine .meta { color: color-mix(in srgb, var(--house-on) 78%, transparent); }
[data-wz] .meta { font-style: italic; }
[data-wz] .msg.fresh .bubble { animation: wz-appear .45s var(--ease-out) both; }
[data-wz] .quote { border-left: 2px solid currentColor; background: rgb(0 0 0 / .14); border-radius: 0 6px 6px 0; }
[data-wz] .quote strong { font-family: var(--font-head); font-size: 11px; letter-spacing: .06em; }
[data-wz] .reacts { background: var(--night); border: 1px solid var(--house-line); color: var(--wz-text); }
[data-wz] .day-sep span { background: rgb(5 4 7 / .7); color: var(--house-line); border: 1px solid color-mix(in srgb, var(--house-line) 45%, transparent);
  font-family: var(--font-head); font-weight: 600; font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; }
[data-wz] .load-older { background: rgb(5 4 7 / .7); color: var(--house-line); border: 1px solid color-mix(in srgb, var(--house-line) 50%, transparent); font-family: var(--font-head); letter-spacing: .1em; }

/* Photos façon polaroïd, inclinées (la bulle s'efface autour) */
[data-wz] .msg:not(.sticker):not(.gif) .bubble:has(> .file > .media) { background: none; border: 0; box-shadow: none; padding: 4px 4px 0; }
[data-wz] .msg:not(.sticker):not(.gif) .file > .media:not(.gif) { display: block; width: 196px; padding: 7px 7px 26px; background: #fbf6ea; border-radius: 3px; box-shadow: 0 6px 16px rgb(0 0 0 / .5); transform: rotate(-3deg); position: relative; }
[data-wz] .msg.mine:not(.sticker):not(.gif) .file > .media:not(.gif) { transform: rotate(2deg); }
[data-wz] .msg:not(.sticker):not(.gif) .file > .media:not(.gif) img,
[data-wz] .msg:not(.sticker):not(.gif) .file > .media:not(.gif) video { display: block; width: 100%; height: 160px; object-fit: cover; border-radius: 1px; max-height: none; }
[data-wz] .msg .bubble:has(> .file > .media) .text { margin-top: 8px; padding: 6px 11px; border-radius: 4px 12px 12px 12px; background: var(--parchment); color: var(--ink); font-size: 15px; }
[data-wz] .msg.mine .bubble:has(> .file > .media) .text { border-radius: 12px 4px 12px 12px; background: var(--house); color: var(--house-on); border: 1px solid var(--house-2); }
[data-wz] .msg .bubble:has(> .file > .media) .meta { color: var(--wz-text); text-shadow: 0 1px 4px #000; padding: 2px 4px; }
/* Pile : plusieurs photos envoyées à la suite = une seule pile (on touche pour ouvrir) */
[data-wz] .msg.wz-stack-member { display: none; }
[data-wz] .msg.wz-stack-head .file > .media::before, [data-wz] .msg.wz-stack-head .file > .media::after {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 3px; background: #fbf6ea; box-shadow: 0 4px 10px rgb(0 0 0 / .45); }
[data-wz] .msg.wz-stack-head .file > .media::before { transform: rotate(10deg) translate(6px, 2px); }
[data-wz] .msg.wz-stack-head .file > .media::after { transform: rotate(-8deg) translate(-4px, 3px); }
[data-wz] .msg.wz-stack-head .file > .media { z-index: 0; isolation: isolate; }
[data-wz] .msg.wz-stack-head .file { position: relative; }
[data-wz] .msg.wz-stack-head .file::after { content: attr(data-count); position: absolute; right: -6px; top: -8px; z-index: 2; min-width: 30px; height: 30px; padding: 0 8px; border-radius: 999px;
  display: grid; place-items: center; font-family: var(--font-head); font-size: 13px; font-weight: 700; background: var(--house); color: var(--house-on); border: 1px solid var(--house-2); box-shadow: 0 2px 8px rgb(0 0 0 / .5); }
[data-wz] .file-card { background: rgb(0 0 0 / .1); border-radius: 10px; }
[data-wz] .msg.theirs .file-card { color: var(--ink); }

/* Cartes de jeu sur parchemin */
[data-wz] .game-card { background: linear-gradient(170deg, var(--parchment-hi), var(--parchment) 60%, var(--parchment-2)); color: var(--ink); border-radius: 8px; border-top: 4px solid var(--house); box-shadow: var(--sh-card); }
[data-wz] .game-title { font-family: var(--font-head); letter-spacing: .14em; text-transform: uppercase; color: var(--house-ink); }
[data-wz] .ttt-cell { font-family: var(--font-title); color: var(--ink); }
[data-wz] .ttt-cell.x { color: var(--house-ink); }
[data-wz] .game-status { font-style: italic; }
[data-wz] .coin { background: radial-gradient(circle at 35% 30%, #fff6d8, var(--house-2) 45%, color-mix(in srgb, var(--house-2) 60%, #000)); color: var(--ink); font-family: var(--font-title); }

/* ---------- Zone de saisie ---------- */
[data-wz] .composer, #chat[data-wz] .composer { background: linear-gradient(0deg, #000, var(--house-deep) 70%); border-top: 2px solid var(--house); }
[data-wz] .composer .icon-btn { color: var(--house-line); }
[data-wz] .composer textarea { background: var(--parchment); color: var(--ink); font-family: var(--font-body); font-size: 16px; border: 0; box-shadow: inset 0 2px 6px rgb(120 80 30 / .35); }
[data-wz] .composer textarea::placeholder { color: var(--ink-soft); font-style: italic; }
[data-wz] .composer .text-box .icon-btn { color: var(--ink-soft); }
[data-wz] .send { background: var(--house); color: var(--house-on); border: 1px solid var(--house-2); }
[data-wz] .send.wz-cast { animation: wz-cast .7s ease; }
[data-wz] .reply-bar, [data-wz] .edit-bar { background: var(--house-deep); color: var(--wz-text); }

/* ---------- Feuilles, menus, réglages ---------- */
body[data-wz] .sheet, body[data-wz] dialog.sheet { background: linear-gradient(180deg, var(--house-deep), var(--night) 45%); color: var(--wz-text); }
body[data-wz] .sheet-head { border-bottom: 2px solid var(--house); }
body[data-wz] .sheet-head strong { font-family: var(--font-title); letter-spacing: .04em; }
body[data-wz] .card { border-top: 3px solid var(--house); }
body[data-wz] .card h3 { font-family: var(--font-head); letter-spacing: .12em; text-transform: uppercase; color: var(--house-line); }
body[data-wz] .menu { background: var(--wz-panel); border: 1px solid color-mix(in srgb, var(--house-line) 40%, transparent); }
body[data-wz] .menu button { font-family: var(--font-head); letter-spacing: .03em; }
body[data-wz] button.primary, body[data-wz] .primary { background: var(--house); color: var(--house-on); border-color: var(--house-2); }
body[data-wz] #notif-pop { background: var(--house-deep); border: 1px solid var(--house-line); color: var(--wz-text); }
.wz-house-card { display: flex; align-items: center; gap: 14px; }
.wz-house-card img, .wz-house-card .wz-mark { width: 52px; height: 60px; }
.wz-house-card b { display: block; font-family: var(--font-head); letter-spacing: .1em; text-transform: uppercase; font-size: 16px; }
.wz-house-card small { font-style: italic; color: var(--wz-muted); }

/* ---------- Poussière de fée ---------- */
.wz-dust { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 3; }
.wz-dust i { position: absolute; bottom: -10px; width: 3px; height: 3px; border-radius: 50%; background: var(--house-glow); box-shadow: 0 0 6px var(--house-glow); opacity: 0; animation: wz-rise linear infinite; }
.wz-fx { position: fixed; inset: 0; pointer-events: none; z-index: 60; overflow: hidden; }
.wz-fairy { position: absolute; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: radial-gradient(circle, #fff, var(--house-glow) 60%, transparent); box-shadow: 0 0 8px var(--house-glow); opacity: 0; animation: wz-fly var(--t, .9s) cubic-bezier(.3,.1,.3,1) forwards; }
.wz-twinkle { position: absolute; width: 12px; height: 12px; margin: -6px 0 0 -6px; opacity: 0; animation: wz-twinkle .9s ease-out forwards; }
.wz-twinkle::before, .wz-twinkle::after { content: ""; position: absolute; background: #fff; box-shadow: 0 0 6px var(--house-glow); }
.wz-twinkle::before { left: 5px; top: 0; width: 2px; height: 12px; } .wz-twinkle::after { left: 0; top: 5px; width: 12px; height: 2px; }

/* ---------- Ouverture (logo, « Harry Potter », Choixpeau, choix, verdict) ---------- */
.wzi { position: fixed; inset: 0; z-index: 9999; overflow: hidden; background: var(--void); color: var(--wz-text); font-family: var(--font-body); }
.wzi-fog { position: absolute; left: -30%; width: 160%; height: 60%; border-radius: 50%; pointer-events: none; opacity: 0; background: radial-gradient(ellipse at center, rgb(120 110 140 / .18), transparent 65%); filter: blur(20px); }
.wzi-fog.a { top: 8%; animation: wz-fogA 18s ease-in-out infinite alternate, wz-fadeIn 4s ease .5s forwards; }
.wzi-fog.b { bottom: 4%; animation: wz-fogB 22s ease-in-out infinite alternate, wz-fadeIn 4s ease 1.5s forwards; }
.wzi-embers { position: absolute; inset: 0; pointer-events: none; }
.wzi-embers i { position: absolute; bottom: -8px; width: 3px; height: 3px; border-radius: 50%; background: var(--ember); box-shadow: 0 0 6px var(--ember); opacity: 0; }
.wzi-halo { position: absolute; top: 22%; left: 50%; width: 340px; height: 340px; margin-left: -170px; border-radius: 50%; z-index: 2; opacity: 0; background: radial-gradient(circle, rgb(200 205 230 / .16), transparent 62%); }
.wzi-logo { position: absolute; top: 25%; left: 50%; width: 230px; height: 238px; margin-left: -115px; z-index: 3; opacity: 0;
  -webkit-mask: url(/sorcier/hs-logo.png) center / contain no-repeat; mask: url(/sorcier/hs-logo.png) center / contain no-repeat;
  background: linear-gradient(105deg, #5d5d66 0%, #9fa2ad 30%, #f4f1e8 45%, #9fa2ad 55%, #4a4a52 75%, #2a2a30 100%); background-size: 300% 100%; background-position: 100% 0; }
.wzi.short .wzi-logo { top: 30%; }
.wzi-wordmark { position: absolute; bottom: 64px; left: 50%; width: 150px; height: 51px; margin-left: -75px; z-index: 3; opacity: 0; transition: opacity .8s;
  -webkit-mask: url(/sorcier/harry-potter-wordmark.svg) center / contain no-repeat; mask: url(/sorcier/harry-potter-wordmark.svg) center / contain no-repeat;
  background: linear-gradient(180deg, #f6dd8f, #b8892e 60%, #7a5717); }
.wzi-hat { position: absolute; top: 4%; left: 50%; width: 250px; height: 285px; margin-left: -125px; z-index: 4; opacity: 0; transform: translateY(-140%); transition: transform .9s cubic-bezier(.3,.1,.2,1), opacity .4s; }
.wzi-hat > div { position: relative; width: 100%; height: 100%; transform-origin: 50% 90%; }
.wzi-hat img { width: 100%; height: 100%; display: block; filter: brightness(.42) saturate(.85) contrast(1.15); transition: filter 1.6s ease; }
.wzi-eye { position: absolute; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; opacity: 0; background: radial-gradient(circle, #fff7d0 0%, var(--house-glow) 30%, transparent 70%); mix-blend-mode: screen; }
.wzi-eye.l { left: 48.9%; top: 51.2%; } .wzi-eye.r { left: 61.3%; top: 52.1%; }
.wzi-voice { position: absolute; left: 22px; right: 22px; top: 62%; margin: 0; z-index: 4; text-align: center; font-style: italic; font-size: 19px; line-height: 1.4; color: #e6dcc6; min-height: 54px; text-shadow: 0 2px 10px #000; transition: top .9s cubic-bezier(.3,.1,.2,1); }
.wzi-voice span { animation: wz-letter .18s ease both; }
.wzi-choices { position: absolute; left: 16px; right: 16px; top: 33%; bottom: 124px; z-index: 4; display: flex; flex-direction: column; gap: 9px; overflow-y: auto; scrollbar-width: none; }
.wzi-choice { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 10px; cursor: pointer; text-align: left; border: 1px solid var(--house-line);
  background: linear-gradient(100deg, var(--house) 0%, var(--house-deep) 100%); color: var(--house-on); box-shadow: 0 6px 18px rgb(0 0 0 / .55); opacity: 0; animation: wz-choiceIn .6s var(--ease-out) both; font: inherit; }
.wzi-choice[data-house="mangemort"] { background: linear-gradient(100deg, #141a1d, #020607); }
.wzi-choice:focus-visible, .wzi-choice:hover { outline: none; box-shadow: 0 0 0 1px var(--house-line), 0 0 22px var(--house-glow); }
.wzi-choice img, .wzi-choice .wz-mark { width: 44px; height: 52px; object-fit: contain; flex-shrink: 0; }
.wzi-choice b { display: block; font-family: var(--font-head); font-weight: 700; letter-spacing: .1em; font-size: 15px; }
.wzi-choice small { display: block; font-style: italic; font-size: 13.5px; }
.wzi-burst { position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0; background: radial-gradient(circle at 50% 42%, var(--house-glow), var(--house) 30%, transparent 70%); animation: wz-burst 1.6s ease-out forwards; }
.wzi-crest { position: absolute; left: 50%; top: 24%; width: 170px; height: 200px; margin-left: -85px; z-index: 4; opacity: 0; display: grid; place-items: center; animation: wz-crestIn 1.3s var(--ease-out) .15s forwards; }
.wzi-crest img { width: 100%; height: 100%; object-fit: contain; }
.wzi-crest .wz-mark { width: 110px; height: 200px; }
.wzi-verdict { position: absolute; left: 0; right: 0; top: 56%; margin: 0; z-index: 4; text-align: center; font-family: var(--font-title); font-weight: 700; font-size: 32px; letter-spacing: .05em; color: var(--house-line); opacity: 0; text-shadow: 0 0 24px var(--house-glow); animation: wz-verdict 1.4s var(--ease-out) .3s forwards; }
.wzi-sub { position: absolute; left: 0; right: 0; top: 63%; margin: 0; z-index: 4; text-align: center; font-style: italic; font-size: 16px; color: #e6dcc6; opacity: 0; animation: wz-fadeIn 1s ease 1.2s forwards; }
.wzi-flash { position: absolute; inset: 0; z-index: 5; background: #dfe6ff; opacity: 0; pointer-events: none; mix-blend-mode: screen; }
.wzi-skip { position: absolute; right: 10px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 6; height: 40px; padding: 0 10px; border: 0; background: none; color: #6f6758; font-family: var(--font-head); letter-spacing: .16em; font-size: 11px; cursor: pointer; opacity: 0; animation: wz-fadeIn 1s ease 2s forwards; }
.wzi-veil { position: absolute; inset: 0; z-index: 9; background: var(--void); opacity: 0; pointer-events: none; }
.wzi.leaving .wzi-veil { animation: wz-veilIn .9s ease forwards; }
.wzi.out { animation: wz-veilOut .5s ease forwards; }


/* ---------- Verdict avec photo de maison ---------- */
/* 4 maisons : page de La Gazette du Sorcier qui arrive en tournoyant, photo qui bouge */
.wzg { position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; align-items: center; overflow: hidden; }
.wzg-burst { position: absolute; inset: 0; opacity: 0; background: radial-gradient(circle at 50% 38%, var(--house-glow), var(--house) 30%, transparent 70%); animation: wz-burstHold 1.8s ease-out forwards; }
.wzg-crest { position: relative; margin-top: calc(28px + env(safe-area-inset-top)); width: 78px; height: 92px; display: grid; place-items: center; opacity: 0; animation: wz-crestIn 1.1s var(--ease-out) .2s forwards; }
.wzg-crest img, .wzg-crest .wz-mark { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 4px 10px rgb(0 0 0 / .6)); }
.wzg-paper { position: relative; width: min(300px, 86vw); margin-top: 12px; padding: 12px 12px 14px; color: #2b2116; opacity: 0;
  background: radial-gradient(ellipse at 30% 20%, #f3ead2, #e4d6b2 60%, #cdb98d), #e9dcbb; box-shadow: 0 18px 40px rgb(0 0 0 / .65), inset 0 0 40px rgb(110 80 40 / .35);
  transform: rotate(-720deg) scale(.1); animation: wz-paperIn 1.6s var(--ease-out) .9s forwards; }
.wzg-mast { text-align: center; border-bottom: 3px double #2b2116; padding-bottom: 4px; }
.wzg-mast b { display: block; font-family: var(--font-title); font-size: 19px; letter-spacing: .04em; line-height: 1.05; }
.wzg-mast small { display: flex; justify-content: space-between; font-family: var(--font-head); font-size: 8.5px; letter-spacing: .12em; margin-top: 3px; }
.wzg-head { margin: 7px 0 6px; text-align: center; font-family: var(--font-head); font-weight: 700; font-size: 15px; line-height: 1.15; text-transform: uppercase; }
.wzg-cols { display: grid; grid-template-columns: 1fr 58px; gap: 8px; }
.wzg-photo { position: relative; height: 196px; overflow: hidden; border: 2px solid #2b2116; background: #2b2116; }
.wzg-photo img { position: absolute; inset: -6%; width: 112%; height: 112%; object-fit: cover; filter: sepia(.3) contrast(1.05); animation: wz-alive 7s ease-in-out infinite alternate; }
.wzg-photo::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at center, transparent 55%, rgb(40 25 10 / .55)); animation: wz-flick 3.2s steps(1) infinite; }
.wzg-photo span { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 3px 6px; background: rgb(43 33 22 / .78); color: #f3ead2; font-family: var(--font-head); font-size: 9px; letter-spacing: .08em; text-align: center; }
.wzg-lines { display: flex; flex-direction: column; gap: 4px; padding-top: 2px; }
.wzg-lines i { display: block; height: 3px; background: rgb(43 33 22 / .55); border-radius: 1px; }
.wzg-lines i:nth-child(3n) { width: 70%; } .wzg-lines i:nth-child(4n) { width: 85%; }
.wzg-foot { margin: 7px 0 0; font-size: 10.5px; font-style: italic; line-height: 1.3; text-align: justify; }
.wzg-title { position: relative; margin: 18px 0 0; font-family: var(--font-title); font-weight: 700; font-size: 30px; color: var(--house-line); text-shadow: 0 0 24px var(--house-glow); opacity: 0; animation: wz-verdict 1.3s var(--ease-out) 2.4s forwards; }
.wzg-sub { position: relative; margin: 8px 22px 0; text-align: center; font-style: italic; color: #e6dcc6; opacity: 0; animation: wz-fadeIn .9s ease 3.2s forwards; }

/* Mangemort : la photo en entier, la Marque des Ténèbres (même entrée que le logo HS), yeux du crâne verts, Avada Kedavra */
.wzd { position: absolute; inset: 0; z-index: 4; background: #000; overflow: hidden; }
.wzd-shot { position: absolute; left: 0; right: 0; margin: 0 auto; width: min(100%, 440px); top: calc(34px + env(safe-area-inset-top)); opacity: 0; animation: wz-shotIn 1.8s ease .2s forwards; }
.wzd-shot img { display: block; width: 100%; }
.wzd-shot::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 30%; background: linear-gradient(180deg, transparent, #000); }
.wzd-halo { position: absolute; left: 50%; top: calc(50% + 141px); width: 300px; height: 300px; margin: -150px 0 0 -150px; border-radius: 50%; opacity: 0;
  background: radial-gradient(circle, rgb(57 255 20 / .16), rgb(54 214 231 / .06) 40%, transparent 62%); animation: wz-fadeIn 3s ease 2.8s forwards, wz-breathe 4s ease-in-out 5.6s infinite; }
.wzd-mark { position: absolute; left: 50%; top: 50%; width: 96px; height: 282px; margin-left: -48px; z-index: 1; opacity: 0; animation: wz-emerge 3.4s cubic-bezier(.25,.1,.2,1) 2.2s forwards; }
.wzd-mk { position: absolute; inset: 0; -webkit-mask: url(/sorcier/mangemort.png) center / contain no-repeat; mask: url(/sorcier/mangemort.png) center / contain no-repeat;
  background: linear-gradient(105deg, #0c6b3c 0%, #1fbf5a 30%, #e6ffd9 45%, #39ff14 55%, #0f8f4a 75%, #06371f 100%); background-size: 300% 100%; background-position: 100% 0;
  filter: drop-shadow(0 0 8px rgb(57 255 20 / .7)) drop-shadow(0 0 20px rgb(54 214 231 / .4)); animation: wz-sheen 3.6s ease-in-out 3.6s forwards; }
.wzd-eye { position: absolute; width: 14px; height: 11px; margin: -5px 0 0 -7px; border-radius: 50%; opacity: 0;
  background: radial-gradient(circle, #fff 0 15%, #7dff4a 35%, #39ff14 55%, transparent 72%); box-shadow: 0 0 10px 3px rgb(57 255 20 / .9);
  animation: wz-ignite .6s ease 5.8s forwards, wz-glowEye 1.6s ease-in-out 6.4s infinite; }
.wzd-eye.l { left: 37%; top: 12%; } .wzd-eye.r { left: 60%; top: 12%; }
.wzd-flash { position: absolute; inset: 0; z-index: 2; background: #39ff14; opacity: 0; pointer-events: none; mix-blend-mode: screen; animation: wz-gflash 1s ease 5.8s forwards; }
.wzd-avada { position: absolute; left: 0; right: 0; bottom: calc(44px + env(safe-area-inset-bottom)); z-index: 3; margin: 0; text-align: center; font-family: var(--font-title); font-size: 16px; letter-spacing: .08em; color: #b6ff9a;
  text-shadow: 0 0 8px #39ff14, 0 0 18px #36d6e7; }
.wzd-avada span { display: inline-block; opacity: 0; animation: wz-letterUp .35s ease forwards; animation-delay: calc(6.6s + var(--i) * 70ms); }

@keyframes wz-burstHold { 0% { opacity: 0; transform: scale(.4); } 30% { opacity: .75; } 100% { opacity: .18; transform: scale(1.5); } }
@keyframes wz-paperIn { 0% { opacity: 0; transform: rotate(-720deg) scale(.1); } 15% { opacity: 1; } 85% { transform: rotate(4deg) scale(1.05); } 100% { opacity: 1; transform: rotate(-2deg) scale(1); } }
@keyframes wz-alive { 0% { transform: scale(1) translate(0, 0) rotate(0); } 50% { transform: scale(1.06) translate(-2%, 1.5%) rotate(-.6deg); } 100% { transform: scale(1.03) translate(2%, -1%) rotate(.5deg); } }
@keyframes wz-flick { 0%, 100% { opacity: 1; } 47% { opacity: .75; } 49% { opacity: 1; } 83% { opacity: .85; } }
@keyframes wz-shotIn { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: none; } }
@keyframes wz-gflash { 0% { opacity: 0; } 12% { opacity: .45; } 30% { opacity: 0; } 42% { opacity: .2; } 100% { opacity: 0; } }
@keyframes wz-letterUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Réglages : choix de la photo de profil */
.wz-avatars { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.wz-avatars button { position: relative; border: 0; background: none; padding: 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 8px; color: inherit; font: inherit; }
.wz-avatars img, .wz-avatars .wz-initial { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 3px #3a3240, 0 6px 14px rgb(0 0 0 / .35); transition: box-shadow .25s, transform .25s; }
.wz-avatars .wz-initial { display: grid; place-items: center; background: var(--house); color: var(--house-on); font-family: var(--font-title); font-size: 36px; }
.wz-avatars button[aria-checked="true"] img, .wz-avatars button[aria-checked="true"] .wz-initial { box-shadow: 0 0 0 3px var(--house), 0 0 0 6px var(--house-2), 0 0 22px var(--house-glow); transform: scale(1.04); }
.wz-avatars small { font-family: var(--font-head); font-size: 11.5px; letter-spacing: .06em; text-align: center; }

/* ---------- Animations ---------- */
@keyframes wz-fadeIn { to { opacity: 1; } }
@keyframes wz-fogA { to { transform: translateX(18%); } }
@keyframes wz-fogB { to { transform: translateX(-16%); } }
@keyframes wz-ember { 0% { transform: translate(0, 0); opacity: 0; } 10% { opacity: .9; } 100% { transform: translate(var(--dx, 20px), -900px); opacity: 0; } }
@keyframes wz-lightning { 0%, 27% { opacity: 0; } 27.6% { opacity: .55; } 28.4% { opacity: 0; } 29.2% { opacity: .35; } 30% { opacity: 0; } 47% { opacity: 0; } 47.5% { opacity: .25; } 48.2%, 100% { opacity: 0; } }
@keyframes wz-lightningShort { 0%, 30% { opacity: 0; } 32% { opacity: .4; } 36%, 100% { opacity: 0; } }
@keyframes wz-emerge { 0% { opacity: 0; transform: scale(.86); filter: blur(10px) brightness(.3); } 60% { opacity: .85; filter: blur(2px) brightness(.7); } 100% { opacity: 1; transform: scale(1); filter: blur(0) brightness(1); } }
@keyframes wz-sheen { from { background-position: 100% 0; } to { background-position: 0 0; } }
@keyframes wz-logoOut { to { opacity: 0; transform: scale(1.06) translateY(-30px); filter: blur(6px) brightness(.4); } }
@keyframes wz-breathe { 50% { transform: scale(1.08); } }
@keyframes wz-wmIn { from { opacity: 0; transform: translateY(8px); } to { opacity: .92; transform: none; } }
@keyframes wz-descend { 0% { opacity: 0; transform: translateY(-140%) rotate(-6deg); } 70% { opacity: 1; transform: translateY(4%) rotate(2deg); } 100% { opacity: 1; transform: none; } }
@keyframes wz-ignite { 0% { opacity: 0; transform: scale(.3); } 40% { opacity: 1; transform: scale(1.6); } 100% { opacity: .9; transform: scale(1); } }
@keyframes wz-glowEye { 0%, 100% { opacity: .9; transform: scale(1); } 50% { opacity: .55; transform: scale(.85); } }
@keyframes wz-talk { from { transform: rotate(-1.2deg) scaleY(1); } to { transform: rotate(1.2deg) scaleY(1.02); } }
@keyframes wz-letter { from { opacity: 0; filter: blur(3px); } to { opacity: 1; filter: none; } }
@keyframes wz-choiceIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes wz-crestIn { 0% { opacity: 0; transform: scale(.4) rotate(-8deg); filter: blur(6px); } 70% { opacity: 1; transform: scale(1.08) rotate(1deg); filter: none; } 100% { opacity: 1; transform: none; } }
@keyframes wz-verdict { 0% { opacity: 0; transform: scale(.6); filter: blur(8px); } 60% { opacity: 1; transform: scale(1.08); filter: none; } 100% { opacity: 1; transform: scale(1); } }
@keyframes wz-burst { 0% { opacity: 0; transform: scale(.4); } 30% { opacity: .75; } 100% { opacity: 0; transform: scale(1.6); } }
@keyframes wz-veilIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes wz-veilOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes wz-appear { from { opacity: 0; transform: translateY(6px); } }
@keyframes wz-rise { 0% { transform: translate(0, 0); opacity: 0; } 15% { opacity: .75; } 100% { transform: translate(30px, -900px); opacity: 0; } }
@keyframes wz-fly { 0% { transform: translate(0, 0) scale(1); opacity: 1; } 70% { opacity: 1; } 100% { transform: translate(var(--tx), var(--ty)) scale(.3); opacity: 0; } }
@keyframes wz-twinkle { 0% { transform: scale(0) rotate(0); opacity: 0; } 30% { transform: scale(1.2) rotate(45deg); opacity: 1; } 100% { transform: scale(0) rotate(90deg); opacity: 0; } }
@keyframes wz-cast { 40% { transform: rotate(-14deg) scale(1.08); box-shadow: 0 0 0 10px color-mix(in srgb, var(--house-glow) 30%, transparent), 0 0 30px var(--house-glow); } }

@media (prefers-reduced-motion: reduce) {
  .wzi *, .wz-dust *, .wz-fx * { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .wz-dust { display: none; }
}
