/**
 * Loecsen - Guide Officiel de la Méthode d'Apprentissage
 * Stylesheet Classique CSS3 (Vanilla Pure - Zero Framework)
 */

:root {
  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Outfit', 'Plus Jakarta Sans', system-ui, sans-serif;

  --bg-main: #FAF7F2;
  --bg-gradient-top: #FAF7F2;
  --bg-gradient-mid: #F5F1EB;
  --bg-gradient-bot: #FAF8F5;

  --card-bg: #FFFDF9;
  --card-border: #E7DCCE;
  --card-border-subtle: #F0E8DC;
  
  --text-main: #2C3E50;
  --text-heading: #1E293B;
  --text-muted: #665848;
  --text-light: #7A6A58;

  --emerald: #2FA88E;
  --emerald-dark: #1F8772;
  --emerald-light: #E5F5F0;
  --emerald-border: #C6EBE1;

  --blue: #2563EB;
  --blue-dark: #1D4ED8;
  --blue-light: #EFF6FF;
  --blue-border: #BFDBFE;

  --amber: #D97706;
  --amber-dark: #B45309;
  --amber-light: #FEF3C7;
  --amber-border: #FDE68A;

  --coral: #E75B42;
  --red: #DC2626;
  --red-light: #FFF5F5;
  --red-border: #FCDADA;

  --pink: #D73876;
  --pink-light: #FDF2F8;
  --pink-border: #FCE7F3;

  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-card: 0 4px 25px -5px rgba(215, 190, 160, 0.18);
  --shadow-dock: 0 -4px 20px rgba(0, 0, 0, 0.06);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-2xl: 28px;
}

/* ========================================================= */
/* ANIMATIONS SYSTEM (100% ISO REACT)                        */
/* ========================================================= */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn 0.3s ease-out forwards;
}

@keyframes gentlePulse {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.15); opacity: 0.4; }
}

.animate-gentle-pulse {
  animation: gentlePulse 2.2s infinite ease-in-out;
}

@keyframes waveDash {
  to { stroke-dashoffset: -20; }
}

.animate-dash-flow {
  animation: waveDash 1.4s linear infinite;
}

@keyframes ping {
  75%, 100% { transform: scale(2); opacity: 0; }
}

.animate-ping {
  animation: ping 1.2s cubic-bezier(0, 0, 0.2, 1) infinite;
  transform-origin: center;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

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

#guide-method ::selection {
  background: rgba(47, 168, 142, 0.2);
}

#guide-method {
  display: block;
  width: 100%;
  margin: 0;
  font-family: var(--font-body);
  background: linear-gradient(180deg, var(--bg-gradient-top) 0%, var(--bg-gradient-mid) 50%, var(--bg-gradient-bot) 100%);
  color: var(--text-main);
  line-height: 1.5;
  padding-bottom: 112px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#guide-method, #guide-method * {
  font-family: var(--font-body);
}

#guide-method h1, #guide-method h2, #guide-method h3, #guide-method h4, #guide-method .font-display {
  font-family: var(--font-display);
}

#guide-method img, #guide-method svg {
  display: block;
  max-width: 100%;
}

#guide-method svg.gm-lucide {
  display: inline-block;
  width: auto;
  height: auto;
  max-width: none;
  flex: 0 0 auto;
  vertical-align: middle;
}

#guide-method .gm-acc-label,
#guide-method .gm-icon-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

#guide-method .subcard-footer.gm-icon-row,
#guide-method .info-pill.gm-icon-row {
  display: inline-flex;
  gap: 6px;
}

#guide-method .subcard-footer.gm-icon-row {
  display: flex;
}

#guide-method .diamond-tag {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0284C7;
}

#guide-method .gm-icon-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 12px;
}

#guide-method strong {
  font-weight: 800;
}

#guide-method button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

/* ========================================================= */
/* HEADER FIXE ÉPURÉ (LOECSEN OFFICIAL)                      */
/* ========================================================= */
.loecsen-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(250, 247, 242, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid #E8DCCF;
}

