/* ============================================================
   LE REPAIRE ALCHIMIA — Système de design
   Vibe : pastel contrasté licorne / bubblegum / arc-en-ciel
   Palette : mauve lilas · pêche · turquoise
   ============================================================ */

:root {
  /* Couleurs de marque */
  --lilas: #c3a6ff;
  --lilas-fonce: #9d7bf5;
  --lilas-pale: #ece3ff;
  --peche: #ffc0a3;
  --peche-fonce: #ff9d78;
  --peche-pale: #ffe8dd;
  --turquoise: #79e0d8;
  --turquoise-fonce: #3fc9bd;
  --turquoise-pale: #dcf7f4;

  /* Neutres */
  --creme: #fdf7fc;
  --blanc: #ffffff;
  --encre: #3a2e5c;
  --encre-doux: #6b5f8a;
  --bordure: #efe6f5;

  /* Effets */
  --ombre: 0 10px 30px rgba(157, 123, 245, 0.12);
  --ombre-forte: 0 18px 44px rgba(157, 123, 245, 0.22);
  --rayon: 22px;
  --rayon-sm: 14px;

  /* Dégradé arc-en-ciel signature */
  --arc: linear-gradient(120deg, var(--lilas) 0%, var(--peche) 50%, var(--turquoise) 100%);
  --arc-doux: linear-gradient(120deg, var(--lilas-pale) 0%, var(--peche-pale) 50%, var(--turquoise-pale) 100%);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(1200px 600px at 10% -10%, var(--lilas-pale), transparent 60%),
    radial-gradient(1000px 500px at 100% 0%, var(--peche-pale), transparent 55%),
    radial-gradient(900px 500px at 50% 120%, var(--turquoise-pale), transparent 55%),
    var(--creme);
  color: var(--encre);
  min-height: 100vh;
  line-height: 1.6;
}

/* ---------- Nuages / étoiles décoratifs ---------- */
.deco-etoile { position: fixed; pointer-events: none; opacity: .5; z-index: 0; }

/* ============================================================
   TYPOGRAPHIE
   ============================================================ */
