/* =============================================================================
   GrowLED Academy — refonte homepage + gamification + paywall aperçu
   (2026-08-07b).

   Retour commanditaire du jour : "pas ultra fan de la homepage, ça fait pas
   propre, pas de gamification, on doit voir l'étape 1 et être logué pour
   les autres". Ce fichier répond aux trois points sur /academy, et habille
   le nouveau bloc "aperçu tronqué" de /academy/etape (step.php coupe déjà le
   HTML côté serveur ; ici, uniquement la mise en scène visuelle du point de
   coupe).

   Charge en DERNIER (après academy-front-20260805e.css et
   academy-front-20260807.css, cf. les 3 contrôleurs) : aucun des deux
   fichiers précédents n'est modifié, celui-ci les surcharge à spécificité
   égale grâce à l'ordre de cascade. En particulier, la frise verticale à
   pointillés introduite par academy-front-20260807.css (section
   ".ga-steps" de ce fichier) est neutralisée ici et remplacée par une
   grille de cartes disciplinée : moins d'éléments décoratifs concurrents,
   une hiérarchie par carte (numéro → titre → description → statut).
   Mobile-first, mêmes tokens --ga-* que les fichiers précédents.
   ============================================================================= */

/* -----------------------------------------------------------------------
   Utilitaire accessibilité : texte réservé aux lecteurs d'écran (labels de
   badges), même pattern que le reste du web.
   ----------------------------------------------------------------------- */
.gwps-academy .ga-sr-only,
.gwps-academy-step .ga-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ═════════════════════════════ LANDING /academy ══════════════════════════ */

/* --- Tableau de bord de progression (visiteur connecté) ------------------- */

.gwps-academy .ga-dashboard {
  background: #fff;
  border: 1px solid rgba(43, 17, 66, .08);
  border-radius: 20px;
  box-shadow: var(--ga-shadow);
  padding: 24px 22px;
  margin: 0 0 28px;
}

.gwps-academy .ga-dashboard-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.gwps-academy .ga-dashboard-progress {
  flex: 1 1 240px;
  min-width: 0;
}

/* Barre segmentée : 10 blocs, un par étape — la progression X/10 se lit
   d'un coup d'œil, sans dépendre d'un anneau SVG. */
.gwps-academy .ga-track {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 4px;
  width: 100%;
  max-width: 360px;
}

.gwps-academy .ga-track-seg {
  height: 10px;
  border-radius: 999px;
  background: #ece6f4;
}

.gwps-academy .ga-track-read {
  background: var(--ga-amber);
}

.gwps-academy .ga-track-done {
  background: var(--ga-green);
}

.gwps-academy .ga-dashboard-count {
  margin: 10px 0 0;
  font-size: 14px;
  color: var(--ga-muted);
}

.gwps-academy .ga-dashboard-count strong {
  color: var(--ga-violet);
  font-size: 16px;
}

.gwps-academy .ga-dashboard-xp {
  margin: 0;
  text-align: right;
  font-size: 30px;
  font-weight: 800;
  color: var(--ga-violet);
  white-space: nowrap;
  line-height: 1.1;
}

.gwps-academy .ga-dashboard-xp span {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ga-muted);
  margin-top: 2px;
}

/* Badges : puces compactes, 10 étapes + 2 paliers, gagnés en couleur,
   non gagnés en silhouette grise (l'objectif à atteindre reste visible). */
.gwps-academy .ga-badges-strip {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 20px;
  padding: 0;
}

.gwps-academy .ga-badge-chip {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  background: #efecf3;
  color: #b3aabf;
  border: 1px solid rgba(43, 17, 66, .06);
  flex-shrink: 0;
}

.gwps-academy .ga-badge-chip.is-earned {
  background: linear-gradient(155deg, var(--ga-green), var(--ga-green-dark));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 3px 8px -3px rgba(76, 154, 42, .5);
}

.gwps-academy .ga-badge-milestone {
  width: 38px;
  height: 38px;
  border-radius: 12px;
}

.gwps-academy .ga-badge-milestone::before {
  content: "";
  width: 18px;
  height: 18px;
  background-color: currentColor;
}

.gwps-academy .ga-badge-halfway::before {
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'><path d='M12 3l2.6 5.6 6.1.6-4.6 4.1 1.3 6-5.4-3.1-5.4 3.1 1.3-6-4.6-4.1 6.1-.6z'/></svg>") center/contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'><path d='M12 3l2.6 5.6 6.1.6-4.6 4.1 1.3 6-5.4-3.1-5.4 3.1 1.3-6-4.6-4.1 6.1-.6z'/></svg>") center/contain no-repeat;
}