.header-container {
  max-width: 1152px; /* max-w-6xl */
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

@media (min-width: 640px) {
  .header-container {
    padding: 10px 24px;
  }
}

#guide-method .gm-brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

#guide-method .gm-back {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  margin: 0;
  padding: 0;
  border-radius: 12px;
  background: #fff;
  text-decoration: none;
  box-shadow: rgba(0, 0, 0, 0.08) 0 0 0 1px;
}
#guide-method .gm-back .icon-back {
  width: 22px;
  height: 22px;
  max-width: none;
  fill: #29a9a4;
}
#guide-method .gm-back:hover .icon-back,
#guide-method .gm-back:focus-visible .icon-back {
  fill: #ff7eaf;
}
#guide-method .gm-back .infos {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 6px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  color: #444;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.25);
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 6;
}
#guide-method .gm-back:hover .infos,
#guide-method .gm-back:focus-visible .infos {
  opacity: 1;
  visibility: visible;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.2s;
}

.brand-wrapper:hover {
  opacity: 0.8;
}

.brand-logo-img {
  height: 20px;
  width: auto;
  object-fit: contain;
}

@media (min-width: 640px) {
  .brand-logo-img {
    height: 24px;
  }
}

.brand-title-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  color: var(--text-heading);
  letter-spacing: -0.025em;
}

@media (min-width: 640px) {
  .brand-title-text {
    font-size: 16px;
  }
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #786959;
}

.step-indicator-tag {
  font-weight: 700;
  color: var(--text-heading);
}

.slide-name-badge {
  font-weight: 600;
  color: var(--emerald);
  display: none;
}

@media (min-width: 768px) {
  .slide-name-badge {
    display: inline-block;
  }
}

.header-progress-track {
  width: 100%;
  height: 4px;
  background: #E8DDD0;
}

.header-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--emerald) 0%, #6D28D9 100%);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================================= */
/* CONTENEUR PRINCIPAL DU GUIDE                              */
/* ========================================================= */
main.deck-container {
  max-width: 1152px; /* max-w-6xl */
  width: 100%;
  margin: 0 auto;
  padding: 16px 12px;
  flex: 1;
}

@media (min-width: 640px) {
  main.deck-container {
    padding: 24px 24px;
  }
}

.slide-pane {
  display: none;
}

.slide-pane.active {
  display: block;
  animation: slideFadeIn 0.35s ease-out forwards;
}

@keyframes slideFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================================================= */
/* CARTES ÉLÉGANTES ET SECTIONS                              */
/* ========================================================= */
.card-box {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  padding: 24px 28px;
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
}

@media (max-width: 640px) {
  .card-box {
    padding: 18px 16px;
    border-radius: var(--radius-lg);
  }
}

.card-header {
  border-bottom: 1px solid var(--card-border-subtle);
  padding-bottom: 14px;
  margin-bottom: 20px;
}

.pill-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.pill-emerald { background: var(--emerald-light); color: var(--emerald-dark); border: 1px solid var(--emerald-border); }
.pill-blue    { background: var(--blue-light);    color: var(--blue-dark);    border: 1px solid var(--blue-border); }
.pill-amber   { background: var(--amber-light);   color: var(--amber-dark);   border: 1px solid var(--amber-border); }
.pill-pink    { background: var(--pink-light);    color: var(--pink);         border: 1px solid var(--pink-border); }

.card-title {
  font-size: 24px;
  font-weight: 900;
  color: var(--text-heading);
  letter-spacing: -0.5px;
  margin-top: 6px;
}

@media (max-width: 640px) {
  .card-title {
    font-size: 20px;
  }
}

.card-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.55;
}

/* ========================================================= */
/* GRILLES & SOUS-CARTES MODULAIRES                          */
/* ========================================================= */
.grid-cols-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 768px) {
  .grid-cols-2 {
    grid-template-columns: 1fr 1fr;
  }
}

