:root {
  --bg: #040705;
  --panel: rgba(14, 22, 16, .74);
  --panel-2: #12201a;
  --line: rgba(120, 255, 150, .1);
  --line-2: rgba(120, 255, 150, .24);
  --text: #f1f7f2;
  --muted: #93a798;
  --green: #0cfc02;      /* vert des lunettes */
  --green-light: #a9fc9e; /* vert clair des reflets */
  --accent: #19d64b;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
* { box-sizing: border-box; }
html { scroll-behavior: auto; } /* le défilement fluide est géré par home.js */
body {
  margin: 0; font-family: 'Nunito', 'Segoe UI', system-ui, sans-serif; background: var(--bg); color: var(--text);
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.muted { color: var(--muted); }

/* ---- Fond animé ---- */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.grid {
  position: absolute; inset: -50%;
  background-image: linear-gradient(rgba(120, 255, 150, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(120, 255, 150, .045) 1px, transparent 1px);
  background-size: 64px 64px; mask-image: radial-gradient(ellipse at 50% 40%, #000, transparent 60%);
  animation: grid-move 26s linear infinite;
}
@keyframes grid-move { to { transform: translateY(64px); } }
.orb { position: absolute; border-radius: 50%; filter: blur(100px); }
.orb-a { width: 640px; height: 640px; background: var(--accent); opacity: .22; top: -300px; left: -200px; animation: drift-a 20s ease-in-out infinite alternate; }
.orb-b { width: 560px; height: 560px; background: #0a7d2c; opacity: .3; bottom: -260px; right: -220px; animation: drift-b 24s ease-in-out infinite alternate; }
@keyframes drift-a { to { transform: translate(140px, 90px) scale(1.12); } }
@keyframes drift-b { to { transform: translate(-120px, -70px) scale(1.15); } }

/* Barre de progression de lecture */
.progress { position: fixed; top: 0; left: 0; height: 3px; width: 100%; z-index: 20; transform-origin: 0 50%; transform: scaleX(var(--read, 0)); background: linear-gradient(90deg, var(--green), var(--green-light)); box-shadow: 0 0 12px var(--green); }

/* ---- Boutons ---- */
.btn {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 12px; font-weight: 800; border: 1px solid transparent; white-space: nowrap; cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s, background .25s, border-color .25s, opacity .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.97); }
.btn-primary { background: linear-gradient(135deg, var(--green), var(--accent) 60%, #0b9c33); color: #021407; box-shadow: 0 8px 26px rgba(12, 252, 2, .28); }
.btn-primary:hover { box-shadow: 0 12px 36px rgba(12, 252, 2, .45); }
.btn-ghost { border-color: var(--line-2); background: rgba(255, 255, 255, .03); color: var(--text); backdrop-filter: blur(6px); }
.btn-ghost:hover { border-color: var(--green); background: rgba(12, 252, 2, .07); }
.btn-lg { padding: 15px 28px; font-size: 17px; border-radius: 14px; }
.btn-off { background: rgba(255, 255, 255, .06); color: var(--muted); box-shadow: none; cursor: not-allowed; border-color: var(--line); }
.btn-off:hover { transform: none; }
.btn-shine::after {
  content: ''; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .5), transparent); transform: skewX(-20deg);
  animation: shine 5s ease-in-out infinite;
}
@keyframes shine { 0%, 72% { left: -60%; } 100% { left: 130%; } }

/* ---- Barre du haut ---- */
.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 15; display: flex; align-items: center; gap: 22px;
  padding: 16px clamp(16px, 5vw, 56px); transition: background .35s, padding .35s, border-color .35s;
  border-bottom: 1px solid transparent;
}
.top.scrolled { background: rgba(4, 7, 5, .78); backdrop-filter: blur(16px); padding-block: 10px; border-bottom-color: var(--line); }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 900; font-size: 22px; letter-spacing: -.01em; }
.brand-logo { width: 56px; height: auto; transition: transform .35s var(--ease); }
.brand:hover .brand-logo { transform: rotate(-8deg) scale(1.1); }
.brand-sm { font-size: 18px; }
.brand-sm .brand-logo { width: 42px; }
.top-links { display: flex; gap: 4px; margin-left: auto; font-weight: 800; }
.top-links a { padding: 8px 12px; color: var(--muted); border-radius: 10px; transition: color .2s, background .2s; }
.top-links a:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.account { display: flex; align-items: center; gap: 10px; }
.me { display: inline-flex; align-items: center; gap: 8px; padding: 4px 6px 4px 4px; border-radius: 99px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); font-weight: 800; font-size: 14px; }
.me img { width: 30px; height: 30px; border-radius: 50%; }
.me-link { display: inline-flex; align-items: center; gap: 8px; padding-right: 4px; border-radius: 99px; transition: color .2s; }
.me-link:hover { color: var(--green-light); }
.me-out { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); }
.me-out:hover { color: #fff; background: rgba(255, 80, 80, .25); }

/* ---- Scènes « collées » à l'écran pendant le défilement ---- */
.scene { position: relative; height: var(--h, 300vh); }
.sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: grid; place-items: center; }

