/* ============================================================
   ElviaExperience — couche d'expérience "wow"
   Aurora WebGL · préloader · curseur · tilt · marquee · magnétique
   (inspiré de 21st.dev : Silk Aurora, Blurred Marquee, Tilt Card)
   ============================================================ */

/* ---------- Aurora WebGL (fond vivant) ---------- */
#aurora {
  position: fixed; inset: 0; z-index: -2; width: 100%; height: 100%;
  display: block; opacity: 0; transition: opacity 1.2s ease;
}
#aurora.on { opacity: 1; }
.bg-canvas { z-index: -3 !important; }        /* base sous l'aurora */
body.aurora-live .blob { opacity: 0.28; }      /* on adoucit les blobs quand l'aurora tourne */

/* ---------- Préloader / intro premium ---------- */
#preloader {
  position: fixed; inset: 0; z-index: 10000; background: #08080A;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px;
  transition: transform 1.05s cubic-bezier(0.76,0,0.24,1), opacity .6s ease;
}
#preloader.done { transform: translateY(-100%); }
.pre-mark { width: 54px; height: 54px; opacity: 0; transform: translateY(10px); animation: preIn .8s var(--ease) forwards; }
.pre-name { font-family: var(--font-display); font-size: 26px; letter-spacing: .06em; color: var(--ivory); opacity: 0; animation: preIn .8s .12s var(--ease) forwards; }
.pre-name b { font-weight: 600; } .pre-name span { color: var(--champ); }
.pre-track { width: min(240px, 60vw); height: 2px; background: rgba(255,255,255,0.10); border-radius: 2px; overflow: hidden; }
.pre-fill { height: 100%; width: 0; background: var(--gold-grad); }
.pre-count { font-size: 12px; letter-spacing: .3em; color: var(--ivory-mute); font-variant-numeric: tabular-nums; }
@keyframes preIn { to { opacity: 1; transform: none; } }
body.preloading { overflow: hidden; }

/* ---------- Barre de progression scroll ---------- */
#scrollbar { position: fixed; top: 0; left: 0; height: 2px; width: 0; z-index: 1001; background: var(--gold-grad); box-shadow: 0 0 12px rgba(201,169,106,0.6); transition: width .1s linear; }

/* ---------- Curseur signature ---------- */
@media (hover: hover) and (pointer: fine) {
  body.cursor-on, body.cursor-on * { cursor: none !important; }
  .cur-dot, .cur-ring { position: fixed; top: 0; left: 0; z-index: 9999; pointer-events: none; border-radius: 50%; transform: translate(-50%, -50%); will-change: transform; }
  .cur-dot { width: 6px; height: 6px; background: var(--champ); }
  .cur-ring { width: 34px; height: 34px; border: 1px solid rgba(201,169,106,0.5); transition: width .25s var(--ease), height .25s var(--ease), background .25s var(--ease), border-color .25s var(--ease); }
  body.cur-hover .cur-ring { width: 62px; height: 62px; background: rgba(201,169,106,0.10); border-color: rgba(201,169,106,0.8); }
  body.cur-hover .cur-dot { opacity: 0; }
}

