/* =========================================================================
   KLASH — Design System
   Dark-mode futuriste · gradient "heat" orange→magenta · glassmorphism
   Mobile-first (320px) → desktop (1920px)
   ========================================================================= */

/* -------------------------------------------------------------------------
   1. RESET
   ---------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; color-scheme: dark; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
body { min-height: 100vh; line-height: 1.6; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg, video { max-width: 100%; height: auto; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
:focus-visible { outline: 2px solid var(--flame-2); outline-offset: 2px; border-radius: 4px; }

/* -------------------------------------------------------------------------
   2. TOKENS
   ---------------------------------------------------------------------- */
:root {
  /* Fond & surfaces */
  --bg:        #08080c;
  --bg-2:      #0d0d14;
  --surface:   rgba(255,255,255,.035);
  --surface-2: rgba(255,255,255,.06);
  --surface-solid: #13131c;
  --border:    rgba(255,255,255,.09);
  --border-2:  rgba(255,255,255,.14);

  /* Texte */
  --text:      #f5f5fa;
  --text-dim:  #a2a2b5;
  --text-mute: #6a6a7d;

  /* Marque — "heat" */
  --flame-1: #ff7a1a;   /* orange */
  --flame-2: #ff2d6b;   /* magenta chaud */
  --plasma:  #9b3cff;   /* violet plasma */
  --heat: linear-gradient(120deg, #ff7a1a 0%, #ff2d6b 55%, #9b3cff 110%);
  --heat-soft: linear-gradient(120deg, rgba(255,122,26,.18), rgba(255,45,107,.18));

  /* Vote */
  --valide:  #1fe08f;   /* vert néon — d'accord */
  --valide-d:#0fae6c;
  --crame:   #ff3b5c;   /* rouge flamme — pas d'accord */
  --crame-d: #d81f42;

  /* Divers */
  --gold: #ffce4d;

  /* Rayons */
  --r-sm: 8px; --r-md: 14px; --r-lg: 22px; --r-xl: 32px; --r-full: 999px;

  /* Ombres / glows */
  --shadow: 0 18px 50px -20px rgba(0,0,0,.7);
  --glow-flame: 0 0 30px -6px rgba(255,45,107,.55);
  --glow-valide: 0 0 24px -6px rgba(31,224,143,.5);
  --glow-crame:  0 0 24px -6px rgba(255,59,92,.5);

  /* Typo */
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  /* Layout */
  --maxw: 1180px;
  --nav-h: 68px;
}

/* -------------------------------------------------------------------------
   3. BASE
   ---------------------------------------------------------------------- */
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  position: relative;
}

/* Décor : halos plasma + grain, fixés en fond */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(60vw 60vw at 82% -8%, rgba(255,45,107,.16), transparent 60%),
    radial-gradient(55vw 55vw at 8% 12%, rgba(155,60,255,.14), transparent 60%),
    radial-gradient(50vw 50vw at 50% 108%, rgba(255,122,26,.10), transparent 55%),
    var(--bg);
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.08; letter-spacing: -.02em; }
h1 { font-size: clamp(2.4rem, 7vw, 4.6rem); }
h2 { font-size: clamp(1.7rem, 4vw, 2.8rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }
p { color: var(--text-dim); }
strong { color: var(--text); font-weight: 600; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 20px; }
.section { padding-block: clamp(3rem, 8vw, 6rem); }

/* Texte en dégradé "heat" */
.grad { background: var(--heat); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }

/* Micro-label technique */
.eyebrow {
  font-family: var(--font-display); font-size: .74rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .22em; color: var(--flame-2);
  display: inline-flex; align-items: center; gap: .5rem;
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--heat); border-radius: 2px; }