/* Accueil : pendant le défilement (--p de 0 à 1 sur la hauteur de l'écran), le contenu remonte
   un peu moins vite que la page et s'estompe. Pas de fond propre à la section : aucune séparation visible. */
.hero { --p: 0; position: relative; min-height: 100vh; min-height: 100svh; display: grid; place-items: center; padding: 110px 20px 90px; }
.hero-inner {
  display: flex; flex-direction: column; align-items: center; gap: 26px;
  transform: translateY(calc(var(--p) * 14vh)) scale(calc(1 - var(--p) * .06)); opacity: calc(1 - var(--p) * 1.7); will-change: transform, opacity;
}
.hero-glasses { width: clamp(220px, 30vw, 360px); filter: drop-shadow(0 20px 46px rgba(12, 252, 2, .45)); }
.float { position: relative; animation: float 5.5s ease-in-out infinite; }
.float img { width: 100%; height: auto; }
.glasses-shine {
  position: absolute; inset: 0; pointer-events: none;
  -webkit-mask: url(/glasses.svg) center / contain no-repeat; mask: url(/glasses.svg) center / contain no-repeat;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .75) 50%, transparent 65%) no-repeat; background-size: 250% 100%;
  animation: glint 4.5s ease-in-out infinite;
}
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-1.5deg); } 50% { transform: translateY(-14px) rotate(1.5deg); } }
@keyframes glint { 0%, 55% { background-position: 150% 0; } 100% { background-position: -50% 0; } }
.hero-text { width: min(880px, 92vw); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 20px; }
/* Titre : dégradé vert ↔ vert clair qui boucle sans coupure */
.title {
  margin: 0; font-size: clamp(66px, 12.5vw, 140px); font-weight: 900; letter-spacing: -.035em; line-height: .95;
  background: linear-gradient(90deg, var(--green), var(--green-light), var(--green)) 0 0 / 200% 100% repeat-x;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: title-flow 6s linear infinite; filter: drop-shadow(0 6px 30px rgba(12, 252, 2, .25));
}
@keyframes title-flow { to { background-position: 200% 0; } }
.lead { margin: 0; color: var(--muted); font-size: clamp(17px, 2.2vw, 21px); line-height: 1.6; max-width: 640px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.scroll-hint { position: absolute; bottom: 26px; left: 50%; margin-left: -13px; width: 26px; height: 42px; border: 2px solid var(--line-2); border-radius: 14px; opacity: calc(1 - var(--p) * 6); }
.scroll-hint span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--green); animation: wheel 1.8s ease-in-out infinite; }
@keyframes wheel { to { opacity: 0; transform: translateY(14px); } }

/* Scène 2 : mots qui s'allument */
.statement .sticky { padding: 0 clamp(20px, 8vw, 120px); }
.words { margin: 0; max-width: 1100px; font-size: clamp(30px, 5vw, 64px); font-weight: 900; line-height: 1.18; letter-spacing: -.02em; text-align: center; }
.words span { color: rgba(241, 247, 242, .12); transition: color .35s, text-shadow .35s; }
.words span.lit { color: var(--text); }
.words span.lit.hl { color: var(--green-light); text-shadow: 0 0 24px rgba(12, 252, 2, .45); }

