/* ============================================================================
   Formation Atoo Next — shared.css
   Design system : atoo-warm (lavande + pastels, LearnHub-inspired)
   Consommé par README.html + tous les modules
   ============================================================================ */

/* ---------- 1. TOKENS ---------- */
:root {
  /* Fonds */
  --bg-canvas: #F5F3F7;
  --bg-elevated: #FFFFFF;
  --bg-subtle: #EEEAF3;
  --bg-tinted: #F9F6FB;
  --bg-gradient-hero: linear-gradient(135deg, #E8DFF5 0%, #F5F3F7 100%);
  --bg-page-gradient: linear-gradient(135deg, #E8DFF5 0%, #F5F3F7 40%, #F5F3F7 100%);

  /* Violet Atoo */
  --violet-brand: #8B1A7A;
  --violet-accent: #A78BD9;
  --violet-accent-hover: #9370C7;
  --violet-soft: #E8DFF5;
  --violet-strong: #6B4FA0;

  /* Pastels */
  --mint: #B8E0C8; --mint-soft: #E8F5EE; --mint-strong: #5DAA7A;
  --peach: #F5C7A9; --peach-soft: #FCEBD9; --peach-strong: #C88458;
  --sky: #A5C8E4; --sky-soft: #DDECF5; --sky-strong: #4F86B8;
  --sunshine: #F0D97A; --sunshine-soft: #FBF3D6; --sunshine-strong: #B89A3A;

  /* Textes */
  --text-primary: #2C2438;
  --text-secondary: #5C556B;
  --text-muted: #8B849A;
  --text-inverse: #F5F3F7;
  --text-on-violet: #FFFFFF;

  /* États */
  --success: #5DAA7A; --success-soft: #E8F5EE;
  --warning: #C88458; --warning-soft: #FCEBD9;
  --danger: #D97570; --danger-soft: #FADDD8;
  --info: #4F86B8; --info-soft: #DDECF5;

  /* Bordures */
  --border-subtle: #E8E3EF;
  --border-medium: #D4CCE0;
  --border-strong: #B8ADCC;

  /* Ombres */
  --shadow-xs: 0 1px 2px rgba(44, 36, 56, 0.04);
  --shadow-sm: 0 2px 8px rgba(44, 36, 56, 0.06);
  --shadow-md: 0 8px 24px rgba(44, 36, 56, 0.08);
  --shadow-lg: 0 16px 48px rgba(44, 36, 56, 0.10);
  --shadow-glow-violet: 0 8px 32px rgba(167, 139, 217, 0.30);
  --shadow-glow-mint: 0 8px 32px rgba(184, 224, 200, 0.35);
  --shadow-card: 0 1px 3px rgba(44, 36, 56, 0.04), 0 4px 12px rgba(44, 36, 56, 0.06);
  --shadow-card-hover: 0 2px 6px rgba(44, 36, 56, 0.06), 0 12px 32px rgba(44, 36, 56, 0.10);

  /* Typo */
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Instrument Serif', 'Georgia', serif;
  --font-mono: 'JetBrains Mono', 'Consolas', 'Monaco', monospace;

  /* Tailles */
  --fs-xs: 0.75rem; --fs-sm: 0.875rem; --fs-base: 1rem;
  --fs-lg: 1.125rem; --fs-xl: 1.375rem; --fs-2xl: 1.75rem;
  --fs-3xl: 2.25rem; --fs-4xl: 3rem; --fs-5xl: 4rem; --fs-display: 5rem;

  --lh-tight: 1.15; --lh-snug: 1.35; --lh-normal: 1.5;
  --lh-relaxed: 1.65; --lh-loose: 1.85;

  --ls-display: -0.03em; --ls-tight: -0.02em; --ls-normal: 0;
  --ls-wide: 0.05em; --ls-wider: 0.08em;

  /* Espacements */
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 24px; --space-8: 32px; --space-10: 40px;
  --space-12: 48px; --space-16: 64px; --space-20: 80px; --space-24: 96px;
  --space-32: 128px;

  /* Radius */
  --radius-xs: 6px; --radius-sm: 10px; --radius-md: 16px;
  --radius-lg: 20px; --radius-xl: 24px; --radius-2xl: 32px;
  --radius-3xl: 40px; --radius-full: 9999px;

  /* Layout */
  --max-width-reading: 720px;
  --max-width-dashboard: 1440px;
  --sidebar-width: 80px;
  --right-sidebar-width: 300px;
  --container-padding: 32px;
  --container-padding-mobile: 20px;

  /* Z */
  --z-base: 1; --z-sticky: 100; --z-drawer: 400;
  --z-modal-overlay: 900; --z-modal: 1000; --z-tooltip: 1100;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.25, 1, 0.5, 1);
  --transition-base: 250ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 400ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

[data-theme="dark"] {
  --bg-canvas: #1B1523;
  --bg-elevated: #2A2135;
  --bg-subtle: #24192F;
  --bg-tinted: #221830;
  --bg-gradient-hero: linear-gradient(135deg, #2A2135 0%, #1B1523 100%);
  --bg-page-gradient: linear-gradient(135deg, #2A2135 0%, #1B1523 100%);
  --text-primary: #F5F0FA;
  --text-secondary: #C4B8D6;
  --text-muted: #8B849A;
  --text-inverse: #2C2438;
  --border-subtle: #3A3145;
  --border-medium: #4A4055;
  --border-strong: #5C556B;
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.20);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.30);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.35);
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.20), 0 4px 12px rgba(0, 0, 0, 0.30);
  --shadow-card-hover: 0 2px 6px rgba(0, 0, 0, 0.30), 0 12px 32px rgba(0, 0, 0, 0.40);

  /* Pastels assombris pour lisibilite en dark */
  --mint-soft: #1A3327; --mint: #2D5E42; --mint-strong: #7CCFA0;
  --peach-soft: #3A2518; --peach: #6B4530; --peach-strong: #E8A87C;
  --sky-soft: #172A3D; --sky: #2A5070; --sky-strong: #8FBCE0;
  --sunshine-soft: #342E14; --sunshine: #6B5C28; --sunshine-strong: #E8CC5E;
  --violet-soft: #2A1E3D; --violet-accent: #8B6FBF; --violet-strong: #C4A8E8;

  /* Etats assombris */
  --success-soft: #1A3327; --success: #7CCFA0;
  --warning-soft: #3A2518; --warning: #E8A87C;
  --danger-soft: #3A1A18; --danger: #E88A85;
  --info-soft: #172A3D; --info: #8FBCE0;
}

/* ---------- 2. RESET ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
.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; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--bg-canvas);
  background-image: var(--bg-page-gradient);
  background-attachment: fixed;
  line-height: var(--lh-relaxed);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
img, svg { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
a { color: var(--violet-strong); text-decoration: none; }
a:hover { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
code { font-family: var(--font-mono); font-size: 0.9em; }
:not(pre) > code { padding: 2px 6px; background: var(--violet-soft); color: var(--violet-strong); border-radius: var(--radius-xs); }
pre { font-family: var(--font-mono); padding: var(--space-5); background: var(--bg-subtle); border-radius: var(--radius-md); overflow-x: auto; font-size: var(--fs-sm); line-height: var(--lh-normal); }
strong { font-weight: 600; }
em { font-style: italic; }

/* Focus */
:focus-visible { outline: 2px solid var(--violet-accent); outline-offset: 2px; border-radius: var(--radius-xs); }
:focus:not(:focus-visible) { outline: none; }

