:root {
  --bg: #050506;
  --panel: #111113;
  --panel-alt: #18181b;
  --border: #27272a;
  --text: #f4f4f5;
  --text-dim: #a1a1aa;
  /* Accent monochrome : bordures et liens en gris clair, degrades du gris
     clair au noir. Jamais de texte blanc sur l'accent (trop clair). */
  --accent: #d4d4d8;
  --accent2: #71717a;
  --accent-glow: #ffffff14;
  --grad-clair: linear-gradient(180deg, #fafafa 0%, #a1a1aa 100%);
  --grad-sombre: linear-gradient(180deg, #27272a 0%, #0a0a0b 100%);
  --ok: #2ecc71;
  --err: #e74c3c;
  --warn: #f1c40f;
}

* { box-sizing: border-box; }

/* `overflow-x: hidden` sur body en faisait un CONTENEUR DE DEFILEMENT (la
   regle CSS calcule alors overflow-y a `auto`) : le `scroll-behavior: smooth`
   pose sur html ne s'appliquait plus, et les ancres du menu sautaient au lieu
   de glisser. `clip` coupe le debordement sans creer de conteneur. */
html { scroll-behavior: smooth; overflow-x: clip; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  overflow-x: clip;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--panel-alt); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--border); }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes drift {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(3%, 4%) scale(1.08); }
  100% { transform: translate(0, 0) scale(1); }
}
@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* --- Fond : grille + halos --- */
.bg-grid {
  position: fixed; inset: -10%; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, #ffffff08 1px, transparent 1px),
    linear-gradient(to bottom, #ffffff08 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 20%, #000 40%, transparent 90%);
}
.bg-glow {
  position: fixed; z-index: 0; pointer-events: none; border-radius: 50%;
  filter: blur(110px); opacity: .12; animation: drift 18s ease-in-out infinite;
}
.bg-glow-a { top: -10%; left: 10%; width: 480px; height: 480px; background: #d4d4d8; }
.bg-glow-b { top: 15%; right: 5%; width: 400px; height: 400px; background: #52525b; animation-delay: -6s; }

/* --- Nav --- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 28px;
  padding: 16px 40px;
  background: #060710cc; backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 17px; margin-right: auto; }
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a {
  display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--text-dim); white-space: nowrap;
  transition: color .15s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-icon { font-size: 13px; }
.nav-burger { display: none; flex-direction: column; justify-content: center; gap: 4px; background: none; border: none; cursor: pointer; padding: 12px; margin: -8px -10px -8px 0; min-width: 44px; min-height: 44px; }
.nav-burger span { width: 20px; height: 2px; background: var(--text); border-radius: 2px; }
/* Menu telephone : une petite fenetre arrondie qui flotte sous la barre,
   en degrade gris -> noir comme le reste du site. Fixe (pas dans le flux) :
   en sticky, il s'ouvrait decale des qu'on avait defile. */
.nav-mobile {
  display: none; flex-direction: column; gap: 4px;
  position: fixed; top: 66px; left: 10px; right: 10px; z-index: 49;
  max-height: calc(100vh - 80px); overflow-y: auto;
  padding: 8px; border-radius: 18px;
  background: linear-gradient(180deg, #232327 0%, #0b0b0c 100%);
  border: 1px solid #ffffff14;
  box-shadow: 0 22px 50px #000c, inset 0 1px 0 #ffffff0d;
  transform-origin: top right;
}
.nav-mobile.open { display: flex; animation: navMobileOpen .24s cubic-bezier(.16,1,.3,1); }
@keyframes navMobileOpen {
  from { opacity: 0; transform: scale(.92) translateY(-8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.nav-mobile-liste { display: flex; flex-direction: column; gap: 2px; }
.nav-mobile-liste a {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 12px;
  font-size: 14.5px; color: var(--text-dim);
  transition: background .15s ease, color .15s ease;
}
.nav-mobile-liste a:hover, .nav-mobile-liste a:active { background: #ffffff0d; color: var(--text); }
.nav-mobile .ath-icon { width: 18px; height: 18px; opacity: .85; }
.nav-mobile-ronds {
  display: flex; justify-content: center; gap: 22px;
  padding: 12px 0 8px; margin-top: 4px; border-top: 1px solid #ffffff10;
}
.nav-mobile-ronds .rond {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-size: 11px; color: var(--text-dim);
}
.nav-mobile-ronds .cercle {
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #ffffff0d; border: 1px solid #ffffff1a;
  transition: transform .15s ease, border-color .15s ease;
}
.nav-mobile-ronds .rond:active .cercle, .nav-mobile-ronds .rond:hover .cercle { transform: scale(1.06); border-color: var(--accent); }
.nav-mobile-dash { margin: 6px 4px 4px; }
.nav-mobile-dash .ath-icon { filter: invert(1); opacity: .9; }

/* --- Boutons --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 10px; font-size: 14px; font-weight: 600;
  border: 1px solid transparent; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-staff {
  background: var(--grad-clair);
  color: #0a0a0b; font-size: 13px; font-weight: 700; padding: 10px 20px;
  box-shadow: 0 8px 22px -10px #ffffff33;
}
.btn-staff:hover { box-shadow: 0 10px 26px -6px var(--accent-glow); }
.btn-primary {
  background: var(--grad-clair);
  color: #0a0a0b; box-shadow: 0 10px 30px -12px #ffffff40;
}
.btn-primary:hover { box-shadow: 0 14px 36px -8px var(--accent-glow); }
/* Icones Athena dans les boutons : blanches, noires sur le bouton clair. */
.btn .ath-icon { width: 16px; height: 16px; flex-shrink: 0; }
.btn-primary .ath-icon, .btn-staff .ath-icon { filter: invert(1); opacity: .85; }
.btn-lg { padding: 16px 30px; font-size: 15.5px; border-radius: 12px; }
.btn-secondary { background: var(--grad-sombre); border-color: var(--border); color: var(--text); }
.btn-secondary:hover { border-color: var(--accent); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text-dim); }
.btn-ghost:hover { color: var(--text); border-color: var(--text-dim); }

/* --- Hero --- */
.hero {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 110px 24px 90px;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--panel-alt); border: 1px solid var(--border); border-radius: 999px;
  padding: 6px 16px; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; color: var(--text-dim);
  animation: fadeUp .5s ease backwards;
}
.eyebrow.center { align-self: center; }
.eyebrow-dot { color: var(--text-dim); }
.hero-title {
  font-size: clamp(38px, 7vw, 68px); font-weight: 800; line-height: 1.08; margin: 22px 0 18px;
  animation: fadeUp .55s ease .05s backwards;
}
.gradient-text {
  background: linear-gradient(180deg, #ffffff 15%, #8b8b94 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub {
  max-width: 560px; color: var(--text-dim); font-size: 16px; line-height: 1.6; margin: 0 0 34px;
  animation: fadeUp .55s ease .1s backwards;
}
.hero-actions { animation: fadeUp .55s ease .15s backwards; }
.hero-actions-secondary {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 18px;
  animation: fadeUp .55s ease .2s backwards;
}

.status-card {
  display: inline-flex; align-items: center; gap: 10px;
  background: #ffffff08; border: 1px solid var(--border); border-radius: 999px;
  padding: 9px 18px; margin-top: 28px; font-size: 13px; color: var(--text-dim);
  animation: fadeUp .55s ease .22s backwards;
}
.status-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--ok);
  box-shadow: 0 0 0 0 #2ecc7166; animation: statusPulse 2s ease-in-out infinite;
}
.status-card.offline .status-dot { background: var(--text-dim); animation: none; box-shadow: none; }
.status-text { color: var(--text); font-weight: 600; }
.status-sep { opacity: .5; }
.status-ping { font-variant-numeric: tabular-nums; }
@keyframes statusPulse {
  0%, 100% { box-shadow: 0 0 0 0 #2ecc7155; }
  50% { box-shadow: 0 0 0 5px #2ecc7100; }
}

.stat-row {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 32px;
  animation: fadeUp .55s ease .25s backwards;
}
.stat-chip {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: linear-gradient(180deg, #ffffff0a, #ffffff03);
  border: 1px solid var(--border); border-radius: 16px;
  padding: 18px 28px; min-width: 140px;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.stat-chip:hover { transform: translateY(-2px); border-color: var(--accent); background: linear-gradient(180deg, #ffffff10, #ffffff05); }
.stat-icon { font-size: 20px; }
.stat-value { font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.stat-label { font-size: 10.5px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }

/* --- Sections generiques --- */
main { position: relative; z-index: 1; }
.section-title { font-size: clamp(26px, 4vw, 38px); font-weight: 800; margin: 14px 0 12px; line-height: 1.2; }
.section-sub { color: var(--text-dim); font-size: 15px; max-width: 560px; margin: 0 auto 50px; line-height: 1.6; }
.center { text-align: center; }

/* .js est pose par site.js : sans script, les sections restent visibles. */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in-view { opacity: 1; transform: translateY(0); }

.features, .about { padding: 90px 24px; text-align: center; }
.feature-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px; max-width: 1080px; margin: 0 auto;
}
.feature-card {
  position: relative; background: linear-gradient(180deg, var(--panel), var(--panel-alt, var(--panel)));
  border: 1px solid var(--border); border-radius: 18px;
  padding: 28px 24px; text-align: left;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
  overflow: hidden;
}
.feature-card::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(120% 60% at 50% 0%, rgba(255,255,255,0.05), transparent 60%);
  opacity: 0; transition: opacity .25s ease;
  pointer-events: none;
}
.feature-card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 10px 30px -12px rgba(0,0,0,0.6); }
.feature-card:hover::before { opacity: 1; }
.feature-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; margin-bottom: 16px;
  font-size: 22px;
  background: linear-gradient(135deg, rgba(255,255,255,0.10), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.12); border-radius: 12px;
}
.feature-card h3 { margin: 0 0 10px; font-size: 16.5px; font-weight: 700; letter-spacing: -.01em; }
.feature-card p { margin: 0; color: var(--text-dim); font-size: 13.5px; line-height: 1.6; }

/* --- Commandes (liste complete, accordeon par categorie) --- */
.commands { padding: 90px 24px; text-align: center; }
/* Grille fixe : ouvrir une categorie ne redistribue plus les autres (les
   colonnes CSS « journal » laissaient une colonne vide). La categorie
   ouverte prend toute la largeur, ses commandes sur plusieurs colonnes. */
/* Avant : la categorie ouverte passait en `grid-column: 1 / -1`, donc TOUTE
   la grille se reorganisait au clic - on ouvrait « Commandes slash » et les
   douze autres cartes sautaient de place. Desormais la grille ne bouge
   jamais : le detail s'affiche dans un panneau sous la grille (voir
   initCommandes dans site.js). Sans JavaScript, les <details> natifs
   s'ouvrent sur place, ce qui reste lisible. */
.commands-grid {
  /* 300px mini : les titres longs (« Commandes slash les plus utiles »)
     tiennent sur UNE ligne, donc toutes les cartes ont la meme hauteur. */
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px; align-items: start;
  max-width: 1100px; margin: 40px auto 0; text-align: left;
}
.commands-grid .cmd-cat { display: block; margin: 0; }
.cmd-cat {
  background: var(--panel); border: 1px solid var(--border); border-radius: 14px;
  overflow: hidden;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}
.cmd-cat:hover { border-color: var(--accent); transform: translateY(-2px); }
.cmd-cat summary {
  padding: 15px 16px; cursor: pointer; font-weight: 700; font-size: 14px;
  display: flex; align-items: center; gap: 10px; list-style: none;
  user-select: none;
}
.cmd-cat summary::-webkit-details-marker { display: none; }
/* Chevron plutot qu'un + : il pivote, donc l'etat ouvert/ferme se lit sans
   avoir a comparer deux signes. */
.cmd-cat summary::after {
  content: ""; margin-left: 2px; flex: none;
  width: 7px; height: 7px; border-right: 2px solid var(--text-dim);
  border-bottom: 2px solid var(--text-dim); border-radius: 1px;
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform .22s ease, border-color .2s ease;
}
.cmd-cat:hover summary::after { border-color: var(--accent2); }

/* Categorie active : c'est elle que le panneau du dessous detaille. */
.js .cmd-cat.actif {
  border-color: var(--accent); background: var(--panel-alt);
}
.js .cmd-cat.actif summary::after {
  border-color: var(--accent2);
  transform: rotate(225deg) translate(-2px, -2px);
}
.js .cmd-cat.actif .cmd-cat-count { background: var(--accent); color: #0a0a0b; }

/* Avec JS, le detail vit dans le panneau : on masque celui des cartes. */
.js .commands-grid .cmd-list { display: none; }
/* Telephone : la categorie s'ouvre sur place (accordeon, voir site.js). */
.js .commands-grid .cmd-cat[open] > .cmd-list { display: flex; animation: fadeUp .25s ease; }
.js .cmd-cat[open].actif:hover { transform: none; }

.cmd-panel {
  max-width: 1100px; margin: 14px auto 0; text-align: left;
  background: var(--panel); border: 1px solid var(--accent);
  border-radius: 16px; overflow: hidden;
}
.cmd-panel[hidden] { display: none; }
.cmd-panel-head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px; border-bottom: 1px solid var(--border);
  font-weight: 700; font-size: 14.5px;
}
.cmd-panel-head .ath-icon { width: 18px; height: 18px; }
.cmd-panel-close {
  margin-left: auto; background: none; border: 1px solid var(--border);
  color: var(--text-dim); border-radius: 8px; cursor: pointer;
  font-size: 12px; padding: 4px 10px; font-family: inherit;
  transition: border-color .15s ease, color .15s ease;
}
.cmd-panel-close:hover { border-color: var(--accent); color: var(--text); }
.cmd-panel .cmd-list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 10px; padding: 16px 18px 20px; border-top: none; margin-top: 0;
  animation: fadeUp .28s ease;
}
.cmd-cat-icon { font-size: 18px; display: inline-flex; }

/* Icones Athena (PNG blancs) a la place des emojis classiques. */
.ath-icon {
  width: 1.05em; height: 1.05em; vertical-align: -0.16em;
  object-fit: contain; display: inline-block;
}
.nav-icon .ath-icon { width: 14px; height: 14px; vertical-align: -2px; opacity: .9; }
.feature-icon .ath-icon { width: 26px; height: 26px; vertical-align: middle; }
.cmd-cat-icon .ath-icon { width: 18px; height: 18px; }
.ticket-gate-icon .ath-icon { width: 44px; height: 44px; }
.cmd-cat-count {
  margin-left: auto; margin-right: 10px; color: var(--text-dim); font-size: 11.5px;
  font-weight: 600; background: var(--panel-alt); padding: 2px 8px; border-radius: 10px;
  min-width: 26px; text-align: center; transition: background .2s ease, color .2s ease;
}
.cmd-cat-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.cmd-list {
  display: flex; flex-direction: column; gap: 8px;
  padding: 4px 16px 18px; border-top: 1px solid var(--border);
  margin-top: 4px; padding-top: 14px;
}
.cmd {
  display: flex; flex-direction: column; gap: 3px;
  padding: 8px 10px; border-radius: 8px;
  background: var(--panel-alt); border: 1px solid transparent;
  transition: border-color .15s ease;
}
.cmd:hover { border-color: var(--border); }
.cmd code {
  font-family: "SF Mono", Menlo, Consolas, monospace; font-size: 12.5px;
  color: var(--accent2); background: transparent; padding: 0; font-weight: 600;
}
.cmd span { color: var(--text-dim); font-size: 12.5px; line-height: 1.45; }
.commands-note {
  max-width: 720px; margin: 32px auto 0; color: var(--text-dim);
  font-size: 12.5px; text-align: center; line-height: 1.6;
}

.about-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 50px;
  max-width: 1080px; margin: 40px auto 0; text-align: left;
}
.about-text h3 { font-size: 20px; margin: 0 0 14px; }
.about-text p { color: var(--text-dim); font-size: 14.5px; line-height: 1.7; margin: 0 0 20px; }
.check-list { display: flex; flex-direction: column; gap: 12px; }
.check-list li { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--text); }
.check { color: var(--ok); font-weight: 800; flex-shrink: 0; }
.value-grid { display: flex; flex-direction: column; gap: 14px; }
.value-card { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 20px; }
.value-icon { font-size: 20px; margin-bottom: 8px; }
.value-card h4 { margin: 0 0 6px; font-size: 15px; }
.value-card p { margin: 0; color: var(--text-dim); font-size: 13px; line-height: 1.5; }

/* --- Athena en chiffres --- */
.numbers { padding: 70px 24px; text-align: center; }
.numbers-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px; max-width: 780px; margin: 30px auto 0;
  background: var(--border); border: 1px solid var(--border); border-radius: 18px; overflow: hidden;
}
.numbers-card { background: var(--panel); padding: 34px 20px; }
.numbers-value { font-size: clamp(30px, 5vw, 42px); font-weight: 800; letter-spacing: -.02em; }
.numbers-label { color: var(--text-dim); font-size: 13px; margin-top: 6px; }

.cta-band {
  text-align: center; padding: 90px 24px 110px;
  background: linear-gradient(180deg, transparent, #ffffff08);
}
.cta-band h2 { font-size: clamp(24px, 4vw, 34px); margin: 0 0 10px; }
.cta-band p { color: var(--text-dim); margin: 0 0 30px; }

/* --- Footer --- */
.footer {
  position: relative; z-index: 1;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 16px; padding: 28px 40px; border-top: 1px solid var(--border);
}
.footer-brand { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; }
.brand-mark { flex-shrink: 0; display: block; height: 20px; width: auto; }
.footer-brand .brand-mark { height: 15px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-links a { color: var(--text-dim); font-size: 13px; }
.footer-links a:hover { color: var(--text); }
.footer-copy { color: var(--text-dim); font-size: 12px; width: 100%; text-align: center; order: 3; }
.footer-copy a { text-decoration: underline; text-underline-offset: 2px; }

/* --- Page Tickets --- */
.ticket-main {
  position: relative; z-index: 1;
  max-width: 640px; margin: 0 auto; padding: 90px 24px 60px; text-align: center;
}
.ticket-main .eyebrow { margin-bottom: 18px; }
.ticket-title { font-size: clamp(28px, 5vw, 42px); font-weight: 800; margin: 0 0 16px; line-height: 1.15; animation: fadeUp .5s ease backwards; }
.ticket-sub { color: var(--text-dim); font-size: 15px; margin: 0 0 50px; animation: fadeUp .5s ease .05s backwards; }
.ticket-app { animation: fadeUp .5s ease .1s backwards; }
.ticket-loading { color: var(--text-dim); padding: 40px 0; }
.ticket-footnote { margin-top: 40px; color: var(--text-dim); font-size: 13px; }
.ticket-footnote a { color: var(--accent); }

.ticket-gate {
  background: var(--panel); border: 1px solid var(--border); border-radius: 18px;
  padding: 44px 32px; display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.ticket-gate-icon {
  width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: #2ecc7122; font-size: 24px; margin-bottom: 6px;
}
.ticket-gate h2 { margin: 0; font-size: 19px; }
.ticket-gate p { margin: 0 0 10px; color: var(--text-dim); font-size: 13.5px; max-width: 380px; }

.ticket-form {
  background: var(--panel); border: 1px solid var(--border); border-radius: 18px;
  padding: 32px; text-align: left; display: flex; flex-direction: column; gap: 18px;
}
.ticket-field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.ticket-field textarea {
  width: 100%; background: var(--panel-alt); border: 1px solid var(--border); color: var(--text);
  border-radius: 9px; padding: 11px 13px; font-size: 13.5px; font-family: inherit;
  transition: border-color .15s ease; resize: vertical;
}
.ticket-field textarea:focus { outline: none; border-color: var(--accent); }

/* Menu deroulant maison (voir customSelect dans site.js) - remplace le
   <select> natif dont le popup d'options n'est pas stylable en CSS. */
.custom-select { position: relative; display: block; width: 100%; }
.custom-select-trigger {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; background: var(--panel-alt); border: 1px solid var(--border); color: var(--text);
  border-radius: 9px; padding: 11px 13px; font-size: 13.5px; font-family: inherit;
  cursor: pointer; transition: border-color .15s ease;
}
.custom-select-trigger:hover { border-color: var(--accent); }
.custom-select.open .custom-select-trigger { border-color: var(--accent); }
.custom-select-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.custom-select-chevron { flex-shrink: 0; font-size: 10px; color: var(--text-dim); transition: transform .15s ease; }
.custom-select.open .custom-select-chevron { transform: rotate(180deg); }
.custom-select.disabled .custom-select-trigger { opacity: .5; cursor: not-allowed; }
.custom-select-menu {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 20;
  background: var(--panel-alt); border: 1px solid var(--border); border-radius: 10px;
  padding: 4px; max-height: 220px; overflow-y: auto;
  box-shadow: 0 14px 30px -10px #000000cc;
  display: none;
}
.custom-select.open .custom-select-menu { display: block; animation: fadeUp .12s ease; }
.custom-select-option {
  padding: 8px 11px; border-radius: 6px; font-size: 13.5px; cursor: pointer;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.custom-select-option:hover { background: var(--panel); }
.custom-select-option.selected { background: #3f3f46; color: var(--text); }
.ticket-existing {
  background: #f1c40f14; border: 1px solid #f1c40f44; border-radius: 12px; padding: 16px 18px;
  font-size: 13.5px;
}
.ticket-existing a { color: var(--warn); font-weight: 700; }
.ticket-error {
  background: #e74c3c14; border: 1px solid #e74c3c44; border-radius: 10px; padding: 12px 14px;
  font-size: 13px; color: #ff8a80;
}
.ticket-success {
  background: #2ecc7114; border: 1px solid #2ecc7144; border-radius: 12px; padding: 22px; text-align: center;
}
.ticket-success h3 { margin: 0 0 8px; }
.ticket-success p { margin: 0; color: var(--text-dim); font-size: 13.5px; }

/* --- Pages légales --- */
.legal-main {
  position: relative; z-index: 1;
  max-width: 820px; margin: 0 auto; padding: 90px 24px 60px;
}
.legal-head { text-align: center; margin-bottom: 34px; }
.legal-title { font-size: clamp(28px, 5vw, 42px); font-weight: 800; margin: 18px 0 22px; line-height: 1.15; animation: fadeUp .5s ease backwards; }
.legal-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; animation: fadeUp .5s ease .05s backwards; }
.legal-tab {
  padding: 8px 15px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--panel); color: var(--text-dim); font-size: 13px; font-weight: 600;
  transition: color .2s, border-color .2s, background .2s;
}
.legal-tab:hover { color: var(--text); border-color: var(--accent); }
.legal-tab.active { color: var(--text); border-color: var(--accent); background: var(--accent-glow); }

.legal-toc {
  background: var(--panel); border: 1px solid var(--border); border-radius: 18px;
  padding: 20px 24px; margin-bottom: 20px; animation: fadeUp .5s ease .1s backwards;
}
.legal-toc-title {
  margin: 0 0 10px; color: var(--text-dim); font-size: 12px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
}
.legal-toc ol { margin: 0; padding: 0; list-style: none; columns: 2; column-gap: 28px; }
.legal-toc li { break-inside: avoid; padding: 3px 0; font-size: 14px; }
.legal-toc a { color: var(--text-dim); }
.legal-toc a:hover { color: var(--text); }

.legal-doc {
  background: var(--panel); border: 1px solid var(--border); border-radius: 18px;
  padding: 34px 38px; font-size: 15px; line-height: 1.7;
  animation: fadeUp .5s ease .15s backwards;
}
.legal-doc h2 { font-size: 20px; line-height: 1.3; margin: 34px 0 10px; scroll-margin-top: 90px; }
.legal-doc h3 { font-size: 16px; margin: 24px 0 6px; }
.legal-doc p { margin: 0 0 12px; }
.legal-doc .legal-meta { color: var(--text-dim); font-size: 14px; margin-bottom: 18px; }
.legal-doc ul, .legal-doc ol { margin: 0 0 14px; padding-left: 22px; }
.legal-doc ul { list-style: disc; }
.legal-doc ol { list-style: decimal; }
.legal-doc li { margin: 5px 0; }
.legal-doc li::marker { color: var(--text-dim); }
.legal-doc a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }
.legal-doc code {
  background: var(--panel-alt); border: 1px solid var(--border); border-radius: 6px;
  padding: 1px 6px; font-size: 13px;
}
.legal-doc blockquote {
  margin: 0 0 14px; padding: 12px 16px; border-left: 3px solid var(--accent);
  background: var(--panel-alt); border-radius: 0 10px 10px 0;
}
.legal-doc blockquote p { margin: 0; }
.legal-table { overflow-x: auto; margin: 0 0 16px; }
.legal-doc table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.5; }
.legal-doc th, .legal-doc td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.legal-doc th { color: var(--text-dim); font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.legal-doc tr:last-child td { border-bottom: none; }

/* --- Responsive --- */
/* Entre 1080 et 1240 px, la barre complete (8 liens + Dashboard) ne tenait
   plus : « À propos » passait sur deux lignes et le bouton Dashboard sortait
   de l'ecran. On retire les icones, puis on passe au menu burger. */
@media (max-width: 1240px) {
  .nav { gap: 20px; padding: 16px 24px; }
  .nav-links { gap: 16px; }
  .nav-links .nav-icon { display: none; }
}
@media (max-width: 1080px) {
  .nav-links, .btn-staff { display: none; }
  .nav-burger { display: flex; }
  .nav { padding: 14px 18px; }
}
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 34px; }
  .nav { padding: 14px 18px; }
  /* Sur tablette, on force 2 colonnes plutot que d'attendre 640px : trois
     colonnes de 320px min tenaient tout juste, ce qui rendait les cards trop
     etroites et le texte des commandes coupait. */
  .cmd-panel .cmd-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .hero { padding: 80px 18px 60px; }
  .hero-actions-secondary { flex-direction: column; width: 100%; }
  .hero-actions-secondary .btn { width: 100%; }
  .stat-row { gap: 10px; }
  .stat-chip { min-width: 0; flex: 1 1 calc(50% - 10px); padding: 14px 12px; }
  .features, .about, .numbers, .commands { padding: 60px 18px; }
  .commands-grid { grid-template-columns: 1fr; }
  .cmd-panel .cmd-list { grid-template-columns: 1fr; }
  .footer { flex-direction: column; text-align: center; padding: 24px 18px; }
  .footer-links { justify-content: center; gap: 0 6px; }
  /* Cibles tactiles d'au moins ~40 px de haut. */
  .footer-links a { padding: 11px 8px; }
  .ticket-main { padding: 70px 18px 40px; }
  .legal-main { padding: 70px 16px 40px; }
  .legal-doc { padding: 22px 18px; }
  .legal-toc { padding: 18px; }
  .legal-toc ol { columns: 1; }
  .legal-doc table { font-size: 13px; }
  .legal-doc th, .legal-doc td { padding: 8px 6px; overflow-wrap: anywhere; }
  .ticket-form, .ticket-gate { padding: 26px 20px; }
}

/* Mouvement reduit demande par le systeme : plus d'animations ni de
   transitions (le parallax et l'apparition des sections sont aussi coupes
   cote site.js). */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
  }
  html { scroll-behavior: auto; }
}

/* Ancres : le titre de section ne passe pas sous la barre collante. */
section[id] { scroll-margin-top: 72px; }

/* --- Touches de blanc ---
   Le site restait tout gris : quelques accents blancs francs (lumiere
   derriere le titre, tuiles d'icones blanches, liseres et filets blancs)
   le rendent plus net sans changer son fond noir. */
:root {
  --blanc: #fafafa;
  --lisere: inset 0 1px 0 #ffffff1c;
  --halo-blanc: 0 0 0 1px #ffffff26, 0 18px 40px -22px #ffffff59;
}
.hero::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  top: -40px; left: 50%; width: min(900px, 100%); height: 520px; transform: translateX(-50%);
  background: radial-gradient(50% 50% at 50% 42%, #ffffff33 0%, #ffffff0d 45%, transparent 75%);
}
.nav, .footer { border-image: linear-gradient(90deg, transparent, #ffffff40 50%, transparent) 1; }
.nav { border-top: 0; border-left: 0; border-right: 0; }
.footer { border-bottom: 0; border-left: 0; border-right: 0; }
.eyebrow { border-color: #ffffff2e; color: #e4e4e7; box-shadow: var(--lisere); }
.eyebrow-dot { color: var(--blanc); text-shadow: 0 0 8px #ffffffcc; }
.feature-icon {
  background: linear-gradient(180deg, #ffffff 0%, #d4d4d8 100%);
  border-color: #ffffff; box-shadow: 0 8px 22px -10px #ffffff66;
}
.feature-icon .ath-icon { filter: invert(1); width: 24px; height: 24px; }
.value-icon .ath-icon { width: 22px; height: 22px; }
.feature-card, .value-card, .stat-chip, .cmd-cat, .numbers-grid, .legal-doc, .legal-toc,
.ticket-form, .ticket-gate, .cmd-panel, .status-card { box-shadow: var(--lisere); }
.feature-card:hover, .stat-chip:hover, .cmd-cat:hover, .value-card:hover {
  border-color: #ffffffb3; box-shadow: var(--lisere), var(--halo-blanc);
}
.value-card { transition: border-color .2s ease, box-shadow .2s ease; }
.js .cmd-cat.actif { border-color: var(--blanc); box-shadow: var(--lisere), var(--halo-blanc); }
.js .cmd-cat.actif .cmd-cat-count { background: var(--blanc); }
.cmd-panel { border-color: #ffffffb3; }
.stat-icon .ath-icon { filter: drop-shadow(0 0 6px #ffffff80); }
.stat-value, .numbers-value { color: var(--blanc); text-shadow: 0 0 24px #ffffff40; }
.cmd code { color: #e4e4e7; }
.btn-secondary { box-shadow: var(--lisere); border-color: #ffffff3d; }
.btn-secondary:hover { border-color: #ffffffb3; }
.btn-ghost:hover { border-color: #ffffffb3; color: var(--blanc); }
.btn-primary, .btn-staff { background: linear-gradient(180deg, #ffffff 0%, #d4d4d8 100%); }
.cta-band {
  background: radial-gradient(60% 90% at 50% 100%, #ffffff17, transparent 70%),
              linear-gradient(180deg, transparent, #ffffff08);
}
.legal-tab.active { background: var(--blanc); color: #0a0a0b; border-color: var(--blanc); }
.legal-doc h2 { padding-top: 6px; }
