/* =====================================================================
   mods.baptistedev.fr
   ===================================================================== */
:root {
  --bg: #121110;
  --bg-2: #1a1917;
  --panel: #1e1d1a;
  --panel-2: #262420;
  --line: #34312b;
  --line-2: #45413a;
  --text: #f1ece1;
  --muted: #a39d90;
  --accent: #f2d35b;
  --accent-ink: #1b1708;
  --accent-soft: rgba(242, 211, 91, .12);
  --ok: #7fd19a;
  --info: #7fb4f0;
  --warn: #f0b36a;
  --err: #f07f7f;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 12px 32px -18px rgba(0,0,0,.8);
  --f-display: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
  --f-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; padding-bottom: 72px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--f-display); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
code, kbd, .mono { font-family: var(--f-mono); font-size: .88em; }
code { background: var(--panel-2); border: 1px solid var(--line); padding: .08em .4em; border-radius: 6px; word-break: break-word; }
pre { font-family: var(--f-mono); font-size: .85em; background: #0c0b0a; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; overflow-x: auto; white-space: pre; line-height: 1.55; margin: 0 0 1em; }
kbd { display: inline-block; min-width: 1.9em; text-align: center; padding: .15em .5em; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--line-2); border-bottom-width: 3px; color: var(--text); font-weight: 600; white-space: nowrap; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(1160px, 100% - 40px); margin-inline: auto; }
.narrow { width: min(820px, 100% - 40px); }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; z-index: 99; }
.skip:focus { left: 8px; }

/* ---------- Barre du haut ---------- */
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(18,17,16,.86); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.topbar-in { display: flex; align-items: center; justify-content: space-between; height: 66px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-family: var(--f-display); font-size: 1.12rem; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 1.05rem; box-shadow: 0 0 22px -4px rgba(242,211,91,.55); }
.brand-txt { font-weight: 500; color: var(--muted); }
.brand-txt b { color: var(--text); font-weight: 800; }
.brand-dot { color: var(--accent); margin: 0 1px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav > a:not(.btn) { color: var(--muted); padding: 8px 12px; border-radius: 8px; font-weight: 500; }
.nav > a:not(.btn):hover { color: var(--text); background: var(--panel); text-decoration: none; }
.nav > a.on { color: var(--text); }
.nav .btn { margin-left: 8px; }

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 .95rem/1 var(--f-body); padding: 12px 18px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); border: 1px solid transparent; cursor: pointer; transition: transform .12s, box-shadow .2s, background .2s; white-space: nowrap; }
.btn:hover { text-decoration: none; box-shadow: 0 6px 24px -8px rgba(242,211,91,.7); transform: translateY(-1px); }
.btn:active { transform: none; }
.btn-sm { padding: 8px 13px; font-size: .88rem; }
.btn-lg { padding: 15px 22px; font-size: 1rem; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--panel-2); box-shadow: none; border-color: var(--muted); }
.btn-danger { background: transparent; color: var(--err); border-color: rgba(240,127,127,.4); }
.btn-danger:hover { background: rgba(240,127,127,.1); box-shadow: none; }
.link { font-weight: 600; }
.link-btn { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: .8rem; padding: 0; }
.link-btn:hover { color: var(--err); }