.grid-cols-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 768px) {
  .grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.grid-cols-4 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

@media (min-width: 768px) {
  .grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

.subcard {
  background: #FFFFFF;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.subcard:hover {
  border-color: #D3C5B2;
  box-shadow: var(--shadow-sm);
}

.subcard-error {
  background: var(--red-light);
  border-color: var(--red-border);
}

.subcard-success {
  background: #F0FAF7;
  border-color: var(--emerald-border);
}

.subcard-footer {
  padding-top: 10px;
  border-top: 1px solid #F1ECE3;
  font-size: 11px;
  font-weight: 700;
}

/* ========================================================= */
/* ACCORDÉONS « EN SAVOIR PLUS »                            */
/* ========================================================= */
.accordion-wrapper {
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.7);
  overflow: hidden;
  margin-top: 20px;
  box-shadow: var(--shadow-xs);
}

.accordion-trigger {
  width: 100%;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  background: transparent;
  transition: background 0.2s;
  text-align: start;
}

.accordion-trigger:hover {
  background: #FFFFFF;
}

.accordion-arrow {
  transition: transform 0.2s ease-in-out;
  font-size: 10px;
  color: var(--text-light);
}

.accordion-trigger[aria-expanded="true"] .accordion-arrow {
  transform: rotate(180deg);
}

.accordion-panel {
  display: none;
  padding: 16px 20px;
  background: #FAF7F2;
  border-top: 1px solid #EFE5D9;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
}

.accordion-panel.open {
  display: block;
}

/* ========================================================= */
/* SLIDE 1 : HERO OFFICIEL (LOECSEN HERO HEADER)             */
/* ========================================================= */
.hero-header-section {
  position: relative;
  width: 100%;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 20px 60px -15px rgba(11, 65, 216, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
  background: linear-gradient(135deg, #0934b0 0%, #3525b8 32%, #6826d1 68%, #ca7fe5 100%);
}

.hero-radial-1 {
  pointer-events: none;
  position: absolute;
  top: -96px;
  right: -96px;
  width: 384px;
  height: 384px;
  border-radius: 9999px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0.05) 50%, transparent 100%);
  filter: blur(40px);
}

.hero-radial-2 {
  pointer-events: none;
  position: absolute;
  bottom: -128px;
  left: -80px;
  width: 320px;
  height: 320px;
  border-radius: 9999px;
  background: radial-gradient(circle, rgba(202, 127, 229, 0.3) 0%, transparent 100%);
  filter: blur(50px);
}

.hero-content-wrap {
  position: relative;
  z-index: 10;
  padding: 32px 24px;
}

@media (min-width: 640px) {
  .hero-content-wrap { padding: 48px 36px; }
}
@media (min-width: 1024px) {
  .hero-content-wrap { padding: 56px 48px; }
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: center;
}

@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: 7fr 5fr;
    gap: 40px;
  }
}

.hero-left {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero-pill-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #FFFFFF;
}

.hero-main-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.18;
  color: #FFFFFF;
}

@media (min-width: 640px) {
  .hero-main-title { font-size: 38px; }
}
@media (min-width: 1024px) {
  .hero-main-title { font-size: 46px; }
}

.hero-gradient-text {
  font-style: italic;
  font-family: Georgia, Cambria, "Times New Roman", Times, serif;
  font-weight: 400;
  letter-spacing: 0;
  background: linear-gradient(90deg, #FFE57F 0%, #FFCA66 50%, #FFA7E6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  /* L'italique déborde à droite. background-clip coupe le dernier glyphe
     de chaque ligne (r de Super, e de Mémoire). */
  padding-inline-end: 0.22em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.hero-desc-text {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.6;
  max-width: 580px;
}

@media (min-width: 640px) {
  .hero-desc-text { font-size: 17px; }
}

#guide-method .hero-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 9999px;
  color: #FFFFFF;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  background: linear-gradient(135deg, #7c3aed 0%, #9333ea 50%, #c026d3 100%);
  box-shadow: 0 8px 25px rgba(147, 51, 234, 0.45);
  align-self: flex-start;
}

#guide-method .hero-cta-btn:hover {
  transform: scale(1.03);
  box-shadow: 0 12px 32px rgba(147, 51, 234, 0.6);
}

