/* =========================================================
   SkoolDash — Vitrine
   Feuille de styles principale (thème clair)
   Organisation :
     1. Variables et reset
     2. Typographie globale
     3. Brand (logo)
     4. Hero + fresque XL
     5. Header sticky + mini-fresque (pills)
     6. Sections d'étape + animation reveal
     7. Footer
     8. Responsive (< 768px)
   ========================================================= */


/* 1. =====================================================
      Variables, reset et base — thème clair
      ===================================================== */
:root {
  /* Couleurs accent */
  --accent-primary: #00aaef;
  --accent-primary-hover: #0095d4;
  --accent-secondary: #00C896;
  --danger: #FF4757;
  --warning: #FFA502;

  /* Texte */
  --text-primary: #2D3436;
  --text-secondary: #6b7280;

  /* Fonds */
  --bg-page: #F8F9FA;
  --bg-card: #FFFFFF;

  /* Bordures */
  --border-standard: #E0E0E0;
  --border-soft: #f0f0f0;

  /* Ombres */
  --shadow-standard: 0 2px 12px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.12);

  /* Border radius */
  --radius-standard: 12px;
  --radius-small: 8px;
  --radius-pill: 999px;

  /* Transitions et layout (conservés, non thématiques) */
  --transition-fast: 180ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 600ms cubic-bezier(0.16, 1, 0.3, 1);

  --max-content: 1280px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--bg-page);
  color: var(--text-primary);
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

ol, ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

button {
  font: inherit;
}

/* Focus visible accessible — visible pour les utilisateurs clavier */
:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 3px;
  border-radius: 4px;
}


/* 2. =====================================================
      Typographie globale
      Le keyword (em.keyword) porte l'accent bleu signature.
      Des overrides locaux peuvent réaffirmer la couleur si nécessaire.
      ===================================================== */
.keyword,
em.keyword,
em {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-weight: 500;
  color: var(--accent-primary);
}


/* 3. =====================================================
      Brand (logo)
      Carré 36px arrondi #00aaef avec un "S" blanc + texte
      ===================================================== */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
  user-select: none;
}

.brand__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background-color: var(--accent-primary);
  color: #FFFFFF;
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.02em;
  box-shadow: 0 6px 18px rgba(0, 170, 239, 0.35);
}

.brand__name {
  font-weight: 500;
  font-size: 17px;
  letter-spacing: -0.01em;
}

.brand--compact .brand__mark {
  width: 28px;
  height: 28px;
  font-size: 14px;
  border-radius: 8px;
}

.brand--compact .brand__name {
  font-size: 15px;
}


/* 4. =====================================================
      Hero + fresque XL
      ===================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 24px clamp(20px, 4vw, 48px) 80px;
}

.hero__topbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.hero__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  gap: clamp(40px, 6vw, 72px);
  max-width: var(--max-content);
  width: 100%;
  margin: 0 auto;
  padding-top: clamp(2rem, 6vh, 5rem);
}

.hero__intro {
  max-width: 720px;
  font-size: clamp(17px, 2vw, 21px);
  color: var(--text-secondary);
  margin: 0;
}

.hero__intro .keyword {
  color: var(--text-primary);
}

/* Titre principal du hero : Playfair Italic accent, traitement éditorial.
   Toute la phrase porte la signature italique bleue, pas un mot isolé. */
.hero__headline {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--accent-primary);
  text-align: center;
  max-width: 22ch;
  margin: 1rem auto 0;
}

/* Baseline factuelle sous le titre : Inter sans-serif, plus petit, texte foncé.
   Hiérarchie volontairement contrastée avec le titre éditorial. */
.hero__baseline {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 600;
  font-size: clamp(1.3rem, 2.2vw, 1.75rem);
  line-height: 1.5;
  color: var(--text-primary);
  text-align: center;
  max-width: none;
  margin: -2.75rem auto 1.5rem;
}

/* Sentinel : élément invisible placé en bas du hero
   utilisé par IntersectionObserver pour décider d'afficher le header sticky */