.gwps-academy .ga-badge-full::before {
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'><path d='M7 4h10v4a5 5 0 0 1-10 0V4z'/><path d='M7 5H4a3 3 0 0 0 3 5M17 5h3a3 3 0 0 1-3 5'/><path d='M12 14v3M9 20h6M9 20c0-1.7 1.3-3 3-3s3 1.3 3 3'/></svg>") center/contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'><path d='M7 4h10v4a5 5 0 0 1-10 0V4z'/><path d='M7 5H4a3 3 0 0 0 3 5M17 5h3a3 3 0 0 1-3 5'/><path d='M12 14v3M9 20h6M9 20c0-1.7 1.3-3 3-3s3 1.3 3 3'/></svg>") center/contain no-repeat;
}

.gwps-academy .ga-badge-milestone.is-earned {
  background: linear-gradient(155deg, var(--ga-amber), #c97f00);
  color: #fff;
  box-shadow: 0 3px 8px -3px rgba(201, 127, 0, .5);
}

.gwps-academy .ga-dashboard-cta {
  margin-top: 2px;
}

.gwps-academy .ga-dashboard-done {
  background: #f2f9ea;
  border: 1px solid rgba(122, 193, 67, .4);
  border-left: 4px solid var(--ga-green);
  border-radius: 12px;
  color: var(--ga-green-dark);
  font-weight: 700;
  padding: 14px 18px;
  margin: 0;
}

/* --- Bandeau de déblocage (visiteur non connecté) -------------------------
   Le déblocage EST la mécanique de jeu montrée ici : ce que le compte
   débloque, pas seulement "connecte-toi". Une seule action principale. */

.gwps-academy .ga-unlock {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: linear-gradient(135deg, #f4eefb, #fdf7ea);
  border: 1px solid rgba(43, 17, 66, .10);
  border-radius: 20px;
  padding: 26px 24px;
  margin: 0 0 28px;
}

.gwps-academy .ga-unlock-copy {
  flex: 1 1 340px;
  min-width: 0;
}

.gwps-academy .ga-unlock-copy h2 {
  margin: 0 0 6px;
  color: var(--ga-violet);
  font-size: 21px;
  font-weight: 800;
  line-height: 1.3;
}

.gwps-academy .ga-unlock-copy p {
  margin: 0;
  color: var(--ga-muted);
  font-size: 15px;
  line-height: 1.5;
  max-width: 48ch;
}

.gwps-academy .ga-unlock-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  flex-shrink: 0;
}

.gwps-academy .ga-unlock-login {
  color: var(--ga-violet);
  font-weight: 600;
  font-size: 14.5px;
  text-decoration: underline;
}

#center_column .gwps-academy .ga-unlock-login {
  color: var(--ga-violet) !important;
}

/* --- Cartes d'étapes : grille disciplinée, la frise à pointillés est
   neutralisée (une seule mise en page pour toutes les étapes). ----------- */

.gwps-academy .ga-steps {
  position: static;
  display: grid;
  grid-template-columns: 1fr;
  flex-direction: unset;
  gap: 16px;
  padding-left: 0;
}

.gwps-academy .ga-steps::before {
  content: none;
}

.gwps-academy .ga-step {
  position: static;
}

.gwps-academy .ga-step a {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 16px;
  row-gap: 5px;
  align-items: start;
  flex-direction: unset;
  background: #fff;
  border: 1px solid rgba(43, 17, 66, .08);
  border-left: 4px solid rgba(43, 17, 66, .15);
  border-radius: 16px;
  padding: 20px 22px;
  text-align: left;
  text-decoration: none;
  box-shadow: var(--ga-shadow);
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
  position: relative;
}

.gwps-academy .ga-step a:hover,
.gwps-academy .ga-step a:focus {
  box-shadow: var(--ga-shadow-hover);
  transform: translateY(-2px);
}

.gwps-academy .ga-step-num {
  grid-row: 1;
  position: static;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ga-violet);
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.gwps-academy .ga-state-read .ga-step-num {
  background: var(--ga-amber);
}

.gwps-academy .ga-state-done .ga-step-num {
  background: var(--ga-green);
}

.gwps-academy .ga-state-preview .ga-step-num {
  background: var(--ga-bg-light);
  color: var(--ga-muted);
  border: 2px solid rgba(43, 17, 66, .12);
}

.gwps-academy .ga-step-title {
  grid-row: 1;
  padding-right: 0;
}

.gwps-academy .ga-step-intro {
  grid-column: 2;
}

.gwps-academy .ga-step-meta {
  grid-column: 2;
  margin-top: 2px;
}

.gwps-academy .ga-step-tag {
  grid-column: 2;
  display: inline-block;
  width: fit-content;
  margin-top: 6px;
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: var(--ga-violet);
  color: #fff;
}