/* Skip link */
.skip-link { position: absolute; left: -9999px; top: var(--space-2); z-index: 9999; padding: var(--space-3) var(--space-6); background: var(--violet-accent); color: var(--text-on-violet); border-radius: var(--radius-sm); font-weight: 500; }
.skip-link:focus { left: var(--space-4); }

/* Sélection */
::selection { background: var(--violet-soft); color: var(--text-primary); }

/* Scrollbars */
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--border-medium); border-radius: var(--radius-full); }
*::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }

/* ---------- 3. TYPOGRAPHIE ---------- */
h1, h2, h3, h4 { font-family: var(--font-body); line-height: var(--lh-tight); color: var(--text-primary); font-weight: 700; }
h1 { font-size: var(--fs-3xl); letter-spacing: var(--ls-tight); }
h2 { font-size: var(--fs-2xl); letter-spacing: var(--ls-tight); }
h3 { font-size: var(--fs-xl); font-weight: 600; }
h4 { font-size: var(--fs-lg); font-weight: 600; }
p, ul, ol { margin-bottom: var(--space-4); }
ul, ol { padding-left: 1.4em; }
li { margin-bottom: var(--space-2); }
li::marker { color: var(--violet-accent); }
blockquote { padding: var(--space-4) var(--space-6); background: var(--bg-subtle); border-left: 3px solid var(--border-medium); color: var(--text-secondary); border-radius: 0 var(--radius-md) var(--radius-md) 0; margin: var(--space-4) 0; }

.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-strong { color: var(--text-primary); font-weight: 600; }
.uppercase-label { text-transform: uppercase; letter-spacing: var(--ls-wider); font-size: var(--fs-xs); font-weight: 700; color: var(--text-muted); }

/* ---------- 4. LAYOUT DASHBOARD ---------- */
.layout-dashboard { min-height: 100vh; padding-left: var(--sidebar-width); }
.dashboard-main { padding: var(--space-6) var(--space-8) var(--space-16); max-width: var(--max-width-dashboard); margin: 0 auto; width: 100%; }
.dashboard-topbar { display: flex; justify-content: flex-end; align-items: center; gap: var(--space-3); padding-bottom: var(--space-6); }
.dashboard-hero { display: grid; grid-template-columns: 1fr auto; gap: var(--space-6); align-items: end; padding: var(--space-8); background: var(--bg-gradient-hero); border-radius: var(--radius-xl); margin-bottom: var(--space-6); box-shadow: var(--shadow-sm); }
.dashboard-hero__title { font-family: var(--font-body); font-weight: 600; font-size: var(--fs-3xl); letter-spacing: var(--ls-tight); }
.dashboard-hero__name { font-family: var(--font-display); font-weight: 400; font-style: italic; color: var(--violet-strong); }
.dashboard-hero__emoji { display: inline-block; }
.dashboard-hero__subtitle { color: var(--text-secondary); margin-top: var(--space-2); }
.dashboard-hero__cta { display: flex; gap: var(--space-2); }
.dashboard-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-4); margin-bottom: var(--space-6); }
.dashboard-progress-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-6); margin-bottom: var(--space-8); }
.dashboard-modules { }
.section-header-main { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: var(--space-6); }
.section-header-main h2 { font-size: var(--fs-2xl); }
.link-more { font-size: var(--fs-sm); color: var(--violet-strong); font-weight: 500; }
.module-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6); }

/* ---------- 5. LAYOUT MODULE ---------- */
.layout-module { min-height: 100vh; padding-left: var(--sidebar-width); }
.module-main { padding: var(--space-6) var(--space-8) var(--space-16); max-width: var(--max-width-dashboard); margin: 0 auto; width: 100%; }
.module-topbar { display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); padding-bottom: var(--space-6); }
.module-topbar__actions { display: flex; gap: var(--space-3); align-items: center; }
.module-layout { display: grid; grid-template-columns: 1fr var(--right-sidebar-width); gap: var(--space-10); align-items: start; }
.module-content { min-width: 0; max-width: var(--max-width-reading); justify-self: start; }
.module-sidebar-right { position: sticky; top: var(--space-6); width: var(--right-sidebar-width); }

/* ---------- 6. SIDEBAR ICONIQUE ---------- */
.sidebar-icons { position: fixed; left: 0; top: 0; width: var(--sidebar-width); height: 100vh; background: var(--bg-elevated); border-right: 1px solid var(--border-subtle); padding: var(--space-6) var(--space-4); display: flex; flex-direction: column; align-items: center; gap: var(--space-4); z-index: var(--z-drawer); }
.sidebar-icons__logo { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; margin-bottom: var(--space-2); }
.sidebar-icons__logo img { width: 100%; height: 100%; object-fit: contain; }
.sidebar-icons__nav { display: flex; flex-direction: column; gap: var(--space-3); flex: 1; align-items: center; }
.sidebar-icons__footer { display: flex; flex-direction: column; gap: var(--space-3); align-items: center; }
.sidebar-icons__item { width: 48px; height: 48px; border-radius: var(--radius-full); display: flex; align-items: center; justify-content: center; color: var(--text-secondary); transition: all var(--transition-fast); }
.sidebar-icons__item:hover { background: var(--bg-subtle); color: var(--text-primary); text-decoration: none; }
.sidebar-icons__item.is-active { background: var(--violet-soft); color: var(--violet-strong); }
.sidebar-icons__item svg { width: 22px; height: 22px; }
.sidebar-icons__mobile-close { display: none; }

/* Bouton hamburger (mobile) */
.hamburger-btn { display: none; position: fixed; top: var(--space-3); left: var(--space-3); z-index: 500; width: 44px; height: 44px; border-radius: var(--radius-md); background: var(--bg-elevated); border: 1px solid var(--border-subtle); box-shadow: var(--shadow-sm); align-items: center; justify-content: center; color: var(--text-primary); }

/* Overlay drawer */
.drawer-overlay { display: none; position: fixed; inset: 0; background: rgba(44, 36, 56, 0.5); backdrop-filter: blur(4px); z-index: calc(var(--z-drawer) - 1); }
.drawer-overlay.is-open { display: block; }

/* ---------- 7. STAT CARD ---------- */
.stat-card { padding: var(--space-6); background: var(--bg-elevated); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.stat-card__header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: var(--space-3); }
.stat-card__label { font-size: var(--fs-sm); color: var(--text-secondary); font-weight: 500; }
.stat-card__value { font-family: var(--font-display); font-size: var(--fs-3xl); color: var(--text-primary); line-height: 1; }
.stat-card__trend { display: inline-flex; align-items: center; gap: var(--space-1); margin-top: var(--space-2); font-size: var(--fs-xs); font-weight: 500; }
.stat-card__trend--positive { color: var(--success); }
.stat-card__trend--negative { color: var(--danger); }

