/* ===========================================================
   KairoBot — feuille de style de la landing page
   Thème sombre par défaut, thème clair via [data-theme="light"].
   Accent unique : blurple Discord, désaturé et tenu.
   =========================================================== */

:root {
  --accent: #5b6ef0;
  --accent-2: #7c8bff;
  --accent-deep: #4453c7;
  --accent-soft: rgba(91, 110, 240, 0.14);

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

  --radius-lg: 22px;
  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1160px;
  /* Courbe ease-out franche (Emil Kowalski) : démarre vite = réactif. */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --transition: 180ms cubic-bezier(0.23, 1, 0.32, 1);
  --ring: 0 0 0 3px var(--accent-soft);

  /* échelle z-index propre */
  --z-nav: 100;
  --z-grain: 5;
}

/* Palette sombre — gris froids cohérents, fond bleu-nuit */
[data-theme='dark'] {
  --bg: #0b0d16;
  --bg-2: #0f111c;
  --surface: #161927;
  --surface-2: #1d2132;
  --border: rgba(150, 162, 210, 0.12);
  --border-strong: rgba(150, 162, 210, 0.22);
  --text: #eceef6;
  --text-2: #969db4;
  --nav-bg: rgba(11, 13, 22, 0.7);
  --shadow: 0 24px 60px -20px rgba(5, 8, 25, 0.8);
  --shadow-accent: 0 16px 40px -12px rgba(76, 92, 220, 0.5);
  --grain-opacity: 0.04;
}

/* Palette claire */
[data-theme='light'] {
  --bg: #f5f6fc;
  --bg-2: #ecedf6;
  --surface: #ffffff;
  --surface-2: #f3f4fb;
  --border: rgba(40, 48, 90, 0.1);
  --border-strong: rgba(40, 48, 90, 0.18);
  --text: #14162a;
  --text-2: #5d6379;
  --nav-bg: rgba(255, 255, 255, 0.78);
  --shadow: 0 24px 55px -22px rgba(40, 50, 100, 0.28);
  --shadow-accent: 0 16px 38px -14px rgba(76, 92, 220, 0.4);
  --grain-opacity: 0.025;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Grain global : casse la platitude numérique */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: var(--z-grain);
  pointer-events: none;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

a { color: inherit; text-decoration: none; }

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

code {
  font-family: 'Space Grotesk', ui-monospace, 'Consolas', monospace;
  background: var(--accent-soft);
  color: var(--accent-2);
  padding: 1px 7px;
  border-radius: 6px;
  font-size: 0.85em;
  font-weight: 600;
}

h1, h2, h3, .nav-logo, .stat-value { font-family: var(--font-display); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 11px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition),
    background var(--transition), border-color var(--transition);
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); transition-duration: 100ms; }
.btn-large { padding: 15px 28px; font-size: 1.02rem; }
.btn-sm { padding: 8px 16px; font-size: 0.88rem; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fff;
  box-shadow: var(--shadow-accent);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 22px 46px -12px rgba(76, 92, 220, 0.62); }
.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-secondary:hover { transform: translateY(-2px); border-color: var(--accent); }

/* ---------- Navigation ---------- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: var(--z-nav);
  background: var(--nav-bg);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid var(--border);
}
.nav-container {
  max-width: var(--maxw);
  margin: 0 auto;
  height: 68px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  display: flex; align-items: center; gap: 11px;
  font-weight: 700; font-size: 1.25rem; letter-spacing: -0.02em;
  flex-shrink: 0; /* le logo ne doit jamais être écrasé ni poussé hors écran */
}
.nav-logo i {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 11px;
  font-size: 1rem;
  box-shadow: var(--shadow-accent);
}
/* Logo image (badge circulaire KairoBot) */
.brand-logo { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; display: block; flex-shrink: 0; }
.footer-logo .brand-logo { width: 30px; height: 30px; }
.nav-menu { display: flex; align-items: center; gap: 26px; }
.nav-link {
  color: var(--text-2);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color var(--transition);
  position: relative;
}
.nav-link:hover, .nav-link.active { color: var(--text); }
.nav-link.active::after {
  content: '';
  position: absolute; left: 0; bottom: -9px;
  width: 100%; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 2px;
}

/* Zone de connexion dans la nav (accueil + dashboard) */
.nav-auth { display: flex; align-items: center; gap: 12px; }
.nav-user { display: flex; align-items: center; gap: 9px; }
.nav-user img, .nav-user .nav-avatar-fallback {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  background: var(--surface-2); overflow: hidden;
}
/* L'IMAGE : rendu photo net et rond (surtout PAS display:grid, qui déforme une <img>). */
.nav-user img { display: block; object-fit: cover; }
/* Le repli (initiale quand pas d'avatar) : c'est LUI qui centre la lettre en grille. */
.nav-user .nav-avatar-fallback { display: grid; place-items: center; color: var(--accent); font-weight: 700; font-size: 0.85rem; }
/* L'avatar du menu déroulant (accueil) : même rendu rond et net. */
.nav-user-trigger img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; display: block; flex-shrink: 0; }
.nav-user-name { font-size: 0.92rem; font-weight: 600; white-space: nowrap; }
.nav-user-link {
  display: flex; align-items: center; gap: 9px;
  padding: 4px 12px 4px 5px; border-radius: 999px;
  border: 1px solid var(--border); transition: border-color var(--transition), background var(--transition);
}
.nav-user-link:hover { border-color: var(--accent); background: var(--surface); }
.nav-admin-btn { white-space: nowrap; }

