/* ==========================================================
   Lymastudio — système visuel partagé (accueil + Académie)
   Fond sombre, dégradé violet → rose, logo inchangé.
   ========================================================== */
:root {
  --bg: #08070b;
  --bg-2: #0c0a11;
  --surface: #110f17;
  --surface-2: #17141f;
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.12);
  --text: #f3f0f8;
  --muted: #b1abbf;
  --faint: #8a849b;
  --text-2: #dcd7e6;
  --violet: #a855f7;
  --pink: #ec4899;
  --violet-soft: #c58bff;
  --danger: #f87171;
  --grad: linear-gradient(100deg, #a855f7 0%, #ec4899 100%);
  --grad-text: linear-gradient(100deg, #c58bff 0%, #ec4899 100%);
  --radius: 22px;
  --radius-sm: 14px;
  --maxw: 1200px;
  --gutter: clamp(20px, 4vw, 40px);
  --section-y: clamp(84px, 10vw, 140px);
  --display: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: hidden; overflow-x: clip; scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--body);
  font-size: 16px; line-height: 1.6; overflow-x: hidden; overflow-x: clip; -webkit-font-smoothing: antialiased;
}
/* grain très léger pour un rendu moins « numérique » */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .045;
  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='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
body > * { position: relative; z-index: 1; }
img, svg { max-width: 100%; display: block; }
a { color: var(--violet-soft); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: #e3b8ff; }
::selection { background: #8b2fe0; color: #fff; }
:focus-visible { outline: 2px solid var(--violet-soft); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3, .display { font-family: var(--display); letter-spacing: -0.025em; margin: 0; }
p { margin: 0; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--section-y) 0; }
.section--tint { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.text-grad { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- En-têtes de section ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: var(--violet-soft);
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--grad); }
.section-head { display: grid; gap: 18px; margin-bottom: clamp(40px, 5vw, 64px); max-width: 760px; }
.section-head--split { max-width: none; grid-template-columns: 1fr minmax(0, 420px); align-items: end; gap: 24px 64px; }
.h2 { font-size: clamp(32px, 4.4vw, 56px); line-height: 1.04; font-weight: 700; }
.lead { font-size: clamp(16px, 1.35vw, 18px); color: var(--muted); line-height: 1.7; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--body); font-weight: 600; font-size: 15px; letter-spacing: .01em;
  padding: 15px 28px; border-radius: 999px; border: 1px solid transparent; cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease), border-color .25s var(--ease), color .25s;
  text-decoration: none; white-space: nowrap;
}
.btn-primary, .btn--primary {
  background: var(--grad); color: #0a0a0d; font-weight: 700; border: none;
  box-shadow: 0 10px 30px -10px rgba(168, 85, 247, .7), inset 0 1px 0 rgba(255,255,255,.25);
}
.btn-primary:hover, .btn--primary:hover { color: #0a0a0d; transform: translateY(-2px); box-shadow: 0 16px 40px -12px rgba(236, 72, 153, .75), inset 0 1px 0 rgba(255,255,255,.3); }
.btn--ghost { background: rgba(255,255,255,.03); color: var(--text); border-color: var(--line-2); }
.btn--ghost:hover { color: var(--text); border-color: rgba(197,139,255,.55); background: rgba(168,85,247,.08); }
.btn--sm { padding: 10px 20px; font-size: 13.5px; }
.btn--block { width: 100%; }
.btn .arrow { transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- Cartes ---------- */
.card {
  background: linear-gradient(180deg, rgba(255,255,255,.025), rgba(255,255,255,0) 40%), var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 2.6vw, 34px);
}
.pill {
  display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--violet-soft);
  background: rgba(168,85,247,.1); border: 1px solid rgba(168,85,247,.28); border-radius: 999px; padding: 7px 14px;
}
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 0 0 rgba(236,72,153,.6); animation: pulse 2.4s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(236,72,153,.55); } 70%, 100% { box-shadow: 0 0 0 9px rgba(236,72,153,0); } }

/* ---------- Navigation ---------- */
.site-nav {
  position: sticky; top: 0; z-index: 50; transition: background .3s var(--ease), border-color .3s var(--ease), backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.site-nav.is-scrolled, .site-nav.is-open { background: rgba(8,7,11,.78); -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%); border-bottom-color: var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 76px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); }
.brand:hover { color: var(--text); }
.brand img { width: 34px; height: 34px; }
.brand-word { font-family: var(--display); font-weight: 700; font-size: 19px; letter-spacing: .05em; }
.brand-word i { font-style: normal; color: var(--violet-soft); }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { white-space: nowrap; }
.nav-links a:not(.btn) { font-size: 14px; color: var(--muted); position: relative; }
.nav-links a:not(.btn):hover, .nav-links a.is-active { color: var(--text); }
.nav-links a.nav-academy { color: #e3c6ff; display: inline-flex; align-items: center; gap: 7px; }
.nav-links a.nav-academy::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--grad); }
.nav-toggle {
  display: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line-2);
  background: rgba(255,255,255,.03); color: var(--text); cursor: pointer; align-items: center; justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after { display: block; width: 18px; height: 1.6px; background: currentColor; border-radius: 2px; position: relative; transition: transform .25s var(--ease), opacity .2s; }
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -6px; } .nav-toggle span::after { top: 6px; }
.site-nav.is-open .nav-toggle span { background: transparent; }
.site-nav.is-open .nav-toggle span::before { transform: translateY(6px) rotate(45deg); }
.site-nav.is-open .nav-toggle span::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Pied de page ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-2); padding: clamp(56px, 7vw, 88px) 0 32px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.footer-brand p { color: var(--muted); font-size: 14px; line-height: 1.7; margin-top: 16px; max-width: 320px; }
.footer-col h3 { font-family: var(--body); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); font-weight: 600; margin-bottom: 16px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.footer-col a { color: var(--muted); font-size: 14px; }
.footer-col a:hover { color: var(--text); }
.footer-bottom { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--faint); }