/* ---------- Accueil ---------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); background:
  radial-gradient(900px 340px at 78% -10%, rgba(242,211,91,.16), transparent 70%),
  radial-gradient(500px 260px at 8% 120%, rgba(242,211,91,.06), transparent 70%); }
.hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .35;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px; mask-image: radial-gradient(ellipse 70% 90% at 70% 0%, #000 10%, transparent 70%); }
.hero-in { position: relative; z-index: 1; padding: 76px 0 56px; }
.eyebrow { font-family: var(--f-mono); color: var(--accent); font-size: .85rem; letter-spacing: .04em; margin-bottom: 14px; }
.hero h1 { font-size: clamp(2.2rem, 5.2vw, 3.9rem); font-weight: 800; max-width: 15ch; margin-bottom: 18px; }
.hl { color: var(--accent); }
.lead { color: var(--muted); font-size: 1.12rem; max-width: 60ch; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-stats > div { background: rgba(30,29,26,.7); border: 1px solid var(--line); border-radius: 12px; padding: 12px 18px; min-width: 120px; }
.hero-stats b { display: block; font-family: var(--f-display); font-size: 1.6rem; font-weight: 800; }
.hero-stats span { color: var(--muted); font-size: .85rem; }

.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 36px; margin-top: 44px; align-items: start; }
.sec-title { font-size: 1.45rem; margin: 0 0 18px; }
.game-title { font-size: 1.05rem; font-family: var(--f-body); font-weight: 600; margin: 0 0 14px; display: flex; gap: 10px; align-items: baseline; }
.game-title .muted { font-weight: 400; font-size: .88rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 20px; margin-bottom: 36px; }
.card { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--text); box-shadow: var(--shadow); transition: transform .18s, border-color .18s; }
.card:hover { text-decoration: none; transform: translateY(-3px); border-color: var(--line-2); }
.card:hover .go { color: var(--accent); }
.card .art { height: 168px; }
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.card h4 { font-size: 1.35rem; margin-bottom: 6px; }
.card p { color: var(--muted); font-size: .95rem; }
.game-chip { font-size: .78rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.ver { font-family: var(--f-mono); font-size: .78rem; background: var(--accent-soft); color: var(--accent); padding: 4px 9px; border-radius: 999px; border: 1px solid rgba(242,211,91,.25); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.tags span { font-size: .78rem; padding: 4px 9px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); }
.card-foot { margin-top: auto; display: flex; justify-content: space-between; font-size: .85rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 14px; }
.go { font-weight: 600; color: var(--text); transition: color .15s; }

.side { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 90px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); }
.panel + .panel { margin-top: 0; }
aside > .panel + .panel { margin-top: 20px; }
.side > .panel + .panel { margin-top: 0; }
.panel-title { font-size: 1.05rem; margin-bottom: 14px; }
.panel-help { background: linear-gradient(160deg, rgba(242,211,91,.1), transparent 60%), var(--panel); border-color: rgba(242,211,91,.25); }
.panel p:last-child { margin-bottom: 0; }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li + li { border-top: 1px solid var(--line); }
.feed a { display: grid; gap: 2px; padding: 12px 0; color: var(--text); }
.feed a:hover { text-decoration: none; }
.feed a:hover .feed-ver { color: var(--accent); }
.feed-ver { font-family: var(--f-display); font-weight: 700; }
.feed-mod { font-size: .8rem; color: var(--muted); }
.feed-sum { font-size: .9rem; color: var(--muted); }

/* ---------- Vignettes (CSS pur, aucune image de jeu) ---------- */
.art { position: relative; overflow: hidden; background: #2a2823; }
.art-backrooms {
  background:
    linear-gradient(180deg, #e9e1b0 0 13%, transparent 13%),
    repeating-linear-gradient(90deg, rgba(120,100,30,.13) 0 2px, transparent 2px 22px),
    repeating-linear-gradient(90deg, rgba(255,255,255,.05) 0 9px, transparent 9px 11px),
    linear-gradient(180deg, #d8c272 0%, #c4ad5d 55%, #a8914a 100%);
}
.art-backrooms::before { content: ""; position: absolute; left: 0; right: 0; top: 13%; height: 2px; background: rgba(90,75,25,.35); }
.art-light { position: absolute; top: 2%; left: 14%; width: 26%; height: 7%; background: #fffdf0; border-radius: 2px; box-shadow: 0 0 22px 8px rgba(255,250,210,.75), 0 30px 70px 20px rgba(255,248,200,.35); animation: flicker 7s infinite; }
.art-light.l2 { left: 60%; animation-delay: 2.3s; animation-duration: 9s; }
.art-door { position: absolute; left: 44%; bottom: 22%; width: 13%; height: 48%; background: linear-gradient(180deg, #19170f, #0c0b07); box-shadow: inset 0 0 0 3px rgba(80,66,22,.6); }
.art-floor { position: absolute; left: 0; right: 0; bottom: 0; height: 22%; background:
  repeating-linear-gradient(45deg, rgba(0,0,0,.05) 0 3px, transparent 3px 6px),
  linear-gradient(180deg, #8f7d45, #6f6033); box-shadow: 0 -2px 0 rgba(60,50,20,.5); }
.art::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 40%, transparent 40%, rgba(0,0,0,.38)); }
@keyframes flicker { 0%, 92%, 100% { opacity: 1; } 93% { opacity: .35; } 94% { opacity: 1; } 96% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .art-light { animation: none; } * { scroll-behavior: auto !important; } }

/* ---------- Page mod ---------- */
.mod-hero { position: relative; border-bottom: 1px solid var(--line); overflow: hidden; }
.mod-hero .art-hero { position: absolute; inset: 0; opacity: .5; }
.mod-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--bg) 18%, rgba(18,17,16,.82) 55%, rgba(18,17,16,.35)), linear-gradient(0deg, var(--bg), transparent 45%); }
.mod-hero-in { position: relative; z-index: 1; padding: 46px 0 34px; }
.mod-hero h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); font-weight: 800; margin-bottom: 10px; }
.crumbs { font-size: .88rem; color: var(--muted); margin-bottom: 16px; }
.crumbs span { margin: 0 6px; opacity: .6; }
.mod-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 30px; }
.facts { display: grid; grid-template-columns: repeat(6, auto); justify-content: start; gap: 10px 34px; margin: 0; }
.facts dt { font-size: .76rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-weight: 600; }

