/* =====================================================================
   HUIS CLOS — site public
   Une porte entrouverte dans le noir : encre, papier, laiton.
   Thème sombre unique (choix d'identité). Aucune police externe.
   ===================================================================== */
:root {
  --bg: #0a0a0b; --bg2: #121113; --bg3: #1a1917; --line: #2b2925;
  --ink: #ece6da; --dim: #9a9285; --faint: #5f5a52;
  --brass: #c8a15a; --brass2: #e5c98e; --blood: #b23a26;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --gut: clamp(16px, 4vw, 40px);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); color: var(--ink);
  font: 16px/1.6 var(--sans); overflow-x: hidden; }
main { flex: 1; }
a { color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; text-wrap: balance; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }
[hidden] { display: none !important; }

.grain { position: fixed; inset: -50%; z-index: 50; pointer-events: none; opacity: .07; mix-blend-mode: screen;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite; }
@keyframes grain { 0% { transform: translate(0,0); } 20% { transform: translate(-3%,2%); } 40% { transform: translate(2%,-4%); } 60% { transform: translate(-2%,3%); } 80% { transform: translate(4%,-1%); } 100% { transform: translate(0,0); } }

/* ------------------------------------------------------------ en-tête */
.top { position: relative; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 18px var(--gut); }
.brand { display: inline-flex; align-items: center; gap: 12px; font-family: var(--serif); font-style: italic; font-size: 21px; text-decoration: none; letter-spacing: .01em; }
.brand-slit { width: 3px; height: 26px; background: linear-gradient(var(--brass2), var(--brass)); box-shadow: 0 0 14px 2px rgba(200,161,90,.55); }
.top nav { display: flex; gap: clamp(14px, 3vw, 30px); flex-wrap: wrap; }
.top nav a { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; text-decoration: none; color: var(--dim); padding: 8px 0; border-bottom: 1px solid transparent; }
.top nav a:hover { color: var(--ink); border-color: var(--brass); }
.foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 26px var(--gut) calc(26px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line);
  font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); }
.foot span:last-child { font-family: var(--serif); font-style: italic; text-transform: none; letter-spacing: 0; font-size: 15px; }

/* ------------------------------------------------------------ éléments communs */
.wrap { width: min(1120px, 100%); margin: 0 auto; padding: clamp(36px, 7vw, 80px) var(--gut); }
.wrap.narrow { width: min(620px, 100%); }
.wrap.page { padding-top: clamp(28px, 6vw, 64px); }
.eyebrow { margin: 0 0 14px; font-size: 12px; letter-spacing: .28em; text-transform: uppercase; color: var(--brass); }
.h-page { font-size: clamp(38px, 8vw, 76px); line-height: 1; letter-spacing: -.01em; margin-bottom: 20px; }
.h-page em { color: var(--brass); }
.lede { font-family: var(--serif); font-size: clamp(19px, 2.6vw, 24px); line-height: 1.4; color: #d2cbbd; margin: 0 0 22px; max-width: 34em; }
.note, .empty { color: var(--dim); font-size: 15px; }
.empty { font-family: var(--serif); font-style: italic; font-size: 19px; padding: 24px 0; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-bottom: 26px; }
.sec-head h2 { font-size: clamp(24px, 4vw, 34px); font-style: italic; }
.sec-head a { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--dim); text-decoration: none; }
.sec-head a:hover { color: var(--brass); }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 13px 26px; border: 1px solid var(--ink); background: none; color: var(--ink);
  font: 500 13px var(--sans); letter-spacing: .2em; text-transform: uppercase; text-decoration: none; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.btn:hover { background: var(--ink); color: var(--bg); }
.btn.solid { background: var(--brass); border-color: var(--brass); color: #14110a; }
.btn.solid:hover { background: var(--brass2); border-color: var(--brass2); }
.btn.ghost { border-color: var(--line); color: var(--dim); }
.btn[disabled] { opacity: .4; pointer-events: none; }
.cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.dots { display: inline-flex; gap: 4px; margin-left: 8px; vertical-align: middle; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line); }
.dots i.on { background: var(--brass); }