/* ---------- 8. ICON CIRCLE ---------- */
.icon-circle { display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius-full); flex-shrink: 0; }
.icon-circle--xs { width: 32px; height: 32px; }
.icon-circle--xs svg { width: 16px; height: 16px; }
.icon-circle--sm { width: 40px; height: 40px; }
.icon-circle--sm svg { width: 20px; height: 20px; }
.icon-circle--md { width: 56px; height: 56px; }
.icon-circle--md svg { width: 24px; height: 24px; }
.icon-circle--lg { width: 72px; height: 72px; }
.icon-circle--lg svg { width: 32px; height: 32px; }
.icon-circle--xl { width: 96px; height: 96px; }
.icon-circle--xl svg { width: 48px; height: 48px; }
.icon-circle--mint { background: var(--mint-soft); color: var(--mint-strong); }
.icon-circle--peach { background: var(--peach-soft); color: var(--peach-strong); }
.icon-circle--sky { background: var(--sky-soft); color: var(--sky-strong); }
.icon-circle--lavender { background: var(--violet-soft); color: var(--violet-strong); }
.icon-circle--sunshine { background: var(--sunshine-soft); color: var(--sunshine-strong); }
.icon-circle--white { background: rgba(255,255,255,0.9); color: var(--text-primary); backdrop-filter: blur(8px); }

/* ---------- 9. MODULE CARD (dashboard) ---------- */
.module-card { background: var(--bg-elevated); border-radius: var(--radius-xl); overflow: hidden; box-shadow: var(--shadow-card); transition: transform var(--transition-base), box-shadow var(--transition-base); }
.module-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); }
.module-card__link { display: block; color: inherit; }
.module-card__link:hover { text-decoration: none; }
.module-card__visual { position: relative; aspect-ratio: 16/10; display: flex; align-items: center; justify-content: center; padding: var(--space-6); overflow: hidden; }
.module-card__visual--sky { background: linear-gradient(135deg, var(--sky-soft) 0%, var(--sky) 100%); }
.module-card__visual--mint { background: linear-gradient(135deg, var(--mint-soft) 0%, var(--mint) 100%); }
.module-card__visual--peach { background: linear-gradient(135deg, var(--peach-soft) 0%, var(--peach) 100%); }
.module-card__visual--lavender { background: linear-gradient(135deg, var(--violet-soft) 0%, var(--violet-accent) 100%); }
.module-card__visual--sunshine { background: linear-gradient(135deg, var(--sunshine-soft) 0%, var(--sunshine) 100%); }
.module-card__icon { width: 96px; height: 96px; border-radius: var(--radius-full); background: rgba(255,255,255,0.9); display: flex; align-items: center; justify-content: center; color: var(--text-primary); backdrop-filter: blur(8px); box-shadow: var(--shadow-sm); }
.module-card__icon svg { width: 44px; height: 44px; }
.module-card__number { position: absolute; top: var(--space-4); right: var(--space-5); font-family: var(--font-display); font-size: var(--fs-4xl); color: var(--text-primary); opacity: 0.5; line-height: 1; letter-spacing: var(--ls-display); }
.module-card__type-badge { position: absolute; top: var(--space-4); left: var(--space-4); padding: 4px var(--space-3); background: rgba(255,255,255,0.85); backdrop-filter: blur(8px); border-radius: var(--radius-full); font-size: var(--fs-xs); font-weight: 600; text-transform: uppercase; letter-spacing: var(--ls-wide); color: var(--text-primary); }
.module-card__body { padding: var(--space-6); }
.module-card__title { font-size: var(--fs-lg); font-weight: 600; margin-bottom: var(--space-2); }
.module-card__desc { color: var(--text-secondary); font-size: var(--fs-sm); margin-bottom: var(--space-4); line-height: var(--lh-snug); }
.module-card__meta { display: flex; gap: var(--space-4); margin-bottom: var(--space-4); font-size: var(--fs-xs); color: var(--text-muted); }
.meta-item { display: inline-flex; align-items: center; gap: var(--space-1); }
.meta-item svg { width: 14px; height: 14px; }
.module-card__footer { margin-bottom: var(--space-4); }
.module-card__progress-text { display: block; margin-top: var(--space-2); font-size: var(--fs-xs); color: var(--text-muted); }

/* ---------- 10. MODULE HEADER (dans le module) ---------- */
.module-header { margin-bottom: var(--space-10); }
.module-header__visual { position: relative; padding: var(--space-8) var(--space-8) var(--space-10); border-radius: var(--radius-2xl) var(--radius-2xl) 0 0; overflow: hidden; display: flex; align-items: center; justify-content: center; min-height: 200px; }
.module-header__visual--sky { background: linear-gradient(135deg, var(--sky-soft) 0%, var(--sky) 100%); }
.module-header__visual--mint { background: linear-gradient(135deg, var(--mint-soft) 0%, var(--mint) 100%); }
.module-header__visual--peach { background: linear-gradient(135deg, var(--peach-soft) 0%, var(--peach) 100%); }
.module-header__visual--lavender { background: linear-gradient(135deg, var(--violet-soft) 0%, var(--violet-accent) 100%); }
.module-header__icon-large { width: 128px; height: 128px; border-radius: var(--radius-full); background: rgba(255,255,255,0.9); display: flex; align-items: center; justify-content: center; color: var(--text-primary); box-shadow: var(--shadow-md); backdrop-filter: blur(8px); }
.module-header__icon-large svg { width: 64px; height: 64px; }
.module-header__number-huge { position: absolute; top: var(--space-4); right: var(--space-8); font-family: var(--font-display); font-size: var(--fs-5xl); color: var(--text-primary); opacity: 0.35; line-height: 1; letter-spacing: var(--ls-display); }
.module-header__meta { padding: var(--space-6) var(--space-8) 0; }
.module-header__label { display: block; font-size: var(--fs-xs); font-weight: 700; letter-spacing: var(--ls-wider); text-transform: uppercase; color: var(--text-muted); margin-bottom: var(--space-2); }
.module-header__title { font-size: var(--fs-3xl); font-weight: 700; letter-spacing: var(--ls-tight); margin-bottom: var(--space-2); }
.module-header__subtitle { color: var(--text-secondary); font-size: var(--fs-lg); margin-bottom: var(--space-6); }
.module-header__stats { display: flex; gap: var(--space-8); padding: var(--space-4) 0; border-top: 1px solid var(--border-subtle); border-bottom: 1px solid var(--border-subtle); }
.stat-mini { display: flex; flex-direction: column; }
.stat-mini__value { font-family: var(--font-display); font-size: var(--fs-2xl); color: var(--text-primary); line-height: 1; }
.stat-mini__label { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: var(--ls-wide); color: var(--text-muted); margin-top: var(--space-1); }