/* -------------------------------------------------------------------------
   4. BOUTONS
   ---------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  font-family: var(--font-display); font-weight: 600; font-size: .95rem;
  padding: .82rem 1.5rem; border-radius: var(--r-full);
  transition: transform .18s ease, box-shadow .25s ease, background .25s ease, border-color .2s;
  white-space: nowrap; border: 1px solid transparent; line-height: 1;
}
.btn svg { width: 1.1em; height: 1.1em; }
.btn-primary { background: var(--heat); color: #fff; box-shadow: var(--glow-flame); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 40px -4px rgba(255,45,107,.75); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border-2); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--flame-2); transform: translateY(-2px); }
.btn-sm { padding: .55rem 1rem; font-size: .85rem; }
.btn-lg { padding: 1.05rem 2rem; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* -------------------------------------------------------------------------
   5. NAVBAR
   ---------------------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 50; height: var(--nav-h);
  display: flex; align-items: center;
  background: rgba(8,8,12,.72); backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid var(--border);
}
.nav .container { display: flex; align-items: center; gap: 1.2rem; }
.brand { display: flex; align-items: center; gap: .6rem; font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; letter-spacing: -.03em; }
.brand .logo { width: 34px; height: 34px; }
.brand b { background: var(--heat); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.nav-links { display: none; gap: .3rem; margin-left: auto; }
.nav-links a { padding: .5rem .85rem; border-radius: var(--r-full); color: var(--text-dim); font-weight: 500; font-size: .93rem; transition: color .2s, background .2s; }
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--surface); }
.nav-actions { display: flex; align-items: center; gap: .6rem; margin-left: auto; }
.nav-links + .nav-actions { margin-left: .5rem; }
.burger { display: inline-flex; margin-left: auto; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: var(--r-md); border: 1px solid var(--border); background: var(--surface); }
.burger svg { width: 22px; height: 22px; }
.mobile-menu { position: fixed; inset: var(--nav-h) 0 0; z-index: 49; background: rgba(8,8,12,.97); backdrop-filter: blur(20px); padding: 1.5rem 20px; display: flex; flex-direction: column; gap: .3rem; transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; }
.mobile-menu.open { opacity: 1; transform: none; pointer-events: auto; }
.mobile-menu a { padding: 1rem; border-radius: var(--r-md); font-family: var(--font-display); font-size: 1.15rem; border-bottom: 1px solid var(--border); }
.mobile-menu .btn { margin-top: 1rem; }

/* Avatar (identicon dégradé) */
.avatar { border-radius: var(--r-full); flex-shrink: 0; display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; color: #fff; overflow: hidden; }
.avatar-sm { width: 34px; height: 34px; font-size: .85rem; }
.avatar-md { width: 48px; height: 48px; font-size: 1.1rem; }
.avatar-lg { width: 84px; height: 84px; font-size: 2rem; }

/* -------------------------------------------------------------------------
   6. HERO
   ---------------------------------------------------------------------- */
.hero { position: relative; padding-block: clamp(3rem, 9vw, 7rem) clamp(2.5rem, 6vw, 4.5rem); text-align: center; overflow: hidden; }
.hero .container { position: relative; z-index: 2; }
.hero h1 { margin: 1.1rem auto .6rem; max-width: 14ch; }
.hero .lead { font-size: clamp(1.05rem, 2.4vw, 1.35rem); color: var(--text-dim); max-width: 40ch; margin: 0 auto 2rem; }
.hero-cta { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; }
.hero-orbs { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.orb { position: absolute; border-radius: 50%; filter: blur(46px); opacity: .55; animation: float 14s ease-in-out infinite; }
.orb.o1 { width: 320px; height: 320px; background: radial-gradient(circle, #ff2d6b, transparent 70%); top: -60px; right: -40px; }
.orb.o2 { width: 300px; height: 300px; background: radial-gradient(circle, #9b3cff, transparent 70%); bottom: -80px; left: -60px; animation-delay: -5s; }
.orb.o3 { width: 240px; height: 240px; background: radial-gradient(circle, #ff7a1a, transparent 70%); top: 30%; left: 40%; animation-delay: -9s; }
@keyframes float { 0%,100% { transform: translate(0,0) scale(1); } 33% { transform: translate(24px,-30px) scale(1.08); } 66% { transform: translate(-20px,20px) scale(.95); } }

/* Fond image du hero d'accueil (par-dessus les halos, sous le texte) */
.hero-home { background-image: linear-gradient(rgba(8,8,12,.80), rgba(8,8,12,.93) 75%), url("/assets/img/hero.webp"); background-size: cover; background-position: center; }

/* Bandeau de stats */
.stats-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-top: 2.8rem; }

/* Cartes catégories (accueil) */
.cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.cat-card { position: relative; display: block; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--border); aspect-ratio: 2 / 1; }
.cat-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.16,1,.3,1); }
.cat-card:hover img { transform: scale(1.07); }
.cat-card .cat-card-label { position: absolute; inset: auto 0 0 0; padding: .9rem 1rem; font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; background: linear-gradient(transparent, rgba(8,8,12,.92)); }
.cat-card::after { content: ""; position: absolute; inset: 0; border: 2px solid transparent; border-radius: inherit; transition: border-color .25s; pointer-events: none; }
.cat-card:hover::after { border-color: var(--flame-2); }

/* En-tête de catégorie avec image de fond (Arène) */
.page-head-cat { border-radius: 0 0 var(--r-xl) var(--r-xl); margin-bottom: 1rem; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 1.3rem 1rem; text-align: center; backdrop-filter: blur(8px); }
.stat .num { font-family: var(--font-display); font-size: clamp(1.6rem, 5vw, 2.4rem); font-weight: 700; }
.stat .num.grad { background: var(--heat); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat .lbl { font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; color: var(--text-mute); margin-top: .3rem; }

/* -------------------------------------------------------------------------
   7. CARTES DE TAKE
   ---------------------------------------------------------------------- */
.take-grid { display: grid; grid-template-columns: 1fr; gap: 1.1rem; }
.take-card {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 1.3rem; transition: transform .2s, border-color .25s, box-shadow .25s;
  display: flex; flex-direction: column; gap: 1rem; overflow: hidden;
}
.take-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--heat); opacity: 0; transition: opacity .25s; }
.take-card:hover { transform: translateY(-3px); border-color: var(--border-2); box-shadow: var(--shadow); }
.take-card:hover::before { opacity: 1; }
/* Épingle le bloc vote + footer en bas de la carte : alignement propre sur une ligne */
.take-card .votebar { margin-top: auto; }
.take-head { display: flex; align-items: center; gap: .7rem; }
.take-author { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.take-author .name { font-weight: 600; font-size: .92rem; display: flex; align-items: center; gap: .35rem; }
.take-author .meta { font-size: .78rem; color: var(--text-mute); }
.take-cat { margin-left: auto; font-family: var(--font-display); font-size: .68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--flame-2); background: var(--heat-soft); border: 1px solid rgba(255,45,107,.25); padding: .3rem .6rem; border-radius: var(--r-full); }
.take-text { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.05rem, 2.6vw, 1.3rem); line-height: 1.3; letter-spacing: -.01em; color: var(--text); }
.take-card a.take-text:hover { color: var(--flame-2); }

/* Barre de vote */
.votebar { --pct: 50; position: relative; height: 42px; border-radius: var(--r-md); overflow: hidden; background: rgba(255,59,92,.14); border: 1px solid var(--border); display: flex; align-items: center; }
.votebar .fill { position: absolute; inset: 0 auto 0 0; width: calc(var(--pct) * 1%); background: linear-gradient(90deg, rgba(31,224,143,.35), rgba(31,224,143,.18)); border-right: 2px solid var(--valide); transition: width .8s cubic-bezier(.16,1,.3,1); }
.votebar .side { position: relative; z-index: 2; flex: 1; display: flex; align-items: center; gap: .4rem; padding: 0 .9rem; font-family: var(--font-display); font-weight: 600; font-size: .85rem; }
.votebar .side.right { justify-content: flex-end; color: #ffb3c0; }
.votebar .side.left { color: #9dffcf; }
.votebar .side svg { width: 1.05em; height: 1.05em; }

/* Boutons de vote */
.vote-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.vote-btn { display: flex; align-items: center; justify-content: center; gap: .5rem; padding: .7rem; border-radius: var(--r-md); border: 1px solid var(--border-2); background: var(--surface); font-family: var(--font-display); font-weight: 600; transition: all .2s; }
.vote-btn svg { width: 1.15em; height: 1.15em; }
.vote-btn .cnt { font-variant-numeric: tabular-nums; opacity: .8; }
.vote-btn.valide:hover, .vote-btn.valide.on { border-color: var(--valide); color: var(--valide); box-shadow: var(--glow-valide); background: rgba(31,224,143,.08); }
.vote-btn.crame:hover, .vote-btn.crame.on { border-color: var(--crame); color: var(--crame); box-shadow: var(--glow-crame); background: rgba(255,59,92,.08); }
.vote-btn:disabled { cursor: default; }

/* Pied de carte */
.take-foot { display: flex; align-items: center; gap: 1.1rem; font-size: .82rem; color: var(--text-mute); }
.take-foot .chip { display: inline-flex; align-items: center; gap: .35rem; }
.take-foot .chip svg { width: 1.05em; height: 1.05em; }

/* Jauge de discorde */
.discord-gauge { display: inline-flex; align-items: center; gap: .45rem; font-family: var(--font-display); font-weight: 600; font-size: .8rem; }
.discord-gauge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--heat); box-shadow: 0 0 10px var(--flame-2); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .55; transform: scale(1.35); } }

/* -------------------------------------------------------------------------
   8. BADGES / CHIPS / TAGS
   ---------------------------------------------------------------------- */
.badge { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .7rem; border-radius: var(--r-full); font-size: .78rem; font-weight: 600; font-family: var(--font-display); border: 1px solid var(--border-2); background: var(--surface); }
.badge svg { width: 1em; height: 1em; }
.badge.hot { color: var(--flame-2); border-color: rgba(255,45,107,.4); background: var(--heat-soft); }
.badge.gold { color: var(--gold); border-color: rgba(255,206,77,.4); }
.badge.premium { background: var(--heat); color: #fff; border-color: transparent; }
.tag { display: inline-flex; padding: .3rem .7rem; border-radius: var(--r-full); font-size: .8rem; color: var(--text-dim); background: var(--surface); border: 1px solid var(--border); transition: all .2s; }
.tag:hover, .tag.active { color: var(--text); border-color: var(--flame-2); background: var(--heat-soft); }

/* Niveaux */
.lvl { font-family: var(--font-display); font-size: .7rem; font-weight: 700; padding: .12rem .5rem; border-radius: var(--r-full); text-transform: uppercase; letter-spacing: .06em; }
.lvl-0 { background: rgba(255,255,255,.08); color: var(--text-mute); }
.lvl-1 { background: rgba(46,230,214,.14); color: #48e6d8; }
.lvl-2 { background: rgba(31,224,143,.14); color: var(--valide); }
.lvl-3 { background: rgba(255,122,26,.16); color: var(--flame-1); }
.lvl-4 { background: rgba(255,45,107,.16); color: var(--flame-2); }
.lvl-5 { background: var(--heat); color: #fff; }

/* -------------------------------------------------------------------------
   9. FILTRES / TABS
   ---------------------------------------------------------------------- */
.filters { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .4rem; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.tabs { display: flex; gap: .3rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-full); padding: .3rem; width: fit-content; }
.tabs a { padding: .5rem 1rem; border-radius: var(--r-full); font-family: var(--font-display); font-weight: 600; font-size: .88rem; color: var(--text-dim); transition: all .2s; }
.tabs a.active { background: var(--heat); color: #fff; }

/* -------------------------------------------------------------------------
   10. FORMULAIRES
   ---------------------------------------------------------------------- */
.auth-wrap { max-width: 440px; margin-inline: auto; }
.card-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: clamp(1.5rem, 4vw, 2.3rem); backdrop-filter: blur(10px); }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-family: var(--font-display); font-weight: 600; font-size: .85rem; margin-bottom: .45rem; }
.field .hint { font-size: .78rem; color: var(--text-mute); margin-top: .35rem; }
.input, .textarea, .select {
  width: 100%; padding: .85rem 1rem; border-radius: var(--r-md);
  background: rgba(0,0,0,.28); border: 1px solid var(--border-2); color: var(--text);
  transition: border-color .2s, box-shadow .2s; font-size: 1rem; color-scheme: dark;
}
/* Menu déroulant natif aux couleurs du site (navigateurs qui l'honorent) */
.select option, .select optgroup { background-color: #14141c; color: var(--text); }
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--flame-2); box-shadow: 0 0 0 3px rgba(255,45,107,.15); }
.input::placeholder, .textarea::placeholder { color: var(--text-mute); }
.textarea { resize: vertical; min-height: 120px; font-family: var(--font-display); font-weight: 500; font-size: 1.1rem; line-height: 1.35; }
.field-error { color: var(--crame); font-size: .82rem; margin-top: .4rem; display: flex; align-items: center; gap: .35rem; }
.input.invalid { border-color: var(--crame); }
.counter { font-size: .78rem; color: var(--text-mute); text-align: right; margin-top: .35rem; font-variant-numeric: tabular-nums; }
.counter.over { color: var(--crame); }
.form-aux { display: flex; justify-content: space-between; align-items: center; margin-top: 1.3rem; font-size: .88rem; }
.checkbox { display: flex; gap: .6rem; align-items: flex-start; font-size: .86rem; color: var(--text-dim); cursor: pointer; }
.checkbox input { margin-top: .2rem; width: 18px; height: 18px; accent-color: var(--flame-2); flex-shrink: 0; }
.divider { display: flex; align-items: center; gap: 1rem; color: var(--text-mute); font-size: .8rem; margin: 1.4rem 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.link { color: var(--flame-2); font-weight: 600; }
.link:hover { text-decoration: underline; }

/* Force du mot de passe */
.pw-meter { height: 5px; border-radius: var(--r-full); background: var(--surface-2); overflow: hidden; margin-top: .5rem; }
.pw-meter i { display: block; height: 100%; width: 0; border-radius: var(--r-full); transition: width .3s, background .3s; }

/* -------------------------------------------------------------------------
   11. FLASH / ALERTES
   ---------------------------------------------------------------------- */
.flashes { position: fixed; top: calc(var(--nav-h) + 12px); left: 50%; transform: translateX(-50%); z-index: 60; width: min(92%, 480px); display: flex; flex-direction: column; gap: .6rem; }
.flash { display: flex; align-items: center; gap: .7rem; padding: .85rem 1.1rem; border-radius: var(--r-md); font-size: .9rem; font-weight: 500; backdrop-filter: blur(12px); border: 1px solid var(--border-2); animation: slideDown .35s cubic-bezier(.16,1,.3,1); box-shadow: var(--shadow); }
.flash svg { width: 1.2em; height: 1.2em; flex-shrink: 0; }
.flash .x { margin-left: auto; opacity: .6; }
.flash.success { background: rgba(31,224,143,.14); color: #7dffc4; border-color: rgba(31,224,143,.4); }
.flash.error { background: rgba(255,59,92,.14); color: #ff9bab; border-color: rgba(255,59,92,.4); }
.flash.info { background: rgba(155,60,255,.14); color: #cbaaff; border-color: rgba(155,60,255,.4); }
@keyframes slideDown { from { opacity: 0; transform: translateY(-16px); } to { opacity: 1; transform: none; } }

/* -------------------------------------------------------------------------
   12. SECTIONS GÉNÉRIQUES
   ---------------------------------------------------------------------- */
.section-head { text-align: center; max-width: 42ch; margin: 0 auto 2.6rem; }
.section-head p { margin-top: .8rem; }
.page-head { padding-block: clamp(2rem, 6vw, 3.5rem) 1.5rem; }
.page-head h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
.page-head p { margin-top: .6rem; max-width: 52ch; }

/* Grille de features */
.feature-grid { display: grid; grid-template-columns: 1fr; gap: 1.1rem; }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 1.6rem; transition: transform .2s, border-color .2s; }
.feature:hover { transform: translateY(-3px); border-color: var(--border-2); }
.feature .ico { width: 48px; height: 48px; border-radius: var(--r-md); display: grid; place-items: center; background: var(--heat-soft); border: 1px solid rgba(255,45,107,.25); margin-bottom: 1rem; }
.feature .ico svg { width: 24px; height: 24px; color: var(--flame-2); }
.feature h3 { margin-bottom: .5rem; }

/* Étapes numérotées */
.steps { display: grid; gap: 1.1rem; counter-reset: step; }
.step { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 1.6rem 1.6rem 1.6rem 4.2rem; }
.step::before { counter-increment: step; content: counter(step); position: absolute; left: 1.3rem; top: 1.4rem; width: 2rem; height: 2rem; display: grid; place-items: center; border-radius: 50%; background: var(--heat); font-family: var(--font-display); font-weight: 700; color: #fff; }

/* -------------------------------------------------------------------------
   13. CLASSEMENT
   ---------------------------------------------------------------------- */
.rank-list { display: flex; flex-direction: column; gap: .6rem; }
.rank-row { display: flex; align-items: center; gap: 1rem; padding: .9rem 1.1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); transition: border-color .2s, transform .2s; }
.rank-row:hover { border-color: var(--border-2); transform: translateX(3px); }
.rank-row .pos { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; width: 2.2rem; text-align: center; color: var(--text-mute); }
.rank-row.top-1 .pos { color: var(--gold); } .rank-row.top-2 .pos { color: #cfd3dc; } .rank-row.top-3 .pos { color: #e0985a; }
.rank-row.top-1 { border-color: rgba(255,206,77,.4); background: linear-gradient(90deg, rgba(255,206,77,.08), transparent); }
.rank-row .who { display: flex; flex-direction: column; min-width: 0; }
.rank-row .who .name { font-weight: 600; }
.rank-row .who .sub { font-size: .78rem; color: var(--text-mute); }
.rank-row .score { margin-left: auto; font-family: var(--font-display); font-weight: 700; font-variant-numeric: tabular-nums; }
.rank-row .score .grad { background: var(--heat); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* -------------------------------------------------------------------------
   14. PROFIL / ADN D'OPINION
   ---------------------------------------------------------------------- */
.profile-hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1rem; padding-block: 2rem; }
.dna-card { position: relative; background: linear-gradient(160deg, rgba(255,45,107,.1), rgba(155,60,255,.08)); border: 1px solid var(--border-2); border-radius: var(--r-xl); padding: clamp(1.5rem,4vw,2.4rem); overflow: hidden; }
.dna-card::after { content: ""; position: absolute; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle, rgba(255,45,107,.35), transparent 70%); top: -60px; right: -40px; filter: blur(30px); }
.dna-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; position: relative; z-index: 2; }
.dna-metric { background: rgba(0,0,0,.25); border: 1px solid var(--border); border-radius: var(--r-md); padding: 1rem; }
.dna-metric .k { font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text-mute); }
.dna-metric .v { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; margin-top: .25rem; }
.rarity { text-align: center; font-family: var(--font-display); font-weight: 600; margin-top: 1.4rem; position: relative; z-index: 2; }
.rarity b { font-size: 1.3rem; }

/* Barre de progression générique */
.progress { height: 8px; border-radius: var(--r-full); background: var(--surface-2); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--heat); border-radius: var(--r-full); transition: width .8s cubic-bezier(.16,1,.3,1); }

/* -------------------------------------------------------------------------
   15. BADGES DÉBLOQUÉS (achievements)
   ---------------------------------------------------------------------- */
.ach-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .8rem; }
.ach { text-align: center; padding: 1.1rem .8rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); transition: transform .2s; }
.ach:hover { transform: translateY(-2px); }
.ach.locked { opacity: .38; filter: grayscale(1); }
.ach .medal { width: 48px; height: 48px; margin: 0 auto .6rem; display: grid; place-items: center; border-radius: 50%; background: var(--heat-soft); border: 1px solid rgba(255,45,107,.3); }
.ach .medal svg { width: 24px; height: 24px; color: var(--flame-2); }
.ach .t { font-family: var(--font-display); font-weight: 600; font-size: .85rem; }
.ach .d { font-size: .72rem; color: var(--text-mute); margin-top: .2rem; }