/* Scène 3 : fonctions */
.showcase .sticky { place-items: stretch; padding: 96px clamp(16px, 5vw, 64px) 40px; }
.show-head { position: absolute; top: 92px; left: clamp(16px, 5vw, 64px); right: clamp(16px, 5vw, 64px); display: flex; align-items: center; justify-content: space-between; z-index: 2; }
.eyebrow { margin: 0; color: var(--green); font-weight: 900; letter-spacing: .16em; text-transform: uppercase; font-size: 13px; }
.show-hint { margin: 6px 0 0; color: var(--muted); font-size: 13px; font-weight: 700; }
/* Onglets des fonctions : on voit où on en est, et on peut cliquer pour y aller */
.dots { display: flex; gap: 6px; padding: 5px; border-radius: 14px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); backdrop-filter: blur(8px); }
.tab {
  position: relative; display: flex; flex-direction: column; gap: 6px; min-width: 96px; padding: 8px 12px 9px; border: 0; border-radius: 10px;
  background: transparent; color: var(--muted); font: inherit; font-weight: 800; font-size: 14px; cursor: pointer; text-align: left;
  transition: background .3s, color .3s;
}
.tab:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
.tab.on { color: var(--text); background: rgba(12, 252, 2, .08); }
.tab i { display: block; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .1); overflow: hidden; position: relative; }
.tab i::after { content: ''; position: absolute; inset: 0; transform-origin: 0 50%; transform: scaleX(var(--f, 0)); background: linear-gradient(90deg, var(--green), var(--green-light)); }
.show-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(24px, 4vw, 64px); align-items: center; height: 100%; max-width: 1240px; margin: 0 auto; width: 100%; }
.show-texts, .show-media { position: relative; height: 100%; }
.slide-text, .slide-media { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; opacity: 0; will-change: transform, opacity; }
.slide-text { gap: 16px; }
.slide-num { font-size: 15px; font-weight: 900; color: var(--green); letter-spacing: .1em; }
.slide-text h3 { margin: 0; font-size: clamp(34px, 4.6vw, 60px); font-weight: 900; letter-spacing: -.03em; line-height: 1; }
.slide-text p { margin: 0; color: var(--muted); font-size: 18px; line-height: 1.6; }
.slide-text ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.slide-text li { display: flex; gap: 10px; align-items: flex-start; font-weight: 700; line-height: 1.45; }
.slide-text li::before { content: ''; flex: none; width: 8px; height: 8px; margin-top: 8px; border-radius: 2px; transform: rotate(45deg); background: var(--green); box-shadow: 0 0 10px var(--green); }
.slide-text li b { color: var(--green-light); }
.cmds { display: flex; flex-wrap: wrap; gap: 8px; }
.cmds code { padding: 6px 11px; border-radius: 9px; background: rgba(12, 252, 2, .1); border: 1px solid var(--line-2); color: var(--green-light); font-size: 14px; font-weight: 800; }
.slide-media { align-items: center; perspective: 1200px; }
.media-main { width: 100%; border-radius: 22px; box-shadow: 0 30px 80px rgba(0, 0, 0, .55), 0 0 0 1px var(--line-2); }
.media-stack { position: relative; width: 100%; }
.media-stack .media-sub { position: absolute; width: 58%; right: -4%; bottom: -14%; border-radius: 18px; box-shadow: 0 24px 60px rgba(0, 0, 0, .6), 0 0 0 1px var(--line-2); transform: rotate(4deg); }
.media-stack .media-sub2 { left: -6%; right: auto; bottom: auto; top: -16%; width: 48%; transform: rotate(-5deg); }