/* ---------- 11. SECTION HEADER (dans le module) ---------- */
.module-section { margin-bottom: var(--space-16); }
.section-header { display: flex; align-items: center; gap: var(--space-4); padding: var(--space-6); background: var(--bg-elevated); border-radius: var(--radius-lg); margin-bottom: var(--space-6); box-shadow: var(--shadow-sm); }
.section-header__content { flex: 1; }
.section-header__label { display: block; font-size: var(--fs-xs); font-weight: 700; letter-spacing: var(--ls-wider); text-transform: uppercase; color: var(--text-muted); margin-bottom: 2px; }
.section-header__title { font-size: var(--fs-xl); font-weight: 700; margin-bottom: 0; }
.section-header__meta { font-size: var(--fs-sm); color: var(--text-muted); margin-top: var(--space-1); margin-bottom: 0; }

/* ---------- 12. SUB-SECTIONS DANS LE MODULE ---------- */
.content-block { background: var(--bg-elevated); border-radius: var(--radius-lg); padding: var(--space-6) var(--space-8); margin-bottom: var(--space-6); box-shadow: var(--shadow-sm); }
.content-block h3 { margin-bottom: var(--space-3); font-size: var(--fs-lg); font-weight: 600; color: var(--text-primary); }
.content-block h4 { margin-top: var(--space-6); margin-bottom: var(--space-2); font-size: var(--fs-base); font-weight: 600; }
.content-block p:last-child, .content-block ul:last-child, .content-block ol:last-child { margin-bottom: 0; }
.content-lead { font-size: var(--fs-lg); color: var(--text-secondary); line-height: var(--lh-relaxed); margin-bottom: var(--space-4); }

/* Accroche contextuelle (début de section) */
.section-hook { padding: var(--space-5) var(--space-6); background: var(--violet-soft); border-radius: var(--radius-md); border-left: 3px solid var(--violet-accent); color: var(--text-primary); margin-bottom: var(--space-6); font-size: var(--fs-base); line-height: var(--lh-relaxed); }
.section-hook__label { display: inline-block; font-size: var(--fs-xs); font-weight: 700; letter-spacing: var(--ls-wide); text-transform: uppercase; color: var(--violet-strong); margin-bottom: var(--space-2); }

/* ---------- 13. CALLOUTS ---------- */
.callout { display: flex; gap: var(--space-4); padding: var(--space-5); margin: var(--space-4) 0; border-radius: var(--radius-md); border-left: 3px solid; }
.callout__icon { flex-shrink: 0; }
.callout__content { flex: 1; }
.callout__label { display: block; font-size: var(--fs-xs); font-weight: 700; letter-spacing: var(--ls-wider); text-transform: uppercase; margin-bottom: var(--space-2); }
.callout__content > *:last-child { margin-bottom: 0; }
.callout--warning { background: var(--peach-soft); border-left-color: var(--peach-strong); }
.callout--warning .callout__label { color: var(--peach-strong); }
.callout--info { background: var(--sky-soft); border-left-color: var(--sky-strong); }
.callout--info .callout__label { color: var(--sky-strong); }
.callout--license { background: var(--violet-soft); border-left-color: var(--violet-accent); }
.callout--license .callout__label { color: var(--violet-strong); }
.callout--danger { background: var(--danger-soft); border-left-color: var(--danger); }
.callout--danger .callout__label { color: var(--danger); }
.callout--success { background: var(--mint-soft); border-left-color: var(--mint-strong); }
.callout--success .callout__label { color: var(--mint-strong); }

/* Grille AD ↔ Entra (comparatif) */
.ad-entra-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); margin: var(--space-6) 0; }
.ad-entra-card { padding: var(--space-5); border-radius: var(--radius-md); background: var(--bg-elevated); border: 1px solid var(--border-subtle); border-top: 3px solid var(--border-medium); }
.ad-entra-card--ad { background: var(--sky-soft); border-top-color: var(--sky-strong); }
.ad-entra-card--entra { background: var(--violet-soft); border-top-color: var(--violet-accent); }
.ad-entra-card--danger { grid-column: 1 / -1; background: var(--peach-soft); border-top-color: var(--peach-strong); }
.ad-entra-card__label { display: flex; align-items: center; gap: var(--space-2); font-size: var(--fs-xs); font-weight: 700; letter-spacing: var(--ls-wider); text-transform: uppercase; margin-bottom: var(--space-2); }
.ad-entra-card--ad .ad-entra-card__label { color: var(--sky-strong); }
.ad-entra-card--entra .ad-entra-card__label { color: var(--violet-strong); }
.ad-entra-card--danger .ad-entra-card__label { color: var(--peach-strong); }
.ad-entra-card__body p:last-child { margin-bottom: 0; }

/* ---------- 14. REVEAL CARD ---------- */
.reveal-card { background: var(--bg-elevated); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); margin: var(--space-4) 0; overflow: hidden; }
.reveal-card__trigger { width: 100%; display: flex; align-items: center; gap: var(--space-4); padding: var(--space-4) var(--space-5); background: transparent; color: var(--text-primary); text-align: left; font-family: inherit; font-size: var(--fs-base); font-weight: 500; }
.reveal-card__trigger:hover { background: var(--bg-subtle); }
.reveal-card__title { flex: 1; }
.reveal-card__chevron { transition: transform 200ms cubic-bezier(0.4, 0, 0.2, 1); color: var(--text-muted); }
.reveal-card[aria-expanded="true"] .reveal-card__chevron,
.reveal-card.is-open .reveal-card__chevron { transform: rotate(90deg); }
.reveal-card__content { max-height: 0; overflow: hidden; transition: max-height var(--transition-base), padding var(--transition-base); padding: 0 var(--space-5); }
.reveal-card.is-open .reveal-card__content { max-height: 2000px; padding: 0 var(--space-5) var(--space-5); }

/* ---------- 15. QUICKQUESTION / REVEAL INLINE / PAIRS ---------- */
.quickquestion { padding: var(--space-6); margin: var(--space-6) 0; border-radius: var(--radius-lg); background: var(--violet-soft); border: 1px dashed var(--violet-accent); }
.quickquestion__label { display: inline-flex; align-items: center; gap: var(--space-2); padding: 4px var(--space-3); background: var(--bg-elevated); border-radius: var(--radius-full); font-size: var(--fs-xs); font-weight: 700; letter-spacing: var(--ls-wide); text-transform: uppercase; color: var(--violet-strong); margin-bottom: var(--space-4); }
.quickquestion__question { margin-bottom: var(--space-4); font-weight: 500; }
.quickquestion__answer { display: none; padding: var(--space-4); background: var(--bg-elevated); border-radius: var(--radius-md); margin-top: var(--space-3); }
.quickquestion.is-revealed .quickquestion__answer { display: block; }
.quickquestion.is-revealed .quickquestion__btn { display: none; }
.quickquestion__explanation { margin-top: var(--space-2); font-size: var(--fs-sm); color: var(--text-secondary); }