/* Menu déroulant utilisateur (accueil) */
.nav-user-menu { position: relative; }
.nav-user-trigger {
  display: flex; align-items: center; gap: 9px; cursor: pointer;
  padding: 4px 10px 4px 5px; border-radius: 999px;
  background: none; border: 1px solid var(--border); color: var(--text); font: inherit;
  transition: border-color var(--transition), background var(--transition);
}
.nav-user-trigger:hover { border-color: var(--accent); background: var(--surface); }
.nav-user-caret { font-size: 0.7rem; color: var(--text-2); transition: transform var(--transition); }
.nav-user-dropdown {
  position: absolute; top: calc(100% + 10px); right: 0;
  min-width: 200px; padding: 7px;
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: 14px; box-shadow: 0 18px 44px -16px rgba(0, 0, 0, 0.5);
  display: none; flex-direction: column; gap: 2px; z-index: 1200;
}
.nav-user-dropdown.open { display: flex; animation: navDropIn 0.16s ease; }
.nav-user-menu:has(.nav-user-dropdown.open) .nav-user-caret { transform: rotate(180deg); }
@keyframes navDropIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.nav-drop-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 9px;
  color: var(--text); font-size: 0.9rem; font-weight: 500;
  transition: background var(--transition), color var(--transition);
}
.nav-drop-item i { width: 16px; text-align: center; color: var(--text-2); }
.nav-drop-item:hover { background: var(--surface-2); }
.nav-drop-item:hover i { color: var(--accent); }
.nav-drop-danger { color: #e0556a; }
.nav-drop-danger i { color: #e0556a; }
.nav-drop-danger:hover { background: rgba(224, 85, 106, 0.12); }
.nav-drop-sep { height: 1px; background: var(--border); margin: 5px 4px; }

/* Bouton de langue (FR/EN) */
.lang-toggle {
  height: 40px; min-width: 44px; padding: 0 12px;
  display: grid; place-items: center;
  border-radius: 12px; background: var(--surface); border: 1px solid var(--border);
  color: var(--text); font: inherit; font-size: 0.82rem; font-weight: 700; letter-spacing: 0.03em;
  cursor: pointer; transition: color var(--transition), border-color var(--transition), transform var(--transition);
}
.lang-toggle:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-1px); }

/* Bouton de thème — icône seule, propre, pas de débordement */
.theme-toggle {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-2);
  cursor: pointer;
  font-size: 0.95rem;
  transition: color var(--transition), border-color var(--transition),
    transform var(--transition), background var(--transition);
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-1px); }
.theme-toggle:active { transform: scale(0.92); }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; flex-direction: column; gap: 5px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: var(--transition); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 150px 24px 96px;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(640px circle at 12% 8%, rgba(91, 110, 240, 0.2), transparent 46%),
    radial-gradient(620px circle at 92% 26%, rgba(124, 139, 255, 0.14), transparent 46%);
  pointer-events: none;
}
/* Hero centré (composition propre, distincte) */
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text-2);
  padding: 7px 15px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 600;
  margin-bottom: 24px;
  font-variant-numeric: tabular-nums;
}
.hero-badge i { color: var(--accent); }
.hero-title {
  font-size: clamp(2.4rem, 5.2vw, 3.7rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.035em;
  margin-bottom: 22px;
  text-wrap: balance;
}
.gradient-text {
  background: linear-gradient(115deg, var(--accent), var(--accent-2) 70%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.accent-word { color: var(--accent); }
.hero-subtitle {
  font-size: 1.14rem;
  color: var(--text-2);
  max-width: 56ch;
  margin: 0 auto 32px;
  text-wrap: pretty;
}
.hero-subtitle strong { color: var(--text); font-weight: 600; }
.hero-buttons { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }

/* Stats en pastilles intégrées (au lieu d'un bandeau de cartes) */
.hero-stats {
  list-style: none;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
  margin-top: 34px;
}
.hero-stats li {
  display: inline-flex; align-items: baseline; gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.9rem;
  color: var(--text-2);
}
.hero-stats b {
  font-family: var(--font-display);
  font-size: 1.02rem; font-weight: 700; color: var(--text);
  font-variant-numeric: tabular-nums;
}

/* Showcase centré sous le hero */
.hero-showcase {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 56px auto 0;
}

/* Particules flottantes */
.hero-particles { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.particle {
  position: absolute;
  width: 4px; height: 4px;
  background: rgba(91, 110, 240, 0.45);
  border-radius: 50%;
  animation: float linear infinite;
}
@keyframes float {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(-130px) translateX(22px); opacity: 0; }
}

/* ---------- Mockup Discord ---------- */
.hero-visual { position: relative; z-index: 1; }
.discord-mock {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow);
  animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.discord-mock::before {
  /* lueur d'angle, façon verre */
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(124, 139, 255, 0.5), transparent 40%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
}
@keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: translateY(0); } }
.discord-message { display: flex; gap: 14px; position: relative; }
.discord-avatar {
  flex-shrink: 0;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  display: grid; place-items: center;
  color: #fff;
}
.discord-body { flex: 1; min-width: 0; }
.discord-author { font-weight: 600; font-size: 0.95rem; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.discord-bot-tag {
  background: var(--accent);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  letter-spacing: 0.04em;
}
.discord-time { color: var(--text-2); font-size: 0.72rem; font-weight: 400; }
.discord-embed {
  margin-top: 9px;
  border-left: 4px solid var(--accent);
  background: var(--surface-2);
  border-radius: 6px;
  padding: 14px 16px;
}
.discord-embed-title { font-weight: 600; margin-bottom: 6px; }
.discord-embed-title i { color: var(--accent); margin-right: 6px; }
.discord-embed-desc { color: var(--text-2); font-size: 0.9rem; margin-bottom: 12px; }
.discord-fields { display: flex; flex-wrap: wrap; gap: 8px; }
.discord-pill {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 0.82rem;
  font-weight: 500;
}
.discord-select {
  margin-top: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  color: var(--text-2);
  font-size: 0.9rem;
  display: flex; align-items: center; gap: 8px;
}
.discord-select i { font-size: 0.75rem; }

/* ---------- Stats ---------- */
.stats { padding: 24px 0 6px; }
.stats-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 38px;
  box-shadow: var(--shadow);
}
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stat { text-align: center; }
.stat-icon {
  width: 48px; height: 48px;
  margin: 0 auto 14px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 1.2rem;
}
.stat-value { font-size: 2.4rem; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stat-label { color: var(--text-2); font-size: 0.9rem; }

/* ---------- Sections génériques (titres alignés à gauche = plus éditorial) ---------- */
.section-header { max-width: 620px; margin: 0 0 46px; text-align: left; }
.section-header::before {
  content: '';
  display: block; width: 38px; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  margin-bottom: 18px;
}
.section-title { font-size: clamp(1.9rem, 3.6vw, 2.5rem); font-weight: 700; letter-spacing: -0.03em; text-wrap: balance; }
.section-subtitle { color: var(--text-2); font-size: 1.08rem; margin-top: 13px; text-wrap: pretty; }

.features-section { padding: 96px 0; }

/* Cartes "spotlight" : une lueur suit le curseur (--mx/--my en JS) */
.spotlight {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition), border-color var(--transition);
}
.spotlight::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 0%), var(--accent-soft), transparent 60%);
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
}
.spotlight:hover { transform: translateY(-5px); border-color: var(--border-strong); }
.spotlight:hover::before { opacity: 1; }