.gwps-academy .ga-step-tag-free {
  background: var(--ga-green);
}

#center_column .gwps-academy .ga-step-tag {
  color: #fff !important;
}

/* Cadenas d'aperçu : "aperçu seulement", jamais un mur — la carte reste
   cliquable (elle mène à l'aperçu tronqué serveur de la page étape). */
.gwps-academy .ga-step-lock {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 20px;
  height: 20px;
  background-color: var(--ga-muted);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='5' y='11' width='14' height='9' rx='2'/><path d='M8 11V7a4 4 0 0 1 8 0v4'/></svg>") center/contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='5' y='11' width='14' height='9' rx='2'/><path d='M8 11V7a4 4 0 0 1 8 0v4'/></svg>") center/contain no-repeat;
}

.gwps-academy .ga-state-preview a {
  border-style: dashed;
  border-left-style: solid;
  border-left-color: rgba(43, 17, 66, .18);
  background: #fbfafd;
}

.gwps-academy .ga-step-current a {
  border-color: var(--ga-violet);
  border-left-color: var(--ga-violet);
  box-shadow: 0 0 0 3px rgba(59, 17, 85, .12), var(--ga-shadow-hover);
}

.gwps-academy .ga-step-free a {
  border-color: var(--ga-green);
  border-left-color: var(--ga-green);
  box-shadow: 0 0 0 3px rgba(122, 193, 67, .16), var(--ga-shadow);
}

@media (min-width: 768px) {
  .gwps-academy .ga-steps {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }

  .gwps-academy .ga-dashboard {
    padding: 28px 30px;
  }
}

/* ═══════════════════════════ PAGE ÉTAPE /etape ═══════════════════════════ */

/* --- Aperçu tronqué (visiteur non connecté, étapes 2 à 10) ---------------
   Le corps est déjà coupé côté serveur (step.php / ContentTeaser) : ce
   fondu n'est qu'un habillage visuel des derniers paragraphes réellement
   présents dans le HTML, pas un voile CSS sur du contenu masqué. */

.gwps-academy-step .ga-teaser-fade {
  height: 150px;
  margin-top: -150px;
  position: relative;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .82) 55%, #fff 100%);
  pointer-events: none;
}

.gwps-academy-step .ga-teaser-cta {
  position: relative;
  overflow: hidden;
  text-align: center;
  background: linear-gradient(160deg, var(--ga-night) 0%, var(--ga-night-2) 100%);
  color: #f1e7fb;
  border-radius: 20px;
  padding: 34px 24px;
  margin: 0 0 32px;
  box-shadow: var(--ga-shadow);
}

.gwps-academy-step .ga-teaser-cta::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(420px 260px at 50% -20%, color-mix(in srgb, var(--ga-glow-violet) 38%, transparent), transparent 74%);
  pointer-events: none;
}

.gwps-academy-step .ga-teaser-cta > * {
  position: relative;
}

.gwps-academy-step .ga-teaser-cta::before {
  content: "";
  display: block;
  width: 46px;
  height: 46px;
  margin: 0 auto 16px;
  border-radius: 13px;
  background-color: var(--ga-glow-amber);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'><rect x='4' y='11' width='16' height='10' rx='2'/><path d='M8 11V7a4 4 0 0 1 8 0v4'/></svg>") center/50% no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'><rect x='4' y='11' width='16' height='10' rx='2'/><path d='M8 11V7a4 4 0 0 1 8 0v4'/></svg>") center/50% no-repeat;
  position: relative;
  z-index: 1;
}

.gwps-academy-step .ga-teaser-cta h2 {
  margin: 0 0 10px;
  color: #fff;
  font-size: 23px;
  font-weight: 800;
  line-height: 1.3;
}

.gwps-academy-step .ga-teaser-cta p {
  margin: 0 auto 22px;
  max-width: 46ch;
  color: #e6d9f7;
  font-size: 16px;
  line-height: 1.55;
}

.gwps-academy-step .ga-teaser-cta .ga-btn {
  font-size: 17px;
  padding: 14px 30px;
}

#center_column .gwps-academy-step .ga-teaser-cta .ga-btn {
  color: #fff !important;
}

.gwps-academy-step .ga-teaser-login {
  margin: 16px 0 0;
  font-size: 14.5px;
}

.gwps-academy-step .ga-teaser-login a {
  color: #e6d9f7;
  text-decoration: underline;
  font-weight: 600;
}

#center_column .gwps-academy-step .ga-teaser-login a {
  color: #e6d9f7 !important;
}

@media (prefers-reduced-motion: reduce) {
  .gwps-academy .ga-step a {
    transition: none;
  }
}