.pairs-game { margin: var(--space-6) 0; padding: var(--space-6); border-radius: var(--radius-lg); background: var(--bg-elevated); border: 1px solid var(--border-subtle); }
.pairs-game__title { font-weight: 600; margin-bottom: var(--space-4); }
.pairs-game__grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-6); }
.pairs-game__column { display: flex; flex-direction: column; gap: var(--space-2); }
.pairs-game__column-title { font-size: var(--fs-xs); font-weight: 700; letter-spacing: var(--ls-wider); text-transform: uppercase; color: var(--text-muted); margin-bottom: var(--space-2); display: flex; align-items: center; gap: var(--space-2); }
.pair-item { padding: var(--space-3) var(--space-4); border-radius: var(--radius-sm); background: var(--bg-canvas); border: 2px solid var(--border-subtle); cursor: pointer; user-select: none; font-size: var(--fs-sm); transition: all var(--transition-fast); text-align: left; }
.pair-item:hover:not(.is-matched) { border-color: var(--violet-accent); background: var(--violet-soft); }
.pair-item.is-active { border-color: var(--violet-accent); background: var(--violet-soft); }
.pair-item.is-matched { border-color: var(--mint-strong); background: var(--mint-soft); color: var(--mint-strong); cursor: default; }
.pair-item.is-wrong { border-color: var(--danger); background: var(--danger-soft); animation: shake 300ms; }
.pairs-game__status { margin-top: var(--space-4); display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); font-size: var(--fs-sm); color: var(--text-muted); }
.pairs-game__status.is-complete { color: var(--mint-strong); font-weight: 600; }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  50% { transform: translateX(4px); }
  75% { transform: translateX(-2px); }
}

/* ---------- 16. PROGRESS BAR / DONUT ---------- */
.progress-bar { height: 8px; border-radius: var(--radius-full); background: var(--border-subtle); overflow: hidden; }
.progress-bar__fill { height: 100%; background: var(--violet-accent); border-radius: var(--radius-full); transition: width var(--transition-slow); }

.progress-donut { position: relative; display: inline-block; width: 120px; height: 120px; }
.progress-donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.progress-donut__track { fill: none; stroke: var(--border-subtle); stroke-width: 8; }
.progress-donut__fill { fill: none; stroke: var(--violet-accent); stroke-width: 8; stroke-linecap: round; transition: stroke-dashoffset 800ms cubic-bezier(0.16, 1, 0.3, 1); }
.progress-donut__label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.progress-donut__value { font-family: var(--font-display); font-size: var(--fs-2xl); color: var(--text-primary); line-height: 1; }
.progress-donut__unit { font-size: var(--fs-xs); color: var(--text-muted); margin-top: 2px; }

/* ---------- 17. BADGES ---------- */
.badge { display: inline-flex; align-items: center; gap: var(--space-1); padding: 4px var(--space-3); border-radius: var(--radius-full); font-size: var(--fs-xs); font-weight: 600; text-transform: uppercase; letter-spacing: var(--ls-wide); border: 1px solid; }
.badge svg { width: 12px; height: 12px; }
.badge--mint { background: var(--mint-soft); color: var(--mint-strong); border-color: var(--mint); }
.badge--lavender { background: var(--violet-soft); color: var(--violet-strong); border-color: var(--violet-accent); }
.badge--peach { background: var(--peach-soft); color: var(--peach-strong); border-color: var(--peach); }
.badge--neutral { background: var(--bg-subtle); color: var(--text-muted); border-color: var(--border-medium); }
.badge--sunshine { background: var(--sunshine-soft); color: var(--sunshine-strong); border-color: var(--sunshine); }
.badge--sky { background: var(--sky-soft); color: var(--sky-strong); border-color: var(--sky); }

.badge-card { position: relative; padding: var(--space-6); background: var(--bg-elevated); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); text-align: center; opacity: 0.4; filter: grayscale(1); transition: opacity var(--transition-slow), filter var(--transition-slow), box-shadow var(--transition-slow), transform var(--transition-slow); }
.badge-card.is-unlocked { opacity: 1; filter: none; box-shadow: var(--shadow-glow-violet); }
.badge-card__icon { margin: 0 auto var(--space-3); }
.badge-card__name { font-weight: 700; font-size: var(--fs-base); margin-bottom: var(--space-1); }
.badge-card__desc { font-size: var(--fs-xs); color: var(--text-muted); }

/* ---------- 18. BOUTONS ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); padding: var(--space-3) var(--space-6); border-radius: var(--radius-md); font-family: inherit; font-size: var(--fs-sm); font-weight: 500; cursor: pointer; text-decoration: none; transition: all var(--transition-fast); border: 1px solid transparent; line-height: 1.4; }
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); text-decoration: none; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn--primary { background: var(--violet-accent); color: var(--text-on-violet); }
.btn--primary:hover { background: var(--violet-accent-hover); color: var(--text-on-violet); }
.btn--soft-violet { background: var(--violet-soft); color: var(--violet-strong); }
.btn--soft-violet:hover { background: var(--violet-accent); color: var(--text-on-violet); }
.btn--soft-mint { background: var(--mint-soft); color: var(--mint-strong); }
.btn--soft-peach { background: var(--peach-soft); color: var(--peach-strong); }
.btn--soft-sky { background: var(--sky-soft); color: var(--sky-strong); }
.btn--soft-sunshine { background: var(--sunshine-soft); color: var(--sunshine-strong); }
.btn--ghost { background: transparent; border-color: var(--border-medium); color: var(--text-secondary); }
.btn--ghost:hover { background: var(--bg-subtle); color: var(--text-primary); }
.btn--full { width: 100%; }
.btn--sm { padding: var(--space-2) var(--space-4); font-size: var(--fs-xs); }
.btn--lg { padding: var(--space-4) var(--space-8); font-size: var(--fs-base); }

.btn-icon { width: 40px; height: 40px; border-radius: var(--radius-full); display: flex; align-items: center; justify-content: center; background: var(--bg-elevated); border: 1px solid var(--border-subtle); color: var(--text-secondary); transition: all var(--transition-fast); }
.btn-icon:hover { background: var(--bg-subtle); color: var(--text-primary); box-shadow: var(--shadow-sm); }
.btn-icon svg { width: 20px; height: 20px; }

.back-link { display: inline-flex; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-4); background: var(--bg-elevated); border: 1px solid var(--border-subtle); border-radius: var(--radius-full); color: var(--text-primary); font-size: var(--fs-sm); font-weight: 500; box-shadow: var(--shadow-xs); }
.back-link:hover { background: var(--bg-subtle); text-decoration: none; box-shadow: var(--shadow-sm); }
.back-link svg { width: 16px; height: 16px; }

/* ---------- 19. TABLEAUX ---------- */
.table-wrapper { overflow-x: auto; margin: var(--space-4) 0; border-radius: var(--radius-md); border: 1px solid var(--border-subtle); }
table { width: 100%; border-collapse: collapse; background: var(--bg-elevated); font-size: var(--fs-sm); }
th { background: var(--violet-soft); color: var(--violet-strong); text-align: left; padding: var(--space-3) var(--space-4); font-weight: 700; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: var(--ls-wide); border-bottom: 1px solid var(--border-subtle); }
td { padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--border-subtle); vertical-align: top; }
tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--bg-subtle); }

