:root {
  --bg: #0d0f14; --bg2: #141821; --panel: #1a1f2b; --panel2: #212838; --line: #2c3446;
  --text: #e7e9ee; --muted: #9aa3b5; --gold: #e2b659; --gold2: #f5d58a; --accent: #6d8dff;
  --ok: #4cc38a; --warn: #e8a13a; --err: #ef6a6a; --radius: 12px;
  --warrior: #c79c6e; --paladin: #f58cba; --hunter: #abd473; --rogue: #fff569; --priest: #ffffff;
  --shaman: #2f8fff; --mage: #69ccf0; --warlock: #a48ae0; --druid: #ff7d0a;
}
* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0; min-height: 100vh; font: 15px/1.55 "Inter", system-ui, "Segoe UI", sans-serif; color: var(--text);
  background: radial-gradient(1200px 600px at 80% -10%, #24304f55, transparent 60%),
              radial-gradient(900px 500px at -10% 10%, #5a3f1444, transparent 60%), var(--bg);
  background-attachment: fixed;
}
a { color: var(--gold2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: "Cinzel", Georgia, serif; font-weight: 700; letter-spacing: .02em; margin: 0 0 .6em; }
h1 { font-size: 1.9rem; } h2 { font-size: 1.25rem; color: var(--gold2); } h3 { font-size: 1rem; }
p { margin: 0 0 .8em; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .right { text-align: right; } .nowrap { white-space: nowrap; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* Barre du haut */
.top { position: sticky; top: 0; z-index: 20; background: #0d0f14e6; backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 22px; height: 60px; }
.brand { font-family: "Cinzel", serif; font-weight: 900; font-size: 1.15rem; color: var(--gold); display: flex; align-items: center; gap: 10px; }
.brand:hover { text-decoration: none; color: var(--gold2); }
.brand .sigil { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: #1a1305;
  background: linear-gradient(135deg, var(--gold2), #b9862b); font-size: .8rem; box-shadow: 0 0 18px #e2b65955; }
.nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; }
.nav a { color: var(--muted); padding: 8px 12px; border-radius: 8px; white-space: nowrap; font-weight: 500; }
.nav a:hover { color: var(--text); background: var(--panel); text-decoration: none; }
.nav a.on { color: var(--gold2); background: var(--panel); }
.who { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.who img { width: 30px; height: 30px; border-radius: 50%; }
.who form { margin: 0; }

main { padding: 28px 0 60px; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.head h1 { margin: 0; } .head .sub { color: var(--muted); margin-top: 4px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Panneaux */
.panel { background: linear-gradient(180deg, var(--panel), #171c27); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 20px; position: relative; }
.grid { display: grid; gap: 20px; } .g2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); } .cols { grid-template-columns: 2fr 1fr; }
@media (max-width: 900px) { .cols { grid-template-columns: 1fr; } }

/* Boutons et champs */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--panel2); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; transition: .15s; }
.btn:hover { border-color: #48557a; background: #283149; text-decoration: none; }
.btn.gold { background: linear-gradient(135deg, var(--gold2), #c9932f); color: #1c1403; border-color: #0000; }
.btn.gold:hover { filter: brightness(1.08); }
.btn.discord { background: #5865f2; border-color: #0000; color: #fff; padding: 12px 22px; font-size: 1.05rem; }
.btn.danger { color: var(--err); } .btn.small { padding: 4px 10px; font-size: .82rem; } .btn.ghost { background: none; }
input, select, textarea { font: inherit; color: var(--text); background: #0f131b; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; max-width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid #6d8dff66; border-color: var(--accent); }
textarea { width: 100%; min-height: 110px; font-family: ui-monospace, Consolas, monospace; font-size: .85rem; }
label { display: block; font-weight: 600; margin-bottom: 4px; }
.field { margin-bottom: 14px; } .field .help { color: var(--muted); font-size: .84rem; margin-top: 3px; }
.field input:not([type=checkbox]), .field select { width: 100%; }
.check { display: flex; gap: 10px; align-items: flex-start; } .check input { margin-top: 4px; width: 17px; height: 17px; accent-color: var(--gold); }
.inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0; }

/* Messages */
.flash { padding: 10px 14px; border-radius: 9px; margin-bottom: 12px; border: 1px solid; }
.flash.ok { background: #153126; border-color: #2c6b4f; } .flash.warn { background: #3a2a10; border-color: #7a5a1f; }
.flash.err { background: #3b1a1c; border-color: #7d3336; }

/* Tableaux */
table { width: 100%; border-collapse: collapse; }
th { text-align: left; color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; padding: 8px 10px; border-bottom: 1px solid var(--line); }
td { padding: 9px 10px; border-bottom: 1px solid #232a39; vertical-align: middle; }
tr:last-child td { border-bottom: 0; } tbody tr:hover { background: #ffffff05; }
.scroll { overflow-x: auto; }

/* Étiquettes */
.tag { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .76rem; font-weight: 700; border: 1px solid var(--line); background: var(--panel2); white-space: nowrap; }
.tag.open { color: var(--ok); border-color: #2c6b4f; } .tag.locked { color: var(--warn); border-color: #7a5a1f; }
.tag.done { color: var(--muted); } .tag.gold { color: var(--gold2); border-color: #7a6427; }
.tag.bonus { color: #1c1403; background: linear-gradient(135deg, var(--gold2), #c9932f); border: 0; }
.tag.hard { color: var(--err); border-color: #7d3336; }
.c-warrior { color: var(--warrior); } .c-paladin { color: var(--paladin); } .c-hunter { color: var(--hunter); }
.c-rogue { color: var(--rogue); } .c-priest { color: var(--priest); } .c-shaman { color: var(--shaman); }
.c-mage { color: var(--mage); } .c-warlock { color: var(--warlock); } .c-druid { color: var(--druid); }
.char { font-weight: 700; }
.q0 { color: #9d9d9d; } .q1 { color: #ffffff; } .q2 { color: #1eff00; } .q3 { color: #3d9bff; } .q4 { color: #b05cff; } .q5 { color: #ff8000; }
.item { font-weight: 600; } .item img { width: 22px; height: 22px; border-radius: 4px; vertical-align: -5px; margin-right: 6px; border: 1px solid #000; }

/* Cartes de raid */
.raid-card { display: block; color: inherit; background: linear-gradient(160deg, #222a3c, #171c27); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; transition: .15s; }
.raid-card:hover { border-color: var(--gold); transform: translateY(-2px); text-decoration: none; box-shadow: 0 10px 30px #0008; }
.raid-card .when { color: var(--gold2); font-weight: 700; } .raid-card h3 { font-size: 1.15rem; margin: 6px 0; }
.raid-card .meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; color: var(--muted); font-size: .88rem; }
.bar { height: 6px; border-radius: 3px; background: #0f131b; overflow: hidden; margin-top: 12px; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold2)); }

/* Accueil public */
.hero { text-align: center; padding: 70px 0 40px; }
.hero h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); font-weight: 900; background: linear-gradient(180deg, #fff3cf, var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--muted); font-size: 1.1rem; max-width: 620px; margin: 0 auto 28px; }
.feature h3 { color: var(--gold2); }

/* Roster */
.roster { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.roster .col { background: #10141c; border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.roster .col h3 { display: flex; justify-content: space-between; color: var(--muted); font-family: inherit; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }
.roster li { list-style: none; padding: 4px 0; display: flex; justify-content: space-between; gap: 6px; } .roster ul { margin: 0; padding: 0; }

/* Jetons */
.slots { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0 14px; }
.slot { min-width: 190px; flex: 1; padding: 12px; border-radius: 10px; border: 1px dashed #48557a; color: var(--muted); display: flex; justify-content: space-between; align-items: center; gap: 8px; background: #10141c; }
.slot.full { border-style: solid; border-color: var(--gold); background: #2a2413; color: var(--text); }
.slot button { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 1.1rem; }
.slot button:hover { color: var(--err); }
.boss { margin-top: 18px; } .boss h3 { color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.loot-row { display: flex; align-items: center; gap: 10px; padding: 7px 4px; border-bottom: 1px solid #202737; flex-wrap: wrap; }
.loot-row:last-child { border-bottom: 0; } .loot-row .grow { flex: 1; min-width: 200px; }
.loot-row .who-res { display: flex; gap: 6px; flex-wrap: wrap; font-size: .85rem; }
.shake { animation: shake .3s; } @keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

/* Simulateur */
.sim { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; align-items: end; height: 190px; margin-top: 10px; }
.sim .col { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; gap: 4px; }
.sim .col i { width: 100%; border-radius: 6px 6px 0 0; background: linear-gradient(180deg, var(--gold2), #9b6f1c); min-height: 2px; transition: height .2s; }
.sim .col b { font-size: .9rem; } .sim .col span { color: var(--muted); font-size: .75rem; }
.group-title { margin: 26px 0 12px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.group-title:first-child { margin-top: 0; }

.winner td { background: #2a2413; } .total { font-weight: 800; font-size: 1.1rem; color: var(--gold2); }
.code { word-break: break-all; font-family: ui-monospace, Consolas, monospace; font-size: .8rem; background: #0f131b; border: 1px solid var(--line); border-radius: 8px; padding: 12px; max-height: 180px; overflow: auto; }
footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; padding: 18px 0 30px; }
footer .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
details > summary { cursor: pointer; color: var(--gold2); font-weight: 600; margin-bottom: 10px; }

/* Téléphone */
@media (max-width: 760px) {
  .top .wrap { flex-wrap: wrap; height: auto; padding: 8px 14px; gap: 6px 12px; }
  .brand { flex: 1; min-width: 0; white-space: nowrap; }
  .nav { order: 3; flex: 0 0 100%; }
  .who .tag { display: none; }
  .wrap { padding: 0 14px; }
  h1 { font-size: 1.5rem; }
  .panel { padding: 14px; }
  .slot { min-width: 0; flex-basis: 100%; }
  .head input[type=search] { min-width: 0 !important; width: 100%; }
  .grid.g2, .grid.g3 { grid-template-columns: 1fr; }
  .grid > * { min-width: 0; }
}
.grid > * { min-width: 0; }

/* Administration */
.subnav { display: flex; gap: 6px; flex-wrap: wrap; margin: -6px 0 20px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.subnav a { padding: 6px 12px; border-radius: 999px; color: var(--muted); border: 1px solid var(--line); font-weight: 600; font-size: .9rem; }
.subnav a:hover { color: var(--text); text-decoration: none; border-color: #48557a; }
.subnav a.on { color: #1c1403; background: linear-gradient(135deg, var(--gold2), #c9932f); border-color: #0000; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat b { display: block; font-size: 1.7rem; color: var(--gold2); font-family: "Cinzel", serif; }
.stat span { color: var(--muted); font-size: .85rem; }
.member-char { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 3px 0; }
.member-char select { padding: 3px 6px; font-size: .82rem; max-width: 150px; }
code { background: #0f131b; border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; font-size: .85em; }