/* ---------- Tilt + spotlight sur cartes ---------- */
.tilt { transform-style: preserve-3d; transition: transform .3s var(--ease); will-change: transform; }
.tilt > * { transform: translateZ(0.01px); }
.tilt::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  opacity: 0; transition: opacity .35s ease;
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 50%), rgba(201,169,106,0.16), transparent 60%);
}
.tilt:hover::after { opacity: 1; }
.tilt::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  opacity: 0; transition: opacity .35s ease; padding: 1px;
  background: radial-gradient(300px circle at var(--mx,50%) var(--my,50%), rgba(231,210,162,0.6), transparent 55%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.tilt:hover::before { opacity: .7; }

/* ---------- Boutons magnétiques ---------- */
.btn-primary { will-change: transform; }

/* ---------- Marquee logos (bandeau infini masqué) ---------- */
.marquee { position: relative; overflow: hidden; width: 100%;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee__track { display: flex; width: max-content; gap: 0; animation: marquee 26s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__group { display: flex; gap: 56px; padding-right: 56px; flex: none; align-items: center; }
@keyframes marquee { to { transform: translateX(-50%); } }
/* le bandeau trust passe de flex-wrap centré à marquee défilante */
#trustLogos.marquee { display: block; flex-wrap: nowrap; justify-content: flex-start; gap: 0; opacity: 1; }
#trustLogos.marquee .logo-ph { color: var(--ivory-dim); white-space: nowrap; transition: color .3s; }
#trustLogos.marquee .logo-ph:hover { color: var(--champ); }

/* ---------- Sheen doré animé sur les titres or ---------- */
.gold { background-size: 220% 100%; animation: sheen 7s ease-in-out infinite; }
@keyframes sheen { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

/* ---------- Apparition images (clip reveal) ---------- */
.img-reveal { clip-path: inset(0 0 100% 0); transition: clip-path 1.1s var(--ease); }
.img-reveal.in { clip-path: inset(0 0 0% 0); }

/* ---------- Respect reduced-motion ---------- */
@media (prefers-reduced-motion: reduce) {
  #aurora { display: none; }
  .marquee__track { animation: none; }
  .gold { animation: none; }
  #preloader { display: none; }
  .cur-dot, .cur-ring { display: none; }
  body.cursor-on, body.cursor-on * { cursor: auto !important; }
  .img-reveal { clip-path: none; }
}

/* ============================================================
   DA+50% — typo éditoriale, reveals en masque, bande, manifeste
   ============================================================ */

/* Hero eyebrow */
.hero-eyebrow { display: inline-flex; align-items: center; gap: 11px; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--champ); margin-bottom: 26px; }
.hero-eyebrow .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--champ); animation: eePulse 2.4s infinite; }
@keyframes eePulse { 0% { box-shadow: 0 0 0 0 rgba(201,169,106,.5); } 70% { box-shadow: 0 0 0 11px rgba(201,169,106,0); } 100% { box-shadow: 0 0 0 0 rgba(201,169,106,0); } }

/* Reveal en masque, ligne par ligne (hero H1) */
.reveal-lines .ln { display: block; overflow: hidden; padding-bottom: 4px; }
.reveal-lines .ln > span { display: block; }
html.has-enhance .reveal-lines .ln > span { transform: translateY(116%); transition: transform 1s var(--ease); }
html.has-enhance .reveal-lines.in .ln > span { transform: none; }
html.has-enhance .reveal-lines.in .ln:nth-child(1) > span { transition-delay: .05s; }
html.has-enhance .reveal-lines.in .ln:nth-child(2) > span { transition-delay: .17s; }
html.has-enhance .reveal-lines.in .ln:nth-child(3) > span { transition-delay: .29s; }

/* Reveal générique : passe en opacité seule (plus raffiné) + titres en wipe montant */
.reveal { transform: none; }
html.has-enhance:not(.split-ready) .reveal .h-section { clip-path: inset(-4% -4% 108% -4%); transform: translateY(22px); transition: clip-path 1.1s var(--ease) .05s, transform 1.1s var(--ease) .05s; }
html.has-enhance:not(.split-ready) .reveal.in .h-section { clip-path: inset(-4% -4% -4% -4%); transform: none; }

/* SplitText : lignes révélées depuis un masque (typo cinétique premium) */
.sline-mask { display: block; overflow: hidden; }
.sline { display: block; will-change: transform; padding-bottom: 0.08em; }

/* Bande kinétique (typo outline défilante) */
.ticker { overflow: hidden; border-top: 1px solid var(--glass-border); border-bottom: 1px solid var(--glass-border); padding: 24px 0; background: rgba(255,255,255,0.014); margin: 6px 0; }
.ticker__track { display: flex; width: max-content; animation: ticker 32s linear infinite; }
.ticker:hover .ticker__track { animation-play-state: paused; }
.ticker__group { display: flex; align-items: center; flex: none; }
.ticker__group span { font-family: var(--font-display); font-size: clamp(26px, 4.4vw, 58px); line-height: 1; padding: 0 32px; color: var(--ivory); white-space: nowrap; }
.ticker__group span.out { color: transparent; -webkit-text-stroke: 1px rgba(201,169,106,0.5); }
.ticker__group b { color: var(--champ); font-size: clamp(18px, 2.6vw, 36px); }
@keyframes ticker { to { transform: translateX(-50%); } }

/* Manifeste grand format */
.manifesto { padding: clamp(80px, 12vw, 172px) 0; position: relative; }
.manifesto__eyebrow { font-size: 12px; letter-spacing: .28em; text-transform: uppercase; color: var(--champ); margin-bottom: 32px; display: inline-flex; align-items: center; gap: 12px; }
.manifesto__eyebrow::before { content: ""; width: 30px; height: 1px; background: var(--champ); opacity: .7; }
.manifesto__text { font-family: var(--font-display); font-weight: 500; font-size: clamp(30px, 5.6vw, 78px); line-height: 1.08; letter-spacing: -0.015em; max-width: 20ch; color: var(--ivory); }
.manifesto__text .dim { color: var(--ivory-mute); }

@media (prefers-reduced-motion: reduce) {
  .ticker__track { animation: none; }
  html.has-enhance .reveal-lines .ln > span { transform: none; }
  html.has-enhance .reveal .h-section { clip-path: none; transform: none; }
  .hero-eyebrow .pulse { animation: none; }
}

/* ============================================================
   v8 — Fondateur, bandes double-CTA, nav démo
   ============================================================ */

/* Fondateur / Pourquoi nous */
.founder { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 56px; align-items: center; }
.founder__photo { border-radius: 24px; overflow: hidden; border: 1px solid var(--glass-hair); background: var(--ink-2); aspect-ratio: 4/5; box-shadow: 0 40px 100px -40px rgba(0,0,0,0.8); }
.founder__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.founder__body h2 { margin: 20px 0 22px; }
.founder__points { list-style: none; display: flex; flex-direction: column; gap: 14px; margin-top: 28px; }
.founder__points li { display: flex; gap: 12px; align-items: center; font-size: 15px; color: var(--ivory-dim); }
.founder__points svg { width: 18px; height: 18px; color: var(--champ); flex: none; }

/* Bande double-CTA (carte, ex. après L'expérience) */
.cta-band { display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap;
  margin-top: 64px; padding: 36px 40px; border-radius: 24px; border: 1px solid var(--glass-border);
  background: var(--glass); backdrop-filter: blur(8px); }
.cta-band__text { font-family: var(--font-display); font-size: clamp(22px, 2.8vw, 34px); color: var(--ivory); margin: 0; }
.cta-band__actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* Bande finale pleine largeur avant footer */
.cta-band--full { display: block; margin: 0; padding: clamp(56px, 8vw, 96px) 0; border-radius: 0;
  border-left: 0; border-right: 0; border-top: 1px solid rgba(201,169,106,0.22); border-bottom: 1px solid rgba(201,169,106,0.22);
  background: linear-gradient(160deg, rgba(201,169,106,0.12), rgba(255,255,255,0.015)); backdrop-filter: none; }
.cta-band--full .cta-band__inner { display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; }

/* Nav : lien démo secondaire */
.nav-demo { padding: 11px 20px; font-size: 14px; }

/* Responsive */
@media (max-width: 900px) {
  .founder { grid-template-columns: 1fr; gap: 30px; }
  .founder__photo { max-width: 360px; }
}
@media (max-width: 680px) {
  .cta-band, .cta-band--full .cta-band__inner { flex-direction: column; align-items: flex-start; text-align: left; }
  .cta-band { padding: 28px; }
  .cta-band__actions { width: 100%; }
  .cta-band__actions .btn { width: 100%; justify-content: center; }
}

/* ============================================================
   v9 — Correctifs & DA raffinée
   ============================================================ */

/* Ancres propres sous la nav fixe */
section[id], header[id] { scroll-margin-top: 92px; }

/* Hairline or subtile en tête de chaque section (rythme éditorial) */
.section-pad { position: relative; }
.section-pad::before {
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: min(1160px, 86%); height: 1px; opacity: .55;
  background: linear-gradient(90deg, transparent, rgba(201,169,106,0.32), transparent);
}
.manifesto::before, #pourquoi.section-pad::before { opacity: 0; } /* pas de ligne sur le manifeste/fondateur */

/* Bouton principal : reflet doré au survol */
.btn-primary { position: relative; overflow: hidden; }
.btn-primary::after {
  content: ""; position: absolute; top: 0; left: -130%; width: 55%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.5), transparent);
  transform: skewX(-18deg); pointer-events: none;
}
.btn-primary:hover::after { left: 140%; transition: left .75s var(--ease); }