/* Grille de fonctionnalités : 2 colonnes, cartes uniformes */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.feature-card { padding: 28px; display: flex; flex-direction: column; }
.feature-icon {
  width: 54px; height: 54px;
  display: grid; place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fff;
  font-size: 1.35rem;
  margin-bottom: 20px;
  box-shadow: var(--shadow-accent);
}
.feature-card h3 { font-size: 1.22rem; margin-bottom: 9px; letter-spacing: -0.01em; }
.feature-card p { color: var(--text-2); font-size: 0.96rem; max-width: 52ch; }

/* ---------- Commandes ---------- */
.commands-section { padding: 0 0 96px; }
.commands-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.command-card { padding: 26px; }
.command-head { display: flex; align-items: center; gap: 11px; margin-bottom: 16px; }
.command-emoji { font-size: 1.4rem; }
.command-head h3 { font-size: 1.16rem; letter-spacing: -0.01em; }
.command-card ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.command-card li { color: var(--text-2); font-size: 0.94rem; }

/* ---------- CTA (bannière dégradée) ---------- */
.cta-section { padding: 24px 0 110px; }
.cta-content {
  position: relative;
  overflow: hidden;
  background: linear-gradient(120deg, var(--accent-deep), var(--accent) 45%, #8a6cff 100%);
  border-radius: 28px;
  padding: 70px 30px;
  text-align: center;
  box-shadow: 0 30px 70px -28px rgba(91, 110, 240, 0.6);
}
/* halos lumineux pour donner de la profondeur */
.cta-content::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(420px circle at 18% 0%, rgba(255, 255, 255, 0.22), transparent 60%),
    radial-gradient(520px circle at 88% 120%, rgba(0, 0, 0, 0.22), transparent 55%);
  pointer-events: none;
}
.cta-content > * { position: relative; z-index: 1; }
.cta-content h2 { font-size: clamp(1.9rem, 3.6vw, 2.5rem); font-weight: 700; margin-bottom: 14px; letter-spacing: -0.03em; color: #fff; }
.cta-content p { color: rgba(255, 255, 255, 0.88); font-size: 1.08rem; margin-bottom: 32px; max-width: 56ch; margin-left: auto; margin-right: auto; }
.cta-content code { background: rgba(255, 255, 255, 0.18); color: #fff; }
.cta-buttons { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
/* Bouton blanc « pilule » sur la bannière */
.cta-content .btn-primary {
  background: #fff; color: var(--accent-deep); border-radius: 999px;
}
.cta-content .btn-primary:hover { background: #fff; transform: translateY(-2px); box-shadow: 0 12px 28px -10px rgba(0, 0, 0, 0.45); }
.cta-content .btn-secondary {
  background: rgba(255, 255, 255, 0.12); color: #fff; border: 1px solid rgba(255, 255, 255, 0.5); border-radius: 999px;
}
.cta-content .btn-secondary:hover { background: rgba(255, 255, 255, 0.22); border-color: #fff; transform: translateY(-2px); }

/* ---------- Footer ---------- */
.footer {
  position: relative;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
  padding: 70px 0 30px;
}
/* fine ligne d'accent dégradée en haut du footer */
.footer::before {
  content: '';
  position: absolute; top: -1px; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--accent-2), transparent);
  opacity: 0.7;
}
.footer-content { display: grid; grid-template-columns: 2.2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 44px; }
.footer-logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.25rem; margin-bottom: 14px; letter-spacing: -0.02em; }
.footer-logo i { color: var(--accent); }
.footer-logo .brand-logo { width: 30px; height: 30px; border-radius: 9px; }
.footer-section p { color: var(--text-2); font-size: 0.94rem; max-width: 40ch; line-height: 1.65; }
.footer-cta { margin-top: 20px; }
.footer-section h4 {
  margin-bottom: 16px; font-size: 0.78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.09em; color: var(--text-2);
}
.footer-section ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.footer-section li a {
  color: var(--text); font-size: 0.92rem; display: inline-flex; align-items: center; gap: 8px;
  transition: color var(--transition), transform var(--transition);
}
.footer-section li a i { color: var(--text-2); width: 15px; font-size: 0.85rem; transition: color var(--transition); }
.footer-section li a:hover { color: var(--accent); transform: translateX(3px); }
.footer-section li a:hover i { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 26px;
  display: flex; flex-wrap: wrap; gap: 8px;
  align-items: center; justify-content: space-between;
  color: var(--text-2); font-size: 0.88rem;
}
.footer-bottom-links a { color: var(--text-2); transition: color var(--transition); }
.footer-bottom-links a:hover { color: var(--accent); }
.footer-bottom-links .sep { opacity: 0.5; margin: 0 4px; }

/* =========================================================
   Polish premium — élévation, bord lumineux, scrollbar, micro-détails
   ========================================================= */

/* Sélection de texte assortie à l'accent */
::selection { background: rgba(91, 110, 240, 0.28); color: var(--text); }

/* Scrollbar discrète et cohérente */
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 99px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: var(--text-2); background-clip: content-box; }

/* Élévation douce + bord lumineux sur les cartes (effet verre haut de gamme) */
.spotlight {
  box-shadow: 0 1px 2px rgba(8, 10, 25, 0.18), 0 12px 30px -22px rgba(8, 10, 25, 0.55);
}
.spotlight::after {
  content: '';
  position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  /* fin liseré clair en haut de la carte */
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 18%);
  mix-blend-mode: screen;
}
[data-theme='light'] .spotlight::after { background: linear-gradient(180deg, rgba(255, 255, 255, 0.7), transparent 16%); mix-blend-mode: normal; opacity: 0.5; }
.spotlight:hover {
  box-shadow: 0 2px 4px rgba(8, 10, 25, 0.2), 0 26px 50px -26px rgba(8, 10, 25, 0.65);
}