/* Animations des fonctions : inclinaison vers la souris, lueur, grand numéro, petites images flottantes */
.show-media { --tx: 0; --ty: 0; }
.show-media::before {
  content: ''; position: absolute; width: 70%; aspect-ratio: 1; border-radius: 50%; pointer-events: none;
  left: calc(15% + var(--tx) * 8%); top: calc(50% + var(--ty) * 10%); transform: translateY(-50%);
  background: radial-gradient(circle, rgba(12, 252, 2, .22), transparent 65%); filter: blur(30px);
  transition: left .5s var(--ease), top .5s var(--ease);
}
.tilt { transform: rotateY(calc(var(--tx) * 9deg)) rotateX(calc(var(--ty) * -7deg)); transition: transform .5s var(--ease); transform-style: preserve-3d; }
.media-sub { animation: bob 6s ease-in-out infinite; }
.media-sub2 { animation-delay: -3s; }
@keyframes bob { 50% { margin-top: -10px; } }
.slide-big {
  position: absolute; top: 50%; right: -2%; font-size: clamp(160px, 22vw, 320px); font-weight: 900; line-height: 1; letter-spacing: -.06em;
  color: transparent; -webkit-text-stroke: 2px rgba(12, 252, 2, .16); pointer-events: none; z-index: -1; user-select: none;
}
.slide-text .si { will-change: transform, opacity; }
.cmds code { transition: transform .25s var(--ease), background .25s; }
.cmds code:hover { transform: translateY(-3px); background: rgba(12, 252, 2, .2); }