/* Cartes : liseré or au survol (complète le tilt/spotlight) */
.cap:hover, .sub-card:hover, .jstep:hover { border-color: rgba(201,169,106,0.38); }

/* Nav : souligné animé au survol */
.nav-links a { position: relative; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 1px; width: 100%;
  background: var(--champ); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease);
}
.nav-links a:hover::after { transform: scaleX(1); }

/* Aurora un poil plus présente au-dessus du fond */
#aurora.on { opacity: .92; }

/* Curseur : on retire le gros halo #spotlight redondant avec le ring (desktop fin) */
@media (hover: hover) and (pointer: fine) { .spotlight { display: none; } }

/* ============================================================
   v10 — VERRE "APPLE" (liquid glass premium)
   Panneaux frostés qui givrent l'aurora + arête spéculaire + profondeur
   ============================================================ */

/* Surface verre partagée : cartes, mockups, bandes, champs, FAQ */
.cap, .sub-card, .compare-card, .jstep,
.cta-band:not(.cta-band--full), .founder__photo,
.mock-desktop, .mock-phone, .faq-item, .cta-form {
  background: linear-gradient(152deg, rgba(255,255,255,0.10), rgba(255,255,255,0.028)) !important;
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.12) !important;
  box-shadow:
    0 24px 70px -24px rgba(0,0,0,0.72),
    0 2px 10px -4px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.22),
    inset 0 0 0 1px rgba(255,255,255,0.02) !important;
  border-radius: 22px;
}

