/* =========================================================================
   Landing premium iGoviral — « Charbon & Ambre »
   Fichier dédié (n'impacte ni auth.html ni l'app). Effets : parallaxe,
   révélation au scroll, mot géant qui explose, cartes flottantes, grain.
   ========================================================================= */

body { overflow-x: hidden; }

/* ===== Décor de fond en couches (parallaxe) ===== */
.decor { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }

.orbe {
  position: absolute; border-radius: 50%; filter: blur(90px); opacity: .55;
  will-change: transform;
}
.orbe-1 {
  top: -12vh; left: -8vw; width: 46vw; height: 46vw;
  background: radial-gradient(circle at 40% 40%, rgba(251,191,36,.50), transparent 68%);
}
.orbe-2 {
  bottom: -18vh; right: -10vw; width: 52vw; height: 52vw;
  background: radial-gradient(circle at 60% 50%, rgba(249,115,22,.42), transparent 66%);
}
/* Grille fine en fond — donne de la profondeur, défile lentement */
.grille-fond {
  position: absolute; inset: -10% 0; opacity: .35; will-change: transform;
  background-image:
    linear-gradient(rgba(168,156,142,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(168,156,142,.05) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 30%, transparent 75%);
          mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 30%, transparent 75%);
}
/* Lueur qui suit la souris (--x / --y posés par le JS) */
.lueur-souris {
  position: absolute; width: 600px; height: 600px; border-radius: 50%;
  left: var(--x, 50%); top: var(--y, 30%); transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(251,191,36,.10), transparent 60%);
  transition: opacity .4s ease; will-change: left, top;
}
/* Grain léger par-dessus tout, pour la texture premium */
.grain {
  position: absolute; inset: 0; opacity: .04; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Tout le contenu passe au-dessus du décor */
header, main, footer { position: relative; z-index: 1; }

/* ===== En-tête (sticky, se solidifie au scroll) ===== */
.entete {
  position: sticky; top: 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 6vw; max-width: var(--max-l); margin: 0 auto;
  transition: background .3s ease, border-color .3s ease, backdrop-filter .3s ease;
  border-bottom: 1px solid transparent;
}
.entete.solidifie {
  background: rgba(12,10,9,.72); backdrop-filter: blur(14px);
  border-bottom-color: var(--bordure);
}
.brand {
  font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 1.3rem;
  letter-spacing: -.01em;
}
.cta-sm { padding: 9px 18px; font-size: .9rem; text-decoration: none; display: inline-block; }
.cta { text-decoration: none; display: inline-block; transition: transform .15s ease, box-shadow .25s ease; }
.cta:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -8px rgba(249,115,22,.5); }