.hero-cta-icon-circle {
  width: 24px;
  height: 24px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-card-frame-wrap {
  position: relative;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
}

.hero-card-glow-aura {
  position: absolute;
  inset: 0;
  border-radius: 24px;
  background: linear-gradient(to top right, #2563eb, #d946ef);
  filter: blur(20px);
  opacity: 0.6;
  transform: scale(0.95);
  pointer-events: none;
}

.hero-card-frame-outer {
  position: relative;
  border-radius: 24px;
  border: 4px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 10px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

.hero-card-frame-inner {
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  background: #FAF7F2;
}

#guide-method .hero-img {
  width: 100%;
  height: auto;
  aspect-ratio: 1200 / 630;
  object-fit: contain;
}

/* ========================================================= */
/* SLIDE 10 : LOECSEN INFINITE LOGO (DERNIÈRE SLIDE FORTE)    */
/* ========================================================= */
.infinite-logo-container {
  position: relative;
  width: 100%;
  max-width: 1024px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  user-select: none;
}

.infinite-logo-frame {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(232, 220, 207, 0.6);
  background: #FAF7F2;
  box-shadow: var(--shadow-sm);
}

.infinite-slogan-wrap {
  position: absolute;
  top: 14px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  text-align: center;
  padding: 0 16px;
  z-index: 10;
  pointer-events: none;
}

@media (min-width: 640px) {
  .infinite-slogan-wrap { top: 24px; }
}

.infinite-slogan-text {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: #1E293B;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.85);
}

@media (min-width: 640px) {
  .infinite-slogan-text { font-size: 18px; }
}
@media (min-width: 1024px) {
  .infinite-slogan-text { font-size: 21px; }
}

.infinite-btn-wrap {
  position: absolute;
  bottom: 14px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  text-align: center;
  padding: 0 16px;
  z-index: 10;
}

@media (min-width: 640px) {
  .infinite-btn-wrap { bottom: 28px; }
}

/* Bouton officiel Loecsen (reprise exacte de https://www.loecsen.com/guide) */
.home-btn1 {
  cursor: pointer;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  border-radius: 30px;
  background: linear-gradient(135deg, #6a5cff 0%, #5c7bff 35%, #37d0ff 100%);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  box-shadow: hsl(222deg 47% 11% / 22%) 8px 4px 19px 4px;
  overflow: hidden;
  transition: transform .3s ease, box-shadow .3s ease;
}

.home-btn1::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0));
  transition: left .5s ease;
}

.home-btn1:hover {
  transform: scale(1.05);
  box-shadow: 0 5px 14px 0 #a058f2;
  text-decoration: none;
}

.home-btn1:hover::before {
  left: 100%;
}

@media (max-width: 640px) {
  .home-btn1 {
    padding: 12px 16px;
    font-size: 13.5px;
  }
}


/* ========================================================= */
/* SLIDE 3 : FRISE CHRONOLOGIQUE DES INTERVALLES             */
/* ========================================================= */
.frise-box {
  background: #FFFDF9;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-md);
  margin-bottom: 20px;
}

.frise-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  border-bottom: 1px solid var(--card-border-subtle);
  padding-bottom: 14px;
  margin-bottom: 18px;
}

#guide-method .frise-header > div:first-child {
  flex: 1 1 220px;
  min-width: 0;
}

.frise-scroll-area {
  overflow-x: auto;
  padding: 8px 0 16px 0;
}

.frise-track-inner {
  min-width: 640px;
  position: relative;
}

/* Ligne 1 : Intervalles au-dessus des badges */
.frise-tags-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 0 8px;
}

.frise-tag-col {
  flex: 1;
  display: flex;
  justify-content: center;
  text-align: center;
  cursor: pointer;
}

.frise-interval-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 9999px;
  background: #FFFFFF;
  border: 1px solid #E5DACD;
  color: #7C6E5E;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.frise-tag-col:hover .frise-interval-btn:not(.active) {
  background: #FAF6EF;
}

.frise-interval-btn.active {
  background: #2FA88E;
  color: #FFFFFF;
  border-color: #2FA88E;
  box-shadow: 0 0 0 2px rgba(47, 168, 142, 0.2);
  transform: scale(1.05);
}

/* Ligne 2 : Rail continu centré et badges squircles */
.frise-rail-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
}

.rail-bg {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: 40px;
  right: 40px;
  height: 8px;
  background: #E8DDD0;
  border-radius: 9999px;
  z-index: 0;
}