.hero__sentinel {
  position: absolute;
  bottom: 80px;
  left: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

/* ---------- Fresque XL ---------- */
.fresco {
  width: 100%;
}

.fresco__list {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  align-items: start;
  padding: 32px 12px;
}

/* Ligne horizontale qui relie les 5 cercles
   placée derrière les cercles, alignée sur leur centre vertical */
.fresco__list::before {
  content: '';
  position: absolute;
  top: calc(32px + 8px + 19px + 8px + 60px); /* fresco-list padding-top + node padding-top + num (12px × 1.55) + node gap + demi-cercle 120/2 */
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--border-standard) 12%,
    var(--border-standard) 88%,
    transparent 100%
  );
  z-index: 0;
}

.fresco__node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 8px 4px;
  border-radius: var(--radius-standard);
  transition: transform var(--transition-base);
}

.fresco__num {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.08em;
}

.fresco__circle {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background-color: var(--bg-card);
  border: 1px solid var(--border-standard);
  color: var(--text-secondary);
  font-size: 56px;
  line-height: 1;
  transition:
    border-color var(--transition-base),
    border-width var(--transition-base),
    background-color var(--transition-base),
    color var(--transition-base),
    box-shadow var(--transition-base),
    transform var(--transition-base);
}

.fresco__circle .ti {
  font-size: 56px;
}

.fresco__title {
  font-size: clamp(15px, 1.4vw, 18px);
  font-weight: 500;
  color: var(--text-primary);
  margin-top: 6px;
}

.fresco__desc {
  font-size: 13px;
  color: var(--text-secondary);
  max-width: 18ch;
  line-height: 1.4;
}

/* États interactifs : hover et focus illuminent le cercle
   (bordure 2px accent, icône accent, ombre marquée). */
.fresco__node:hover .fresco__circle,
.fresco__node:focus-visible .fresco__circle {
  border: 2px solid var(--accent-primary);
  color: var(--accent-primary);
  box-shadow: var(--shadow-hover);
  transform: scale(1.05);
}

.fresco__node:hover .fresco__num,
.fresco__node:focus-visible .fresco__num {
  color: var(--accent-primary);
}

/* Carte expandée : layout horizontal, image à gauche, contenu à droite.
   Position absolute par rapport à .fresco__list : la fiche couvre toute
   la largeur de la fresque pour un effet de surcouche pleine largeur. */
.fresco__expand {
  position: absolute;
  top: -15px;
  left: 0;
  right: 0;
  bottom: 0;
  width: auto;
  padding: 1.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-standard);
  border-radius: var(--radius-standard);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  opacity: 0;
  pointer-events: none;
  z-index: 1;
  transform: scale(0.96);
  transition:
    opacity 250ms cubic-bezier(0.4, 0, 0.2, 1) 250ms,
    transform 250ms cubic-bezier(0.4, 0, 0.2, 1) 250ms;
  display: flex;
  gap: 1.75rem;
  align-items: center;
  text-align: left;
}

/* Image symbolique : placeholder carré à gauche, taille fixe. */
.fresco__expand-image {
  flex-shrink: 0;
  width: 440px;
  aspect-ratio: 16 / 9;
  background: var(--border-soft);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: rgba(0, 170, 239, 0.5);
}

.fresco__expand-image .ti {
  font-size: inherit;
}

/* Wrapper du contenu textuel à droite de l'image */
.fresco__expand-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Label "ÉTAPE X" en uppercase, accent primaire */
.fresco__expand-step {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-primary);
}

/* Titre h3 — Inter pour le corps, Playfair italic pour le mot-clé via <em> */
.fresco__expand-title {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.3;
  color: var(--text-primary);
  margin: 0;
}

.fresco__expand-title em,
.fresco__expand-title .keyword {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  color: var(--accent-primary);
}