/* -------------------------------------------------------------------------
   16. COMMENTAIRES (camps)
   ---------------------------------------------------------------------- */
.comment { display: flex; gap: .8rem; padding: 1rem 0; border-bottom: 1px solid var(--border); }
.comment .body { min-width: 0; flex: 1; }
.comment .body .name { font-weight: 600; font-size: .9rem; display: flex; align-items: center; gap: .5rem; }
.comment .body .txt { color: var(--text-dim); margin-top: .3rem; font-size: .95rem; }
.camp { font-size: .68rem; font-weight: 700; font-family: var(--font-display); text-transform: uppercase; letter-spacing: .06em; padding: .1rem .45rem; border-radius: var(--r-full); }
.camp.valide { color: var(--valide); background: rgba(31,224,143,.12); }
.camp.crame { color: var(--crame); background: rgba(255,59,92,.12); }

/* -------------------------------------------------------------------------
   17. FOOTER
   ---------------------------------------------------------------------- */
.footer { border-top: 1px solid var(--border); margin-top: 3rem; padding-block: 3rem 2rem; background: rgba(0,0,0,.25); }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
.footer h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .14em; color: var(--text-mute); margin-bottom: 1rem; }
.footer ul { display: flex; flex-direction: column; gap: .6rem; }
.footer a { color: var(--text-dim); font-size: .92rem; transition: color .2s; }
.footer a:hover { color: var(--flame-2); }
.footer .about p { font-size: .9rem; margin: 1rem 0; max-width: 34ch; }
.footer-bottom { border-top: 1px solid var(--border); margin-top: 2.4rem; padding-top: 1.6rem; display: flex; flex-direction: column; gap: 1rem; align-items: center; text-align: center; font-size: .82rem; color: var(--text-mute); }
.socials { display: flex; gap: .6rem; }
.socials a { width: 38px; height: 38px; display: grid; place-items: center; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border); transition: all .2s; }
.socials a:hover { border-color: var(--flame-2); color: var(--flame-2); transform: translateY(-2px); }
.socials svg { width: 18px; height: 18px; }