h1, h2, h3 { font-family: "Sora", -apple-system, sans-serif; font-weight: 600; letter-spacing: -.6px; color: var(--encre); }
h1 { font-size: 2.4rem; letter-spacing: -.5px; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.15rem; }
a { color: var(--lilas-fonce); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Les sous-titres restent en Poppins, comme le studio et le tableau de bord. */
.slogan, p.intro, .entete-page p.intro, .carte-forfait .sous, .carte-accueil > p {
  font-family: "Poppins", sans-serif;
}

.gradient-text {
  background: var(--arc);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* La marque « Le Repaire Alchim | IA », identique partout depuis le 2026-08-02 :
   un filet lilas devant le IA, en gras couleur encre.
   ⛔ Plus de point de séparation, plus de Fraunces. Anna a tranché le 2026-07-30. */
.ia-accent {
  position: relative;
  display: inline-block;
  color: var(--encre);
  -webkit-text-fill-color: var(--encre);
  font-weight: 700;
  margin-left: .52em;
}
.ia-accent::before {
  content: "";
  position: absolute;
  left: -.30em; top: 50%; transform: translateY(-50%);
  width: 2px; height: .94em;
  border-radius: 999px;
  background: var(--lilas-fonce);
}

/* Le grand titre du portail. Même famille que le studio, jamais de serif. */
.script-titre {
  font-family: "Sora", -apple-system, sans-serif;
  font-weight: 500;
  letter-spacing: -1.5px;
  color: var(--encre);
}

/* ============================================================
   LAYOUT STUDIO (sidebar + contenu)
   ============================================================ */
.studio { display: flex; min-height: 100vh; position: relative; z-index: 1; }

.sidebar {
  width: 300px;
  flex-shrink: 0;
  background: rgba(255,255,255,.72);
  backdrop-filter: blur(14px);
  border-right: 1px solid var(--bordure);
  padding: 28px 20px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar .marque { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.sidebar .marque .logo { width: 52px; height: 52px; flex-shrink: 0; }
.sidebar .marque .nom { font-family: "Baloo 2", sans-serif; font-weight: 700; font-size: 1.15rem; line-height: 1.1; }
.sidebar .marque .nom small { display: block; font-size: .7rem; font-weight: 600; color: var(--encre-doux); letter-spacing: .5px; text-transform: uppercase; }

.badge-forfait {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: var(--blanc);
  margin: 14px 0 22px;
}
.badge-hybride { background: linear-gradient(120deg, var(--peche), var(--peche-fonce)); }
.badge-cle { background: linear-gradient(120deg, var(--turquoise), var(--turquoise-fonce)); }

.nav-section { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .8px; color: var(--encre-doux); margin: 20px 0 8px 8px; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 14px;
  border-radius: var(--rayon-sm);
  cursor: pointer;
  font-weight: 600;
  color: var(--encre);
  transition: all .18s ease;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  font-size: .95rem;
}
.nav-item:hover { background: var(--lilas-pale); transform: translateX(3px); }
.nav-item.actif { background: var(--arc-doux); box-shadow: inset 0 0 0 1.5px var(--lilas); }
.nav-item .ico { font-size: 1.15rem; width: 24px; text-align: center; }
.nav-item .coche { margin-left: auto; font-size: .9rem; opacity: 0; transition: opacity .2s; }
.nav-item.fait .coche { opacity: 1; }
.nav-item.fait .texte { color: var(--encre-doux); }

/* ---------- Zone de contenu ---------- */
.contenu { flex: 1; padding: 46px 56px 80px; max-width: 900px; }

.page { display: none; animation: apparait .4s ease; }
.page.actif { display: block; }
@keyframes apparait { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.entete-page { margin-bottom: 30px; }
.entete-page .fil { font-size: .8rem; font-weight: 700; color: var(--lilas-fonce); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; }
.entete-page p.intro { font-size: 1.08rem; color: var(--encre-doux); margin-top: 10px; }

/* ============================================================
   CARTES & COMPOSANTS
   ============================================================ */
.carte {
  background: var(--blanc);
  border: 1px solid var(--bordure);
  border-radius: var(--rayon);
  padding: 26px 28px;
  box-shadow: var(--ombre);
  margin-bottom: 22px;
}

.carte-accueil {
  background: var(--arc-doux);
  border: none;
  border-radius: var(--rayon);
  padding: 34px;
  box-shadow: var(--ombre);
  margin-bottom: 26px;
}

/* Étapes numérotées */
.etapes { counter-reset: etape; list-style: none; }
.etapes > li {
  counter-increment: etape;
  position: relative;
  padding: 4px 0 22px 52px;
  border-left: 2px dashed var(--lilas);
  margin-left: 16px;
}
.etapes > li:last-child { border-left: 2px dashed transparent; }
.etapes > li::before {
  content: counter(etape);
  position: absolute;
  left: -18px;
  top: 0;
  width: 34px;
  height: 34px;
  background: var(--arc);
  color: var(--blanc);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: .95rem;
  box-shadow: 0 4px 12px rgba(157,123,245,.35);
}
.etapes > li strong { color: var(--encre); }
.etapes > li p { margin: 4px 0; color: var(--encre-doux); }

/* Encadrés d'info */
.note {
  border-radius: var(--rayon-sm);
  padding: 16px 20px;
  margin: 18px 0;
  font-size: .95rem;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.note .ico { font-size: 1.3rem; flex-shrink: 0; }
.note-astuce { background: var(--turquoise-pale); border-left: 4px solid var(--turquoise-fonce); }
.note-attention { background: var(--peche-pale); border-left: 4px solid var(--peche-fonce); }
.note-magie { background: var(--lilas-pale); border-left: 4px solid var(--lilas-fonce); }

/* Bloc de code / commande */
.code {
  background: #2b2340;
  color: #eadffb;
  border-radius: var(--rayon-sm);
  padding: 14px 18px;
  font-family: "SF Mono", "Fira Code", monospace;
  font-size: .88rem;
  overflow-x: auto;
  margin: 12px 0;
  position: relative;
  white-space: pre;
}
.code .copier {
  position: absolute; top: 8px; right: 8px;
  background: rgba(255,255,255,.14); color: #fff; border: none;
  border-radius: 8px; padding: 4px 10px; font-size: .72rem; cursor: pointer; font-weight: 700;
}
.code .copier:hover { background: rgba(255,255,255,.28); }

/* Case à cocher de progression */
.progression {
  display: flex; align-items: center; gap: 12px;
  margin-top: 24px; padding: 16px 20px;
  background: var(--arc-doux); border-radius: var(--rayon-sm);
  font-weight: 700;
}
.progression input { width: 22px; height: 22px; accent-color: var(--lilas-fonce); cursor: pointer; }
.progression label { cursor: pointer; }

/* Barre de progression globale */
.barre-prog { margin: 16px 8px 8px; }
.barre-prog .piste { height: 10px; background: var(--lilas-pale); border-radius: 999px; overflow: hidden; }
.barre-prog .rempli { height: 100%; background: var(--arc); width: 0; transition: width .5s ease; border-radius: 999px; }
.barre-prog .txt { font-size: .78rem; font-weight: 700; color: var(--encre-doux); margin-top: 6px; text-align: center; }

/* Pilules / tags */
.pilule { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--lilas-pale); color: var(--lilas-fonce); }

/* Boutons */
/* ⚠️ Texte en encre, jamais en blanc : le blanc sur le dégradé pastel est
   illisible. Même correction que sur le formulaire. */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--arc); color: var(--encre); border: none;
  padding: 13px 26px; border-radius: 999px; font-weight: 600;
  font-size: .95rem; cursor: pointer; box-shadow: var(--ombre);
  transition: transform .18s ease, box-shadow .18s ease;
  font-family: inherit;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--ombre-forte); text-decoration: none; }
.btn-doux { background: var(--blanc); color: var(--lilas-fonce); box-shadow: inset 0 0 0 2px var(--lilas); }

/* Grille de cartes forfait (accueil) */
.grille-forfaits { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; margin-top: 36px; }
.carte-forfait {
  background: var(--blanc); border-radius: var(--rayon); padding: 30px 26px;
  box-shadow: var(--ombre); border: 1px solid var(--bordure);
  transition: transform .2s ease, box-shadow .2s ease; text-align: center;
  display: flex; flex-direction: column;
}
.carte-forfait:hover { transform: translateY(-6px); box-shadow: var(--ombre-forte); }
.carte-forfait .haut { height: 8px; border-radius: 999px; margin-bottom: 20px; }
.carte-forfait h3 { font-size: 1.35rem; margin-bottom: 8px; }
.carte-forfait .sous { color: var(--encre-doux); font-size: .92rem; margin-bottom: 18px; flex: 1; }
.carte-forfait ul { list-style: none; text-align: left; margin-bottom: 22px; }
.carte-forfait li { padding: 6px 0 6px 26px; position: relative; font-size: .92rem; }
.carte-forfait li::before { content: "✦"; position: absolute; left: 0; color: var(--lilas-fonce); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
.menu-mobile { display: none; }
@media (max-width: 860px) {
  .studio { flex-direction: column; }
  .sidebar {
    width: 100%; height: auto; position: relative;
    border-right: none; border-bottom: 1px solid var(--bordure);
  }
  .nav-liste { display: none; }
  .nav-liste.ouvert { display: block; }
  .menu-mobile { display: block; margin-top: 14px; }
  .contenu { padding: 30px 22px 60px; }
  h1 { font-size: 1.8rem; }
}

/* ============================================================
   PORTE D'ENTRÉE (code d'accès)
   ============================================================ */
.gate-overlay {
  position: fixed; inset: 0; z-index: 9999;
  display: grid; place-items: center; padding: 24px;
  background:
    radial-gradient(1000px 500px at 15% -10%, var(--lilas-pale), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, var(--peche-pale), transparent 55%),
    radial-gradient(800px 500px at 50% 120%, var(--turquoise-pale), transparent 55%),
    var(--creme);
  transition: opacity .3s ease;
}
.gate-carte {
  background: var(--blanc); border: 1px solid var(--bordure);
  border-radius: var(--rayon); box-shadow: var(--ombre-forte);
  padding: 40px 36px; max-width: 400px; width: 100%; text-align: center;
}
.gate-logo { width: 96px; height: 96px; margin-bottom: 6px; }
.gate-titre { font-size: 2.3rem; margin-bottom: 4px;
  background: var(--arc); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.gate-sous { font-family: "Comfortaa", sans-serif; color: var(--encre-doux); margin-bottom: 18px; }
.gate-txt { color: var(--encre-doux); font-size: .95rem; margin-bottom: 20px; }
.gate-carte input {
  width: 100%; padding: 14px 18px; border-radius: var(--rayon-sm);
  border: 2px solid var(--lilas-pale); font-size: 1.1rem; font-family: inherit;
  text-align: center; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 16px;
  color: var(--encre); outline: none; transition: border-color .2s;
}
.gate-carte input:focus { border-color: var(--lilas); }
.gate-carte .btn { width: 100%; justify-content: center; }
.gate-err { color: var(--magenta, #b5179e); font-size: .88rem; font-weight: 700; min-height: 20px; margin-top: 12px; }
.gate-aide { color: var(--encre-doux); font-size: .8rem; margin-top: 16px; }
.gate-shake { animation: gate-shake .4s; border-color: #ff9d78 !important; }
@keyframes gate-shake {
  0%,100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}

/* L'icône dessinée devant le nom d'une formule, à la place de l'emoji. */
.ico-forfait{ vertical-align:-.22em; margin-right:6px; color:var(--lilas-fonce,#8f6fd8); }