/* Bullets : alignés à gauche, plus aérés grâce à la place disponible */
.fresco__expand-bullets {
  list-style: none;
  padding: 0;
  margin: 0.25rem 0 0.5rem;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.fresco__expand-bullets li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.fresco__expand-bullets li:last-child {
  margin-bottom: 0;
}

.fresco__chevron {
  color: var(--accent-primary);
  font-weight: 500;
  flex-shrink: 0;
  font-size: 0.95rem;
  line-height: 1.2;
}

/* Bouton CTA : aligné à gauche, taille naturelle (pas pleine largeur) */
.fresco__expand-cta {
  display: inline-block;
  align-self: flex-start;
  padding: 0.7rem 1.5rem;
  margin-top: 0.5rem;
  background: var(--accent-primary);
  color: #FFFFFF;
  text-decoration: none;
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: var(--radius-small);
  transition: background 200ms ease, transform 200ms ease;
}

.fresco__expand-cta:hover {
  background: var(--accent-primary-hover);
  transform: translateY(-1px);
}

/* Navigation latérale : 5 mini-cercles empilés verticalement pour switcher
   entre les étapes sans sortir de la fiche. */
.fresco__expand-nav {
  flex-shrink: 0;
  width: auto;
}

.fresco__expand-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.fresco__expand-nav-item {
  display: flex;
  align-items: center;
  gap: 0;
  cursor: pointer;
  transition:
    transform 200ms ease,
    opacity 200ms ease;
}

.fresco__expand-nav-circle {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: transparent;
  border: 2px solid var(--border-standard);
  color: var(--text-secondary);
  font-size: 18px;
  line-height: 1;
  transition:
    border-color 200ms ease,
    background-color 200ms ease,
    color 200ms ease,
    transform 200ms ease;
}

/* État "vous êtes ici" : cercle rempli accent */
.fresco__expand-nav-item.is-current {
  cursor: default;
}
.fresco__expand-nav-item.is-current .fresco__expand-nav-circle {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #FFFFFF;
}

/* État hover (sur les items NON-current) : border accent, icône accent, léger scale */
.fresco__expand-nav-item:not(.is-current):hover .fresco__expand-nav-circle {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  transform: scale(1.05);
}

/* Affichage de la fiche : pilotée par JS via .is-active sur .fresco__item
   (mouseenter sur cercle principal OU mini-cercle de nav latérale).
   Le masquage tactile reste géré par @media (hover: none) plus bas. */
.fresco__item.is-active .fresco__expand {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
  z-index: 10;
  transition:
    opacity 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,
    transform 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
}

/* Mobile / tactile : pas de hover possible, l'expand est masqué.
   L'utilisateur clique sur le cercle compact pour scroller vers la section. */
@media (hover: none) or (pointer: coarse) {
  .fresco__expand {
    display: none;
  }
}

/* Pulse séquentielle infinie sur la fresque XL.
   La pulse se déclenche sur l'étape qui porte la classe .is-pulsing
   (gérée dynamiquement par JS). La séquence parcourt les 5 étapes
   en boucle jusqu'au premier survol de la fresque. */
.fresco__node.is-pulsing .fresco__circle {
  animation: nodePulse 2000ms ease-in-out infinite;
}

@keyframes nodePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 170, 239, 0); }
  50%      { box-shadow: 0 0 0 12px rgba(0, 170, 239, 0.35); }
}

@media (hover: none) or (pointer: coarse) {
  .fresco__node.is-pulsing .fresco__circle {
    animation: none;
  }
}


/* 5. =====================================================
      Header sticky + mini-fresque (pills) — frosted clair
      ===================================================== */
.sticky-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-standard);

  /* État caché par défaut, slide-down + fade au déclenchement */
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  transition:
    transform var(--transition-base),
    opacity var(--transition-base);
}

.sticky-header.is-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.sticky-header__inner {
  max-width: var(--max-content);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px clamp(16px, 3vw, 32px);
}

.mini-fresco__list {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Pill : compact, 24px de cercle + label court.
   État éteint : transparent, bordure invisible (pour éviter le shift
   au passage vers is-active qui a une bordure 1px accent). */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 6px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  background-color: transparent;
  transition:
    background-color var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast);
}

.pill__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid var(--border-standard);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  background-color: transparent;
  transition:
    background-color var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast);
}

.pill__label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

/* État ALLUMÉ : pill correspondant à la section visible */
.pill.is-active {
  background-color: rgba(0, 170, 239, 0.1);
  border-color: var(--accent-primary);
}

.pill.is-active .pill__num {
  background-color: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #FFFFFF;
}

.pill.is-active .pill__label {
  color: var(--accent-primary);
}