/* ---------- 20. MERMAID ---------- */
.mermaid-container { margin: var(--space-6) 0; padding: var(--space-6); background: var(--bg-elevated); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); overflow-x: auto; }
.mermaid-render { display: flex; justify-content: center; }
.mermaid-render svg { max-width: 100%; height: auto; }
.mermaid-caption { margin-top: var(--space-3); font-size: var(--fs-sm); color: var(--text-muted); font-style: italic; text-align: center; }
.mermaid-fallback { background: var(--bg-subtle); border-radius: var(--radius-sm); padding: var(--space-4); font-family: var(--font-mono); font-size: var(--fs-sm); white-space: pre-wrap; }
.mermaid-fallback-msg { color: var(--text-muted); font-size: var(--fs-sm); margin-top: var(--space-2); text-align: center; font-style: italic; }

/* ---------- 21. SIDEBAR DROITE MODULE ---------- */
.module-progress-card { padding: var(--space-6); background: var(--bg-elevated); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); text-align: center; margin-bottom: var(--space-4); }
.module-progress-card__title { font-size: var(--fs-sm); font-weight: 600; margin-bottom: var(--space-3); color: var(--text-secondary); }
.module-progress-card__stats { display: flex; justify-content: space-around; margin-top: var(--space-4); font-size: var(--fs-xs); color: var(--text-muted); }
.module-toc { padding: var(--space-5); background: var(--bg-elevated); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); margin-bottom: var(--space-4); }
.module-toc__title { font-size: var(--fs-xs); font-weight: 700; letter-spacing: var(--ls-wider); text-transform: uppercase; color: var(--text-muted); margin-bottom: var(--space-3); }
.module-toc__list { list-style: none; padding: 0; margin: 0; }
.module-toc__item { margin-bottom: var(--space-1); }
.module-toc__link { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm); color: var(--text-secondary); font-size: var(--fs-sm); text-decoration: none; transition: all var(--transition-fast); }
.module-toc__link:hover { background: var(--bg-subtle); color: var(--text-primary); text-decoration: none; }
.module-toc__link.is-active { background: var(--violet-soft); color: var(--violet-strong); font-weight: 500; }
.module-toc__link.is-read::before { content: "✓"; color: var(--mint-strong); font-weight: 700; margin-right: var(--space-1); }
.module-actions { padding: var(--space-5); background: var(--bg-elevated); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: var(--space-3); }

/* ---------- 22. MODAL QCM ---------- */
.modal-overlay { position: fixed; inset: 0; background: rgba(44, 36, 56, 0.6); backdrop-filter: blur(12px); z-index: var(--z-modal-overlay); display: none; align-items: center; justify-content: center; padding: var(--space-4); opacity: 0; transition: opacity var(--transition-base); }
.modal-overlay.is-open { display: flex; opacity: 1; }
.modal { background: var(--bg-elevated); border-radius: var(--radius-xl); max-width: 640px; width: 100%; max-height: 90vh; overflow-y: auto; padding: var(--space-8); box-shadow: var(--shadow-lg); transform: translateY(20px); opacity: 0; transition: transform var(--transition-base), opacity var(--transition-base); }
.modal-overlay.is-open .modal { transform: translateY(0); opacity: 1; }
.modal__header { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-6); }
.modal__eyebrow { font-size: var(--fs-xs); font-weight: 700; letter-spacing: var(--ls-wider); text-transform: uppercase; color: var(--text-muted); }
.modal__close { color: var(--text-muted); padding: var(--space-2); border-radius: var(--radius-full); }
.modal__close:hover { background: var(--bg-subtle); color: var(--text-primary); }
.modal__close svg { width: 20px; height: 20px; }
.modal-progress { height: 4px; border-radius: var(--radius-full); background: var(--border-subtle); overflow: hidden; margin-bottom: var(--space-6); }
.modal-progress__fill { height: 100%; background: var(--violet-accent); border-radius: var(--radius-full); transition: width var(--transition-slow); }
.qcm-question { font-size: var(--fs-lg); font-weight: 500; margin-bottom: var(--space-5); line-height: var(--lh-snug); }
.qcm-question em { color: var(--text-muted); font-style: normal; font-size: 0.85em; }
.qcm-options { display: flex; flex-direction: column; gap: var(--space-2); margin-bottom: var(--space-5); }
.qcm-option { display: flex; align-items: flex-start; gap: var(--space-3); padding: var(--space-4); background: var(--bg-canvas); border: 2px solid var(--border-subtle); border-radius: var(--radius-md); cursor: pointer; transition: all var(--transition-fast); text-align: left; }
.qcm-option:hover:not(.is-disabled) { border-color: var(--violet-accent); background: var(--violet-soft); }
.qcm-option.is-selected { border-color: var(--violet-accent); background: var(--violet-soft); }
.qcm-option.is-correct { border-color: var(--mint-strong); background: var(--mint-soft); }
.qcm-option.is-incorrect { border-color: var(--danger); background: var(--danger-soft); animation: shake 300ms; }
.qcm-option.is-disabled { cursor: default; }
.qcm-option__letter { flex-shrink: 0; width: 32px; height: 32px; border-radius: var(--radius-full); background: var(--bg-elevated); border: 1px solid var(--border-subtle); display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-weight: 700; font-size: var(--fs-sm); }
.qcm-option.is-correct .qcm-option__letter { background: var(--mint-strong); color: white; border-color: var(--mint-strong); }
.qcm-option.is-incorrect .qcm-option__letter { background: var(--danger); color: white; border-color: var(--danger); }
.qcm-option__text { flex: 1; padding-top: 4px; }
.qcm-feedback { display: none; padding: var(--space-4) var(--space-5); border-radius: var(--radius-md); margin-top: var(--space-4); }
.qcm-feedback.is-visible { display: block; animation: fade-slide-up 300ms; }
.qcm-feedback--good { background: var(--mint-soft); border-left: 3px solid var(--mint-strong); }
.qcm-feedback--bad { background: var(--peach-soft); border-left: 3px solid var(--peach-strong); }
.qcm-feedback__title { font-weight: 700; margin-bottom: var(--space-2); display: flex; align-items: center; gap: var(--space-2); }
.qcm-feedback--good .qcm-feedback__title { color: var(--mint-strong); }
.qcm-feedback--bad .qcm-feedback__title { color: var(--peach-strong); }
.qcm-feedback__ref { display: block; margin-top: var(--space-2); font-size: var(--fs-xs); color: var(--text-muted); font-style: italic; }
@keyframes fade-slide-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.modal__footer { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); margin-top: var(--space-6); padding-top: var(--space-6); border-top: 1px solid var(--border-subtle); }

.qcm-results { text-align: center; }
.qcm-results__score { font-family: var(--font-display); font-size: var(--fs-5xl); color: var(--violet-strong); line-height: 1; margin: var(--space-4) 0; letter-spacing: var(--ls-display); }
.qcm-results__score small { font-family: var(--font-body); font-size: 0.35em; color: var(--text-muted); font-weight: 500; margin-left: var(--space-2); }
.qcm-results__badge { display: inline-flex; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-6); border-radius: var(--radius-full); font-weight: 700; font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: var(--ls-wide); }
.qcm-results__badge.badge--lavender { box-shadow: var(--shadow-glow-violet); }
.qcm-results__msg { color: var(--text-secondary); margin: var(--space-4) 0; }
.qcm-results__details { text-align: left; margin: var(--space-6) 0; }
.qcm-results__details summary { cursor: pointer; font-weight: 600; padding: var(--space-3); background: var(--bg-subtle); border-radius: var(--radius-sm); user-select: none; }
.qcm-results__miss { margin-top: var(--space-2); padding: var(--space-4); background: var(--peach-soft); border-left: 3px solid var(--peach-strong); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: var(--fs-sm); }
.qcm-results__miss strong { display: block; margin-bottom: var(--space-1); }
.qcm-results__miss small { color: var(--text-muted); }