/* -------------------------------------------------------------------------
   18. UTILITAIRES
   ---------------------------------------------------------------------- */
.text-center { text-align: center; }
.mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.6rem; } .mt-4 { margin-top: 2.4rem; }
.mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.6rem; }
.flex { display: flex; } .items-center { align-items: center; } .gap-1 { gap: .5rem; } .gap-2 { gap: 1rem; }
.wrap { flex-wrap: wrap; } .justify-between { justify-content: space-between; }
.muted { color: var(--text-mute); } .dim { color: var(--text-dim); }
.hidden { display: none; }
.pill-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 1.4rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.empty { text-align: center; padding: 3rem 1rem; color: var(--text-mute); }
.empty svg { width: 48px; height: 48px; margin: 0 auto 1rem; opacity: .4; }
.load-more { text-align: center; margin-top: 2rem; }
/* Reveal "fail-open" : visible par défaut (sans JS), animé quand JS ajoute .in */
.reveal.in { animation: reveal .7s cubic-bezier(.16,1,.3,1) both; }
@keyframes reveal { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

/* Layout dashboard */
.split { display: grid; grid-template-columns: 1fr; gap: 1.6rem; align-items: start; }
.sidebar-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 1.4rem; }

/* -------------------------------------------------------------------------
   19. RESPONSIVE
   ---------------------------------------------------------------------- */