/* Hover non-actif : soulignement discret */
.pill:hover:not(.is-active) {
  border-color: var(--border-standard);
}

.pill:hover:not(.is-active) .pill__label {
  color: var(--text-primary);
}


/* 6. =====================================================
      Sections d'étape + animation reveal
      ===================================================== */
.step {
  min-height: 80vh;
  display: flex;
  align-items: center;
  padding: clamp(64px, 10vh, 120px) clamp(20px, 4vw, 48px);
  border-top: 1px solid var(--border-soft);
}

.step__inner {
  max-width: 880px;
  margin: 0 auto;
  width: 100%;

  /* État initial pour l'animation reveal au scroll */
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity var(--transition-slow),
    transform var(--transition-slow);
}

.step__inner.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

.step__index {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin-bottom: 16px;
}

.step__title {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin: 0 0 20px;
}

.step__lead {
  font-size: clamp(16px, 1.6vw, 19px);
  color: var(--text-secondary);
  max-width: 60ch;
  margin: 0 0 40px;
}

.step__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  padding: 40px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-standard);
  background-color: var(--bg-card);
  color: var(--text-secondary);
  font-size: 14px;
  font-style: italic;
  box-shadow: var(--shadow-standard);
}


/* 7. =====================================================
      Footer — fond page, séparé du contenu par border-top
      ===================================================== */
.footer {
  background-color: var(--bg-page);
  padding: 28px clamp(20px, 4vw, 48px);
  border-top: 1px solid var(--border-standard);
}

.footer__inner {
  max-width: var(--max-content);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
  color: var(--text-secondary);
}


/* 8. =====================================================
      Responsive : < 768px
      - Fresque XL → grille verticale (2 colonnes ou 1)
      - Mini-fresque sticky → scroll horizontal avec scroll-snap
      - Footer → empilement vertical
      ===================================================== */
@media (max-width: 768px) {
  .hero {
    padding: 20px 16px 60px;
  }

  /* Fresque XL passe en grille verticale */
  .fresco__list {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 16px 8px;
  }

  /* Plus de ligne horizontale en vertical : on cache le séparateur */
  .fresco__list::before {
    display: none;
  }

  .fresco__node {
    flex-direction: row;
    text-align: left;
    align-items: center;
    gap: 16px;
    padding: 12px 8px;
  }

  .fresco__num {
    order: 1;
    min-width: 18px;
  }

  .fresco__circle {
    order: 2;
    width: 64px;
    height: 64px;
    flex-shrink: 0;
  }

  .fresco__circle .ti {
    font-size: 32px;
  }

  .fresco__title {
    order: 3;
    margin-top: 0;
  }

  .fresco__desc {
    order: 4;
    max-width: none;
  }

  /* Réorganise en 2 lignes : num+circle / titre+desc */
  .fresco__node {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 16px;
    row-gap: 2px;
  }

  .fresco__num { grid-column: 1; grid-row: 1 / span 2; align-self: center; }
  .fresco__circle { grid-column: 1; grid-row: 1 / span 2; align-self: center; margin-left: 24px; }
  .fresco__title { grid-column: 2; grid-row: 1; align-self: end; }
  .fresco__desc { grid-column: 2; grid-row: 2; align-self: start; }

  /* Mini-fresque sticky : scroll horizontal avec scroll-snap */
  .sticky-header__inner {
    gap: 12px;
    padding: 10px 12px;
  }

  .mini-fresco {
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    flex: 1;
  }

  .mini-fresco::-webkit-scrollbar {
    display: none;
  }

  .mini-fresco__list {
    gap: 8px;
    padding-right: 8px;
  }

  .mini-fresco__list > li {
    scroll-snap-align: start;
  }

  .pill {
    flex-shrink: 0;
  }

  .footer__inner {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }
}


/* Très petits écrans (< 360px) : on tasse encore un peu */
@media (max-width: 360px) {
  .brand__name {
    display: none;
  }

  .step__title {
    font-size: 28px;
  }
}


/* Préférence "réduire les animations" : on coupe les transitions */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    scroll-behavior: auto;
  }

  .step__inner {
    opacity: 1;
    transform: none;
  }
}


