/* =========================================================
   Halloween — thème nuit, citrouille et brume
   ========================================================= */

:root {
  --bg: #0a0611;
  --bg-2: #170c26;
  --card: rgba(26, 15, 40, 0.78);
  --card-border: rgba(255, 140, 50, 0.18);
  --orange: #ff7a18;
  --orange-2: #ffb347;
  --purple: #9b5cff;
  --green: #8dff6a;
  --red: #ff4d5e;
  --text: #f4ecff;
  --muted: #b2a3c8;
  --input: rgba(10, 5, 18, 0.7);
  --radius: 18px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  --font-title: "Creepster", "Chiller", cursive;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background:
    radial-gradient(ellipse at 80% -10%, rgba(155, 92, 255, 0.28), transparent 55%),
    radial-gradient(ellipse at 10% 110%, rgba(255, 122, 24, 0.18), transparent 50%),
    linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 70%);
  background-attachment: fixed;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

a { color: var(--orange-2); }
a:hover { color: var(--orange); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

:focus-visible { outline: 3px solid var(--orange-2); outline-offset: 3px; border-radius: 6px; }

/* ---------- Décor animé ---------- */

.scene { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }

.stars {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 10% 20%, #fff, transparent),
    radial-gradient(1px 1px at 25% 65%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 40% 12%, #fff, transparent),
    radial-gradient(1px 1px at 55% 40%, #fff, transparent),
    radial-gradient(2px 2px at 68% 22%, #ffe9c2, transparent),
    radial-gradient(1px 1px at 78% 58%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 90% 8%, #fff, transparent),
    radial-gradient(1px 1px at 15% 85%, #fff, transparent),
    radial-gradient(1px 1px at 35% 35%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 85% 80%, #fff, transparent);
  opacity: 0.7;
  animation: twinkle 6s ease-in-out infinite alternate;
}

.moon {
  position: absolute; top: 60px; right: 8vw;
  width: 120px; height: 120px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fffbe8 0%, #ffe7a8 45%, #f2c46b 100%);
  box-shadow: 0 0 60px 20px rgba(255, 220, 140, 0.25), 0 0 140px 60px rgba(255, 180, 80, 0.12);
  animation: moonGlow 8s ease-in-out infinite;
}
.moon::before, .moon::after {
  content: ""; position: absolute; border-radius: 50%; background: rgba(200, 150, 70, 0.25);
}
.moon::before { width: 24px; height: 24px; top: 30px; left: 62px; }
.moon::after { width: 14px; height: 14px; top: 72px; left: 36px; }

.bat { position: absolute; width: 56px; height: 28px; fill: #05030a; filter: drop-shadow(0 0 4px rgba(155, 92, 255, 0.5)); }
.bat use { transform-origin: center; animation: flap 0.35s ease-in-out infinite alternate; }
.bat-1 { top: 18%; animation: flyRight 22s linear infinite; }
.bat-2 { top: 32%; width: 38px; height: 19px; animation: flyLeft 28s linear infinite 4s; }
.bat-3 { top: 10%; width: 30px; height: 15px; animation: flyRight 34s linear infinite 10s; }
.bat-4 { top: 48%; width: 44px; height: 22px; animation: flyLeft 26s linear infinite 15s; }

.ghost { position: absolute; width: 60px; height: 72px; opacity: 0; filter: drop-shadow(0 0 14px rgba(230, 220, 255, 0.6)); }
.ghost-1 { left: 6%; top: 55%; animation: ghostFloat 16s ease-in-out infinite 2s; }
.ghost-2 { right: 12%; top: 40%; width: 44px; height: 54px; animation: ghostFloat 20s ease-in-out infinite 9s; }

.fog {
  position: absolute; left: -50%; width: 200%; height: 40vh; bottom: -8vh;
  background:
    radial-gradient(ellipse at 20% 60%, rgba(200, 190, 230, 0.12), transparent 60%),
    radial-gradient(ellipse at 60% 50%, rgba(200, 190, 230, 0.10), transparent 55%),
    radial-gradient(ellipse at 85% 70%, rgba(200, 190, 230, 0.12), transparent 60%);
  filter: blur(6px);
  animation: fogDrift 40s linear infinite;
}
.fog-2 { bottom: -14vh; opacity: 0.8; animation-duration: 60s; animation-direction: reverse; }

.graveyard { position: absolute; bottom: 0; left: 0; width: 100%; height: 170px; }
.pumpkin { animation: pumpkinGlow 2.6s ease-in-out infinite; }
.pumpkin-2 { animation-delay: 1.1s; }

.spider { position: fixed; top: 0; left: 14px; z-index: 5; display: flex; flex-direction: column; align-items: center; pointer-events: none; animation: spiderDrop 9s ease-in-out infinite; }
.spider-thread { width: 1px; height: 90px; background: linear-gradient(rgba(255,255,255,0.1), rgba(255,255,255,0.5)); }
.spider-body { font-size: 24px; margin-top: -4px; animation: spiderWiggle 1.2s ease-in-out infinite; }

/* ---------- Structure ---------- */

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px clamp(16px, 4vw, 40px);
  background: rgba(10, 6, 17, 0.72);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 122, 24, 0.15);
}

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand-pumpkin { font-size: 30px; display: inline-block; animation: pumpkinBounce 3s ease-in-out infinite; }
.brand-name { font-family: var(--font-title); font-size: 28px; letter-spacing: 1.5px; color: var(--orange); text-shadow: 0 0 12px rgba(255, 122, 24, 0.55); }

.main-nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.main-nav a {
  color: var(--text); text-decoration: none; font-weight: 700;
  padding: 8px 14px; border-radius: 999px; transition: background 0.2s, color 0.2s;
}
.main-nav a:hover { background: rgba(255, 122, 24, 0.12); color: var(--orange-2); }
.main-nav a.active { background: linear-gradient(135deg, var(--orange), #e2450f); color: #1a0a00; }
.logout-form { margin: 0 0 0 6px; }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span:not(.sr-only) { display: block; width: 26px; height: 3px; margin: 5px 0; background: var(--orange); border-radius: 3px; transition: transform 0.25s, opacity 0.25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.container {
  position: relative; z-index: 1;
  width: min(1120px, 100%); margin: 0 auto; flex: 1 0 auto;
  padding: 32px clamp(16px, 4vw, 32px) 200px;
}

.footer { position: relative; z-index: 1; text-align: center; color: var(--muted); font-size: 14px; padding: 0 16px 24px; margin-top: -150px; }

/* ---------- Typo ---------- */

h1, h2, h3 { line-height: 1.2; margin: 0 0 12px; }
h2 { font-size: 1.3rem; }
.title-spooky {
  font-family: var(--font-title); font-weight: 400;
  font-size: clamp(2.2rem, 6vw, 3.6rem); letter-spacing: 2px;
  color: var(--orange);
  text-shadow: 0 0 18px rgba(255, 122, 24, 0.6), 0 4px 0 #4a1700;
}
.flicker { animation: flicker 5s linear infinite; }
.lead { font-size: 1.1rem; color: var(--muted); margin: 0 0 18px; }
.muted { color: var(--muted); }
.small { font-size: 0.86rem; }
.ok { color: var(--green); }
.section-title { font-family: var(--font-title); font-weight: 400; font-size: 1.9rem; color: var(--purple); letter-spacing: 1px; margin: 34px 0 14px; text-shadow: 0 0 14px rgba(155, 92, 255, 0.5); }
.big-emoji { font-size: 64px; animation: pumpkinBounce 2.5s ease-in-out infinite; }
.empty { color: var(--muted); font-style: italic; }
code { background: rgba(255, 255, 255, 0.07); padding: 2px 6px; border-radius: 6px; font-size: 0.92em; }

/* ---------- Cartes ---------- */

.card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: clamp(18px, 3vw, 28px);
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
  margin-bottom: 22px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s;
}
.card:hover { border-color: rgba(255, 140, 50, 0.38); }
.card-center { text-align: center; max-width: 520px; margin: 40px auto; }
.card-danger { border-color: rgba(255, 77, 94, 0.4); }
.card-danger h2 { color: var(--red); }

.two-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 22px; align-items: start; margin-bottom: 22px; }
.two-cols > .card, .stack > .card { margin-bottom: 0; }
.stack { display: grid; gap: 22px; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 18px; }
.grid-cards .card { margin: 0; }
.grid-cards .card:hover { transform: translateY(-4px) rotate(-0.4deg); }

.tag {
  display: inline-block; padding: 3px 12px; border-radius: 999px;
  font-size: 0.78rem; font-weight: 800; letter-spacing: 0.5px; text-transform: uppercase;
  background: rgba(255, 122, 24, 0.18); color: var(--orange-2); border: 1px solid rgba(255, 122, 24, 0.35);
}
.tag-purple { background: rgba(155, 92, 255, 0.18); color: #cdb2ff; border-color: rgba(155, 92, 255, 0.4); }
.tag-warn { background: rgba(255, 200, 60, 0.12); color: #ffd56a; border-color: rgba(255, 200, 60, 0.3); text-transform: none; }

/* ---------- Boutons & formulaires ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border: 0; border-radius: 12px; cursor: pointer;
  font: 800 1rem var(--font-body); text-decoration: none;
  color: #1c0b00;
  background: linear-gradient(135deg, var(--orange-2), var(--orange) 55%, #e2450f);
  box-shadow: 0 6px 22px rgba(255, 122, 24, 0.35), inset 0 -3px 0 rgba(0, 0, 0, 0.2);
  transition: transform 0.15s, box-shadow 0.2s, filter 0.2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(255, 122, 24, 0.55); color: #1c0b00; filter: brightness(1.05); }
.btn:active { transform: translateY(1px); }
.btn-ghost { background: transparent; color: var(--orange-2); border: 1.5px solid rgba(255, 122, 24, 0.5); box-shadow: none; }
.btn-ghost:hover { background: rgba(255, 122, 24, 0.12); color: var(--orange-2); box-shadow: none; }
.btn-danger { background: linear-gradient(135deg, #ff7a85, var(--red) 60%, #b3001b); color: #fff; box-shadow: 0 6px 22px rgba(255, 77, 94, 0.3); }
.btn-danger:hover { color: #fff; box-shadow: 0 10px 30px rgba(255, 77, 94, 0.5); }
.btn-sm { padding: 6px 12px; font-size: 0.85rem; border-radius: 10px; }
.btn-block { width: 100%; }
.link-btn { background: none; border: 0; color: var(--orange-2); cursor: pointer; font: inherit; font-size: 0.85rem; text-decoration: underline; padding: 0 0 0 8px; }

label, legend { display: block; font-weight: 700; margin: 14px 0 6px; font-size: 0.95rem; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
input[type="text"], input[type="password"], input[type="date"], select, textarea {
  width: 100%; padding: 12px 14px;
  font: inherit; color: var(--text);
  background: var(--input);
  border: 1.5px solid rgba(155, 92, 255, 0.3);
  border-radius: 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 4px rgba(255, 122, 24, 0.18), 0 0 20px rgba(255, 122, 24, 0.2); }
input:disabled { opacity: 0.6; }
input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(0.8); }
textarea { resize: vertical; }
select option { background: #1a0f28; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.check {
  display: inline-flex; align-items: center; gap: 8px; margin: 0;
  padding: 8px 14px; border-radius: 999px; cursor: pointer; font-weight: 600;
  background: rgba(155, 92, 255, 0.1); border: 1px solid rgba(155, 92, 255, 0.3);
  transition: background 0.2s;
}
.check:hover { background: rgba(155, 92, 255, 0.2); }
.check input { accent-color: var(--orange); width: 18px; height: 18px; }
form button[type="submit"] { margin-top: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 0 18px; }
.form-grid .full { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.form-actions .btn-ghost { margin-top: 18px; }
form.inline { display: inline; }
form.inline button, .actions form button { margin-top: 0; }

.password-field { position: relative; }
.password-field input { padding-right: 48px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; cursor: pointer; font-size: 18px; padding: 6px; opacity: 0.7; }
.pw-toggle:hover { opacity: 1; }

.meter { height: 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.08); margin-top: 8px; overflow: hidden; }
.meter span { display: block; height: 100%; width: 0; border-radius: 6px; transition: width 0.3s, background 0.3s; }
.meter[data-level="1"] span { width: 25%; background: var(--red); }
.meter[data-level="2"] span { width: 50%; background: #ffb347; }
.meter[data-level="3"] span { width: 75%; background: #d7ff1f; }
.meter[data-level="4"] span { width: 100%; background: var(--green); }

/* ---------- Alertes ---------- */

.alert { padding: 14px 18px; border-radius: 14px; margin-bottom: 18px; font-weight: 600; border: 1px solid; animation: slideDown 0.45s ease both; }
.alert-success { background: rgba(141, 255, 106, 0.1); border-color: rgba(141, 255, 106, 0.4); color: #c8ffb5; }
.alert-error { background: rgba(255, 77, 94, 0.12); border-color: rgba(255, 77, 94, 0.45); color: #ffc1c7; }
.alert-warning { background: rgba(255, 179, 71, 0.12); border-color: rgba(255, 179, 71, 0.45); color: #ffdca8; }
.alert-info { background: rgba(155, 92, 255, 0.12); border-color: rgba(155, 92, 255, 0.45); color: #ddc9ff; }
.alert-secret { background: rgba(155, 92, 255, 0.15); border-color: var(--purple); color: var(--text); box-shadow: 0 0 30px rgba(155, 92, 255, 0.3); }
.alert-secret p { margin: 0 0 8px; }
.secret-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.secret-row code { font-size: 1.3rem; padding: 8px 14px; letter-spacing: 1px; user-select: all; }

/* ---------- Avatars ---------- */

.avatar { display: block; flex-shrink: 0; border-radius: 50%; overflow: visible; }
.avatar-sm { width: 46px; height: 46px; }
.avatar-md { width: 110px; height: 110px; }
.avatar-lg { width: 170px; height: 170px; }
.avatar-girl { filter: drop-shadow(0 0 16px rgba(255, 42, 42, 0.35)); }
.avatar-boy { filter: drop-shadow(0 0 16px rgba(215, 255, 31, 0.3)); }
.avatar-sm { filter: none; }

.av-head { transform-origin: 100px 170px; animation: headTilt 7s ease-in-out infinite; }
.av-eye { transform-box: fill-box; transform-origin: center; animation: eyeGlow 2.4s ease-in-out infinite; }
.av-lid { transform-box: fill-box; transform-origin: center top; transform: scaleY(0); animation: blink 5.5s ease-in-out infinite; }
.av-drip { transform-box: fill-box; transform-origin: center top; animation: drip 4s ease-in infinite; }
.avatar-boy .av-head { animation-duration: 5.5s; animation-delay: -2s; }
.avatar-boy .av-lid { animation-delay: 1.8s; }
.avatar-sm .av-head, .avatar-sm .av-drip { animation: none; }

/* ---------- Connexion ---------- */

.login-wrap { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; min-height: 60vh; }
.login-hero { text-align: center; }
.hero-avatars { display: flex; justify-content: center; gap: 4px; margin-bottom: 8px; }
.hero-avatars .avatar:first-child { transform: rotate(-6deg); }
.hero-avatars .avatar:last-child { transform: rotate(6deg); }
.login-card { max-width: 440px; width: 100%; justify-self: center; margin: 0; }
.login-card h2 { font-family: var(--font-title); font-weight: 400; font-size: 2rem; color: var(--purple); letter-spacing: 1px; }

.countdown { font-weight: 800; font-size: 1.1rem; color: var(--orange-2); min-height: 1.5em; }
.countdown.big { font-size: clamp(1.3rem, 3vw, 1.8rem); margin: 4px 0 0; text-shadow: 0 0 14px rgba(255, 122, 24, 0.5); font-variant-numeric: tabular-nums; }

/* ---------- Tableau de bord ---------- */

.welcome { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
.countdown-box { position: relative; z-index: 1; text-align: right; padding: 14px 20px; border-radius: 16px; background: rgba(28, 14, 40, 0.9); border: 1px dashed rgba(255, 122, 24, 0.4); }

.duo-grid { display: grid; gap: 22px; align-items: stretch; margin-bottom: 22px; }
.duo-grid.is-duo { grid-template-columns: 1fr auto 1fr; }
.duo-grid.is-solo { grid-template-columns: minmax(0, 560px); justify-content: center; }
.duo-grid .card { margin: 0; }
.person-card { text-align: center; display: flex; flex-direction: column; align-items: center; }
.person-card .tag { position: absolute; top: 16px; left: 16px; }
.person-card .avatar { margin: 10px 0 8px; }
.person-card h2 { font-size: 1.6rem; }
.person-card form, .person-card .costume { width: 100%; text-align: left; }
.person-card:hover { transform: translateY(-4px); }
.duo-link { display: flex; align-items: center; justify-content: center; font-size: 34px; animation: pulse 2s ease-in-out infinite; }

.costume { background: rgba(0, 0, 0, 0.25); border-radius: 14px; padding: 16px 18px; margin-bottom: 14px; border-left: 4px solid var(--orange); }
.costume-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted); font-weight: 800; }
.costume-name { font-family: var(--font-title); font-size: 1.9rem; letter-spacing: 1px; color: var(--orange-2); margin: 4px 0; line-height: 1.2; overflow-wrap: anywhere; }
.costume-name.muted { font-family: var(--font-body); font-size: 1.1rem; color: var(--muted); }
.costume-details { margin: 6px 0 0; color: var(--muted); overflow-wrap: anywhere; }

.balance-card { display: grid; grid-template-columns: 1fr auto auto; gap: 18px; align-items: center; }
.balance-card h2, .balance-card p { margin: 0; }
.balance { font-size: 1.4rem; font-weight: 800; }
.pos { color: var(--green); }
.neg { color: var(--red); }

/* ---------- Participants ---------- */

.mini-person { display: flex; align-items: center; gap: 12px; }
.mini-person > div { display: flex; flex-direction: column; min-width: 0; }
.duo-card { display: flex; flex-direction: column; gap: 10px; }
.duo-sep { font-family: var(--font-title); color: var(--purple); font-size: 1.6rem; text-align: center; line-height: 1; }

.progress { height: 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.07); overflow: hidden; max-width: 520px; }
.progress-bar { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--purple), var(--orange)); border-radius: 12px; transition: width 1.2s cubic-bezier(.2, .8, .2, 1); box-shadow: 0 0 14px rgba(255, 122, 24, 0.6); }

/* ---------- Dépenses ---------- */

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 16px; margin-bottom: 22px; }
.stat { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.stat-label { color: var(--muted); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 1px; font-weight: 800; }
.stat-value { font-size: 1.7rem; font-weight: 800; color: var(--orange-2); font-variant-numeric: tabular-nums; }

.balances, .transfers, .list { list-style: none; margin: 0; padding: 0; }
.balances li { display: grid; grid-template-columns: minmax(80px, 1fr) 2fr auto; gap: 12px; align-items: center; padding: 8px 6px; border-radius: 10px; }
.balances li.me, .transfers li.me { background: rgba(255, 122, 24, 0.08); }
.bal-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bal-track { height: 10px; background: rgba(255, 255, 255, 0.06); border-radius: 10px; overflow: hidden; }
.bal-bar { display: block; height: 100%; width: 0; border-radius: 10px; transition: width 1s cubic-bezier(.2, .8, .2, 1); }
.bal-bar.pos { background: linear-gradient(90deg, #3c9d2a, var(--green)); }
.bal-bar.neg { background: linear-gradient(90deg, #a3001a, var(--red)); }
.bal-amount { font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; }

.transfers li, .list li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 12px 8px; border-bottom: 1px dashed rgba(255, 255, 255, 0.08); border-radius: 10px; }
.transfers li:last-child, .list li:last-child { border-bottom: 0; }
.transfers .arrow { color: var(--orange-2); font-weight: 700; }
.list li { justify-content: space-between; }
.pair { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 10px; text-align: left; vertical-align: middle; }
th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); border-bottom: 1px solid rgba(255, 122, 24, 0.25); }
tbody tr { border-bottom: 1px solid rgba(255, 255, 255, 0.06); transition: background 0.2s; }
tbody tr:hover { background: rgba(155, 92, 255, 0.07); }
.num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.actions { text-align: right; white-space: nowrap; }

/* ---------- Admin ---------- */

.admin-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.admin-tabs a {
  padding: 10px 18px; border-radius: 12px; text-decoration: none; font-weight: 700; color: var(--text);
  background: rgba(155, 92, 255, 0.1); border: 1px solid rgba(155, 92, 255, 0.3); transition: background 0.2s, transform 0.2s;
}
.admin-tabs a:hover { background: rgba(155, 92, 255, 0.22); transform: translateY(-2px); color: var(--text); }
.admin-tabs a.active { background: linear-gradient(135deg, var(--purple), #6a2fd6); border-color: transparent; color: #fff; }

.profile-card { display: flex; flex-direction: column; align-items: center; }
.dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 16px 0; width: 100%; }
.dl dt { color: var(--muted); font-weight: 700; }
.dl dd { margin: 0; }

/* ---------- Animations d'entrée ---------- */

.rise { animation: rise 0.7s cubic-bezier(.2, .8, .2, 1) both; }
.rise-1 { animation-delay: 0.08s; }
.rise-2 { animation-delay: 0.16s; }
.rise-3 { animation-delay: 0.24s; }
.rise-4 { animation-delay: 0.32s; }

@keyframes rise { from { opacity: 0; transform: translateY(24px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }
@keyframes twinkle { from { opacity: 0.4; } to { opacity: 0.85; } }
@keyframes moonGlow { 0%, 100% { box-shadow: 0 0 60px 20px rgba(255, 220, 140, 0.25), 0 0 140px 60px rgba(255, 180, 80, 0.12); } 50% { box-shadow: 0 0 80px 30px rgba(255, 220, 140, 0.32), 0 0 180px 80px rgba(255, 180, 80, 0.16); } }
@keyframes flap { from { transform: scaleY(1); } to { transform: scaleY(0.35); } }
@keyframes flyRight { 0% { transform: translate(-10vw, 0); } 25% { transform: translate(25vw, -40px); } 50% { transform: translate(55vw, 30px); } 75% { transform: translate(85vw, -20px); } 100% { transform: translate(115vw, 10px); } }
@keyframes flyLeft { 0% { transform: translate(110vw, 0) scaleX(-1); } 33% { transform: translate(70vw, 40px) scaleX(-1); } 66% { transform: translate(30vw, -30px) scaleX(-1); } 100% { transform: translate(-15vw, 20px) scaleX(-1); } }
@keyframes ghostFloat { 0%, 100% { opacity: 0; transform: translate(0, 30px); } 20% { opacity: 0.55; } 50% { opacity: 0.35; transform: translate(40px, -40px); } 80% { opacity: 0.5; } }
@keyframes fogDrift { from { transform: translateX(0); } to { transform: translateX(25%); } }
@keyframes pumpkinGlow { 0%, 100% { filter: drop-shadow(0 0 6px rgba(255, 150, 30, 0.7)); } 50% { filter: drop-shadow(0 0 16px rgba(255, 190, 60, 1)); } }
@keyframes pumpkinBounce { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-4px) rotate(-6deg); } }
@keyframes spiderDrop { 0%, 100% { transform: translateY(-60px); } 50% { transform: translateY(0); } }
@keyframes spiderWiggle { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(8deg); } }
@keyframes flicker {
  0%, 18%, 22%, 25%, 53%, 57%, 100% { opacity: 1; text-shadow: 0 0 18px rgba(255, 122, 24, 0.7), 0 4px 0 #4a1700; }
  20%, 24%, 55% { opacity: 0.55; text-shadow: none; }
}
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.18); } }
@keyframes headTilt { 0%, 100% { transform: rotate(-2.5deg); } 50% { transform: rotate(2.5deg); } }
@keyframes eyeGlow { 0%, 100% { opacity: 0.7; transform: scale(0.9); } 50% { opacity: 1; transform: scale(1.25); } }
@keyframes blink { 0%, 90%, 100% { transform: scaleY(0); } 94% { transform: scaleY(1); } }
@keyframes drip { 0% { transform: scaleY(0.2); opacity: 0; } 15% { opacity: 1; } 70% { transform: scaleY(1.15); opacity: 1; } 100% { transform: scaleY(1.2) translateY(6px); opacity: 0; } }

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    padding: 12px 16px 18px;
    background: rgba(10, 6, 17, 0.97);
    border-bottom: 1px solid rgba(255, 122, 24, 0.2);
    display: none;
  }
  .main-nav.open { display: flex; animation: slideDown 0.25s ease both; }
  .main-nav a { padding: 12px 14px; }
  .logout-form { margin: 6px 0 0; }
  .logout-form .btn { width: 100%; }
  .login-wrap { grid-template-columns: 1fr; gap: 24px; }
  .duo-grid.is-duo { grid-template-columns: 1fr; }
  .duo-link { transform: rotate(90deg); }
  .balance-card { grid-template-columns: 1fr; }
  .countdown-box { text-align: left; }
  .moon { width: 80px; height: 80px; top: 80px; }
}

@media (max-width: 640px) {
  .avatar-lg { width: 130px; height: 130px; }
  .brand-name { font-size: 22px; }
  .spider { display: none; }
  table thead { display: none; }
  table, tbody, tr, td { display: block; width: 100%; }
  tbody tr { padding: 10px 0; }
  td { padding: 4px 6px; text-align: left; }
  td[data-label]::before { content: attr(data-label) " : "; color: var(--muted); font-size: 0.8rem; font-weight: 700; }
  .num, .actions { text-align: left; }
  .balances li { grid-template-columns: 1fr auto; }
  .bal-track { grid-column: 1 / -1; grid-row: 2; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .av-lid { transform: scaleY(0); }
  .ghost { opacity: 0.3; }
  .bat { display: none; }
}