/* Carte "après audit" / offre principale : verre teinté champagne */
.compare-card.after, .offer-main, .sector-hero {
  background: linear-gradient(152deg, rgba(201,169,106,0.16), rgba(255,255,255,0.03)) !important;
  -webkit-backdrop-filter: blur(22px) saturate(185%);
  backdrop-filter: blur(22px) saturate(185%);
  border: 1px solid rgba(201,169,106,0.32) !important;
  box-shadow:
    0 26px 80px -26px rgba(0,0,0,0.72),
    inset 0 1px 0 rgba(255,255,255,0.26),
    inset 0 0 60px -20px rgba(201,169,106,0.22) !important;
}

/* Nav : barre de verre flottante quand on scrolle */
.nav.scrolled {
  background: rgba(12,12,15,0.55) !important;
  -webkit-backdrop-filter: blur(26px) saturate(180%);
  backdrop-filter: blur(26px) saturate(180%);
  border-bottom: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 10px 40px -18px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.10);
}

/* Champs de formulaire : verre discret */
.field input, .field select, .field textarea {
  background: rgba(255,255,255,0.06) !important;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.12) !important;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--champ) !important;
  box-shadow: 0 0 0 3px rgba(201,169,106,0.14);
}

/* Boutons ghost : vrai verre dépoli */
.btn-ghost {
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  background: rgba(255,255,255,0.06) !important;
  border: 1px solid rgba(255,255,255,0.14) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.16);
}

/* Pastille cookies + sticky : verre cohérent */
#cookie, .sticky-cta {
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
}

/* Reflet spéculaire diagonal léger, statique, sur les grandes cartes verre */
.offer-main, .sector-hero, .cta-form, .founder__photo, .compare-card {
  position: relative;
}

/* Un peu plus de rondeur premium partout */
.cap, .sub-card, .compare-card, .cta-band { border-radius: 24px; }

/* Perf mobile : on allège le flou (coûteux) */
@media (max-width: 680px) {
  .cap, .sub-card, .compare-card, .jstep, .cta-band:not(.cta-band--full),
  .founder__photo, .mock-desktop, .mock-phone, .faq-item, .cta-form {
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    backdrop-filter: blur(14px) saturate(160%);
  }
}

/* Accessibilité : si le navigateur ne gère pas backdrop-filter, on garde un fond lisible */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .cap, .sub-card, .compare-card, .jstep, .cta-band:not(.cta-band--full),
  .founder__photo, .mock-desktop, .mock-phone, .faq-item, .cta-form, .nav.scrolled {
    background: rgba(18,18,24,0.92) !important;
  }
}

/* ============================================================
   v11 — Verre Apple "plus" : nav flottante + reflet spéculaire
   ============================================================ */