/* Bounce badge */
.badge-bounce { animation: badge-bounce var(--transition-spring) both; }
@keyframes badge-bounce { 0% { opacity: 0; transform: scale(0.5); } 55% { opacity: 1; transform: scale(1.05); } 100% { opacity: 1; transform: scale(1); } }

/* ---------- 23. CAS PRATIQUE ---------- */
.caspratique { padding: var(--space-6) var(--space-8); background: var(--bg-elevated); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); margin: var(--space-6) 0; border-top: 3px solid var(--peach-strong); }
.caspratique__title { display: flex; align-items: center; gap: var(--space-3); font-size: var(--fs-xl); font-weight: 700; color: var(--peach-strong); margin-bottom: var(--space-4); }
.caspratique__statement { margin-bottom: var(--space-4); }
.caspratique__label { display: block; font-weight: 600; margin-bottom: var(--space-2); }
.caspratique__textarea { width: 100%; min-height: 200px; padding: var(--space-4); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); font-family: inherit; font-size: var(--fs-base); line-height: var(--lh-relaxed); background: var(--bg-canvas); color: var(--text-primary); resize: vertical; }
.caspratique__textarea:focus { outline: 2px solid var(--peach-strong); outline-offset: -1px; border-color: var(--peach-strong); }
.caspratique__actions { display: flex; gap: var(--space-3); margin-top: var(--space-3); flex-wrap: wrap; }
.caspratique__correction { display: none; margin-top: var(--space-6); padding: var(--space-5); background: var(--peach-soft); border-radius: var(--radius-md); }
.caspratique.is-revealed .caspratique__correction { display: block; animation: fade-slide-up 300ms; }
.caspratique__correction h4 { color: var(--peach-strong); margin-top: 0; margin-bottom: var(--space-3); }
.caspratique__checklist { list-style: none; padding: 0; margin-top: var(--space-4); }
.caspratique__checklist li { display: flex; align-items: flex-start; gap: var(--space-2); padding: var(--space-2) 0; }
.caspratique__checklist input[type="checkbox"] { margin-top: 4px; accent-color: var(--peach-strong); }

/* ---------- 24. LISTES TASK ---------- */
.task-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--space-3); counter-reset: obj-counter; }
.task-list__item { display: flex; align-items: flex-start; gap: var(--space-4); padding: var(--space-4) var(--space-5); background: var(--bg-elevated); border-radius: var(--radius-md); border: 1px solid var(--border-subtle); border-left: 3px solid var(--violet-accent); box-shadow: var(--shadow-xs); counter-increment: obj-counter; transition: transform var(--transition-fast), box-shadow var(--transition-fast); opacity: 0; transform: translateY(12px); animation: obj-appear var(--transition-slow) forwards; }
.task-list__item:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.task-list__item::before { content: counter(obj-counter); display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: var(--radius-full); background: var(--violet-soft); color: var(--violet-strong); font-family: var(--font-display); font-weight: 400; font-size: var(--fs-lg); flex-shrink: 0; }
.task-list__item:nth-child(1) { animation-delay: 0ms; }
.task-list__item:nth-child(2) { animation-delay: 80ms; }
.task-list__item:nth-child(3) { animation-delay: 160ms; }
.task-list__item:nth-child(4) { animation-delay: 240ms; }
.task-list__item:nth-child(5) { animation-delay: 320ms; }
.task-list__item input[type="checkbox"] { display: none; }
.task-list__item > span { flex: 1; padding-top: 5px; }
@keyframes obj-appear { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- 25. HERO CTA / STATUS BAR ---------- */
.status-bar { display: inline-flex; align-items: center; gap: var(--space-2); padding: 6px var(--space-4); background: var(--bg-elevated); border: 1px solid var(--border-subtle); border-radius: var(--radius-full); font-size: var(--fs-sm); color: var(--text-secondary); box-shadow: var(--shadow-xs); }
.status-bar__dot { width: 8px; height: 8px; border-radius: var(--radius-full); background: var(--mint-strong); }

/* Certificat panel */
.cert-panel { padding: var(--space-8); background: linear-gradient(135deg, var(--violet-soft) 0%, var(--sunshine-soft) 100%); border-radius: var(--radius-xl); border: 1px solid var(--violet-accent); text-align: center; margin: var(--space-8) 0; }
.cert-panel__icon { margin: 0 auto var(--space-4); }
.cert-panel__title { font-family: var(--font-display); font-size: var(--fs-3xl); color: var(--violet-strong); margin-bottom: var(--space-3); }
.cert-panel__desc { max-width: 480px; margin: 0 auto var(--space-6); color: var(--text-secondary); }
.cert-panel__hint { margin-top: var(--space-3); font-size: var(--fs-sm); color: var(--text-muted); font-style: italic; }

/* Hero reveal cascadé */
.dashboard-hero, .dashboard-stats, .dashboard-progress-row, .dashboard-modules, .cert-panel {
  opacity: 0; transform: translateY(12px); animation: hero-reveal var(--transition-slow) forwards;
}
.dashboard-hero { animation-delay: 0ms; }
.dashboard-stats { animation-delay: 100ms; }
.dashboard-progress-row { animation-delay: 200ms; }
.dashboard-modules { animation-delay: 300ms; }
.cert-panel { animation-delay: 400ms; }
@keyframes hero-reveal { to { opacity: 1; transform: none; } }

/* ---------- 26. ANIMATE ON SCROLL ---------- */
.animate-on-scroll { opacity: 0; transform: translateY(20px); transition: opacity var(--transition-slow), transform var(--transition-slow); }
.animate-on-scroll.is-visible { opacity: 1; transform: none; }

/* ---------- 27. FOOTER ---------- */
.site-footer { max-width: var(--max-width-dashboard); margin: var(--space-16) auto var(--space-8); padding: var(--space-8); border-top: 1px solid var(--border-subtle); display: flex; justify-content: space-between; align-items: center; gap: var(--space-6); flex-wrap: wrap; color: var(--text-muted); font-size: var(--fs-sm); }
.site-footer__brand { display: flex; align-items: center; gap: var(--space-3); }
.site-footer__brand img { height: 32px; }
.site-footer__tag { color: var(--text-muted); font-style: italic; }

/* ---------- 28. PROFIL & AVATAR ---------- */
.profile-avatar { display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius-full); background: var(--violet-soft); color: var(--violet-strong); font-weight: 600; font-size: var(--fs-sm); flex-shrink: 0; cursor: default; user-select: none; line-height: 1; }
.profile-avatar--lg { width: 40px; height: 40px; font-size: var(--fs-base); }
.profile-avatar--sm { width: 32px; height: 32px; font-size: var(--fs-xs); }
.profile-chip { display: flex; align-items: center; gap: var(--space-2); position: relative; }
.profile-chip__name { font-size: var(--fs-sm); font-weight: 500; color: var(--text-primary); }
.profile-chip__menu { position: absolute; top: calc(100% + var(--space-2)); right: 0; background: var(--bg-elevated); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); box-shadow: var(--shadow-md); padding: var(--space-2) 0; min-width: 180px; z-index: var(--z-tooltip); opacity: 0; pointer-events: none; transform: translateY(-4px); transition: opacity var(--transition-fast), transform var(--transition-fast); }
.profile-chip__menu.is-open { opacity: 1; pointer-events: auto; transform: translateY(0); }
.profile-chip__menu-item { display: block; width: 100%; padding: var(--space-2) var(--space-4); border: none; background: none; font: inherit; font-size: var(--fs-sm); color: var(--text-primary); text-align: left; cursor: pointer; }
.profile-chip__menu-item:hover { background: var(--bg-subtle); }