.rail-fill {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: 40px;
  height: 8px;
  background: linear-gradient(90deg, #2FA88E 0%, #2FA88E 60%, #D73876 100%);
  border-radius: 9999px;
  z-index: 0;
  transition: width 0.4s ease-out;
}

.frise-badge-col {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  cursor: pointer;
}

.badge-wrapper {
  position: relative;
}

/* Badge diamant sur les tests officiels */
.diamond-tag {
  position: absolute;
  top: -6px;
  left: -6px;
  z-index: 20;
  font-size: 11px;
  line-height: 1;
  background: #FFFFFF;
  border-radius: 9999px;
  padding: 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  border: 1px solid #BAE6FD;
  pointer-events: none;
}

/* Témoin lumineux clignotant sur J+3 */
.ping-indicator {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 16px;
  height: 16px;
  border-radius: 9999px;
  background: rgba(231, 91, 66, 0.35);
  animation: ping 1.2s cubic-bezier(0, 0, 0.2, 1) infinite;
  pointer-events: none;
}

/* Badges squircles */
.stage-node-btn {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  border: 2px solid #CDEAE3;
  background: #F0FAF7;
  color: #289A83;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 17px;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

@media (min-width: 640px) {
  .stage-node-btn {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    font-size: 18px;
  }
}

.frise-badge-col:hover .stage-node-btn {
  transform: scale(1.05);
}

/* Étape terminée (complétée) */
.stage-node-btn.completed {
  background: linear-gradient(135deg, #2FA88E 0%, #289A83 100%);
  color: #FFFFFF;
  border-color: #FFFFFF;
  box-shadow: 0 2px 6px rgba(47, 168, 142, 0.3);
}

/* Étape active sélectionnée */
.stage-node-btn.active {
  background: linear-gradient(135deg, #2FA88E 0%, #25917B 100%);
  color: #FFFFFF;
  border-color: #FFFFFF;
  box-shadow: 0 0 0 4px rgba(47, 168, 142, 0.25), 0 6px 20px rgba(47, 168, 142, 0.35);
  transform: scale(1.1);
}

/* Étape finale (J+60) */
.stage-node-btn.final-stage {
  background: #FDF2F7;
  color: #A6456E;
  border-color: #F2D7E3;
}

.stage-node-btn.final-stage.completed,
.stage-node-btn.final-stage.active {
  background: linear-gradient(135deg, #D73876 0%, #E54884 100%) !important;
  color: #FFFFFF !important;
  border-color: #FFFFFF !important;
  box-shadow: 0 0 0 4px rgba(215, 56, 118, 0.25), 0 6px 20px rgba(215, 56, 118, 0.35) !important;
  transform: scale(1.1);
}

/* Ligne 3 : Labels inférieurs */
.frise-labels-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-top: 12px;
  padding: 0 8px;
}

.frise-label-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  padding: 0 4px;
}

.frise-label-card {
  width: 100%;
  padding: 10px 6px;
  border-radius: 12px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.frise-label-col:hover .frise-label-card {
  background: #FAF6EF;
}

.frise-label-col.active .frise-label-card {
  background: #F8F3EA;
  border-color: #E3D9C9;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.frise-step-title {
  font-size: 13px;
  font-weight: 800;
  color: #475569;
  line-height: 1.3;
}

.frise-label-col.active .frise-step-title {
  color: #1E293B;
  font-weight: 900;
}

.frise-step-sub {
  font-size: 11px;
  font-weight: 600;
  color: #8C7E6E;
  margin-top: 3px;
}

/* Bandeaux d'information en ligne (flex-row continu) */
.info-row {
  background: #FAF5EC;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  margin-top: 14px;
}

.info-pill {
  padding: 2px 8px;
  border-radius: 6px;
  background: #FFFFFF;
  border: 1px solid #E0D5C3;
  font-weight: 800;
  color: var(--text-heading);
}

/* ========================================================= */
/* DOCK NAVIGATION FIXE EN BAS                               */
/* ========================================================= */
.dock-nav-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 40;
  background: rgba(250, 247, 242, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--card-border);
  padding: 10px 16px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
}

.dock-content {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s;
}

.nav-btn-prev {
  background: #FFFFFF;
  border-color: #DDD0BF;
  color: var(--text-main);
}

.nav-btn-prev:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.nav-btn-prev:not(:disabled):hover {
  background: #F4EFE6;
}

.nav-btn-next {
  background: var(--emerald);
  color: #FFFFFF;
  box-shadow: var(--shadow-sm);
}

.nav-btn-next:hover {
  background: #258B76;
}

/* ========================================================= */
/* DOCK NAVIGATION FIXE (LOECSEN OFFICIAL DOCK)              */
/* ========================================================= */
.dock-nav-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 30;
  background: rgba(250, 247, 242, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid #E8DCCF;
  padding: 8px 10px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
}

@media (min-width: 640px) {
  .dock-nav-bar {
    padding: 8px 24px;
  }
}

.dock-content {
  max-width: 896px; /* max-w-4xl */
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

@media (min-width: 640px) {
  .dock-content {
    gap: 16px;
  }
}

#guide-method .nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

@media (min-width: 640px) {
  #guide-method .nav-btn {
    padding: 8px 18px;
    font-size: 14px;
  }
}

#guide-method .nav-btn-prev {
  width: 40px;
  height: 40px;
  min-width: 40px;
  padding: 0;
  border-radius: 999px;
  justify-content: center;
  background: #FFFFFF;
  border: 1px solid #E5DACD;
  color: #5C5348;
}

#guide-method .nav-btn-prev:hover:not(:disabled) {
  background: #F7F1E8;
}

#guide-method .nav-btn-prev:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: #FFFFFF;
  color: #C4B8A8;
}