/* ===== Héro ===== */
.hero { max-width: 920px; margin: 0 auto; padding: 9vh 6vw 4vh; text-align: center; }
.hero-pastille {
  display: inline-block; font-size: .85rem; color: var(--texte-2);
  border: 1px solid var(--bordure); border-radius: 999px; padding: 7px 16px;
  background: rgba(21,17,13,.5); backdrop-filter: blur(6px);
}
.hero-titre {
  font-family: 'Space Grotesk', sans-serif; font-weight: 700;
  font-size: clamp(2.3rem, 6.5vw, 4.6rem); line-height: 1.04; letter-spacing: -.02em;
  margin: 22px 0 18px;
}
/* Le mot géant qui explose à l'arrivée + halo pulsant */
.mot-geant {
  display: block; position: relative;
  font-size: clamp(3.6rem, 13vw, 9rem); line-height: .9; font-weight: 700;
  letter-spacing: -.03em; margin: .06em 0;
  background: var(--accent-grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: viralExplose .9s cubic-bezier(.2,.8,.2,1) both;
}
.mot-geant::after {
  content: ''; position: absolute; inset: -28% -8%; z-index: -1;
  background: radial-gradient(ellipse at center, rgba(251,191,36,.35), transparent 65%);
  filter: blur(26px); animation: haloPulse 3.2s ease-in-out infinite;
}
.lede {
  color: var(--texte-2); font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  max-width: 56ch; margin: 0 auto 30px; line-height: 1.6;
}
.lede em { color: var(--texte); font-style: italic; }
.lede strong { color: var(--accent-1); font-weight: 600; }

.hero-recherche { display: flex; gap: 10px; max-width: 580px; margin: 0 auto; flex-wrap: wrap; }
.hero-recherche input {
  flex: 1; min-width: 230px; background: rgba(21,17,13,.7); border: 1px solid var(--bordure);
  border-radius: var(--rayon); padding: 16px 18px; color: var(--texte); font-size: 1rem;
  backdrop-filter: blur(6px); transition: border-color .2s ease, box-shadow .2s ease;
}
.hero-recherche input:focus {
  border-color: var(--accent-1);
  box-shadow: 0 0 0 3px rgba(251,191,36,.15);
}
.hero-note { color: var(--texte-2); font-size: .85rem; margin-top: 16px; }

/* ===== Démonstration : cartes virales flottantes ===== */
.demo {
  display: flex; justify-content: center; margin-top: 7vh;
  perspective: 1200px; will-change: transform;
}
.demo-carte {
  width: 220px; flex: 0 0 auto; background: var(--surface);
  border: 1px solid var(--bordure); border-radius: 18px; padding: 12px;
  box-shadow: 0 30px 60px -25px rgba(0,0,0,.8);
  animation: flotte 6s ease-in-out infinite;
}
.demo-carte--a { transform: rotate(-7deg) translateY(14px); z-index: 1; margin-right: -34px; animation-delay: 0s; }
.demo-carte--b { transform: scale(1.06); z-index: 3; box-shadow: 0 40px 80px -28px rgba(249,115,22,.35), 0 30px 60px -25px rgba(0,0,0,.8); animation-delay: -2s; }
.demo-carte--c { transform: rotate(7deg) translateY(14px); z-index: 1; margin-left: -34px; animation-delay: -4s; }
.demo-tete { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.demo-pastille {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; font-size: .8rem; color: #1a1208; background: var(--accent-grad);
}
.demo-handle { font-size: .85rem; color: var(--texte); font-weight: 500; }
.demo-media {
  aspect-ratio: 4 / 5; border-radius: 12px; display: grid; place-items: center;
  background:
    radial-gradient(circle at 50% 45%, rgba(251,191,36,.12), transparent 60%),
    linear-gradient(160deg, #1d1812, #100c08);
  border: 1px solid var(--bordure);
}
.demo-play { font-size: 1.5rem; color: rgba(237,231,225,.55); }
.demo-metriques { display: flex; justify-content: space-between; align-items: center; margin: 10px 0 8px; }
.demo-vues {
  font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 1.05rem;
  background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.demo-badge { font-size: .72rem; color: var(--texte-2); }
.demo-score { height: 6px; border-radius: 999px; background: var(--bordure); overflow: hidden; }
.demo-score-fill { display: block; height: 100%; background: var(--accent-grad); border-radius: 999px; }

/* ===== Sections (titres communs) ===== */
.section-titre {
  font-family: 'Space Grotesk', sans-serif; font-weight: 700;
  font-size: clamp(1.7rem, 4vw, 2.6rem); line-height: 1.15; letter-spacing: -.02em;
  text-align: center; max-width: 22ch; margin: 0 auto;
}

/* ===== Comment ça marche ===== */
.etapes { max-width: var(--max-l); margin: 0 auto; padding: 12vh 6vw 6vh; }
.etapes-grille {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 48px;
}
.etape {
  background: rgba(21,17,13,.6); border: 1px solid var(--bordure); border-radius: 18px;
  padding: 30px 26px; backdrop-filter: blur(6px);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.etape:hover {
  transform: translateY(-4px); border-color: rgba(251,191,36,.4);
  box-shadow: 0 24px 50px -28px rgba(249,115,22,.4);
}
.etape-num {
  font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 2.4rem;
  background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  display: block; margin-bottom: 10px; opacity: .9;
}
.etape h3 { font-family: 'Space Grotesk', sans-serif; font-size: 1.25rem; margin: 0 0 8px; }
.etape p { color: var(--texte-2); margin: 0; line-height: 1.55; }
.etape code {
  font-family: ui-monospace, monospace; font-size: .85em; color: var(--accent-1);
  background: rgba(251,191,36,.08); padding: 1px 6px; border-radius: 6px;
}
.etape strong { color: var(--texte); font-weight: 600; }

/* ===== La preuve ===== */
.preuve { max-width: var(--max-l); margin: 0 auto; padding: 8vh 6vw; text-align: center; }
.preuve-sous { color: var(--texte-2); max-width: 50ch; margin: 16px auto 0; line-height: 1.6; }
.preuve-sous em { color: var(--texte); font-style: italic; }
.chiffres { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin: 48px 0 40px; }
.chiffre { display: flex; flex-direction: column; gap: 8px; }
.chiffre-val {
  font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: clamp(2.6rem, 6vw, 4rem);
  line-height: 1; background: var(--accent-grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.chiffre-lib { color: var(--texte-2); font-size: .95rem; max-width: 24ch; margin: 0 auto; line-height: 1.4; }
.anti-clonage {
  max-width: 60ch; margin: 0 auto; color: var(--texte-2); line-height: 1.6;
  border-left: 2px solid var(--accent-1); padding-left: 18px; text-align: left;
}
.anti-clonage strong { color: var(--accent-1); font-weight: 600; }

/* ===== Appel à l'action ===== */
.appel { max-width: var(--max-l); margin: 0 auto; padding: 6vh 6vw 12vh; }
.appel-carte {
  position: relative; overflow: hidden; text-align: center;
  border: 1px solid var(--bordure); border-radius: 26px; padding: 64px 8vw;
  background: linear-gradient(160deg, rgba(33,27,20,.7), rgba(16,12,8,.7));
  backdrop-filter: blur(8px);
}
.appel-carte::before {
  content: ''; position: absolute; top: -50%; left: 50%; transform: translateX(-50%);
  width: 120%; height: 120%; z-index: 0;
  background: radial-gradient(ellipse at center top, rgba(251,191,36,.18), transparent 60%);
}
.appel-carte > * { position: relative; z-index: 1; }
.appel-carte h2 { font-family: 'Space Grotesk', sans-serif; font-size: clamp(1.8rem, 4.5vw, 2.8rem); margin: 0 0 14px; letter-spacing: -.02em; }
.appel-carte p { color: var(--texte-2); max-width: 46ch; margin: 0 auto 26px; line-height: 1.6; }
.cta-grand { font-size: 1.1rem; padding: 17px 36px; }
.appel-note { font-size: .85rem; margin-top: 18px !important; }

/* ===== Pied ===== */
.pied { text-align: center; padding: 36px; color: var(--texte-2); font-size: .85rem; }
.pied a { color: var(--accent-1); }

/* ===== Révélation au scroll ===== */
/* Masqué UNIQUEMENT si le JS est actif (classe .js posée dans le <head>).
   Sans JS, le contenu reste visible — l'animation n'est qu'un bonus. */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }
.reveal[data-delai="1"] { transition-delay: .08s; }
.reveal[data-delai="2"] { transition-delay: .16s; }
.reveal[data-delai="3"] { transition-delay: .24s; }
.reveal[data-delai="4"] { transition-delay: .32s; }

/* ===== Keyframes ===== */
@keyframes viralExplose {
  0%   { opacity: 0; filter: blur(28px); transform: scale(1.28); }
  60%  { opacity: 1; filter: blur(0);    transform: scale(.97); }
  100% { opacity: 1; filter: blur(0);    transform: scale(1); }
}
@keyframes haloPulse {
  0%, 100% { opacity: .45; transform: scale(1); }
  50%      { opacity: .8;  transform: scale(1.08); }
}
@keyframes flotte {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -14px; }
}

/* ===== Responsive ===== */
@media (max-width: 820px) {
  .etapes-grille, .chiffres { grid-template-columns: 1fr; }
  .demo { flex-wrap: wrap; gap: 14px; }
  .demo-carte { width: 46%; }
  .demo-carte--a, .demo-carte--b, .demo-carte--c { transform: none; margin: 0; animation: none; }
  .anti-clonage { text-align: center; border-left: 0; border-top: 2px solid var(--accent-1); padding: 18px 0 0; }
}
@media (max-width: 520px) {
  .demo-carte { width: 80%; }
}

/* ===== Accessibilité : mouvement réduit ===== */
@media (prefers-reduced-motion: reduce) {
  .mot-geant, .mot-geant::after, .demo-carte { animation: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .orbe, .grille-fond, .demo, .lueur-souris { transform: none !important; }
}