.welcome-modal-overlay { position: fixed; inset: 0; z-index: var(--z-modal-overlay); background: rgba(44, 36, 56, 0.5); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; padding: var(--space-6); }
.welcome-modal { background: var(--bg-elevated); border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); max-width: 420px; width: 100%; padding: var(--space-8); text-align: center; }
.welcome-modal__logo { height: 48px; margin-bottom: var(--space-6); }
.welcome-modal__title { font-size: var(--fs-2xl); font-weight: 700; color: var(--text-primary); margin-bottom: var(--space-2); }
.welcome-modal__subtitle { font-size: var(--fs-sm); color: var(--text-secondary); margin-bottom: var(--space-6); line-height: var(--lh-relaxed); }
.welcome-modal__field { display: block; text-align: left; margin-bottom: var(--space-4); }
.welcome-modal__label { display: block; font-size: var(--fs-sm); font-weight: 500; color: var(--text-primary); margin-bottom: var(--space-1); }
.welcome-modal__input { display: block; width: 100%; padding: var(--space-2) var(--space-3); border: 1px solid var(--border-medium); border-radius: var(--radius-sm); font: inherit; font-size: var(--fs-base); background: var(--bg-canvas); color: var(--text-primary); transition: border-color var(--transition-fast); }
.welcome-modal__input:focus { outline: none; border-color: var(--violet-accent); box-shadow: 0 0 0 3px rgba(167, 139, 217, 0.2); }
.welcome-modal__input.is-invalid { border-color: var(--danger); }
.welcome-modal__submit { margin-top: var(--space-4); width: 100%; }

.storage-banner { background: var(--warning-soft); color: var(--warning); border-radius: var(--radius-sm); padding: var(--space-2) var(--space-4); font-size: var(--fs-sm); text-align: center; margin-bottom: var(--space-4); }
.noprofile-banner { background: var(--info-soft); color: var(--info); border-radius: var(--radius-sm); padding: var(--space-2) var(--space-4); font-size: var(--fs-sm); text-align: center; margin-bottom: var(--space-4); }
.noprofile-banner a { color: inherit; text-decoration: underline; }

/* ---------- 29. RESPONSIVE ---------- */
@media (max-width: 1024px) {
  .module-layout { grid-template-columns: 1fr; }
  .module-sidebar-right { display: none; }
  .module-content { max-width: none; }
  .module-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-stats { grid-template-columns: repeat(2, 1fr); }
  .dashboard-progress-row { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  body { font-size: 15px; }
  .layout-dashboard, .layout-module { padding-left: 0; }
  .sidebar-icons { transform: translateX(-100%); transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1); width: 280px; padding: var(--space-8) var(--space-4); }
  .sidebar-icons.is-open { transform: translateX(0); }
  .sidebar-icons__item { min-height: 48px; min-width: 48px; }
  .hamburger-btn { display: flex; }
  .dashboard-main, .module-main { padding: calc(var(--space-16)) var(--space-5) var(--space-16); }
  .module-grid, .dashboard-stats { grid-template-columns: 1fr; }
  .dashboard-hero { grid-template-columns: 1fr; padding: var(--space-6); }
  .dashboard-hero__cta { justify-content: flex-start; }
  .module-header__visual { min-height: 140px; padding: var(--space-6); }
  .module-header__number-huge { font-size: var(--fs-4xl); right: var(--space-4); }
  .module-header__icon-large { width: 96px; height: 96px; }
  .module-header__icon-large svg { width: 48px; height: 48px; }
  .module-header__meta { padding: var(--space-5) var(--space-6) 0; }
  .module-header__title { font-size: var(--fs-2xl); }
  .module-header__stats { gap: var(--space-4); }
  .ad-entra-grid { grid-template-columns: 1fr; }
  .pairs-game__grid { grid-template-columns: 1fr; }
  .modal { width: 100%; height: 100%; max-width: none; max-height: none; border-radius: 0; padding: var(--space-6); }
  .btn, .btn-icon, .reveal-card__trigger, .module-toc__link, .sidebar-icons__item { min-height: 44px; }
}

/* ---------- 29. PRINT ---------- */
@media print {
  .sidebar-icons, .hamburger-btn, .module-sidebar-right, .module-topbar, .dashboard-topbar,
  .btn, .btn-icon, .back-link, .modal-overlay, .skip-link, .link-more, .caspratique__actions,
  .pairs-game__actions, .quickquestion__btn { display: none !important; }
  body { background: white; color: black; font-size: 11pt; line-height: 1.4; font-family: Georgia, serif; }
  .layout-dashboard, .layout-module { grid-template-columns: 1fr; }
  .dashboard-main, .module-main { padding: 0; }
  .module-content { max-width: none; }
  .reveal-card__content { max-height: none !important; padding: 0 var(--space-5) var(--space-5) !important; }
  .quickquestion__answer, .caspratique__correction { display: block !important; }
  .module-section { page-break-inside: avoid; }
  h2, h3 { page-break-after: avoid; color: black; }
  a { color: black; }
  .callout, .content-block, .section-header { break-inside: avoid; background: #f8f6fb; box-shadow: none; }
}

/* ---------- 30. REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .task-list__item, .dashboard-hero, .dashboard-stats, .dashboard-progress-row, .dashboard-modules, .cert-panel { opacity: 1 !important; transform: none !important; animation: none !important; }
  .animate-on-scroll { opacity: 1 !important; transform: none !important; }
}


/* ============ SCORM FULL WIDTH OVERRIDE ============ */
body.scorm-mode .layout-module { padding-left: 0; }
body.scorm-mode .sidebar-icons,
body.scorm-mode .hamburger-btn { display: none !important; }
body.scorm-mode .back-link { display: none; }
body.scorm-mode .module-main {
  max-width: 1600px;
  padding: var(--space-6) var(--space-10) var(--space-16);
}
body.scorm-mode .module-content { max-width: none; }
body.scorm-mode .module-layout {
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: var(--space-8);
}
body.scorm-mode .site-footer {
  max-width: 1600px;
  padding: var(--space-6) var(--space-10);
}
@media (max-width: 1024px) {
  body.scorm-mode .module-layout { grid-template-columns: 1fr; }
}