@media (min-width: 560px) {
  .stats-row { grid-template-columns: repeat(4, 1fr); }
  .ach-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 720px) {
  .take-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
  .footer-bottom { flex-direction: row; justify-content: space-between; }
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .dna-grid { grid-template-columns: repeat(4, 1fr); }
  .ach-grid { grid-template-columns: repeat(4, 1fr); }
  .cat-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 900px) {
  .nav-links { display: flex; }
  .burger { display: none; }
  .split { grid-template-columns: 300px 1fr; }
  .split.reverse { grid-template-columns: 1fr 320px; }
}
@media (min-width: 1024px) {
  .take-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
}

/* -------------------------------------------------------------------------
   20. MICRO-COMPOSANTS JS (spark, toast, toggle mdp)
   ---------------------------------------------------------------------- */
.spark { position: fixed; width: 7px; height: 7px; border-radius: 50%; background: var(--heat); pointer-events: none; z-index: 999; animation: spark .7s ease-out forwards; }
@keyframes spark { to { transform: translate(var(--dx), var(--dy)) scale(0); opacity: 0; } }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px); z-index: 999; background: var(--surface-solid); border: 1px solid var(--border-2); color: var(--text); padding: .8rem 1.3rem; border-radius: var(--r-full); font-family: var(--font-display); font-weight: 600; font-size: .9rem; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.pw-wrap { position: relative; }
.pw-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; display: grid; place-items: center; color: var(--text-mute); border-radius: var(--r-sm); }
.pw-toggle:hover, .pw-toggle.on { color: var(--flame-2); }
.pw-wrap .input { padding-right: 48px; }
.votebar .side .n { font-variant-numeric: tabular-nums; }