/* Reflet diagonal spéculaire intégré au verre (sheen figé) */
.cap, .sub-card, .compare-card, .jstep,
.cta-band:not(.cta-band--full), .founder__photo,
.mock-desktop, .mock-phone, .faq-item, .cta-form {
  background:
    linear-gradient(118deg, transparent 40%, rgba(255,255,255,0.07) 48%, transparent 57%),
    linear-gradient(152deg, rgba(255,255,255,0.10), rgba(255,255,255,0.028)) !important;
}
.compare-card.after, .offer-main, .sector-hero {
  background:
    linear-gradient(118deg, transparent 40%, rgba(255,255,255,0.08) 48%, transparent 57%),
    linear-gradient(152deg, rgba(201,169,106,0.16), rgba(255,255,255,0.03)) !important;
}

/* Nav en verre flottante (pill détachée) au scroll — desktop/tablette */
@media (min-width: 861px) {
  .nav.scrolled {
    top: 14px; left: 50%; right: auto; transform: translateX(-50%);
    width: min(1180px, calc(100% - 40px));
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.12) !important;
    padding: 12px 16px 12px 22px;
    box-shadow: 0 20px 50px -20px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.14);
  }
}

/* Hero-frame : bord de verre lumineux */
.hero-frame {
  border: 1px solid rgba(255,255,255,0.14) !important;
  box-shadow: 0 50px 130px -34px rgba(0,0,0,0.85), inset 0 1px 0 rgba(255,255,255,0.22) !important;
}

/* Un peu plus de vibrance dans l'aurora pour que le verre "attrape" la couleur */
#aurora.on { opacity: 1; }

/* ============================================================
   v13 — Section Visibilité SEO + GEO (IA)
   ============================================================ */
#visibilite .vis-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 28px; align-items: stretch; }
.vis-col { display: flex; flex-direction: column; gap: 24px; }

/* Verre partagé pour les cartes de cette section */
.vis-card, .ai-mock {
  background:
    linear-gradient(118deg, transparent 40%, rgba(255,255,255,0.06) 48%, transparent 57%),
    linear-gradient(152deg, rgba(255,255,255,0.10), rgba(255,255,255,0.028));
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 24px 70px -24px rgba(0,0,0,0.72), inset 0 1px 0 rgba(255,255,255,0.22);
  border-radius: 22px;
}
.vis-card { padding: 32px; }
.vis-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.vis-ico { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(160deg, rgba(201,169,106,0.22), rgba(255,255,255,0.03)); border: 1px solid var(--glass-border); flex: none; }
.vis-ico svg { width: 22px; height: 22px; color: var(--champ); }
.vis-card h3 { font-family: var(--font-display); font-size: 25px; }
.vis-card p { color: var(--ivory-dim); font-size: 15px; margin-bottom: 16px; }
.vis-card ul { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.vis-card li { display: flex; gap: 10px; font-size: 14px; color: var(--ivory-dim); align-items: flex-start; }
.vis-card li svg { width: 16px; height: 16px; color: var(--champ); flex: none; margin-top: 3px; }
.vis-card code { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 12.5px; color: var(--champ); background: rgba(201,169,106,0.12); padding: 1px 6px; border-radius: 6px; }

/* Maquette "réponse IA" */
.ai-mock { overflow: hidden; display: flex; flex-direction: column; }
.ai-bar { display: flex; align-items: center; gap: 10px; padding: 16px 22px; border-bottom: 1px solid var(--glass-border); font-size: 13px; color: var(--ivory-dim); }
.ai-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--champ); box-shadow: 0 0 10px var(--champ); }
.ai-body { padding: 26px 24px; display: flex; flex-direction: column; gap: 16px; }
.ai-q { align-self: flex-end; max-width: 82%; background: rgba(255,255,255,0.06); border: 1px solid var(--glass-border); border-radius: 16px 16px 4px 16px; padding: 12px 16px; font-size: 14px; color: var(--ivory); }
.ai-a { align-self: flex-start; max-width: 94%; background: linear-gradient(160deg, rgba(201,169,106,0.15), rgba(255,255,255,0.03)); border: 1px solid rgba(201,169,106,0.32); border-radius: 16px 16px 16px 4px; padding: 16px 18px; }
.ai-tag { font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--champ); }
.ai-a p { font-size: 15px; color: var(--ivory); margin-top: 8px; line-height: 1.5; }
.ai-a b { color: var(--champ); }
.ai-cite { color: var(--ivory-mute); font-style: italic; }
.ai-src { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; font-size: 11px; color: var(--ivory-mute); }
.ai-note { font-size: 11.5px; }

@media (max-width: 900px) {
  #visibilite .vis-grid { grid-template-columns: 1fr; }
}