/* Le reset de la frise partage la classe du dock, mais c'est un libellé, pas un chevron. */
#guide-method #btnResetFrise {
  width: auto;
  height: auto;
  min-width: 0;
  padding: 8px 16px;
  border-radius: 999px;
  white-space: nowrap;
  flex: 0 0 auto;
  background: #FFFFFF;
  border: 1px solid #E5DACD;
  color: #5C5348;
  font-size: 13px;
  font-weight: 700;
}

#guide-method #btnResetFrise:hover {
  background: #F7F1E8;
}

#guide-method .nav-btn-next {
  height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  gap: 8px;
  background: #2FA88E;
  color: #FFFFFF;
  border: 1px solid transparent;
  box-shadow: 0 1px 3px rgba(47, 168, 142, 0.25);
}

#guide-method .nav-btn-next:hover {
  background: #238974;
}

#guide-method .nav-chevron {
  width: 18px;
  height: 18px;
  max-width: none;
  display: block;
  flex: 0 0 auto;
}

html[dir="rtl"] #guide-method .nav-chevron {
  transform: scaleX(-1);
}

.dots-container {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  max-width: 65vw;
  padding: 4px;
  scrollbar-width: none;
}

@media (min-width: 640px) {
  .dots-container {
    max-width: none;
    gap: 6px;
  }
}

#guide-method .dot-btn {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 1px solid #E5DACD;
  background: rgba(255, 255, 255, 0.85);
  color: #8C7E6E;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
  position: relative;
}

@media (min-width: 640px) {
  #guide-method .dot-btn {
    width: 28px;
    height: 28px;
  }
}

#guide-method .dot-btn:hover {
  background: #FFFFFF;
  color: #1E293B;
}

#guide-method .dot-btn.active {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: #1E293B;
  color: #FFFFFF;
  font-weight: 800;
  font-size: 12px;
  border: none;
  box-shadow: 0 2px 6px rgba(30, 41, 59, 0.25);
}

@media (min-width: 640px) {
  #guide-method .dot-btn.active {
    width: 32px;
    height: 32px;
    border-radius: 12px;
  }
}

#guide-method .dot-btn.past {
  background: rgba(47, 168, 142, 0.2);
  color: #2FA88E;
  border: none;
  font-weight: 700;
}

#guide-method .dot-btn.past:hover {
  background: rgba(47, 168, 142, 0.3);
}

.keyboard-shortcut-hint {
  text-align: center;
  font-size: 11px;
  color: #8C7E6E;
  margin-top: 4px;
}

@media (max-width: 640px) {
  .keyboard-shortcut-hint {
    display: none;
  }
}

/* ========================================================= */
/* MEMORY CURVE VISUALIZER & RANGE SLIDER                    */
/* ========================================================= */
.curve-canvas-box {
  position: relative;
  background: #FFFFFF;
  border: 1px solid #EFE5D8;
  border-radius: 16px;
  padding: 16px;
  overflow: hidden;
}