/* Le contenu reste au-dessus des pseudo-éléments décoratifs */
.feature-card > *, .command-card > *, .tier > *, .guild-card > * { position: relative; z-index: 1; }

/* Icônes de fonctionnalité : halo doux + léger zoom au survol de la carte */
.feature-icon { transition: transform var(--transition); }
.feature-card:hover .feature-icon { transform: translateY(-2px) scale(1.04); }

/* Bouton principal : voile lumineux en haut pour donner du relief */
.btn-primary { position: relative; isolation: isolate; }
.btn-primary::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), transparent 55%);
  opacity: 0.7;
}

/* Hero : sol lumineux supplémentaire, profondeur accrue (très subtil) */
.hero::after {
  content: '';
  position: absolute; left: 50%; bottom: -40%; transform: translateX(-50%);
  width: 140%; height: 80%;
  background: radial-gradient(closest-side, rgba(91, 110, 240, 0.1), transparent 70%);
  pointer-events: none; z-index: 0;
}

/* Liens de nav : soulignement animé au survol (en plus de l'état actif) */
.nav-link::after {
  content: ''; position: absolute; left: 0; bottom: -9px; height: 2px; width: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 2px;
  transform: scaleX(0); transform-origin: left; transition: transform 0.25s var(--ease-out);
}
.nav-link:hover::after { transform: scaleX(1); }
.nav-link.active::after { transform: scaleX(1); }

/* Titres de section : meilleure balance typographique */
.section-header { margin-bottom: 44px; }

/* ---------- Apparition au scroll (staggered) ---------- */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1); }
.reveal.visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ===================== Page « Nous soutenir » ===================== */
.support { padding: 88px 0 90px; }