/* -------------------------------------------------------------------------
   21. PROSE (pages légales) + TABLES (admin)
   ---------------------------------------------------------------------- */
.prose { max-width: 760px; margin-inline: auto; }
.prose h2 { font-size: 1.4rem; margin: 2.2rem 0 .8rem; }
.prose h3 { font-size: 1.1rem; margin: 1.5rem 0 .5rem; }
.prose p, .prose li { color: var(--text-dim); margin-bottom: .8rem; line-height: 1.7; }
.prose ul { list-style: disc; padding-left: 1.4rem; margin-bottom: 1rem; }
.prose strong { color: var(--text); }
.prose a { color: var(--flame-2); }
.prose a:hover { text-decoration: underline; }
.prose .updated { color: var(--text-mute); font-size: .85rem; }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-md); }
table.data { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 560px; }
table.data th, table.data td { text-align: left; padding: .8rem 1rem; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.data th { font-family: var(--font-display); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-mute); background: var(--surface); }
table.data tr:last-child td { border-bottom: none; }
table.data tr:hover td { background: var(--surface); }
.admin-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
@media (min-width: 720px) { .admin-grid { grid-template-columns: repeat(4, 1fr); } }
.status-pill { font-size: .72rem; font-weight: 600; padding: .2rem .55rem; border-radius: var(--r-full); }
.status-published { background: rgba(31,224,143,.14); color: var(--valide); }
.status-flagged { background: rgba(255,206,77,.14); color: var(--gold); }
.status-removed { background: rgba(255,59,92,.14); color: var(--crame); }