input[type="range"].curve-range-slider {
  width: 100%;
  accent-color: var(--emerald);
  cursor: pointer;
  height: 6px;
  border-radius: 999px;
  background: #E8DDD0;
  outline: none;
}

.takeaways-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 20px;
}

@media (min-width: 768px) {
  .takeaways-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.takeaway-card {
  background: #FAF6EE;
  border: 1px solid #EBE2D4;
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* ========================================================= */
/* NEURO EXPLAINER                                           */
/* ========================================================= */
.neuro-journey-card {
  background: #FFFDF9;
  border: 1px solid #EBE3D5;
  border-radius: 24px;
  padding: 20px 24px;
  box-shadow: 0 4px 25px -5px rgba(215, 190, 160, 0.2);
  margin-bottom: 20px;
}

.neuro-journey-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: center;
}

@media (min-width: 1024px) {
  .neuro-journey-grid {
    grid-template-columns: 7fr 5fr;
  }
}

.neuro-journey-frame {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #E8DFC8;
  box-shadow: var(--shadow-sm);
  aspect-ratio: 16 / 9;
}

@media (min-width: 640px) {
  .neuro-journey-frame {
    aspect-ratio: 4 / 3;
  }
}

.neuro-stages-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 768px) {
  .neuro-stages-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

.neuro-stage-box {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid #EAE1D3;
  background: rgba(250, 246, 239, 0.6);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s;
}

.neuro-stage-box:hover {
  background: #FAF6EF;
}

.neuro-stage-box.selected {
  background: #F9F4EB;
  border-color: var(--emerald);
  box-shadow: 0 0 0 2px rgba(47, 168, 142, 0.2);
}


#guide-method .gm-langs { position: relative; }
#guide-method .gm-langs summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-inline-end: 8px;
  cursor: pointer;
  list-style: none;
  background: #fff;
  border: 1px solid #E8DCCF;
  border-radius: 12px;
  padding: 6px 12px 6px 10px;
  font-size: 13px;
  font-weight: 700;
  color: #1E293B;
}
#guide-method .gm-lang-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  max-width: none;
  fill: currentColor;
}
#guide-method .gm-langs summary::-webkit-details-marker { display: none; }
#guide-method .gm-langs ul {
  position: absolute;
  inset-inline-end: 0;
  z-index: 6;
  margin: 6px 0 0;
  padding: 8px;
  width: min(280px, 80vw);
  max-height: 280px;
  overflow: auto;
  background: #fff;
  border: 1px solid #E8DCCF;
  border-radius: 12px;
  list-style: none;
}
#guide-method .gm-langs a {
  display: block;
  padding: 6px 8px;
  border-radius: 8px;
  color: #1E293B;
  text-decoration: none;
  font-size: 14px;
}
#guide-method .gm-langs a.is-active,
#guide-method .gm-langs a:hover { background: #E5F5F0; color: #1F8772; }

/* Chrome du site : cette page a son propre en-tête. */
body > header,
#header_nav_classic { display: none !important; }

/* Le CSS Ask est chargé sans bloquer le rendu : garder le bouton hors du flux. */
#ask-loecsen-root {
  position: fixed;
  right: 12px;
  bottom: 12px;
  z-index: 99990;
}

/* Iframe de mesure (0×0, mais en flux) : laisse une ligne blanche une fois le menu masqué. */
body > iframe {
  position: absolute !important;
  width: 0 !important;
  height: 0 !important;
  border: 0 !important;
}
#sheet.isolate { padding-top: 0 !important; }

html, body, .main, #sheet.isolate {
  background: #faf7f2 !important;
  background-image: none !important;
}

#guide-method {
  min-height: 100vh;
  padding-bottom: calc(112px + var(--gm-site-footer, 52px));
}

/* Le pied de page du site reste sous la barre de navigation du guide. */
.site-footer {
  display: block !important;
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  z-index: 45 !important;
  width: 100% !important;
  margin: 0 !important;
}

#guide-method .dock-nav-bar {
  bottom: var(--gm-site-footer, 52px);
  z-index: 46;
}