/* Faux message Discord (boutique) */
.embed { width: 100%; max-width: 560px; background: #2b2d31; border-radius: 10px; border-left: 4px solid var(--green); padding: 18px 20px; color: #dbdee1; box-shadow: 0 30px 80px rgba(0, 0, 0, .55); font-size: 15px; }
.embed h4 { margin: 0 0 10px; color: #fff; font-size: 17px; }
.embed .row { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid rgba(255, 255, 255, .07); }
.embed .row b { color: #fff; }
.embed .row span { color: #949ba4; font-size: 13px; }
.embed .price { color: var(--green-light); font-weight: 900; white-space: nowrap; }
.embed .select { margin-top: 12px; padding: 10px 12px; border-radius: 6px; background: #1e1f22; color: #949ba4; font-size: 14px; }

/* ---- Sections classiques ---- */
.section { max-width: 1160px; margin: 0 auto; padding: 120px 20px 40px; }
.section h2 { font-size: clamp(32px, 4.6vw, 52px); font-weight: 900; margin: 10px 0 10px; text-align: center; letter-spacing: -.03em; }
.section > .eyebrow { text-align: center; }
.section-lead { text-align: center; color: var(--muted); margin: 0 0 40px; font-size: 18px; }
.reveal { opacity: 0; transform: translateY(40px) scale(.98); filter: blur(6px); transition: opacity .9s var(--ease), transform .9s var(--ease), filter .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; filter: none; }

/* Calendrier */
.cal-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: center; }
.cal-days { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.cal-days div { aspect-ratio: 1; border-radius: 14px; display: grid; place-items: center; font-weight: 900; font-size: clamp(16px, 2vw, 22px); background: var(--panel); border: 1px solid var(--line); color: var(--muted); }
.cal-days .past { opacity: .35; }
.cal-days .today { background: linear-gradient(145deg, #d62839, #ff6b6b); color: #fff; border-color: #ffd84a; box-shadow: 0 0 0 3px rgba(255, 216, 74, .35), 0 10px 30px rgba(214, 40, 57, .45); animation: beat 1.6s ease-in-out infinite; }
.cal-days .d25 { grid-column: span 1; background: linear-gradient(145deg, rgba(214, 40, 57, .35), var(--panel)); color: #fff; }
@keyframes beat { 50% { transform: scale(1.07); } }
.cal-side { display: flex; flex-direction: column; gap: 16px; }
.cal-side img { border-radius: 18px; box-shadow: 0 24px 60px rgba(0, 0, 0, .5); }
.countdown { display: flex; gap: 10px; justify-content: center; }
.countdown div { min-width: 82px; padding: 12px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line-2); text-align: center; }
.countdown b { display: block; font-size: 30px; font-weight: 900; color: var(--green-light); font-variant-numeric: tabular-nums; }
.countdown span { color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }

/* Serveur */
.server-card {
  position: relative; display: flex; align-items: center; gap: 28px; padding: 36px; border-radius: 30px; overflow: hidden;
  background: linear-gradient(135deg, rgba(12, 252, 2, .16), rgba(10, 125, 44, .08) 55%, rgba(14, 22, 16, .85)); border: 1px solid var(--line-2);
  transition: transform .4s var(--ease), border-color .3s, box-shadow .4s;
}
.server-card:hover { transform: translateY(-6px) scale(1.01); border-color: var(--green); box-shadow: 0 24px 70px rgba(12, 252, 2, .18); }
.server-card::after { content: ''; position: absolute; width: 360px; height: 360px; right: -120px; top: -160px; border-radius: 50%; background: var(--green); filter: blur(90px); opacity: .16; }
.server-icon { position: relative; flex: none; width: 100px; height: 100px; border-radius: 30px; background: var(--panel-2); border: 1px solid var(--line-2); overflow: hidden; }
.server-icon img { width: 100%; height: 100%; }
.server-text { position: relative; flex: 1; }
.server-card h2 { text-align: left; font-size: clamp(26px, 3.4vw, 36px); margin: 6px 0 8px; }
.server-card p { margin: 0; color: var(--muted); line-height: 1.6; }
.server-btn { position: relative; }

.foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 90px; padding: 28px clamp(16px, 5vw, 56px); border-top: 1px solid var(--line); font-weight: 700; }
.foot > a:last-child { color: var(--muted); }
.foot > a:last-child:hover { color: var(--text); }

/* ---- Téléphone ---- */
@media (max-width: 860px) {
  .top-links { display: none; }
  .me span, #login-btn { display: none; }
  .account { margin-left: auto; }
  .show-grid { grid-template-columns: 1fr; grid-template-rows: 42% 58%; gap: 12px; }
  .show-media { order: -1; }
  .showcase .sticky { padding-top: 120px; }
  .show-head { top: 74px; flex-direction: column; align-items: flex-start; gap: 8px; }
  .dots { max-width: 100%; overflow-x: auto; }
  .tab { min-width: 76px; padding: 6px 8px; font-size: 12px; }
  .showcase .sticky { padding-top: 150px; }
  .slide-text { justify-content: flex-start; }
  .slide-text h3 { font-size: 32px; }
  .slide-text p { font-size: 16px; }
  .slide-text ul { display: none; }
  .media-stack .media-sub, .media-stack .media-sub2 { display: none; }
  .cal-wrap { grid-template-columns: 1fr; }
  .server-card { flex-direction: column; text-align: center; }
  .server-card h2 { text-align: center; }
  .foot { flex-direction: column; }
}

/* Animations réduites (réglage du système) : tout est affiché normalement, sans scènes collées */
.calm .scene { height: auto; }
.calm .sticky { position: relative; height: auto; min-height: 70vh; padding-block: 120px 40px; }
.calm .hero-inner { transform: none; opacity: 1; }
.calm .scroll-hint { display: none; }
.calm .words span { color: var(--text); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; filter: none; }
}

/* ---- Barre du haut sur petits écrans : rien ne se chevauche ---- */
.top { min-width: 0; }
.brand { min-width: 0; flex: none; }
.account { min-width: 0; margin-left: auto; }
.top-links + .account { margin-left: 0; }
@media (max-width: 760px) {
  .top { gap: 10px; }
  .top-links { display: none; }
  #me-name { display: none; }
  .me-link { padding-right: 0; }
}
@media (max-width: 480px) {
  .brand > span, .brand > b, .brand-text { display: none; }
  .brand { font-size: 0; gap: 0; }
  .brand-logo { width: 44px; }
  #dash-btn { padding: 8px 12px; font-size: 13px; }
  .account { gap: 6px; }
}

/* ---- Mobile : bouton « Se connecter » toujours visible, liens Accueil + Classement gardés ---- */
.m-only { display: none; }
@media (max-width: 860px) {
  .top { flex-wrap: wrap; row-gap: 8px; }
  .top-links { display: flex !important; order: 3; width: 100%; margin: 0; justify-content: center; gap: 6px; }
  .top-links a { display: none; padding: 6px 12px; font-size: 14px; background: rgba(255, 255, 255, .05); }
  .top-links a.m-keep, .top-links a.m-only { display: inline-block; }
  #login-btn { display: inline-flex !important; padding: 8px 14px; font-size: 14px; }
  #login-btn[hidden] { display: none !important; }
}