.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin: 26px 0 30px; overflow-x: auto; scrollbar-width: none; }
.tabs a { color: var(--muted); font-weight: 600; padding: 12px 16px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; gap: 8px; align-items: center; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
.pill { font-family: var(--f-mono); font-size: .72rem; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); padding: 2px 7px; border-radius: 999px; font-weight: 400; }
.js .tabpane { display: none; }
.js .tabpane.on { display: block; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.tabpane { padding-bottom: 10px; }
html:not(.js) .tabpane + .tabpane { margin-top: 56px; }

.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 36px; align-items: start; }
.prose p { font-size: 1.06rem; color: #ddd6c8; }
.prose { margin-bottom: 34px; }
.features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 34px; }
.feature { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 18px; }
.feature h3 { font-size: 1rem; color: var(--accent); margin-bottom: 6px; }
.feature p { margin: 0; color: var(--muted); font-size: .93rem; }
.notes { margin: 0; padding-left: 20px; color: var(--muted); }
.notes li { margin-bottom: 8px; }
.notes li::marker { color: var(--accent); }
.keys { width: 100%; border-collapse: collapse; font-size: .92rem; }
.keys td { padding: 7px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.keys tr:last-child td { border-bottom: 0; }
.keys td:first-child { width: 1%; padding-right: 14px; white-space: nowrap; }
.mini-changes { list-style: none; padding: 0; margin: 0 0 14px; font-size: .9rem; color: var(--muted); }
.mini-changes li { margin-bottom: 9px; }

/* Étiquettes de changement */
.chg { display: inline-block; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 3px 7px; border-radius: 5px; min-width: 70px; text-align: center; flex-shrink: 0; }
.chg-new { background: rgba(127,209,154,.14); color: var(--ok); }
.chg-change { background: rgba(127,180,240,.14); color: var(--info); }
.chg-fix { background: rgba(240,179,106,.14); color: var(--warn); }
.chg-remove { background: rgba(240,127,127,.14); color: var(--err); }

/* Tutoriel */
.tuto-head { margin-bottom: 26px; }
.progress { height: 6px; background: var(--panel-2); border-radius: 99px; overflow: hidden; max-width: 420px; margin-top: 14px; }
.progress span { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 99px; transition: width .35s ease; }
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0 0 34px; }
.step { counter-increment: step; position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px 20px 82px; margin-bottom: 16px; transition: border-color .2s, opacity .2s; }
.step::before { content: counter(step); position: absolute; left: 22px; top: 20px; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font: 800 1.15rem var(--f-display); background: var(--accent-soft); color: var(--accent); border: 1px solid rgba(242,211,91,.3); }
.step.done { border-color: rgba(127,209,154,.4); }
.step.done::before { content: "✓"; background: rgba(127,209,154,.15); color: var(--ok); border-color: rgba(127,209,154,.4); }
.step.done > :not(.step-check):not(h3) { opacity: .55; }
.step h3 { font-size: 1.2rem; padding-right: 90px; margin-top: 8px; }
.step ul { padding-left: 20px; color: #ddd6c8; }
.step li { margin-bottom: 6px; }
.step-check { position: absolute; right: 20px; top: 20px; display: inline-flex; align-items: center; gap: 7px; font-size: .85rem; color: var(--muted); cursor: pointer; user-select: none; }
.step-check input { width: 18px; height: 18px; accent-color: var(--ok); cursor: pointer; }
.tag-once { font: 600 .7rem var(--f-body); text-transform: uppercase; letter-spacing: .05em; background: var(--panel-2); color: var(--muted); border: 1px solid var(--line); padding: 3px 8px; border-radius: 999px; vertical-align: middle; margin-left: 6px; }
.path { display: flex; align-items: stretch; background: #0c0b0a; border: 1px solid var(--line); border-radius: var(--radius-sm); margin: 0 0 1em; overflow: hidden; }
.path code { flex: 1; background: none; border: 0; padding: 11px 14px; font-size: .86rem; overflow-x: auto; white-space: nowrap; word-break: normal; }
.copy { background: var(--panel-2); color: var(--text); border: 0; border-left: 1px solid var(--line); padding: 0 16px; font: 600 .82rem var(--f-body); cursor: pointer; flex-shrink: 0; }
.copy:hover { background: var(--line); }
.copy.ok { color: var(--ok); }
.tree { color: #cfc8b8; }
.tree b { color: var(--accent); font-weight: 600; }
details.tip { border: 1px dashed var(--line-2); border-radius: var(--radius-sm); padding: 10px 14px; margin-top: 4px; }
details.tip summary, .faq summary { cursor: pointer; font-weight: 600; color: var(--text); }
details.tip p { margin: 10px 0 2px; color: var(--muted); }
.tuto-extra { grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 40px; }
.tuto-extra .panel p { color: var(--muted); font-size: .94rem; }
.faq { display: grid; gap: 10px; margin-bottom: 34px; }
.faq details { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 18px; }
.faq details[open] { border-color: var(--line-2); }
.faq summary { list-style: none; position: relative; padding-right: 24px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: -2px; font-size: 1.3rem; color: var(--muted); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { margin: 12px 0 0; color: var(--muted); }
.cta-box { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 24px 26px; border-radius: var(--radius); background: linear-gradient(120deg, rgba(242,211,91,.14), rgba(242,211,91,.03)); border: 1px solid rgba(242,211,91,.28); }
.cta-box h3 { margin-bottom: 4px; }
.cta-box p { margin: 0; color: var(--muted); }

/* Patch notes */
.changelog { position: relative; max-width: 860px; }
.changelog::before { content: ""; position: absolute; left: 7px; top: 10px; bottom: 10px; width: 2px; background: var(--line); }
.release { position: relative; padding-left: 40px; margin-bottom: 36px; }
.release::before { content: ""; position: absolute; left: 0; top: 7px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 2px solid var(--line-2); }
.release.is-latest::before { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 5px rgba(242,211,91,.15); }
.release header { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.release h2 { font-size: 1.45rem; margin: 0; display: flex; align-items: center; gap: 10px; }
.release time { color: var(--muted); font-size: .9rem; font-family: var(--f-mono); }
.release-sum { color: var(--muted); margin: 6px 0 14px; }
.release ul { list-style: none; margin: 0; padding: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.release li { display: flex; gap: 14px; align-items: flex-start; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.release li:last-child { border-bottom: 0; }
.release li span:last-child { color: #ddd6c8; }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; font-size: .74rem; font-weight: 600; padding: 4px 9px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; font-family: var(--f-body); }
.badge-new { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.badge-dev { background: var(--accent-soft); color: var(--accent); border-color: rgba(242,211,91,.3); }
.badge-type { color: var(--text); }
.st-ouvert { color: var(--info); border-color: rgba(127,180,240,.35); background: rgba(127,180,240,.1); }
.st-en_cours { color: var(--accent); border-color: rgba(242,211,91,.35); background: var(--accent-soft); }
.st-attente { color: var(--warn); border-color: rgba(240,179,106,.35); background: rgba(240,179,106,.1); }
.st-resolu { color: var(--ok); border-color: rgba(127,209,154,.35); background: rgba(127,209,154,.1); }
.st-ferme { color: var(--muted); }

/* ---------- Tickets ---------- */
.page-head { padding: 46px 0 26px; }
.page-head h1 { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 800; }
.ticket-list { list-style: none; padding: 0; margin: 0 0 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.ticket-list li + li { border-top: 1px solid var(--line); }
.ticket-list a { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "t b" "m b"; gap: 3px 14px; align-items: center; padding: 14px 18px; color: var(--text); }
.ticket-list a:hover { background: var(--panel-2); text-decoration: none; }
.tl-title { grid-area: t; font-weight: 600; }
.tl-meta { grid-area: m; font-size: .82rem; color: var(--muted); }
.ticket-list .badge { grid-area: b; }
.ticket-list.big a { padding: 16px 20px; }
.ticket-list.compact { box-shadow: none; background: transparent; border: 0; margin: 0; }
.ticket-list.compact a { padding: 10px 0; }
.ticket-list.compact a:hover { background: transparent; }
.ticket-list.compact a:hover .tl-title { color: var(--accent); }
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.filters input[type=search] { flex: 1 1 240px; }
.lookup label { display: block; font-size: .88rem; color: var(--muted); margin: 16px 0 6px; }
.panel .lookup label:first-child { margin-top: 0; }
.row { display: flex; gap: 8px; }
.row input { flex: 1; min-width: 0; font-family: var(--f-mono); text-transform: uppercase; }
.empty { text-align: center; padding: 40px 20px; }
.page-head + .two-col, .wrap.two-col { margin-top: 0; }

/* Formulaires */
input, select, textarea { width: 100%; font: inherit; font-size: .95rem; color: var(--text); background: #141311; border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 11px 13px; transition: border-color .15s, box-shadow .15s; }
.filters select, .filters input { width: auto; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
textarea { resize: vertical; min-height: 110px; line-height: 1.55; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(242,211,91,.15); }
::placeholder { color: #6f6a60; }
.form { display: grid; gap: 18px; }
.field { margin: 0; border: 0; padding: 0; min-width: 0; }
.field > label, .field > legend { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 7px; padding: 0; }
.opt { font-weight: 400; color: var(--muted); font-size: .82rem; margin-left: 4px; }
.hint { font-size: .82rem; color: var(--muted); margin: 6px 0 0; }
.has-err input, .has-err select, .has-err textarea { border-color: var(--err); }
.has-err .choice span { border-color: rgba(240,127,127,.5); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice span { display: inline-block; padding: 9px 14px; border: 1px solid var(--line-2); border-radius: 999px; cursor: pointer; font-size: .9rem; transition: all .15s; background: #141311; }
.choice span:hover { border-color: var(--muted); }
.choice input:checked + span { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; color: var(--muted); cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); flex-shrink: 0; }
.form-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.hp { position: absolute; left: -9999px; }
.flash { padding: 14px 18px; border-radius: var(--radius-sm); margin: 22px 0; border: 1px solid; }
.flash ul { margin: 6px 0 0; padding-left: 20px; }
.flash-ok { background: rgba(127,209,154,.08); border-color: rgba(127,209,154,.35); color: #bfeccc; }
.flash-err { background: rgba(240,127,127,.08); border-color: rgba(240,127,127,.4); color: #f6c0c0; }
.auth { max-width: 440px; margin: 60px auto 0; }

/* Fil d'un ticket */
.created { border-color: rgba(127,209,154,.4); background: linear-gradient(160deg, rgba(127,209,154,.1), transparent 60%), var(--panel); margin: 22px 0; }
.created h2 { color: var(--ok); font-size: 1.3rem; }
.code-big { font-size: 1.3rem; color: var(--text); letter-spacing: .06em; background: var(--panel-2); padding: 3px 10px; border-radius: 8px; }
.ticket-head { padding: 18px 0 8px; }
.ticket-head h1 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); margin: 12px 0 8px; }
.ticket-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.thread { list-style: none; padding: 0; margin: 20px 0 22px; display: grid; gap: 14px; }
.msg { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; }
.msg-admin { border-color: rgba(242,211,91,.35); background: linear-gradient(160deg, rgba(242,211,91,.07), transparent 50%), var(--panel); }
.msg-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: .92rem; flex-wrap: wrap; }
.msg-head .muted { font-size: .82rem; }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--panel-2); border: 1px solid var(--line-2); font-weight: 700; font-size: .85rem; }
.msg-admin .avatar { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.msg-body { color: #e2dccf; overflow-wrap: anywhere; }
.msg-body pre { margin: 10px 0; }
.msg-del { margin-left: auto; }
.inline-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0; }
.inline-actions form { margin: 0; }
.meta-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 14px 0 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; }
.meta-grid dt { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.meta-grid dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.canned { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font: 500 .82rem var(--f-body); background: var(--panel-2); color: var(--text); border: 1px solid var(--line-2); border-radius: 999px; padding: 6px 11px; cursor: pointer; }
.chip:hover { border-color: var(--accent); color: var(--accent); }
.inline-select { display: inline-flex; align-items: center; gap: 10px; font-size: .9rem; color: var(--muted); }
.inline-select select { width: auto; }

/* Admin */
.admin-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 22px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 16px; color: var(--text); }
.stat:hover { text-decoration: none; border-color: var(--line-2); }
.stat.on { border-color: var(--accent); }
.stat b { display: block; font: 800 1.5rem var(--f-display); }
.stat span { font-size: .82rem; color: var(--muted); }
.stat-dl { background: transparent; border-style: dashed; }
.table-wrap { overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.admin-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.admin-table th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.admin-table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table a { color: var(--text); }
.admin-table tr.needs { background: rgba(242,211,91,.05); }
.admin-table tr.needs td:first-child { box-shadow: inset 3px 0 0 var(--accent); }

/* ---------- Pied de page ---------- */
.foot { border-top: 1px solid var(--line); background: var(--bg-2); }
.foot-in { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; padding: 34px 0; }
.foot-in > div:first-child { max-width: 420px; }
.brand-foot { margin-bottom: 10px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: flex-start; }
.foot-links a { color: var(--text); font-size: .92rem; }
.foot-links a.muted { color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .home-grid, .two-col { grid-template-columns: 1fr; }
  .side { position: static; }
  .facts { grid-template-columns: repeat(3, auto); }
}
@media (max-width: 640px) {
  .nav > a:not(.btn) { display: none; }
  .nav > a.on, .nav > a[href="/tickets.php"] { display: inline-block; }
  .brand-txt { display: none; }
  .hero-in { padding: 48px 0 40px; }
  .cards { grid-template-columns: 1fr; }
  .features, .grid2, .tuto-extra { grid-template-columns: 1fr; }
  .facts { grid-template-columns: repeat(2, 1fr); gap: 12px 20px; }
  .step { padding: 70px 18px 18px; }
  .step::before { left: 18px; top: 18px; }
  .step h3 { padding-right: 0; }
  .step-check { top: 26px; right: 18px; }
  .release { padding-left: 30px; }
  .release li { flex-direction: column; gap: 6px; }
  .admin-head { flex-direction: column; align-items: flex-start; }
  .ticket-list a { grid-template-columns: 1fr; grid-template-areas: "t" "m" "b"; }
  .ticket-list .badge { justify-self: start; margin-top: 4px; }
}
.wrap.narrow > .crumbs:first-child { padding-top: 30px; }