/* Hero */
.sup-hero { position: relative; text-align: center; max-width: 720px; margin: 0 auto 56px; padding: 56px 20px 8px; }
.sup-hero-glow {
  position: absolute; left: 50%; top: -10%; transform: translateX(-50%);
  width: 620px; max-width: 120%; height: 460px; pointer-events: none; z-index: -1;
  background:
    radial-gradient(closest-side, rgba(255, 93, 115, 0.18), transparent 70%),
    radial-gradient(closest-side, rgba(124, 139, 255, 0.16), transparent 72%);
  background-position: 30% 30%, 75% 40%; background-repeat: no-repeat; filter: blur(6px);
}
.support-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border-strong);
  color: #ff7a8a; padding: 7px 15px; border-radius: 999px;
  font-size: 0.84rem; font-weight: 600; margin-bottom: 22px;
}
.sup-hero-title { font-family: var(--font-display); font-size: clamp(2.3rem, 5vw, 3.3rem); font-weight: 700; letter-spacing: -0.035em; line-height: 1.05; }
.sup-hero-title .heart { background: linear-gradient(120deg, #ff5d73, #ff8a5b); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.sup-hero-sub { color: var(--text-2); font-size: 1.12rem; max-width: 56ch; margin: 16px auto 26px; text-wrap: pretty; }
.sup-hero-pills { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.sup-pill {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 11px 20px; border-radius: 999px; font-weight: 600; font-size: 0.95rem;
  background: var(--surface); border: 1px solid var(--border-strong); color: var(--text);
  transition: transform var(--transition), border-color var(--transition), color var(--transition);
}
.sup-pill i { color: var(--accent); }
.sup-pill:hover { transform: translateY(-2px); border-color: var(--accent); color: var(--accent); }

/* Encart volontaire */
.sup-note {
  display: flex; gap: 18px; align-items: flex-start;
  background: linear-gradient(160deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 26px 28px; margin-bottom: 64px;
}
.sup-note-ic {
  width: 50px; height: 50px; flex-shrink: 0; display: grid; place-items: center;
  border-radius: 14px; font-size: 1.3rem; color: #ff7a8a;
  background: rgba(255, 122, 138, 0.12); border: 1px solid rgba(255, 122, 138, 0.25);
}
.sup-note-body h2 { font-family: var(--font-display); font-size: 1.2rem; margin-bottom: 10px; }
.sup-note-body p { color: var(--text-2); margin-bottom: 0; line-height: 1.7; }
.sup-note strong { color: var(--text); font-weight: 600; }
.sup-note-tip {
  display: flex; gap: 11px; align-items: flex-start;
  margin-top: 16px; padding: 14px 16px;
  background: var(--accent-soft); border: 1px solid var(--border); border-radius: 12px;
  font-size: 0.92rem; color: var(--text-2);
}
.sup-note-tip i { color: var(--accent); margin-top: 3px; }

/* En-têtes de section */
.sup-section { margin-bottom: 72px; }
.sup-sec-head { margin-bottom: 28px; }
.sup-sec-kicker { display: block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.sup-sec-title { font-family: var(--font-display); font-size: clamp(1.5rem, 3vw, 1.9rem); font-weight: 700; letter-spacing: -0.02em; }
.sup-sec-sub { color: var(--text-2); margin-top: 6px; font-size: 1.02rem; }

/* Soutien gratuit (Discord) */
.free-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 20px; }
.free-card { padding: 28px; display: flex; flex-direction: column; --card-accent: var(--accent); }
.free-card.tag { --card-accent: #5b6ef0; }
.free-card.boost { --card-accent: #d06bf0; }
.free-card.active { --card-accent: #57c98a; }
.free-card.spotlight:hover { border-color: color-mix(in srgb, var(--card-accent) 55%, transparent); }
.free-card .free-icon {
  width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center;
  font-size: 1.35rem; margin-bottom: 18px; color: #fff;
  background: linear-gradient(135deg, var(--card-accent), color-mix(in srgb, var(--card-accent) 55%, #000));
  box-shadow: 0 12px 26px -12px var(--card-accent);
}
.free-card h3 { font-size: 1.18rem; margin-bottom: 8px; }
.free-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.free-head h3 { margin-bottom: 0; }
.free-cost { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.02em; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.free-cost.free { color: #57c98a; background: rgba(87, 201, 138, 0.14); }
.free-cost.nitro { color: #b58bff; background: rgba(150, 120, 255, 0.16); }
.free-card > p { color: var(--text-2); font-size: 0.95rem; margin-bottom: 16px; line-height: 1.65; }
.free-how { margin-top: auto; padding-top: 15px; border-top: 1px dashed var(--border); font-size: 0.86rem; color: var(--text-2); }
.free-how strong { color: var(--text); }
.free-how em { color: var(--card-accent); font-style: normal; font-weight: 600; }
.perk-list { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.perk-list li { display: flex; align-items: flex-start; gap: 10px; color: var(--text-2); font-size: 0.93rem; }
.perk-list li i { color: #57c98a; margin-top: 3px; font-size: 0.82rem; flex-shrink: 0; }

/* Comment donner */
.sup-donate-how {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 16px 18px; margin-bottom: 28px; border-radius: 14px;
  background: var(--accent-soft); border: 1px solid var(--border); color: var(--text-2); font-size: 0.94rem; line-height: 1.6;
}
.sup-donate-how i { color: var(--accent); font-size: 1.05rem; margin-top: 2px; }
.sup-donate-how strong { color: var(--text); }

/* Niveaux de don */
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: center; }
.tier {
  position: relative; display: flex; flex-direction: column; padding: 32px 26px;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--surface); --tier-accent: var(--accent);
}
.tier.t-don { --tier-accent: #b07bff; }
.tier.t-super { --tier-accent: #5b6ef0; }
.tier.t-mega { --tier-accent: #f0b34b; }
.tier.featured {
  border-color: color-mix(in srgb, var(--tier-accent) 60%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--tier-accent) 9%, var(--surface)), var(--surface));
  box-shadow: 0 30px 60px -28px color-mix(in srgb, var(--tier-accent) 70%, transparent);
  transform: scale(1.04); z-index: 1;
}
.tier-tag {
  align-self: center; position: absolute; top: -13px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #fff;
  background: linear-gradient(135deg, var(--tier-accent), color-mix(in srgb, var(--tier-accent) 60%, #000));
  padding: 5px 14px; border-radius: 999px; box-shadow: 0 8px 20px -8px var(--tier-accent);
}
.tier-emoji {
  width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px;
  font-size: 1.5rem; margin-bottom: 14px;
  background: color-mix(in srgb, var(--tier-accent) 14%, transparent);
}
.tier-name { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; }
.tier-price { font-family: var(--font-display); font-size: 2.3rem; font-weight: 700; letter-spacing: -0.02em; margin: 8px 0 2px; color: var(--tier-accent); }
.tier-price span { font-size: 0.95rem; color: var(--text-2); font-weight: 500; }
.tier-note { color: var(--text-2); font-size: 0.88rem; margin-bottom: 22px; }
.tier .perk-list { margin-bottom: 24px; }
.tier .btn { margin-top: auto; justify-content: center; }

@media (max-width: 860px) {
  .free-grid { grid-template-columns: 1fr; }
  .tiers { grid-template-columns: 1fr; gap: 26px; }
  .tier.featured { transform: none; }
  .tier-tag { position: static; align-self: flex-start; margin-bottom: 12px; box-shadow: none; }
}

/* ===================== Pages légales ===================== */
.legal { padding: 128px 0 90px; }
.legal-wrap { max-width: 800px; margin: 0 auto; }
.legal .back-link { display: inline-flex; margin-bottom: 22px; }
.legal h1 { font-family: var(--font-display); font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: 700; letter-spacing: -0.03em; }
.legal .updated { color: var(--text-2); font-size: 0.9rem; margin: 8px 0 36px; }
.legal h2 {
  font-family: var(--font-display); font-size: 1.25rem; font-weight: 600;
  margin: 38px 0 12px; padding-top: 18px; border-top: 1px solid var(--border);
  letter-spacing: -0.01em;
}
.legal h2:first-of-type { border-top: none; padding-top: 0; }
.legal p, .legal li { color: var(--text-2); line-height: 1.75; }
.legal p { margin-bottom: 14px; }
.legal ul { list-style: none; margin: 0 0 14px; padding: 0; }
.legal li { position: relative; padding-left: 22px; margin-bottom: 9px; }
.legal li::before { content: ''; position: absolute; left: 4px; top: 11px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.legal strong { color: var(--text); font-weight: 600; }
.legal a { color: var(--accent); }
.legal a:hover { text-decoration: underline; }
.legal .intro-note {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px; margin-bottom: 30px;
  color: var(--text-2); font-size: 0.94rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .commands-grid { grid-template-columns: repeat(2, 1fr); }
}
/* Nav : entre 901 et 1080px, on resserre pour que tout tienne quand
   l'utilisateur est connecté (avatar + pseudo + bouton Ajouter). */
@media (max-width: 1080px) and (min-width: 901px) {
  .nav-menu { gap: 16px; }
  .nav-auth { gap: 8px; }
  .nav-user-name { display: none; } /* on garde juste l'avatar */
}

/* Nav : menu burger dès 900px (avant : 680px → la barre débordait et le logo
   sortait de l'écran quand l'utilisateur était connecté). */
@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    display: none;
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 16px;
    background: var(--nav-bg);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    padding: 22px 24px;
    border-bottom: 1px solid var(--border);
  }
  .nav-menu.active { display: flex; }
  .nav-link.active::after { display: none; }
  .nav-menu .btn { justify-content: center; }
  .theme-toggle { width: 100%; border-radius: 12px; height: 44px; }
  .lang-toggle { width: 100%; height: 44px; border-radius: 12px; }
  /* Zone de connexion : pleine largeur et empilée dans le menu mobile */
  .nav-auth { width: 100%; flex-direction: column; align-items: stretch; gap: 12px; }
  .nav-auth .btn { width: 100%; }
  .nav-user-menu { width: 100%; }
  .nav-user-trigger { width: 100%; justify-content: center; }
  .nav-user-dropdown { position: static; width: 100%; box-shadow: none; margin-top: 8px; }
}

@media (max-width: 680px) {
  .features-grid, .commands-grid { grid-template-columns: 1fr; }
  .footer-content { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-brand { grid-column: 1 / -1; }
  .container { padding: 0 18px; }
  .hero { padding: 112px 18px 64px; }
  .hero-showcase { margin-top: 40px; }
  .features-section { padding: 64px 0; }
  .commands-section { padding: 0 0 64px; }
  .cta-section { padding: 18px 0 72px; }
  .cta-content { padding: 46px 22px; }
  .footer-bottom { justify-content: center; text-align: center; }
}

/* Petits téléphones */
@media (max-width: 480px) {
  .hero-title { font-size: 2.05rem; }
  .hero-subtitle { font-size: 1.02rem; }
  .hero-buttons { flex-direction: column; }
  .hero-buttons .btn { width: 100%; justify-content: center; }
  .hero-stats { gap: 8px; }
  .hero-stats li { font-size: 0.82rem; padding: 6px 12px; }
  .discord-mock { padding: 16px; }
  .discord-fields { gap: 6px; }
  .section-title { font-size: 1.7rem; }
  .nav-logo span { font-size: 1.1rem; }
  .footer-content { grid-template-columns: 1fr; }
  .cta-buttons .btn { width: 100%; justify-content: center; }
}

/* ===== Bandeau cookies (RGPD) ===== */
.cookie-banner {
  position: fixed;
  left: 50%;
  /* Zone sûre : la barre gestuelle de l'iPhone recouvrait le bandeau, dont les
     boutons devenaient intouchables — sur un bandeau de consentement, c'est un
     problème d'accès, pas de cosmétique. */
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%) translateY(20px);
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: min(640px, calc(100vw - 32px));
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 260ms var(--ease-out), transform 260ms var(--ease-out);
}
.cookie-banner.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.cookie-banner .cb-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}
.cookie-banner .cb-text {
  font-size: 0.85rem;
  color: var(--text-2);
  line-height: 1.45;
}
.cookie-banner .cb-text strong { color: var(--text); }
.cookie-banner .cb-text a {
  color: var(--accent-2);
  text-decoration: underline;
}
.cookie-banner .cb-btn {
  flex-shrink: 0;
  padding: 9px 16px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}
.cookie-banner .cb-btn:hover { background: var(--accent-deep); transform: translateY(-1px); }
@media (max-width: 560px) {
  .cookie-banner { flex-direction: column; text-align: center; gap: 10px; bottom: 12px; }
}

/* (le style .lang-toggle est défini plus haut, section navigation) */

/* ----- Bandeau d'annonce du site (piloté depuis la console admin) ----- */
/* Le bandeau coiffe la navbar (elle-même en position fixe) : il se place au-dessus
   d'elle et la repousse de sa propre hauteur, mesurée en JS (--banner-h). */
/* Le site est sombre et indigo : une large bande de couleur vive par-dessus fait
   tache. On garde une barre en verre teinté, et c'est l'accent (--sb) qui porte
   le niveau — filet supérieur, pastille de l'icône, lien. */
.site-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: calc(var(--z-nav) + 1);
  /* Valeurs de repli : sans elles, un niveau inconnu rendrait « border-top:
     2px solid var(--sb) » invalide et le filet disparaîtrait. */
  --sb: #7d8cff;
  --sb-wash: 15%;
  color: #eef0fb;
  font-size: 0.9rem;
  line-height: 1.45;
  background: rgba(12, 15, 33, 0.9);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  border-top: 2px solid var(--sb);
  border-bottom: 1px solid color-mix(in srgb, var(--sb) 28%, transparent);
  box-shadow: 0 14px 36px -22px rgba(0, 0, 0, 0.9);
  animation: sbSlideIn 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
/* Voile coloré qui s'éteint vers la droite : donne du relief sans crier. */
.site-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(100deg, color-mix(in srgb, var(--sb) var(--sb-wash, 15%), transparent) 0%, transparent 55%);
}
@keyframes sbSlideIn {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .site-banner { animation: none; }
}

.site-banner--info { --sb: #7d8cff; }
.site-banner--warn { --sb: #f0a93b; }
.site-banner--danger { --sb: #ff5d66; --sb-wash: 24%; }

/* Thème clair : le verre devient blanc, le texte sombre. */
:root[data-theme='light'] .site-banner {
  background: rgba(255, 255, 255, 0.92);
  color: #1b1e2e;
}

.sb-inner {
  position: relative; /* au-dessus du voile */
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 11px 24px;
  display: flex;
  align-items: center;
  gap: 13px;
}
/* Sélecteur doublé : Font Awesome est chargé après cette feuille et sa règle
   « .fas { display: inline-block } » l'emporterait à spécificité égale. */
.site-banner .sb-ic {
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  font-size: 0.82rem;
  color: var(--sb);
  background: color-mix(in srgb, var(--sb) 16%, transparent);
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--sb) 34%, transparent),
    0 0 20px -6px var(--sb);
}
.sb-msg {
  flex: 1;
  min-width: 0;
  font-weight: 500;
  letter-spacing: -0.005em;
}
.sb-link {
  flex: none;
  color: var(--sb);
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  padding: 5px 14px;
  border: 1px solid color-mix(in srgb, var(--sb) 42%, transparent);
  border-radius: 999px;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}
.sb-link:hover {
  background: color-mix(in srgb, var(--sb) 16%, transparent);
  border-color: var(--sb);
  transform: translateY(-1px);
}
.sb-close {
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  background: none;
  border: 0;
  border-radius: 50%;
  color: inherit;
  opacity: 0.5;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background 0.16s ease, opacity 0.16s ease;
}
.sb-close:hover { opacity: 1; background: color-mix(in srgb, currentColor 14%, transparent); }

/* Empilement des barres fixes au-dessus de la navbar. Chaque barre affichée
   publie sa hauteur réelle en JS ; absente, sa variable vaut zéro et ces deux
   règles n'ont aucun effet. La navbar et le contenu descendent de la somme. */
.navbar { top: calc(var(--banner-h, 0px) + var(--support-h, 0px)); }
body { padding-top: calc(var(--banner-h, 0px) + var(--support-h, 0px)); }

@media (max-width: 720px) {
  .site-banner { font-size: 0.84rem; }
  .sb-inner { padding: 9px 14px; gap: 10px; align-items: center; flex-wrap: wrap; }
  .site-banner .sb-ic { width: 24px; height: 24px; border-radius: 8px; order: 1; }
  .sb-close { order: 2; margin-left: auto; }
  .sb-msg { flex: 1 1 100%; order: 3; }
  .sb-link { order: 4; white-space: normal; }
}

/* ===========================================================================
   [hidden] doit TOUJOURS gagner
   ===========================================================================
   Mesure faite dans Chrome : un element portant l attribut hidden mais dont
   une classe declare « display: flex » se calcule en display: flex — il reste
   donc visible. Le navigateur applique bien « [hidden] { display: none } »,
   mais sans !important, et la moindre regle d auteur le bat.

   Les degats sont silencieux et spectaculaires : le menu du compte restait
   ouvert en permanence, et le tiroir de moderation couvrait 620 px a droite
   de chaque page — ce qui donnait l impression que le contenu etait coupe.
   Aucun des deux ne ressemblait a un probleme de CSS.

   Cette regle rend l attribut fiable partout. Pour cacher autrement, on pose
   une classe : hidden garde le sens « pas la, pour personne ».
   =========================================================================== */
[hidden] { display: none !important; }

/* ===========================================================================
   Hub — les statistiques d'une annonce, pour son proprietaire.

   Les couleurs sont prises aux variables du theme et pas ecrites en dur : le
   site bascule en clair, et un graphique dessine pour le sombre y devient
   illisible sans que rien ne signale l'erreur.
   =========================================================================== */
.hub-stats-bloc {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.hub-stats-tete {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
}
.hub-stats-tete h3 { margin: 0; font-size: 1rem; }
.hub-stats-fenetre { color: var(--text-2); font-size: .82rem; margin-left: auto; }

.hub-stats-chiffres {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.hub-stats-chiffres div {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
}
.hub-stats-chiffres b {
  display: block;
  font-size: 1.35rem;
  line-height: 1.1;
  /* Chiffres tabulaires : sans ca, les colonnes tressautent d'un serveur a
     l'autre parce qu'un « 1 » est plus etroit qu'un « 8 ». */
  font-variant-numeric: tabular-nums;
}
.hub-stats-chiffres span { color: var(--text-2); font-size: .78rem; }

/* Le SVG se laisse etirer en largeur (preserveAspectRatio="none") mais garde
   une hauteur fixe : les barres restent comparables entre deux serveurs. */
.hub-graph { width: 100%; height: 200px; display: block; overflow: visible; }
.hub-graph .g-axe { stroke: var(--border-strong); stroke-width: 1; }
.hub-graph .g-clic { fill: var(--accent); opacity: .38; }
.hub-graph .g-arr { fill: var(--accent); }
.hub-graph .g-mem {
  fill: none;
  stroke: #57f287;
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.hub-graph .g-date { fill: var(--text-2); font-size: 11px; }

.hub-graph-legende {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 8px;
  color: var(--text-2);
  font-size: .78rem;
}
.hub-graph-legende i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; }
.hub-graph-legende .p-clic { background: var(--accent); opacity: .38; }
.hub-graph-legende .p-arr { background: var(--accent); }
.hub-graph-legende .p-mem { background: #57f287; height: 3px; border-radius: 2px; }

.hub-stats-alerte {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(240, 178, 50, .35);
  background: rgba(240, 178, 50, .1);
  font-size: .85rem;
}
.hub-stats-vide { color: var(--text-2); font-size: .85rem; }

@media (max-width: 560px) {
  .hub-graph { height: 150px; }
  .hub-stats-chiffres { grid-template-columns: repeat(2, 1fr); }
}

/* ===========================================================================
   Hub — moderation : actions groupees et lignes selectionnees.
   =========================================================================== */
.hub-lot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--accent);
  background: var(--accent-soft);
  /* Colle en haut pendant qu'on fait defiler : on selectionne des lignes sur
     toute la hauteur du tableau, et une barre d'actions restee en haut de page
     obligerait a remonter pour agir — donc a perdre de vue ce qu'on a coche. */
  position: sticky;
  top: 8px;
  z-index: 5;
  backdrop-filter: blur(8px);
}
.hub-lot .hub-actions { margin-left: auto; }
.hub-tr-choisie { background: var(--accent-soft); }
.hub-table input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }

/* ===========================================================================
   Page d'accueil — la section « KairoBot Pub ».

   Placee juste apres le hero et non en bas de page : une nouveaute rangee
   apres quinze cartes de fonctionnalites n'est lue par personne, et vaut alors
   exactement ce que vaudrait son absence.
   =========================================================================== */
.pub-section { padding: 30px 0 10px; }

.pub-card {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 36px;
  align-items: center;
  padding: 34px 38px;
  border-radius: 22px;
  border: 1px solid var(--border-strong);
  /* Un degrade tres discret plutot qu'un aplat : la section doit se distinguer
     du reste de la page sans hurler. */
  background:
    radial-gradient(120% 140% at 100% 0%, rgb(91 110 240 / .16), transparent 55%),
    var(--surface);
  overflow: hidden;
}

.pub-badge {
  display: inline-block;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.pub-titre {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: clamp(1.7rem, 3.4vw, 2.3rem);
  line-height: 1.1;
  margin-bottom: 10px;
}
.pub-accroche { color: var(--text-2); line-height: 1.65; max-width: 52ch; }
.pub-accroche code {
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: .92em;
}

.pub-points { list-style: none; margin: 16px 0 20px; display: grid; gap: 8px; }
.pub-points li { display: flex; align-items: flex-start; gap: 9px; color: var(--text-2); font-size: .92rem; }
.pub-points i { color: #57c98a; margin-top: 3px; flex: none; }

.pub-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* L'apercu de fiche : une illustration, pas un vrai composant. Elle montre en
   un coup d'oeil ce qu'on obtient en publiant — plus efficace que trois lignes
   de description. */
.pub-apercu { display: flex; justify-content: center; }
.pub-fiche {
  width: min(330px, 100%);
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  overflow: hidden;
  box-shadow: 0 22px 50px -26px rgb(0 0 0 / .6);
  transform: rotate(-1.4deg);
  transition: transform .3s ease;
}
.pub-card:hover .pub-fiche { transform: rotate(0deg) translateY(-4px); }
.pub-fiche-banniere {
  height: 62px;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
}
.pub-fiche-corps { padding: 14px 16px 16px; }
.pub-fiche-tete { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.pub-fiche-icone {
  width: 40px; height: 40px; border-radius: 12px; flex: none;
  background: var(--surface); border: 1px solid var(--border-strong);
}
.pub-fiche-tete b { display: block; font-size: .95rem; }
.pub-fiche-meta { color: var(--text-2); font-size: .76rem; }
.pub-fiche-desc { color: var(--text-2); font-size: .82rem; line-height: 1.55; margin-bottom: 12px; }
.pub-fiche-pied { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.pub-fiche-bump { font-size: .8rem; font-weight: 600; }
.pub-fiche-tag {
  padding: 2px 9px; border-radius: 999px; font-size: .74rem;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-2);
}

/* La pastille « Nouveau » dans la barre de navigation. */
.nav-link-nouveau { display: inline-flex; align-items: center; gap: 6px; }
.nav-pastille {
  padding: 2px 7px; border-radius: 999px; background: var(--accent); color: #fff;
  font-size: .62rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
}

@media (max-width: 900px) {
  /* En colonne, l'apercu passe AU-DESSUS du texte : c'est l'image qui donne
     envie de lire, pas l'inverse. */
  .pub-card { grid-template-columns: 1fr; gap: 26px; padding: 26px 22px; }
  .pub-apercu { order: -1; }
  .pub-fiche { transform: none; }
  .pub-actions .btn { flex: 1 1 100%; justify-content: center; }
}
