/* ============================================================================
 * Guide pédagogique — moteur visuel partagé (SAFe, Scrum, Kanban…)
 * Classes .g-* rendues par tools/_guide.js. Style « liquid glass » sombre,
 * calqué sur les pages outils existantes (frameworks, solid…).
 * ========================================================================== */

/* text-align: left — le body du site est en justify, ce qui crée de gros
   écarts dans les titres/textes courts des cartes. Les éléments centrés
   (héros, titres de quiz, score) gardent leur propre text-align. */
.g-wrap { max-width: 1200px; margin: 0 auto; padding: 6.5rem 1.2rem 5rem; text-align: left; }

/* ---- Héros ---- */
.g-hero {
  text-align: center; padding: 3rem 1.5rem; border-radius: var(--radius-glass, 22px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    radial-gradient(ellipse 75% 120% at 50% -10%, rgba(55, 239, 186, 0.18), transparent 60%),
    linear-gradient(160deg, rgba(24, 29, 40, 0.94), rgba(11, 14, 20, 0.97));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35), 0 0 60px rgba(55, 239, 186, 0.10);
  margin-bottom: 2.5rem; color: #f4fbff;
}
.g-hero-icon {
  width: 64px; height: 64px; margin: 0 auto 1.1rem; display: flex; align-items: center; justify-content: center;
  border-radius: 16px; font-size: 1.8rem; color: #37EFBA;
  background: linear-gradient(140deg, rgba(55, 239, 186, 0.2), rgba(0, 212, 255, 0.12));
  border: 1px solid rgba(255, 255, 255, 0.18);
}
/* Titre en dégradé liquide animé, aligné sur les héros des fiches/parcours (.fiche-hero h1 b) */
.g-hero h1 {
  font-size: 2.1rem; margin-bottom: 0.6rem; font-weight: 800;
  background: linear-gradient(110deg, #37EFBA, #00d4ff 50%, #7b5cff 80%, #37EFBA);
  background-size: 250% auto;
  background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  animation: lgTitleFlow 8s linear infinite;
}
/* Si un titre contient un <b>, on garde le reste en blanc et seul le <b> est coloré (style fiche) */
.g-hero h1:has(b) { background: none; -webkit-text-fill-color: #f4fbff; animation: none; color: #f4fbff; }
.g-hero h1 b {
  font-weight: 800;
  background: linear-gradient(110deg, #37EFBA, #00d4ff 50%, #7b5cff 80%, #37EFBA);
  background-size: 250% auto;
  background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  animation: lgTitleFlow 8s linear infinite;
}
.g-hero p { opacity: 0.92; max-width: 660px; margin: 0 auto; line-height: 1.6; }

/* ---- Bloc « pitch » / analogie ---- */
.g-pitch {
  background: var(--glass-bg, rgba(20, 24, 33, 0.62)); border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.14));
  -webkit-backdrop-filter: blur(var(--glass-blur, 18px)); backdrop-filter: blur(var(--glass-blur, 18px));
  border-radius: var(--radius-glass, 22px); padding: 1.8rem 2rem; margin-bottom: 2.8rem; line-height: 1.75;
  font-size: 1.04rem;
}
.g-pitch strong { color: var(--accent-text, #37EFBA); }
.g-pitch .g-pitch-analogy {
  display: block; margin-top: 1rem; padding-left: 1rem; border-left: 3px solid var(--accent-text, #37EFBA);
  font-style: italic; opacity: 0.92;
}

/* ---- Sections ---- */
/* padding:0 force l'annulation de la règle globale « section { padding: 5rem 0 } »
   de styles.css, qui gonflait l'espace entre les sections du guide. */
.g-section { margin-bottom: 3rem; padding: 0; }
.g-section-head { margin-bottom: 1.3rem; }
.g-section-head h2 {
  display: flex; align-items: center; gap: 0.7rem; font-size: 1.5rem; margin: 0 0 0.4rem;
}
.g-section-head h2 .g-sec-icon {
  width: 42px; height: 42px; flex-shrink: 0; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; color: #25282f; background: linear-gradient(135deg, #37EFBA, #00d4aa);
}
.g-section-head p { opacity: 0.85; line-height: 1.6; margin: 0; max-width: 820px; }

/* ---- Grille de cartes (rôles, événements, artefacts…) ---- */
.g-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.2rem; }
.g-card {
  background: var(--glass-bg, rgba(20, 24, 33, 0.62)); border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.14));
  -webkit-backdrop-filter: blur(var(--glass-blur, 18px)); backdrop-filter: blur(var(--glass-blur, 18px));
  border-radius: 16px; padding: 1.3rem 1.4rem; display: flex; flex-direction: column; gap: 0.5rem;
}
.g-card-head { display: flex; align-items: center; gap: 0.65rem; }
.g-card-ic {
  width: 38px; height: 38px; flex-shrink: 0; border-radius: 11px; display: flex; align-items: center; justify-content: center;
  font-size: 1rem; color: var(--accent-text, #37EFBA);
  background: linear-gradient(140deg, rgba(55, 239, 186, 0.18), rgba(0, 212, 255, 0.10));
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.g-card h3 { font-size: 1.05rem; margin: 0; }
.g-card-tag { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; opacity: 0.6; }
.g-card-body { font-size: 0.92rem; line-height: 1.55; opacity: 0.92; }
.g-card-body strong { color: var(--accent-text, #37EFBA); font-weight: 600; }

/* ---- Carte large (occupe toute la largeur de la grille) ---- */
.g-grid > .g-card-wide { grid-column: 1 / -1; }

/* ---- Blocs de code SQL ---- */
.g-code-wrap { margin-top: 0.7rem; display: flex; flex-direction: column; gap: 0.35rem; }
.g-code-label { font-size: 0.78rem; font-weight: 700; opacity: 0.85; }
.g-code {
  margin: 0; padding: 0.8rem 0.95rem; border-radius: 11px; overflow-x: auto;
  background: rgba(8, 11, 17, 0.72); border: 1px solid rgba(255, 255, 255, 0.10);
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.82rem; line-height: 1.5; color: #e6f1ff;
}
.g-code code { font-family: inherit; white-space: pre; color: inherit; background: none; }

/* ---- Étapes numérotées (cadence, déroulé) ---- */
.g-steps { position: relative; padding-left: 0.3rem; }
.g-step { display: flex; gap: 1rem; padding-bottom: 1.4rem; position: relative; }
.g-step:not(:last-child)::before {
  content: ''; position: absolute; left: 18px; top: 40px; bottom: -4px; width: 2px;
  background: linear-gradient(180deg, rgba(55, 239, 186, 0.5), rgba(55, 239, 186, 0.08));
}
.g-step-num {
  width: 38px; height: 38px; flex-shrink: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.95rem; color: #25282f; background: linear-gradient(135deg, #37EFBA, #00d4aa); z-index: 1;
}
.g-step-body { padding-top: 0.35rem; }
.g-step-body h3 { font-size: 1.02rem; margin: 0 0 0.25rem; }
.g-step-body p { font-size: 0.92rem; line-height: 1.55; opacity: 0.9; margin: 0; }

/* ---- Principes numérotés ---- */
.g-principles { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; }
.g-principle {
  display: flex; gap: 0.9rem; align-items: flex-start;
  background: var(--glass-bg, rgba(20, 24, 33, 0.62)); border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.14));
  border-radius: 14px; padding: 1.1rem 1.2rem;
}
.g-principle-num {
  font-weight: 800; font-size: 1.1rem; color: var(--accent-text, #37EFBA); line-height: 1.2; min-width: 1.6rem;
}
.g-principle-txt { font-size: 0.92rem; line-height: 1.55; }
.g-principle-txt strong { display: block; margin-bottom: 0.15rem; font-size: 0.98rem; }

/* ---- « À retenir absolument » ---- */
.g-essentials {
  border-radius: var(--radius-glass, 22px); padding: 1.8rem 2rem;
  background:
    radial-gradient(ellipse 80% 140% at 50% -20%, rgba(55, 239, 186, 0.16), transparent 60%),
    var(--glass-bg, rgba(20, 24, 33, 0.66));
  border: 1px solid rgba(55, 239, 186, 0.30);
}
.g-essentials h2 { display: flex; align-items: center; gap: 0.6rem; font-size: 1.4rem; margin: 0 0 1.1rem; }
.g-essentials ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.8rem; }
.g-essentials li { display: flex; gap: 0.7rem; line-height: 1.55; font-size: 0.96rem; }
.g-essentials li i { color: var(--accent-text, #37EFBA); margin-top: 0.22rem; flex-shrink: 0; }
.g-essentials li strong { color: var(--accent-text, #37EFBA); }

/* ---- Quiz ---- */
.g-quiz {
  background: var(--glass-bg, rgba(20, 24, 33, 0.62)); border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.14));
  -webkit-backdrop-filter: blur(var(--glass-blur, 18px)); backdrop-filter: blur(var(--glass-blur, 18px));
  border-radius: var(--radius-glass, 22px); padding: 2rem; margin-top: 3rem;
}
.g-quiz h2 { text-align: center; margin-bottom: 0.4rem; }
.g-quiz-intro { text-align: center; opacity: 0.85; margin-bottom: 2rem; }
.g-quiz-q { margin-bottom: 1.8rem; }
.g-quiz-scenario { font-weight: 600; margin-bottom: 0.6rem; line-height: 1.5; }
.g-quiz-scenario .qnum { color: var(--accent-text, #37EFBA); }
.g-quiz-opts { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.g-quiz-opts button {
  font-family: inherit; font-weight: 600; font-size: 0.88rem; cursor: pointer;
  padding: 0.45rem 1.1rem; border-radius: 999px; border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.2));
  background: transparent; color: inherit; transition: all 0.2s ease;
}
.g-quiz-opts button:hover:not(:disabled) { border-color: var(--accent-text, #37EFBA); }
.g-quiz-opts button:disabled { cursor: default; }
.g-quiz-opts button:focus-visible { outline: 2px solid #37EFBA; outline-offset: 2px; }
.g-quiz-opts button.correct { background: rgba(55, 239, 186, 0.25); border-color: #37EFBA; color: var(--accent-text, #37EFBA); }
.g-quiz-opts button.wrong { background: rgba(255, 90, 90, 0.2); border-color: #ff6a6a; color: var(--bad-text, #ff8a8a); }
.g-quiz-feedback { margin-top: 0.7rem; font-size: 0.9rem; opacity: 0; max-height: 0; overflow: hidden; transition: all 0.3s ease; line-height: 1.55; }
.g-quiz-feedback.show { opacity: 1; max-height: 240px; }
.g-score { text-align: center; font-weight: 700; font-size: 1.1rem; margin-top: 1.5rem; min-height: 1.5rem; }

/* ---- Retour ---- */
.g-back { margin-top: 2.5rem; }
.g-back a { color: var(--accent-text, #37EFBA); font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 0.4rem; }
.g-back a:hover { text-decoration: underline; }

/* Annule le style global « section ul li » (carte) sur les listes du guide */
.body-content section p, .body-content section ul { max-width: none; }
.g-essentials ul li { background: none; padding: 0; border-left: 0; }