/* ------------------------------------------------------------ accueil */
.hero { position: relative; min-height: min(86vh, 860px); display: flex; flex-direction: column; justify-content: flex-end; padding: 0 var(--gut) clamp(48px, 9vw, 110px); overflow: hidden; isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -2; background: radial-gradient(ellipse 60% 70% at 72% 40%, rgba(200,161,90,.13), transparent 70%), linear-gradient(180deg, transparent 60%, var(--bg)); }
/* la porte entrouverte */
.door { position: absolute; z-index: -1; top: -4%; bottom: 14%; right: clamp(8%, 22vw, 28%); width: clamp(120px, 24vw, 300px); transform: perspective(900px) rotateY(-14deg); transform-origin: right center; }
.door::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #070707, #0e0d0c 80%, #131210); box-shadow: inset -1px 0 0 #2a2620; }
.door span { position: absolute; top: 0; bottom: 0; right: -10px; width: 10px; background: linear-gradient(180deg, #fff3d6, var(--brass2) 40%, var(--brass)); box-shadow: 0 0 40px 12px rgba(229,201,142,.5), 0 0 160px 60px rgba(200,161,90,.22); animation: breathe 7s ease-in-out infinite; transform-origin: left center; }
.door::after { content: ""; position: absolute; left: 100%; top: 100%; width: 260%; height: 46%; transform-origin: top left; transform: skewX(52deg); background: linear-gradient(180deg, rgba(229,201,142,.26), transparent 85%); filter: blur(6px); animation: breathe 7s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { opacity: .78; transform: scaleX(1); } 50% { opacity: 1; transform: scaleX(1.5); } }
.door::after { animation-name: breathe2; } @keyframes breathe2 { 0%, 100% { opacity: .6; } 50% { opacity: 1; } }
.hero h1 { font-size: clamp(64px, 17vw, 210px); line-height: .84; font-style: italic; letter-spacing: -.03em; margin: 0 0 26px -.04em; text-shadow: 0 2px 60px rgba(0,0,0,.9); }
.hero .lede { text-shadow: 0 1px 20px #000; }
.band { border-block: 1px solid var(--line); background: var(--bg2); }
.how { list-style: none; margin: 0 auto; padding: 0 var(--gut); width: min(1120px, 100%); display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.how li { padding: clamp(26px, 4vw, 44px) clamp(0px, 2vw, 30px) clamp(26px, 4vw, 44px) 0; }
.how li + li { border-left: 1px solid var(--line); padding-left: clamp(18px, 3vw, 30px); }
.how b { font: 400 12px var(--mono); color: var(--brass); letter-spacing: .2em; }
.how h3 { font-size: 26px; font-style: italic; margin: 10px 0 8px; }
.how p { margin: 0; color: var(--dim); font-size: 15px; }
@media (max-width: 720px) { .how li + li { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; } .door { right: 6%; opacity: .9; } }

/* ------------------------------------------------------------ affiches */
.posters { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: clamp(18px, 3vw, 34px); }
.poster { display: flex; flex-direction: column; text-decoration: none; }
.poster-art { position: relative; aspect-ratio: 2 / 3; overflow: hidden; background: linear-gradient(160deg, #1d1b18, #0c0b0a 70%); border: 1px solid var(--line); display: flex; align-items: flex-end; }
.poster-art img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease, filter .6s; filter: saturate(.85) brightness(.9); }
.poster:hover .poster-art img { transform: scale(1.04); filter: none; }
.poster-art::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 1px rgba(255,255,255,.04), inset 0 -80px 80px -40px rgba(0,0,0,.7); pointer-events: none; }
.poster-type { padding: 20px; font-family: var(--serif); font-style: italic; font-size: clamp(28px, 4vw, 40px); line-height: 1; }
.poster-body { padding: 14px 2px 0; display: flex; flex-direction: column; gap: 4px; }
.poster-title { font-family: var(--serif); font-size: 24px; line-height: 1.1; }
.poster:hover .poster-title { color: var(--brass2); }
.poster-tag { color: var(--dim); font-size: 14px; }
.poster-meta { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); margin-top: 4px; }

/* ------------------------------------------------------------ fiche jeu */
.game { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: start; }
.game-art { aspect-ratio: 2 / 3; border: 1px solid var(--line); background: linear-gradient(160deg, #1d1b18, #0c0b0a 70%); display: flex; align-items: flex-end; overflow: hidden; }
.game-art img { width: 100%; height: 100%; object-fit: cover; }
.prose { color: #c9c2b4; max-width: 38em; margin-bottom: 26px; }
@media (max-width: 760px) { .game { grid-template-columns: 1fr; } .game-art { max-width: 260px; } }

/* ------------------------------------------------------------ tableaux, chiffres */
.board { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.board th { text-align: left; font: 500 11px var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--faint); padding: 8px 10px; border-bottom: 1px solid var(--line); }
.board td { padding: 12px 10px; border-bottom: 1px solid var(--line); }
.board td:first-child { color: var(--dim); }
.board tbody tr:first-child td { color: var(--brass2); }
.board.steps tbody tr:first-child td { color: inherit; } .board.steps td:first-child { color: var(--ink); } .board.steps tr.off td { color: var(--faint); }
.board small { color: var(--faint); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin: 26px 0; }
.stats > div { background: var(--bg); padding: 16px; }
.stats dt { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--faint); }
.stats dd { margin: 4px 0 0; font-family: var(--serif); font-size: clamp(26px, 6vw, 38px); line-height: 1; font-variant-numeric: tabular-nums; }
.meta-line { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--dim); }
.rules { margin: 22px 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.rules li { padding: 12px 0 12px 22px; border-bottom: 1px solid var(--line); color: #c9c2b4; position: relative; font-size: 15px; }
.rules li::before { content: ""; position: absolute; left: 2px; top: 20px; width: 8px; height: 1px; background: var(--brass); }

/* ------------------------------------------------------------ formulaires */
.form { display: flex; flex-direction: column; gap: 18px; margin-top: 8px; align-items: flex-start; }
.form.inline { flex-direction: row; flex-wrap: wrap; align-items: center; }
.form label { display: flex; flex-direction: column; gap: 8px; width: 100%; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--dim); }
.form input { width: 100%; min-height: 52px; padding: 12px 14px; background: var(--bg2); border: 1px solid var(--line); border-radius: 0; color: var(--ink); font: 17px var(--sans); letter-spacing: 0; text-transform: none; }
.form.inline input { width: auto; flex: 1 1 200px; }
.form input:focus { outline: none; border-color: var(--brass); }
.code-input { font: 30px var(--mono) !important; letter-spacing: .4em !important; text-transform: uppercase !important; text-align: center; }
.form-msg { margin: 0; min-height: 1.4em; color: #e58a76; font-size: 15px; width: 100%; }
.form-msg.good { color: #9fc79a; }
.links { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 26px; font-size: 14px; color: var(--dim); }
.two { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); }
@media (max-width: 800px) { .two { grid-template-columns: 1fr; } }
.runs { list-style: none; margin: 0; padding: 0; }
.runs li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.runs a { text-decoration: none; font-family: var(--serif); font-size: 20px; } .runs a:hover { color: var(--brass2); }
.runs span { color: var(--dim); font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; }
.checks { list-style: none; padding: 0; margin: 0 0 24px; font-size: 15px; } .checks li { padding: 8px 0; border-bottom: 1px solid var(--line); } .checks .ok { color: #9fc79a; } .checks .ko { color: #e58a76; }
.v-setup .form-msg.on { margin-bottom: 14px; }

@media (prefers-reduced-motion: reduce) { .grain, .door span, .door::after { animation: none; } .poster-art img { transition: none; } }