/* ---------- Champs de formulaire ---------- */
.field { display: flex; flex-direction: column; gap: 8px; }
.field label, .field-label { font-size: 13px; color: var(--muted); font-weight: 500; letter-spacing: .01em; }
input, textarea, select {
  font-family: var(--body); background: rgba(255,255,255,.025); border: 1px solid var(--line-2); color: var(--text);
  border-radius: 12px; padding: 13px 15px; font-size: 16px; outline: none; width: 100%;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background .2s;
}
input:hover, textarea:hover, select:hover { border-color: rgba(255,255,255,.2); }
input:focus, textarea:focus, select:focus { border-color: var(--violet); box-shadow: 0 0 0 4px rgba(168,85,247,.16); background: rgba(168,85,247,.04); }
select { appearance: none; -webkit-appearance: none; padding-right: 42px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23a59fb4' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 15px center; }
select option { background: #15121c; color: var(--text); }
input::placeholder, textarea::placeholder { color: var(--faint); }
textarea { resize: none; overflow: hidden; min-height: 96px; }
.char-counter { font-size: 11.5px; color: var(--faint); text-align: right; margin: 0; }

/* ---------- Mouvements ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ---------- Responsive commun ---------- */
/* Le menu passe en mode « burger » avant d'être trop serré (8 entrées). */
@media (max-width: 1180px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute; top: 76px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px var(--gutter) 24px; background: rgba(8,7,11,.96); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line); display: none;
  }
  .site-nav.is-open .nav-links { display: flex; }
  .nav-links a:not(.btn) { padding: 15px 2px; border-bottom: 1px solid var(--line); font-size: 16px; }
  .nav-links .btn { margin-top: 18px; padding: 15px 24px; font-size: 15px; }
}
@media (max-width: 960px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .section-head--split { grid-template-columns: 1fr; align-items: start; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
}


/* ==========================================================
   Couche « dynamique » partagée — apparitions, halo au survol,
   barre de lecture, compteurs, FAQ. Pilotée par /assets/site.js.
   ========================================================== */
.lead, .prose, .about-text p { max-width: 68ch; }
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: calc(var(--i, 0) * 80ms); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* halo qui suit le pointeur sur les cartes */
.card { position: relative; isolation: isolate; }
.card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1; opacity: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(168,85,247,.13), transparent 45%);
  transition: opacity .35s var(--ease);
}
.card:hover::after { opacity: 1; }

/* barre de progression de lecture */
.read-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 70; pointer-events: none;
  background: var(--grad); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }

/* index de section « 01 — » */
.eyebrow .idx { color: var(--faint); font-variant-numeric: tabular-nums; }

/* FAQ en accordéon */
.faq { display: grid; gap: 12px; }
.faq-item { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); transition: border-color .3s var(--ease), background .3s var(--ease); }
.faq-item[open] { border-color: rgba(197,139,255,.35); background: linear-gradient(180deg, rgba(168,85,247,.06), rgba(17,15,23,0) 60%), var(--surface); }
.faq-item summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 20px 22px; font-family: var(--display); font-weight: 600; font-size: 17px; letter-spacing: -0.01em; color: var(--text); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: ""; flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line-2);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23c58bff' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center/12px no-repeat;
  transition: transform .35s var(--ease), background-color .3s; }
.faq-item[open] summary::after { transform: rotate(45deg); background-color: rgba(168,85,247,.14); }
.faq-answer { padding: 0 22px 22px; color: var(--text-2); font-size: 15.5px; line-height: 1.75; max-width: 78ch; }
.faq-answer a { text-decoration: underline; text-decoration-color: rgba(197,139,255,.45); text-underline-offset: 3px; }

/* Groupes qui apparaissent élément par élément */
.js .stagger:not(.is-done) > * { transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: calc(var(--si, 0) * 90ms); }
.js .stagger:not(.is-in) > * { opacity: 0; transform: translateY(26px); }

@media (prefers-reduced-motion: reduce) {
  .js .stagger > * { opacity: 1 !important; transform: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .card::after { display: none; }
}

/* ---------- Compte (menu) et liens légaux ---------- */
.nav-links a.nav-account { display: inline-flex; align-items: center; gap: 7px; }
.nav-links a.nav-account::before { content: ""; width: 15px; height: 15px; flex-shrink: 0; opacity: .8;
  background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c0-4 4-6 8-6s8 2 8 6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c0-4 4-6 8-6s8 2 8 6'/%3E%3C/svg%3E") center / contain no-repeat; }
.footer-legal { display: inline-flex; flex-wrap: wrap; gap: 6px 18px; }
.footer-legal a { color: var(--faint); }
.footer-legal a:hover { color: var(--text); }

/* L'attribut hidden doit toujours gagner sur les display des composants */
[hidden] { display: none !important; }

.stack { display: flex; flex-direction: column; gap: 16px; }
