/* ============================================================
   CDA — main.css
   Toute la DA est ici. Modifie les variables :root pour
   changer les couleurs sur tout le site d'un coup.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;600&family=Caveat:wght@700&display=swap');

/* ── VARIABLES — modifier ici pour changer le design ── */
:root {
  /* Couleurs principales */
  --turquoise:        #00C4B8;
  --turquoise-dim:    rgba(0, 196, 184, 0.10);
  --turquoise-border: rgba(0, 196, 184, 0.25);
  --gold:        #C9922A;
  --gold-dim:    rgba(201, 146, 42, 0.10);
  --rose:        #E8317A;
  --rose-dim:    rgba(232, 49, 122, 0.10);

  /* Mode clair (défaut) */
  --bg:          #F7F7F5;
  --surface:     #FFFFFF;
  --surface2:    #F2F2F0;
  --sidebar-bg:  #2A2A2A;
  --sidebar2:    #222222;
  --sidebar3:    #1C1C1C;
  --border:      #E8E8E4;
  --border2:     #D8D8D4;
  --text:        #1A1A1A;
  --text2:       #4A4A4A;
  --muted:       #888888;
  --muted2:      #BBBBBB;

  /* Typographie */
  --font-sans:   'DM Sans', sans-serif;
  --font-mono:   'JetBrains Mono', monospace;

  /* Layout */
  --sidebar-w:   260px;
  --topbar-h:    52px;
  --radius:      12px;
  --radius-sm:   8px;

  /* Transitions */
  --t:           0.2s ease;
}

/* ── DARK MODE ── */
body.dark {
  --bg:       #1E1E1E;
  --surface:  #252525;
  --surface2: #2A2A2A;
  --border:   #333333;
  --border2:  #3A3A3A;
  --text:     #F0F0F0;
  --text2:    #AAAAAA;
  --muted:    #666666;
  --muted2:   #444444;
}

/* ── RESET ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  display: flex;
  transition: background var(--t), color var(--t);
}
a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: var(--font-sans); }
input, textarea { font-family: var(--font-sans); }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted2); }

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--sidebar-bg);
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: fixed;
  left: 0; top: 0;
  z-index: 100;
  transition: transform var(--t);
}

/* Logo */
.sidebar-logo {
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--sidebar3);
  flex-shrink: 0;
}

.logo-mark {
  display: flex;
  align-items: center;
  gap: 0.15em;
  margin-bottom: 5px;
  font-size: 1.05rem;
}

/* Cercles SVG — taille pilotée par l'em du logo-mark */
.logo-mark svg {
  width: 0.72em;
  height: 0.72em;
  flex-shrink: 0;
}

/* Espace entre le 2e cercle et le texte ORTHOGO */
.logo-mark .logo-name {
  margin-left: 0.3em;
}

/* Les 2 cercles SVG (option A) */
.logo-circles {
  display: flex;
  align-items: center;
  gap: 0.18em;
  flex-shrink: 0;
}
.logo-circles svg {
  width: 0.88em;
  height: 0.88em;
}

.logo-name {
  font-family: 'Caveat', cursive;
  font-weight: 700;
  font-size: 1.3em;
  color: #F0F0F0;
  letter-spacing: 0.02em;
  line-height: 1;
}

.logo-tagline {
  font-family: 'Caveat', cursive;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.01em;
  text-transform: none;
  padding-left: 3px;
  margin-top: 1px;
  line-height: 1.2;
}


/* Navigation */
.sidebar-nav,
.nav-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px 0;
  display: flex;
  flex-direction: column;
}

/* Item principal */
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  cursor: pointer;
  transition: background var(--t);
  position: relative;
  user-select: none;
  border-left: 3px solid transparent;
}
.nav-item:hover { background: var(--sidebar2); }
.nav-item.active {
  background: var(--sidebar2);
  border-left-color: var(--turquoise);
}

.nav-label {
  font-size: 0.82rem;
  font-weight: 500;
  color: #AAA; /* était #666 — trop sombre sur fond anthracite */
  flex: 1;
  transition: color var(--t);
}
.nav-item:hover .nav-label,
.nav-item.active .nav-label { color: #F0F0F0; }

.nav-arrow {
  font-size: 0.55rem;
  color: #777; /* était #444 — quasi invisible */
  transition: transform var(--t), color var(--t);
}
.nav-item.open .nav-arrow {
  transform: rotate(90deg);
  color: #AAA;
}

/* Séparateur de section dans la nav */
.nav-section-label {
  padding: 20px 18px 5px;
  font-family: 'Caveat', cursive;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--turquoise);
}
/* Pousse le groupe Contact en bas */
.nav-bottom {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

/* Badge nav */
.nav-badge {
  font-size: 0.58rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--turquoise-dim);
  color: var(--turquoise);
  border: 1px solid var(--turquoise-border);
}

/* Sous-menu */
.submenu {
  display: none;
  background: var(--sidebar3);
}
.submenu.open { display: block; }

.sub-section-label {
  padding: 8px 18px 3px 44px;
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #666; /* était #333 — invisible sur fond #1C1C1C */
  font-weight: 700;
}

.sub-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px 6px 44px;
  cursor: pointer;
  transition: background var(--t);
}
.sub-item:hover { background: rgba(255,255,255,0.03); }
.sub-item.active { background: rgba(255,255,255,0.05); }

.sub-dot {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: #666; /* était #333 — invisible sur fond sombre */
  flex-shrink: 0;
  transition: background var(--t);
}
.sub-item:hover .sub-dot,
.sub-item.active .sub-dot { background: var(--turquoise); }

.sub-label {
  font-size: 0.78rem;
  color: #999; /* était #555 — trop sombre sur fond anthracite */
  transition: color var(--t);
}
.sub-item:hover .sub-label,
.sub-item.active .sub-label { color: #CCC; }

/* Tag sidebar (Gratuit / 🔒 Pro / Bientôt).
   white-space: nowrap garde l'emoji et le texte sur une seule ligne. */
.sub-tag {
  font-size: 0.58rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 3px;
  margin-left: auto;
  white-space: nowrap;
}
.sub-tag.live  { background: rgba(34,197,94,0.15);  color: #22c55e; }
.sub-tag.new   { background: var(--turquoise-dim);        color: var(--turquoise); }
.sub-tag.soon  { background: rgba(255,255,255,0.07); color: #888; }
.sub-tag.free  { background: var(--gold-dim);        color: var(--gold); }
.sub-tag.paid  { background: var(--turquoise-dim);        color: var(--turquoise); }

/* Footer sidebar */
.sidebar-footer {
  padding: 14px 18px;
  border-top: 1px solid var(--sidebar3);
  flex-shrink: 0;
}
.profile-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--turquoise), var(--gold));
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #FFF;
  flex-shrink: 0;
}
.profile-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: #CCC;
}
.profile-role {
  font-size: 0.62rem;
  color: #444;
  margin-top: 1px;
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

/* Conteneur principal Ortho-go (equivalent de .main dans OCODA) */
.app-shell {
  margin-left: var(--sidebar-w);
  flex: 1;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

/* Zone de contenu a l'interieur de l'app-shell, apres la topbar */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* Topbar */
.topbar {
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 50;
  transition: background var(--t), border-color var(--t);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.breadcrumb-sep {
  color: var(--muted2);
  font-size: 0.8rem;
}

.topbar-sub {
  font-size: 0.8rem;
  color: var(--muted);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ── Compteur de jetons (topbar) ── */
.jetons-counter {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 5px 12px;
  border-radius: 20px;
  background: rgba(0,196,184,.10);
  border: 1px solid rgba(0,196,184,.25);
  transition: background 0.2s;
  margin-right: 12px;
}
.jetons-counter:hover { background: rgba(0,196,184,.20); }
.jetons-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--turquoise); flex-shrink: 0; }
.jetons-count { font-size: 0.82rem; font-weight: 600; color: var(--turquoise); }

/* ── Barre de recherche ── */
.search-wrap {
  position: relative;
  width: 360px;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.85rem;
  pointer-events: none;
  opacity: 0.5;
}

.search-input {
  width: 100%;
  height: 34px;
  padding: 0 14px 0 34px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.82rem;
  outline: none;
  transition: border-color var(--t), box-shadow var(--t);
  /* Retire le bouton natif "effacer" de certains navigateurs */
}
.search-input::-webkit-search-cancel-button { display: none; }
.search-input::placeholder { color: var(--muted2); }
.search-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-dim);
}

/* Dropdown de résultats */
.search-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  z-index: 200;
  overflow: hidden;
}
.search-dropdown.open { display: block; }

.search-result {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background var(--t);
  border-bottom: 1px solid var(--border);
}
.search-result:last-child { border-bottom: none; }
.search-result:hover,
.search-result.active { background: var(--hover); }

.search-badge {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  border-radius: 10px;
  white-space: nowrap;
  flex-shrink: 0;
}
.search-badge-kit   { background: var(--gold-dim);     color: var(--gold); }
.search-badge-excel { background: rgba(34,197,94,.12); color: #16a34a; }
.search-badge-sql   { background: rgba(99,102,241,.12); color: #6366f1; }

.search-result-title {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-result-sub {
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.search-no-result {
  padding: 14px;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}

/* Sur mobile : cache la barre de recherche, trop peu de place */
@media (max-width: 700px) {
  .search-wrap { display: none; }
}

.badge-beta {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  background: var(--turquoise-dim);
  color: var(--turquoise);
  border: 1px solid var(--turquoise-border);
  letter-spacing: 0.06em;
}

.btn-icon {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  transition: all var(--t);
}
.btn-icon:hover {
  background: var(--surface2);
  color: var(--text);
  border-color: var(--border2);
}

/* ── PAGES ── */
.page {
  display: none;
  padding: 36px 40px 60px;
  animation: fadeUp 0.25s ease;
}
.page.active { display: block; }

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

/* ============================================================
   PAGE ACCUEIL
   ============================================================ */
.hero {
  max-width: 680px;
  margin-bottom: 48px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}
.eyebrow-line {
  width: 28px; height: 2px;
  background: var(--turquoise);
  border-radius: 2px;
  flex-shrink: 0;
}
.eyebrow-text {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--turquoise);
}

.hero h1 {
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 16px;
}
.hero h1 em {
  font-style: normal;
  color: var(--turquoise);
}

/* Paragraphe d'intro du hero */
.hero p {
  font-size: 1rem;
  color: var(--text2);
  line-height: 1.7;
  margin-bottom: 28px;
  max-width: 100%;
  text-align: justify;
}

.hero-cta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Boutons */
.btn-primary {
  padding: 11px 24px;
  background: var(--turquoise);
  color: #FFF;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 700;
  transition: all var(--t);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-primary:hover {
  background: #D42B6E;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(232,49,122,0.3);
}

.btn-secondary {
  padding: 11px 24px;
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border2);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all var(--t);
}
.btn-secondary:hover {
  border-color: var(--muted);
  background: var(--surface2);
}
.btn-gold {
  padding: 11px 24px;
  background: rgba(201,146,42,0.08);
  color: var(--gold);
  border: 1.5px solid rgba(201,146,42,0.35);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all var(--t);
}
.btn-gold:hover {
  background: rgba(201,146,42,0.15);
  border-color: var(--gold);
}

/* Value cards */
.value-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 40px;
}

.value-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: all var(--t);
}
.value-card:hover {
  border-color: var(--turquoise-border);
  box-shadow: 0 4px 20px rgba(232,49,122,0.06);
  transform: translateY(-2px);
}

/* Hover effect : barre rose gauche */
.value-card::before {
  content: '';
  display: block;
  width: 0;
  height: 2px;
  background: var(--turquoise);
  border-radius: 2px;
  margin-bottom: 14px;
  transition: width 0.3s ease;
}
.value-card:hover::before { width: 32px; }

.value-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.value-desc {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.6;
  text-align: justify;
}

/* Tags métier */
.metiers-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}
.secteurs-wrap {
  margin-bottom: 48px;
}
.secteurs-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}
.secteur-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 14px 12px;
}
.secteur-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.04em;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.secteur-icone { font-size: 0.9rem; }
.secteur-tags {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.secteur-tags .metier-tag {
  font-size: 0.68rem;
  padding: 4px 10px;
  border-radius: 4px;
  font-weight: 500;
  width: fit-content;
}
.metiers-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.metier-tag {
  padding: 7px 14px;
  border-radius: 30px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1.5px solid;
  transition: all var(--t);
  cursor: pointer;
}
.metier-tag.rose {
  border-color: var(--turquoise-border);
  color: var(--turquoise);
  background: var(--turquoise-dim);
}
.metier-tag.rose:hover { background: rgba(232,49,122,0.16); }
.metier-tag.neutral {
  border-color: var(--border);
  color: var(--text2);
  background: var(--surface);
}
.metier-tag.neutral:hover {
  border-color: var(--border2);
  color: var(--text);
}

/* ── Section "Par où commencer ?" ────────────────────────────────
   Insérée entre les 3 value-cards et la grille secteurs.
   Deux profils sélectionnables ; les étapes s'adaptent via JS.
──────────────────────────────────────────────────────────────── */
.parcours-section {
  margin: 52px 0 48px;
}
.parcours-header {
  margin-bottom: 24px;
}
/* Boutons de sélection de profil */
.parcours-profiles {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.profile-btn {
  padding: 9px 20px;
  border-radius: 24px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text2);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color var(--t), color var(--t), background var(--t);
  font-family: var(--font-sans);
}
.profile-btn:hover {
  border-color: var(--turquoise);
  color: var(--turquoise);
}
.profile-btn.active {
  border-color: var(--turquoise);
  background: var(--turquoise);
  color: #fff;
}
/* Grille des 4 étapes */
.parcours-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
/* Carte d'une étape */
.parcours-step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
/* Numéro de l'étape dans un cercle rose */
.parcours-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--turquoise);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.parcours-step-content {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}
.parcours-step-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}
.parcours-step-desc {
  font-size: 0.75rem;
  color: var(--text2);
  line-height: 1.5;
  flex: 1;
}
/* Badges en bas de chaque étape */
.parcours-badge {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 2px 8px;
  border-radius: 4px;
  margin-top: 4px;
  width: fit-content;
}
.parcours-badge.free { background: rgba(0,196,184,0.1); color: var(--turquoise); }
.parcours-badge.sub  { background: rgba(201,146,42,0.12); color: var(--gold); }
.parcours-badge.soon { background: var(--surface2); color: var(--muted2); }

/* Responsive : 2 colonnes sur tablette, 1 sur mobile */
@media (max-width: 900px) {
  .parcours-steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  .parcours-steps { grid-template-columns: 1fr; }
  .parcours-profiles { flex-direction: column; }
  .profile-btn { width: 100%; text-align: center; }
}

/* Offres — 2 colonnes depuis la suppression du kit 99€ */
.offres-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  max-width: 720px;
  gap: 14px;
  margin-top: 48px;
}
.offre-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: all var(--t);
  display: flex;
  flex-direction: column;
}
.offre-card.premium {
  border-color: var(--turquoise-border);
  background: linear-gradient(135deg, var(--surface) 0%, rgba(232,49,122,0.03) 100%);
}
.offre-card:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(0,0,0,0.08); }
.offre-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.offre-label.rose { color: var(--turquoise); }
.offre-label.gold { color: var(--gold); }
.offre-price {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.offre-price span {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--muted);
}
.offre-desc {
  font-size: 0.78rem;
  color: var(--text2);
  line-height: 1.6;
  margin-bottom: 16px;
  text-align: justify;
}
.offre-items {
  list-style: none;
  margin-bottom: 0;
  flex: 1;
}
.offre-footer {
  margin-top: auto;
  padding-top: 18px;
}
.offre-annual {
  text-align: center;
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 7px;
}
.offre-items li {
  font-size: 0.78rem;
  color: var(--text2);
  padding: 3px 0;
  display: flex;
  align-items: center;
  gap: 7px;
}
.offre-items li::before {
  content: '·';
  color: var(--turquoise);
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}

/* Section header */
.section-header {
  margin-bottom: 28px;
}
/* H1 de page — spec 2b */
.section-title {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 6px;
}
/* Sous-titre de page */
.section-sub {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.6;
}
/* H2 de section a l'interieur d'une page */
.section-h2 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin: 32px 0 10px;
}
.section-h2:first-child { margin-top: 0; }

/* ============================================================
   PAGE FORMATIONS
   ============================================================ */
.formation-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
  transition: border-color var(--t);
}
.formation-block:hover { border-color: var(--border2); }

.formation-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  cursor: pointer;
  transition: background var(--t);
  user-select: none;
}
.formation-header:hover { background: var(--surface2); }

.formation-icon {
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.f-green  { background: rgba(34,197,94,0.1); }
.f-blue   { background: rgba(59,130,246,0.1); }
.f-purple { background: rgba(168,85,247,0.1); }
.f-orange { background: rgba(249,115,22,0.1); }
.f-teal   { background: rgba(20,184,166,0.1); }

.formation-info { flex: 1; }
.formation-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}
.formation-count {
  font-size: 0.72rem;
  color: var(--muted);
}

.formation-chevron {
  font-size: 0.65rem;
  color: var(--muted2);
  transition: transform var(--t);
  flex-shrink: 0;
}
.formation-block.open .formation-chevron { transform: rotate(180deg); }

.formation-body {
  display: none;
  border-top: 1px solid var(--border);
}
.formation-block.open .formation-body { display: block; }

.theme-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 22px;
  cursor: pointer;
  transition: background var(--t);
  border-bottom: 1px solid var(--border);
}
.theme-row:last-child { border-bottom: none; }
.theme-row:hover { background: var(--surface2); }

.theme-num {
  width: 26px; height: 26px;
  border-radius: 6px;
  background: var(--surface2);
  display: grid;
  place-items: center;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--muted);
  flex-shrink: 0;
  font-family: var(--font-mono);
}
.theme-num.free { background: var(--gold-dim); color: var(--gold); }

.theme-name {
  font-size: 0.83rem;
  color: var(--text2);
  flex: 1;
}

/* ============================================================
   PAGE KITS MÉTIER — layout 2 colonnes (miroir de .xl-layout)
   ============================================================ */

/* Layout racine : liste à gauche + panneau détail à droite */
.kits-layout {
  display: flex;
  gap: 0;
  min-height: calc(100vh - var(--topbar-h));
  margin: -36px -40px -60px; /* annule le padding de .page */
  align-items: stretch;
}

/* Colonne gauche : liste alphabétique des kits */
.kits-list {
  width: 240px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  overflow-y: auto;
}

/* Colonne droite : scrollable */
.kits-main {
  flex: 1;
  overflow-y: auto;
  background: var(--bg);
}

/* Zone de contenu du détail kit — pleine largeur pour le grid de cartes */
.kit-detail-wrap {
  padding: 28px 32px;
}

/* ── En-tête du kit — section à part entière ── */
.kit-detail-header {
  padding-bottom: 28px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

/* Secteur — petite étiquette en haut */
.kit-detail-secteur {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--turquoise);
  margin-bottom: 10px;
}

/* Titre principal — grand et lisible */
.kit-detail-title {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.15;
  margin-bottom: 4px;
}

/* Sous-titre — thématique / type de professionnel */
.kit-detail-thematique {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 18px;
}

/* Description — vraie proposition de valeur */
.kit-detail-desc {
  font-size: 0.88rem;
  color: var(--text2);
  line-height: 1.7;
  max-width: 560px;
  text-align: justify;
}

/* Bloc "Ce kit contient" — résumé structuré du kit complet */
.kit-summary-box {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 14px 18px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.kit-summary-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  margin-top: 1px;
}
.kit-summary-text {
  flex: 1;
}
.kit-summary-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: 4px;
}
.kit-summary-desc {
  font-size: 0.78rem;
  color: var(--text2);
  line-height: 1.5;
}
.kit-summary-count {
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 4px;
}

/* En-tête de secteur dans la liste gauche (ex: "🏥 Santé") */
.kit-sector-label {
  padding: 12px 16px 4px;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-top: 6px;
}
.kit-sector-label:first-child {
  margin-top: 0;
}

/* Badge "Bientôt" dans la liste gauche */
.kit-nav-soon {
  font-size: 0.58rem;
  font-weight: 600;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 3px;
  padding: 1px 5px;
  margin-left: auto;
  flex-shrink: 0;
}

/* Corps du kit : fichiers + footer */
.kit-detail-body {}

.kit-section-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 10px;
}

/* ── Footer kit — carte d'achat harmonieuse ── */
.kit-detail-footer {
  margin-top: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.kit-footer-top {
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--border);
}
.kit-footer-label {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 4px;
}
.kit-footer-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
}
.kit-footer-sub {
  font-size: 0.72rem;
  color: var(--muted);
}
.kit-footer-bottom {
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.kit-detail-price {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text);
}
.kit-detail-price small {
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--muted);
}
.kit-footer-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.kit-detail-price.free {
  color: var(--gold);
}

/* ============================================================
   PAGE TEMPLATES (ancien code conservé pour compatibilité)
   ============================================================ */
.templates-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.template-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--t);
}
.template-card:hover {
  border-color: var(--turquoise-border);
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.template-preview {
  height: 140px;
  background: var(--sidebar-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Effet data loading au hover */
.template-card:hover .preview-bar {
  width: 100% !important;
  transition: width 0.6s ease;
}
.preview-bar {
  position: absolute;
  bottom: 0; left: 0;
  height: 2px;
  background: var(--turquoise);
  width: 0;
}

.preview-circles-lg {
  display: flex;
  gap: 10px;
  opacity: 0.25;
}

.preview-label {
  position: absolute;
  bottom: 10px; right: 10px;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 4px;
}
.preview-label.available {
  background: rgba(34,197,94,0.15);
  color: #22c55e;
  border: 1px solid rgba(34,197,94,0.3);
}
.preview-label.soon {
  background: rgba(255,255,255,0.05);
  color: #666;
}
/* Badge GRATUIT — vert vif pour attirer l'œil et distinguer des kits payants.
   Pour changer la couleur : modifiez les valeurs rgba et #22c55e ci-dessous. */
.preview-label.free {
  background: rgba(34,197,94,0.2);
  color: #16a34a;
  border: 1px solid rgba(34,197,94,0.4);
}

.template-body { padding: 18px 20px; }

/* Thématique du kit — affichée en petit entre le nom du métier et le titre.
   Permet de naviguer rapidement par sujet dans un secteur. */
.template-thematique {
  font-size: 0.68rem;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 6px;
  margin-top: -2px;
}

/* Prix affiché pour les kits gratuits — vert pour cohérence avec le badge GRATUIT */
.template-price-free {
  font-size: 1rem;
  font-weight: 800;
  color: #16a34a;
}

/* Bouton "Télécharger" pour les kits gratuits — vert au lieu du rose */
.btn-sm.btn-free {
  background: #22c55e;
  color: #fff;
}
.btn-sm.btn-free:hover {
  background: #16a34a;
}
.template-metier {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--turquoise);
  margin-bottom: 5px;
}
.template-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.template-desc {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 14px;
}
/* ── Grille de cartes fichiers — cherry-pick ──────────────────────────────
   2 colonnes sur desktop, 1 sur mobile.
   Pour ajouter un fichier : ajoutez un objet dans le tableau fichiers[] du kit. */
.kit-files-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

/* Carte individuelle par fichier */
.kit-file-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color var(--t), box-shadow var(--t);
}
.kit-file-card:hover {
  border-color: rgba(201,146,42,0.45);
  box-shadow: 0 4px 20px rgba(201,146,42,0.07);
}

/* Zone aperçu / screenshot — placeholder quadrillé */
.kit-file-screenshot {
  height: 130px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
/* Motif "tableau de données" en arrière-plan */
.kit-file-screenshot::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 32px 22px;
  opacity: 0.35;
}
.kit-screenshot-ph {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.kit-screenshot-ph-icon {
  font-size: 2rem;
  opacity: 0.45;
  line-height: 1;
}
.kit-screenshot-ph-label {
  font-size: 0.6rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

/* Contenu texte de la carte */
.kit-file-content {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.kit-file-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
}
.kit-file-tagline {
  font-size: 0.73rem;
  color: var(--muted);
  line-height: 1.4;
  margin-bottom: 12px;
}

/* Points de valeur — ce que le fichier permet de faire */
.kit-file-apports {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1; /* pousse le bouton en bas de la carte */
}
.kit-file-apports li {
  font-size: 0.73rem;
  color: var(--text2);
  padding-left: 16px;
  position: relative;
  line-height: 1.45;
}
.kit-file-apports li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--gold);
  font-weight: 700;
  font-size: 0.68rem;
  top: 1px;
}

/* Bouton de téléchargement — doré, pleine largeur */
.btn-kit-dl {
  width: 100%;
  padding: 8px 14px;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  border: 1.5px solid rgba(201,146,42,0.45);
  background: rgba(201,146,42,0.06);
  color: var(--gold);
  cursor: pointer;
  letter-spacing: 0.04em;
  text-align: center;
  transition: background var(--t), border-color var(--t);
}
.btn-kit-dl:hover:not(:disabled) {
  background: rgba(201,146,42,0.13);
  border-color: var(--gold);
}
.btn-kit-dl:disabled {
  border-color: var(--border);
  color: var(--muted);
  cursor: not-allowed;
  background: transparent;
}
/* Gratuit — fond doré plein */
.btn-kit-dl.gratuit {
  background: var(--gold);
  color: #fff;
  border-color: var(--gold);
}
.btn-kit-dl.gratuit:hover:not(:disabled) {
  background: #b07d20;
  border-color: #b07d20;
}

/* Séparateur "ou tout le kit" */
.kit-bundle-sep {
  font-size: 0.65rem;
  font-weight: 600;
  text-align: center;
  color: var(--muted);
  margin: 4px 0 16px;
  position: relative;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.kit-bundle-sep::before,
.kit-bundle-sep::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 38%;
  height: 1px;
  background: var(--border);
}
.kit-bundle-sep::before { left: 0; }
.kit-bundle-sep::after  { right: 0; }

/* Secteur cliquable sur l'accueil — curseur pointer */
.secteur-block.clickable {
  cursor: pointer;
  transition: border-color var(--t), background var(--t);
}
.secteur-block.clickable:hover {
  border-color: var(--turquoise-border);
  background: var(--surface2);
}
.template-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.template-price {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.01em;
}
.template-price small {
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--muted);
}
.btn-group { display: flex; gap: 7px; }

.btn-sm {
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 700;
  transition: all var(--t);
  border: none;
}
.btn-sm.solid {
  background: var(--turquoise);
  color: #FFF;
}
.btn-sm.solid:hover { background: #D42B6E; }
.btn-sm.outline {
  background: transparent;
  color: var(--turquoise);
  border: 1.5px solid var(--turquoise-border);
}
.btn-sm.outline:hover { background: var(--turquoise-dim); }
.btn-sm:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* Section thème templates */
.template-theme { margin-bottom: 40px; }
.template-theme-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.template-theme-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
}
.theme-icone { font-size: 1rem; }
.template-theme-metiers {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.theme-metier-chip {
  font-size: 0.68rem;
  color: var(--muted);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 8px;
}

/* Compat ancienne classe */
.template-cat-title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.template-cat-title.gold { color: var(--gold); border-color: var(--gold-dim); }

/* ============================================================
   PAGE PUBLICATIONS
   ============================================================ */
.pub-filters {
  display: flex;
  gap: 6px;
  margin-bottom: 24px;
}
.filter-btn {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--surface);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  transition: all var(--t);
}
.filter-btn:hover { border-color: var(--border2); color: var(--text); }
.filter-btn.active {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}
body.dark .filter-btn.active {
  background: #F0F0F0;
  color: #111;
}

.pub-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.pub-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--t);
}
.pub-card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.08);
  transform: translateY(-2px);
  border-color: var(--border2);
}
.pub-thumb {
  height: 110px;
  background: var(--sidebar-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}
.pub-body { padding: 14px; }
.pub-type {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 5px;
}
.pub-type.dashboard { color: var(--turquoise); }
.pub-type.article   { color: #3B82F6; }
.pub-type.stats     { color: var(--gold); }
.pub-title {
  font-size: 0.83rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: 5px;
}
.pub-desc { font-size: 0.75rem; color: var(--muted); line-height: 1.5; margin-bottom: 8px; }
.pub-date { font-size: 0.7rem; color: var(--muted2); }

/* ============================================================
   MODULE EXCEL INTERACTIF
   ============================================================ */
.xl-layout {
  display: flex;
  gap: 0;
  min-height: calc(100vh - var(--topbar-h));
  margin: -36px -40px -60px;
  align-items: stretch;
}

/* Exercices sidebar */
.xl-exos {
  width: 220px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 12px 8px;
}
.xl-exo-item {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  margin-bottom: 4px;
  border: 1px solid transparent;
  transition: all var(--t);
}
.xl-exo-item:hover { background: var(--surface2); border-color: var(--border); }
.xl-exo-item.active { background: var(--gold-dim); border-color: var(--gold); }
.xl-exo-badge {
  font-size: 0.58rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 3px;
  margin-bottom: 4px;
  display: inline-block;
}
/* Niveaux : Débutant → Intermédiaire → Avancé → Expert */
.badge-debutant     { background: rgba(34,197,94,0.15);  color: #22c55e; }
.badge-intermediaire{ background: var(--gold-dim);        color: var(--gold); }
.badge-avance       { background: rgba(239,68,68,0.12);   color: #ef4444; }
.badge-expert       { background: rgba(232,49,122,0.15);  color: var(--turquoise); }
.badge-theorie {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 4px;
  background: var(--surface2);
  color: var(--muted);
  border: 1px solid var(--border);
}
.xl-exo-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text2);
}
.xl-exo-item.active .xl-exo-title { color: var(--gold); }

/* Zone principale Excel — scrollable verticalement */
.xl-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  min-width: 0;
}

/* En-tête de l'exercice sélectionné */
.xl-exo-header {
  padding: 24px 32px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.xl-exo-header .exo-title { font-size: 1.05rem; margin-bottom: 6px; }
.xl-exo-header .exo-desc  { margin-bottom: 0; }

/* Ligne info : vidéo + hint côte à côte */
.xl-info-row {
  display: flex;
  gap: 20px;
  padding: 20px 32px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.xl-video-col { flex: 0 0 calc(55% - 10px); min-width: 0; display: flex; flex-direction: column; }
.xl-hint-col  { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: flex-start; }
/* Vidéo et hint fill toute la hauteur de la ligne */
.xl-video-col .video-box { flex: 1; margin-bottom: 0; }
.xl-hint-col  .hint-box  { flex: 1; margin-bottom: 0; }

/* Séparateur "Pratique" */
.xl-pratique-sep {
  padding: 5px 0 5px 0;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  border-top: 1px solid var(--border);
  margin: 10px 0 0;
  flex-shrink: 0;
}
/* Panel sélecteur de jeu de données — style cohérent avec SQL */
.xl-sector-panel {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin: 6px 0 10px;
  flex-wrap: wrap;
  flex-shrink: 0;
}
.xl-sector-panel-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  white-space: nowrap;
  padding-right: 4px;
  border-right: 1px solid var(--border);
  margin-right: 2px;
}
.xl-sector-panel-btns {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
}
.xl-sector-btn {
  padding: 3px 9px;
  font-size: 0.71rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text2);
  cursor: pointer;
  transition: background var(--t), border-color var(--t), color var(--t);
  white-space: nowrap;
  line-height: 1.4;
}
.xl-sector-btn:hover { background: var(--surface2); border-color: var(--border2); }
.xl-sector-btn.active {
  background: var(--turquoise-dim);
  border-color: var(--turquoise-border);
  color: var(--turquoise);
  font-weight: 600;
}
.xl-sector-status {
  font-size: 0.65rem;
  color: var(--muted);
  margin-left: auto;
  white-space: nowrap;
}

/* Zone tableur — overflow: visible requis pour que le dropdown d'autocomplétion
   puisse déborder en dessous de la barre de formule sans être rogné.
   Hauteur augmentée à 480px pour intégrer le corps du ruban (~52px). */
.xl-tool {
  display: flex;
  flex-direction: column;
  height: 480px;
  flex-shrink: 0;
  overflow: visible;
  border-bottom: 1px solid var(--border);
}

/* Ruban onglets Excel — bande rose DA en haut */
.xl-ribbon {
  display: flex;
  align-items: flex-end;
  gap: 0;
  padding: 0 8px;
  height: 32px;
  background: var(--surface);
  border-bottom: 1px solid #d0cfcb;
  border-top: 3px solid var(--turquoise);
  flex-shrink: 0;
}
.xl-ribbon-tab {
  padding: 5px 13px 4px;
  font-size: 0.72rem;
  font-weight: 500;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  cursor: pointer;
  line-height: 1;
  transition: color var(--t), border-color var(--t);
}
.xl-ribbon-tab:hover { color: var(--text); }
.xl-ribbon-tab.active {
  color: var(--turquoise);
  border-bottom-color: var(--turquoise);
  font-weight: 700;
}

/* Corps du ruban — groupes de commandes sous les tabs */
.xl-ribbon-body {
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 4px 8px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  min-height: 52px;
  flex-shrink: 0;
  overflow: visible;
}
.xl-rgroup {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 2px 12px 2px 4px;
  border-right: 1px solid var(--border);
  min-width: 0;
}
.xl-rgroup:last-child { border-right: none; }
.xl-rgroup-label {
  font-size: 0.62rem;
  color: var(--muted2);
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
  margin-top: auto;
  padding-top: 2px;
}
.xl-rgroup-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}
/* Bouton de commande ribbon */
.xl-rcmd {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 3px 7px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 3px;
  font-size: 0.7rem;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--t), border-color var(--t);
  line-height: 1.2;
}
.xl-rcmd:hover {
  background: var(--surface2);
  border-color: var(--border);
}
/* Commande "formula" — met en avant les fonctions Excel */
.xl-rcmd.fn {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--turquoise);
  padding: 3px 8px;
}
.xl-rcmd.fn:hover { color: var(--turquoise); }
/* Commande décorative grisée */
.xl-rcmd.dim { color: var(--muted2); cursor: default; }
.xl-rcmd.dim:hover { background: transparent; border-color: transparent; }

/* Boutons vérification */
.xl-actions {
  padding: 16px 32px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
  flex-shrink: 0;
}
.xl-actions .check-btn,
.xl-actions .reset-btn {
  width: auto;
  min-width: 180px;
}
.xl-actions .result-msg { flex-basis: 100%; }

/* Barre de formule — style Excel */
.xl-fbar {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0;
  height: 30px;
  background: var(--surface);
  border-bottom: 1px solid #d0cfcb;
  flex-shrink: 0;
}
/* Séparateur vertical dans la barre de formule */
.xl-fbar-sep {
  width: 1px;
  height: 18px;
  background: #d0cfcb;
  flex-shrink: 0;
  margin: 0 2px;
}
.cell-ref-box {
  width: 76px;
  height: 100%;
  text-align: center;
  background: var(--surface);
  border: none;
  border-right: 1px solid #d0cfcb;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  flex-shrink: 0;
  padding: 0 6px;
}
.fx-sym {
  color: var(--turquoise);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 700;
  flex-shrink: 0;
  padding: 0 10px;
  border-right: 1px solid #d0cfcb;
  height: 100%;
  display: flex;
  align-items: center;
}
.formula-bar {
  flex: 1;
  height: 100%;
  background: var(--surface);
  border: none;
  border-radius: 0;
  color: var(--text);
  font-family: 'Calibri', 'DM Sans', 'Arial', sans-serif;
  font-size: 0.82rem;
  padding: 0 10px;
  outline: none;
}
.formula-bar:focus {
  background: #fffde7;
  box-shadow: inset 0 0 0 1px var(--gold);
}
.dark .formula-bar:focus { background: #2a2a1a; }

/* Toggle FR/EN */
.lang-toggle {
  display: flex;
  gap: 2px;
  background: var(--surface2);
  border-radius: 6px;
  padding: 2px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.lang-btn {
  padding: 3px 10px;
  border: none;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  background: transparent;
  color: var(--muted);
  transition: all var(--t);
}
.lang-btn.active {
  background: var(--surface);
  color: var(--turquoise);
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

/* Tableur — style Excel réel */
.xl-sheet-wrap { flex: 1; overflow: auto; min-height: 0; }
.xl-table { border-collapse: collapse; min-width: 100%; }

/* En-têtes colonnes / lignes — style Excel */
.xl-table th {
  position: sticky;
  background: #f0f0ef;
  color: #555;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 500;
  border: 1px solid #d0cfcb;
  height: 22px;
  text-align: center;
  user-select: none;
  min-width: 72px;
}
.dark .xl-table th { background: #2a2a2a; color: #999; border-color: #3a3a3a; }
.xl-table th.corner { top: 0; left: 0; z-index: 4; width: 36px; min-width: 36px; background: #e8e8e7; }
.xl-table th.col-h  { top: 0; z-index: 3; }
.xl-table th.row-h  { left: 0; z-index: 2; width: 36px; min-width: 36px; font-size: 0.68rem; }
/* En-tête actif — colonne / ligne sélectionnée */
.xl-table th.col-active,
.xl-table th.row-active {
  background: var(--turquoise) !important;
  color: #fff !important;
  border-color: rgba(232,49,122,0.6) !important;
}

.xl-table td {
  background: var(--surface);
  border: 1px solid #d0cfcb;
  height: 22px;
  min-width: 72px;
  padding: 0;
  position: relative;
}
.dark .xl-table td { border-color: #3a3a3a; }
.xl-table td.selected {
  background: var(--turquoise-dim) !important;
  outline: 2px solid var(--turquoise);
  outline-offset: -2px;
  z-index: 1;
}
.xl-table td.formula-cell { background: var(--turquoise-dim); }
.xl-table td.in-range {
  background: var(--turquoise-dim) !important;
  outline: 1px solid var(--turquoise-border);
  outline-offset: -1px;
}
.xl-table td.fill-preview {
  background: var(--turquoise-dim) !important;
  outline: 1px dashed var(--turquoise);
  outline-offset: -1px;
}
.xl-table td.formula-range {
  background: rgba(79,142,247,0.10) !important;
  outline: 2px solid #4f8ef7;
  outline-offset: -2px;
}
/* Surlignage rose des cellules référencées lors de la saisie d'une formule */
.xl-table td.formula-typed-ref {
  background: var(--turquoise-dim) !important;
  outline: 2px solid var(--turquoise);
  outline-offset: -2px;
}

/* Poignée de recopie */
.fill-handle {
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 8px;
  height: 8px;
  background: var(--turquoise);
  border: 1px solid var(--surface);
  cursor: crosshair;
  z-index: 10;
  border-radius: 1px;
}
.xl-table td.error-cell input { color: #d93025; }

.xl-table td input {
  width: 100%;
  height: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: 'Calibri', 'DM Sans', 'Arial', sans-serif;
  font-size: 0.8rem;
  padding: 0 4px;
  cursor: default;
  white-space: nowrap;
}
.xl-table td input:focus {
  cursor: text;
  background: #fffde7;
}
.dark .xl-table td input:focus { background: #2a2a1a; }

.exo-title { font-size: 0.95rem; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.exo-desc  { font-size: 0.82rem; color: var(--muted); line-height: 1.65; margin-bottom: 0; }

.hint-box {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 14px;
}
.hint-title {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
  margin-bottom: 5px;
}
.hint-text {
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: var(--text);
  line-height: 1.5;
}

/* ── Bloc théorie dans les exercices ── */
.theorie-block {
  margin: 0 32px 0;
  padding: 16px 20px;
  background: var(--surface2);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.theorie-header {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
}
.theorie-icon  { font-size: 0.85rem; }
.theorie-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
}
.theorie-utilite {
  font-size: 0.84rem;
  line-height: 1.65;
  color: var(--text);
  margin-bottom: 10px;
  text-align: justify;
}
.theorie-metier-wrap {
  display: block;
  padding: 10px 0;
  background: var(--gold-dim);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(201, 146, 42, 0.30);
  margin-top: 8px;
}
.theorie-metier-wrap .theorie-exemple-label {
  color: var(--gold);
  display: block;
  margin-bottom: 8px;
  padding: 0 12px;
}
.theorie-metier {
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--text);
}
.theorie-metier .chapter-list li {
  background: transparent;
  border: none;
  padding-top: 3px;
  padding-bottom: 3px;
}
.theorie-exemple-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 14px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-top: 12px;
}
.theorie-exemple-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.theorie-exemple-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Étape d'action — barre latérale subtile */
.exemple-step {
  font-size: 0.82rem;
  color: var(--text);
  line-height: 1.65;
  padding: 5px 0 5px 12px;
  border-left: 2px solid var(--border);
  text-align: justify;
}

/* Résultat — fond vert clair, icône ✓ */
.exemple-result {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.82rem;
  line-height: 1.65;
  padding: 6px 10px;
  background: rgba(34, 197, 94, 0.07);
  border-left: 2px solid #22c55e;
  border-radius: 0 4px 4px 0;
  color: var(--text);
  text-align: justify;
}
.exemple-result-icon {
  color: #22c55e;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
  font-size: 0.8rem;
}

/* ── Bouton révéler / masquer la formule ou solution ── */
.hint-reveal-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text2);
  font-size: 0.78rem;
  font-family: var(--font);
  cursor: pointer;
  transition: all var(--t);
  width: 100%;
  text-align: left;
}
.hint-reveal-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}
/* Téléchargements dans la hint-box */
.hint-downloads {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 0;
  margin-top: 6px;
}
.hint-downloads .xl-dl-btn {
  font-size: 0.75rem;
  padding: 6px 12px;
  justify-content: flex-start;
  text-align: left;
  width: 100%;
}
/* Bouton "Voir le résultat attendu" sous l'énoncé Excel réel */
.reel-result-wrap {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.reel-result-wrap .hint-reveal-btn { width: auto; }
/* Texte de la formule révélée */
.hint-text {
  margin-top: 8px;
  padding: 10px 14px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--gold);
}
/* Solution SQL — pre formaté */
.hint-sql {
  margin-top: 8px;
  padding: 12px 14px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--gold);
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
}

/* ── Bloc consigne exercice ── */
.consigne-block {
  margin: 16px 32px 0;
  padding: 16px 20px;
  background: var(--turquoise-dim);
  border-left: 3px solid var(--turquoise);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.consigne-header {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
}
.consigne-icon { font-size: 0.85rem; }
.consigne-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--turquoise);
}
.consigne-text {
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--text);
}

/* ── Préambule sidebar item ── */
.sql-preambule-item {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
  transition: background var(--t);
}
.sql-preambule-item:hover { background: rgba(255,255,255,.06); }
.sql-preambule-item.active { background: var(--gold-dim); border-left: 2px solid var(--gold); }
.preambule-icon { font-size: 0.9rem; }
.sql-exos-divider {
  height: 1px;
  background: rgba(255,255,255,.08);
  margin: 6px 0 10px;
}

/* ── Section théorie SQL dédiée ── */
.preambule-view-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold);
  margin: 0 0 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.sql-theory-view {
  padding: 28px 32px;
  overflow-y: auto;
  flex: 1;
}
.sql-theory-section {
  margin-bottom: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.sql-theory-section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
}
.sql-theory-section-icon  { font-size: 1.1rem; }
.sql-theory-section-title { font-size: 0.95rem; font-weight: 700; }
.sql-theory-body { padding: 16px 20px; }
.sql-theory-subsection { margin-bottom: 16px; }
.sql-theory-subsection:last-child { margin-bottom: 0; }
.sql-theory-sub-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 6px;
}
.sql-theory-text {
  font-size: 0.84rem;
  line-height: 1.65;
  color: var(--text);
}
.sql-theory-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sql-theory-list li {
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text);
  padding-left: 16px;
  position: relative;
}
.sql-theory-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--turquoise);
  font-size: 0.65rem;
  top: 3px;
}

/* Bouton Théorie dans la sidebar SQL */
.sql-theory-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: calc(100% - 16px);
  margin: 4px 8px 8px;
  padding: 8px 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text2);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t);
  text-align: left;
}
.sql-theory-btn:hover { background: var(--gold-dim); border-color: var(--gold); color: var(--gold); }
.sql-theory-btn.active { background: var(--gold-dim); border-color: var(--gold); color: var(--gold); }

/* ── Bloc vidéo dans les panneaux d'exercice ── */
.video-box {
  margin-bottom: 14px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}

/* Iframe YouTube — ratio 16/9 */
.video-box iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: none;
}

/* Placeholder "À VENIR" quand pas de vidéo — ratio 16:9 professionnel */
.video-coming {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  overflow: hidden;
}

/* Cercle décoratif derrière l'icône */
.video-coming::before {
  content: '';
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(232, 49, 122, 0.08);
  pointer-events: none;
}

/* Bouton play en surimpression */
.video-coming-icon {
  position: relative;
  width: 52px;
  height: 52px;
  background: rgba(232, 49, 122, 0.18);
  border: 2px solid rgba(232, 49, 122, 0.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: rgba(232, 49, 122, 0.8);
}

.video-coming-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.45);
}

/* Sous-titre facultatif (nom de la formation) */
.video-coming-sub {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.25);
  max-width: 200px;
  line-height: 1.4;
}

.check-btn {
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--turquoise);
  color: #FFF;
  font-size: 0.83rem;
  font-weight: 700;
  transition: all var(--t);
  margin-bottom: 7px;
}
.check-btn:hover { background: #D42B6E; transform: translateY(-1px); }

.reset-btn {
  width: 100%;
  padding: 8px;
  border: 1.5px solid var(--border2);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  transition: all var(--t);
}
.reset-btn:hover { background: var(--surface2); color: var(--text); }

.result-msg {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  display: none;
}
.result-msg.ok {
  background: rgba(34,197,94,0.1);
  border: 1px solid rgba(34,197,94,0.3);
  color: #22c55e;
}
.result-msg.ko {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.3);
  color: #ef4444;
}

/* ============================================================
   MODULE SQL INTERACTIF
   ============================================================ */
.sql-layout {
  display: flex;
  min-height: calc(100vh - var(--topbar-h));
  margin: -36px -40px -60px;
  align-items: stretch;
}
.sql-left-panel {
  width: 240px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  overflow-y: auto;
}
.sql-exo-list {
  padding: 12px 8px;
}

.sql-schema {
  width: 200px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 10px 0;
}
.schema-head {
  padding: 8px 14px;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}
.schema-table-name {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gold);
  cursor: pointer;
  transition: background var(--t);
}
.schema-table-name:hover { background: var(--surface2); }
.schema-col {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px 4px 28px;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--muted);
  transition: background var(--t);
}
.schema-col:hover { background: var(--surface2); color: var(--text2); }
.col-type-badge {
  font-size: 0.58rem;
  padding: 1px 4px;
  border-radius: 3px;
  background: var(--surface2);
  color: var(--muted2);
  border: 1px solid var(--border);
}
.col-pk    { color: var(--gold); font-size: 0.65rem; }
.col-no-pk { opacity: 0.2; }

/* Liste exercices SQL — colonne gauche (miroir de .xl-exos) */
.sql-exos {
  width: 220px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 12px 8px;
}

/* Zone principale SQL — scrollable */
.sql-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  min-width: 0;
}

/* En-tête exercice SQL */
.sql-exo-header {
  padding: 24px 32px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.sql-exo-header .exo-title { font-size: 1.05rem; margin-bottom: 6px; }
.sql-exo-header .exo-desc  { margin-bottom: 0; }

/* Ligne info SQL : vidéo + hint côte à côte */
.sql-info-row {
  display: flex;
  gap: 20px;
  padding: 20px 32px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.sql-video-col { flex: 0 0 calc(55% - 10px); min-width: 0; display: flex; flex-direction: column; }
.sql-hint-col  { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: flex-start; }
/* Vidéo et hint fill toute la hauteur de la ligne */
.sql-video-col .video-box { flex: 1; margin-bottom: 0; }
.sql-hint-col  .hint-box  { flex: 1; margin-bottom: 0; }

/* Séparateur "Pratique" SQL */
.sql-pratique-sep {
  padding: 7px 32px;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

/* Zone outil SQL : schéma + éditeur + résultats */
.sql-tool {
  display: flex;
  height: 460px;
  flex-shrink: 0;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

/* Colonne éditeur + résultats dans l'outil */
.sql-editor-results {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

/* Actions SQL */
.sql-actions {
  padding: 16px 32px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  border-top: 1px solid var(--border);
}
.sql-actions .result-msg { flex: 1; margin-top: 0; }

/* Éditeur */
.sql-editor-section {
  flex: 0 0 200px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}
.editor-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  height: 38px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.editor-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
}
.run-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--turquoise);
  color: #FFF;
  font-size: 0.78rem;
  font-weight: 700;
  transition: all var(--t);
}
.run-btn:hover { background: #c82c6a; transform: translateY(-1px); }
.run-shortcut {
  font-size: 0.6rem;
  opacity: 0.7;
  font-family: var(--font-mono);
}

.sql-textarea {
  flex: 1;
  background: var(--bg);
  color: var(--text);
  border: none;
  outline: none;
  resize: none;
  font-family: var(--font-mono);
  font-size: 0.83rem;
  line-height: 1.7;
  padding: 14px 16px;
  tab-size: 2;
}
.sql-textarea::placeholder { color: var(--muted2); }

/* Resize handle */
.resize-handle {
  height: 4px;
  background: var(--border);
  cursor: row-resize;
  flex-shrink: 0;
  transition: background var(--t);
}
.resize-handle:hover { background: var(--gold); }

/* Résultats */
.sql-results { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  height: 36px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.results-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.results-count {
  font-size: 0.72rem;
  color: var(--gold);
  font-family: var(--font-mono);
  font-weight: 600;
}
.results-wrap { flex: 1; overflow: auto; }

.results-table { border-collapse: collapse; width: 100%; min-width: max-content; }
.results-table th {
  position: sticky;
  top: 0;
  background: var(--surface2);
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  border: 1px solid var(--border);
  padding: 6px 14px;
  text-align: left;
  white-space: nowrap;
  z-index: 2;
}
.results-table td {
  border: 1px solid var(--border);
  padding: 5px 14px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text);
  background: var(--surface);
  white-space: nowrap;
}
.results-table tr:hover td { background: var(--surface2); }
.results-table td.null-val { color: var(--muted); font-style: italic; }
.results-table td.num-val  { color: var(--gold); }

.results-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  color: var(--muted);
  font-size: 0.82rem;
  gap: 8px;
  padding: 40px;
  height: 100%;
}
.empty-icon { font-size: 2rem; opacity: 0.3; }
.results-error {
  padding: 16px;
  color: #ef4444;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.6;
}

/* Titre des listes d'exercices (Excel + SQL) */
.xl-exos-head, .sql-exos-head {
  padding: 10px 12px 8px;
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}
.sql-exo-item {
  padding: 12px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background var(--t);
}
.sql-exo-item:hover { background: var(--surface2); }
.sql-exo-item.active { background: var(--gold-dim); border-left: 3px solid var(--gold); }
.sql-exo-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text2);
  margin-bottom: 3px;
}
.sql-exo-item.active .sql-exo-title { color: var(--gold); }

/* ============================================================
   AUTH — Connexion / Inscription
   ============================================================ */

/* Bouton topbar */
.auth-btn {
  padding: 5px 14px;
  border-radius: 20px;
  border: 1px solid var(--turquoise-border);
  background: var(--turquoise-dim);
  color: var(--turquoise);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: all var(--t);
  white-space: nowrap;
}
.auth-btn:hover {
  background: var(--turquoise);
  color: #fff;
  border-color: var(--turquoise);
}

/* Avatar connecté */
.auth-avatar-wrap {
  position: relative;
  align-items: center;
}
.auth-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--turquoise);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  letter-spacing: 0.03em;
  flex-shrink: 0;
  user-select: none;
  transition: opacity var(--t);
}
.auth-avatar:hover { opacity: 0.85; }

/* Dropdown */
.auth-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 210px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  padding: 6px 0;
  z-index: 1100;
  display: none;
}
.auth-dropdown.open { display: block; }
.auth-dropdown-name {
  padding: 10px 16px 2px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
}
.auth-dropdown-email {
  padding: 0 16px 10px;
  font-size: 0.72rem;
  color: var(--muted);
}
.auth-dropdown-sep { height: 1px; background: var(--border); margin: 2px 0; }
.auth-dropdown-item {
  padding: 9px 16px;
  font-size: 0.8rem;
  color: var(--text2);
  cursor: pointer;
  transition: background var(--t);
}
.auth-dropdown-item:hover { background: var(--surface2); }
.auth-dropdown-item.danger { color: var(--turquoise); }
.auth-dropdown-item.danger:hover { background: var(--turquoise-dim); }

/* Overlay */
.auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.auth-overlay.open { opacity: 1; pointer-events: all; }

/* Modal card */
.auth-modal {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0,0,0,0.18);
  width: 100%;
  max-width: 420px;
  padding: 32px;
  position: relative;
  transform: translateY(8px);
  transition: transform 0.2s;
}
.auth-overlay.open .auth-modal { transform: translateY(0); }
.auth-modal-close {
  position: absolute;
  top: 12px; right: 14px;
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--muted);
  line-height: 1;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all var(--t);
}
.auth-modal-close:hover { background: var(--surface2); color: var(--text); }
.auth-modal-header { margin-bottom: 20px; }
.auth-modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.auth-modal-sub { font-size: 0.77rem; color: var(--muted); line-height: 1.5; }

/* Tabs */
.auth-tabs {
  display: flex;
  background: var(--surface2);
  border-radius: var(--radius-sm);
  padding: 3px;
  margin-bottom: 24px;
  gap: 3px;
}
.auth-tab {
  flex: 1;
  padding: 7px 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  transition: all var(--t);
}
.auth-tab.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

/* Form */
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-field-row { display: flex; gap: 12px; }
.auth-field-row .auth-field { flex: 1; min-width: 0; }
.auth-field { display: flex; flex-direction: column; gap: 5px; }
.auth-field label {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text2);
  letter-spacing: 0.02em;
}
.auth-field input,
.auth-field select {
  padding: 9px 12px;
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 0.84rem;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
  width: 100%;
  box-sizing: border-box;
}
.auth-field input:focus,
.auth-field select:focus {
  border-color: var(--turquoise);
  box-shadow: 0 0 0 3px var(--turquoise-dim);
}
.auth-field input::placeholder { color: var(--muted); }
.auth-field select { cursor: pointer; }
/* Champ texte libre "Autre secteur" — apparaît sous le select via JS */
#reg-secteur-autre { margin-top: 6px; }

.auth-error {
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  background: var(--turquoise-dim);
  border: 1px solid var(--turquoise-border);
  border-radius: var(--radius-sm);
  color: var(--turquoise);
  font-size: 0.78rem;
}

.auth-submit {
  padding: 11px;
  border-radius: var(--radius-sm);
  border: none;
  background: linear-gradient(135deg, var(--turquoise), #c0275f);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  transition: opacity var(--t), transform var(--t);
  margin-top: 2px;
}
.auth-submit:hover { opacity: 0.88; transform: translateY(-1px); }
.auth-submit:active { transform: none; opacity: 1; }

.auth-switch {
  text-align: center;
  font-size: 0.74rem;
  color: var(--muted);
}
.auth-switch a {
  color: var(--turquoise);
  cursor: pointer;
  font-weight: 600;
}
.auth-switch a:hover { text-decoration: underline; }

/* ── Boutons de connexion sociale (Google / Facebook) ──
   Utilisés dans la modale auth ET dans les panneaux paywall.
   Chaque bouton est une ligne pleine avec logo SVG + texte. */
.auth-social-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 4px;
}
.btn-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border2);
  background: var(--surface);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--t), border-color var(--t);
}
.btn-social:hover { background: var(--surface2); border-color: var(--border); }
/* Styles spécifiques Google / Facebook si besoin de couleurs de marque */
.btn-google:hover  { border-color: #4285F4; }
.btn-facebook:hover { border-color: #1877F2; }

/* Séparateur "ou" entre les boutons sociaux et le formulaire classique */
.auth-or, .paywall-or {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0;
  color: var(--muted);
  font-size: 0.75rem;
}
.auth-or::before, .auth-or::after,
.paywall-or::before, .paywall-or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Panneau paywall — boutons sociaux en colonne dans l'invitation */
.paywall-social {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 12px 0 0;
  max-width: 320px;
}
.paywall-social .btn-social { justify-content: flex-start; }

/* ============================================================
   UTILITAIRES
   ============================================================ */
.sep {
  width: 1px; height: 18px;
  background: var(--border);
  flex-shrink: 0;
}

.status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 5px #22c55e;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

/* ============================================================
   RESPONSIVE — Mobile burger
   ============================================================ */
.burger-btn {
  display: none;
  width: 32px; height: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 20px rgba(0,0,0,0.3);
  }
  .main { margin-left: 0; }
  .app-shell { margin-left: 0; }
  .burger-btn { display: flex; }
  .value-grid { grid-template-columns: 1fr; }
  .templates-grid { grid-template-columns: 1fr; }
  .pub-grid { grid-template-columns: 1fr; }
  .offres-grid { grid-template-columns: 1fr; }
  .secteurs-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-wrap { grid-template-columns: 1fr; }
  .ta-cards { grid-template-columns: 1fr; }
}

/* ============================================================
   CODEMIRROR — Surcharge thème pour la DA
   ============================================================ */
.CodeMirror {
  height: 100% !important;
  background: var(--bg) !important;
  color: var(--text) !important;
  font-family: var(--font-mono) !important;
  font-size: 0.83rem !important;
  line-height: 1.7 !important;
  border: none !important;
}
.CodeMirror-scroll { padding: 10px 6px; box-sizing: border-box; }
.CodeMirror-cursor { border-left: 2px solid var(--text) !important; }
.CodeMirror-selected { background: var(--gold-dim) !important; }
.CodeMirror-focused .CodeMirror-selected { background: var(--gold-dim) !important; }
.CodeMirror-gutters { display: none; }
/* Tokens SQL */
.cm-s-default .cm-keyword  { color: var(--turquoise); font-weight: 700; }
.cm-s-default .cm-string   { color: var(--gold); }
.cm-s-default .cm-number   { color: #7c9e5e; }
.cm-s-default .cm-comment  { color: var(--muted); font-style: italic; }
.cm-s-default .cm-operator { color: var(--text2); }
.cm-s-default .cm-atom     { color: var(--turquoise); }
/* Dark mode */
body.dark .CodeMirror          { background: var(--bg) !important; color: var(--text) !important; }
body.dark .CodeMirror-cursor   { border-left-color: var(--text) !important; }

/* ============================================================
   SQL CHIPS — Blocs drag & drop
   ============================================================ */
.sql-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 6px 10px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.sql-chip {
  padding: 2px 9px;
  border-radius: 4px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--gold);
  cursor: grab;
  user-select: none;
  transition: background var(--t), border-color var(--t), opacity var(--t);
  white-space: nowrap;
}
.sql-chip:hover  { background: var(--gold-dim); border-color: var(--gold-border); }
.sql-chip:active { cursor: grabbing; }
.sql-chip.dragging { opacity: 0.4; }

/* ============================================================
   NORMES — 1NF / 2NF / 3NF
   ============================================================ */
.normes-list { display: flex; flex-direction: column; gap: 10px; }
.norme-item {
  background: var(--surface2);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 12px 16px;
}
.norme-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.norme-level {
  background: var(--gold);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
}
.norme-nom   { font-weight: 700; font-size: 0.85rem; color: var(--text); }
.norme-regle { font-size: 0.82rem; color: var(--text2); margin: 0 0 6px; line-height: 1.55; }
.norme-exemple { font-size: 0.78rem; color: var(--muted); font-style: italic; }
.norme-exemple-label { font-weight: 700; font-style: normal; color: var(--gold); margin-right: 4px; }

/* ============================================================
   TABLES ANALYTIQUES — Faits / Dimensions
   ============================================================ */
.ta-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.ta-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}
.ta-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.ta-icone  { font-size: 1.1rem; }
.ta-nom    { font-weight: 700; font-size: 0.85rem; color: var(--text); }
.ta-desc   { font-size: 0.8rem; color: var(--text2); margin: 0 0 8px; line-height: 1.55; }
.ta-exemple {
  display: block;
  font-size: 0.7rem;
  color: var(--muted);
  font-family: var(--font-mono);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 6px 10px;
  word-break: break-all;
  white-space: normal;
}

/* ══════════════════════════════════════════
   EXEMPLE MODELE — Préambule SQL
══════════════════════════════════════════ */
.em-erd-wrap {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 12px 8px;
  overflow-x: auto;
}
.em-tables-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 4px;
}
.em-table-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.em-table-name {
  font-weight: 700;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: 0.04em;
}
.em-col-list {
  list-style: none;
  padding: 0; margin: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.em-col-list li {
  font-size: 0.72rem;
  color: var(--text2);
  font-family: var(--font-mono);
  padding: 2px 0;
  border-bottom: 1px solid var(--border);
}
.em-col-list li:last-child { border-bottom: none; }
.em-relations { display: flex; flex-direction: column; gap: 10px; }
.em-relation {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}
.em-relation-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.em-rel-tables { font-weight: 700; font-size: 0.78rem; font-family: var(--font-mono); color: var(--text); }
.em-rel-card {
  background: var(--turquoise-dim);
  color: var(--turquoise);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
}
.em-rel-desc { font-size: 0.78rem; color: var(--text2); margin: 0 0 6px; }
.em-rel-join {
  display: block;
  font-size: 0.7rem;
  color: var(--muted);
  font-family: var(--font-mono);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px 8px;
}
.em-query-block {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text2);
  white-space: pre;
  overflow-x: auto;
  line-height: 1.6;
}
.em-query-block code { background: none; padding: 0; color: inherit; }
@media (max-width: 640px) {
  .em-tables-grid { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════
   BDD INTRO — Préambule SQL
══════════════════════════════════════════ */
.bdd-intro {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.bdd-intro-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  cursor: pointer;
  user-select: none;
  transition: background var(--t);
}
.bdd-intro-header:hover { background: var(--surface2); }

.bdd-intro-icon  { font-size: 1rem; }
.bdd-intro-title { flex: 1; font-size: 0.85rem; font-weight: 600; }
.bdd-intro-chevron {
  font-size: 0.6rem;
  color: var(--muted);
  transition: transform var(--t);
}

/* Corps masqué par défaut — s'ouvre via toggleBDDIntro() */
.bdd-intro-body {
  display: none;
  padding: 0 16px 14px;
  border-top: 1px solid var(--border);
}
.bdd-intro-body.open { display: block; }

.bdd-intro-p {
  font-size: 0.8rem;
  line-height: 1.65;
  color: var(--text-muted, var(--muted));
  margin: 10px 0 0;
}

.bdd-intro-analogie {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 12px;
  background: var(--surface2);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--muted);
}
.bdd-analogie-label {
  flex-shrink: 0;
  font-weight: 600;
  color: var(--gold);
}

/* ══════════════════════════════════════════
   PAGE CONTACT
══════════════════════════════════════════ */
.contact-wrap {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  max-width: 860px;
}

/* Colonne infos */
.contact-info { display: flex; flex-direction: column; gap: 20px; }

.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.contact-info-icon { font-size: 1.1rem; margin-top: 2px; }
.contact-info-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 3px;
}
.contact-info-value { font-size: 0.85rem; font-weight: 500; }

/* Formulaire */
.contact-form { display: flex; flex-direction: column; gap: 16px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.form-group { display: flex; flex-direction: column; gap: 5px; }

.form-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.form-input {
  padding: 9px 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.84rem;
  transition: border-color var(--t);
  outline: none;
}
.form-input:focus { border-color: var(--turquoise); }
.form-textarea { resize: vertical; min-height: 120px; }

.contact-submit { align-self: flex-start; padding: 10px 24px; }

.contact-success {
  padding: 10px 14px;
  background: rgba(34,197,94,0.12);
  border: 1px solid rgba(34,197,94,0.3);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: #22c55e;
}

/* ══════════════════════════════════════════
   C9 — BARRE INFÉRIEURE EXCEL (onglets + statut)
══════════════════════════════════════════ */
.xl-bottom-bar {
  display: flex;
  align-items: stretch;
  height: 30px;
  background: var(--surface2);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.xl-tabs-area {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}
.xl-tab-nav {
  flex-shrink: 0;
  width: 22px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: var(--muted);
  background: transparent;
  border: none;
  border-right: 1px solid var(--border);
  cursor: pointer;
  transition: color var(--t), background var(--t);
}
.xl-tab-nav:hover:not(:disabled) { color: var(--text); background: var(--surface); }
.xl-tab-nav:disabled { opacity: 0.35; cursor: default; }
.xl-sheet-tabs {
  display: flex;
  align-items: flex-end;
  gap: 0;
  height: 100%;
  padding: 0 4px;
}
.xl-sheet-tab {
  padding: 4px 16px 3px;
  font-size: 0.72rem;
  font-weight: 500;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 4px 4px 0 0;
  color: var(--muted);
  cursor: pointer;
  transition: all var(--t);
  position: relative;
  top: 1px;
  white-space: nowrap;
}
.xl-sheet-tab:hover { background: var(--surface); color: var(--text); }
.xl-sheet-tab.active {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
  font-weight: 600;
  border-bottom-color: var(--surface);
}
.xl-tab-add {
  flex-shrink: 0;
  padding: 0 10px;
  height: 100%;
  background: transparent;
  border: none;
  border-left: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
  cursor: pointer;
  transition: color var(--t);
}
.xl-tab-add:hover { color: var(--turquoise); }

/* Barre de statut (droite) */
.xl-statusbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  border-left: 1px solid var(--border);
  flex-shrink: 0;
}
.xl-stat {
  font-size: 0.68rem;
  color: var(--muted);
  white-space: nowrap;
  min-width: 60px;
}
.xl-zoom {
  display: flex;
  align-items: center;
  gap: 4px;
  border-left: 1px solid var(--border);
  padding-left: 10px;
  margin-left: 4px;
}
.xl-zoom-btn {
  width: 18px;
  height: 18px;
  border-radius: 3px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--t);
}
.xl-zoom-btn:hover { border-color: var(--turquoise); color: var(--turquoise); }
#xlZoomVal { font-size: 0.68rem; color: var(--muted); min-width: 34px; text-align: center; }

/* Conteneur graphique */
#xlChartContainer {
  background: var(--surface2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  padding: 16px 20px !important;
  margin-top: 4px;
}

/* Boutons téléchargement */
.xl-downloads {
  display: flex;
  gap: 10px;
  padding: 10px 0 2px;
  flex-wrap: wrap;
}
.xl-dl-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  font-size: 0.78rem;
  font-weight: 500;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface2);
  color: var(--text2);
  cursor: pointer;
  transition: all var(--t);
}
.xl-dl-btn:hover { border-color: var(--gold); color: var(--gold); }
.xl-dl-btn.xl-dl-result { border-color: var(--turquoise-border); color: var(--turquoise); background: var(--turquoise-dim); }
.xl-dl-btn.xl-dl-result:hover { background: rgba(232,49,122,.18); }
.xl-dl-icon { font-size: 0.75rem; }

/* ══════════════════════════════════════════
   C5 / C7 — VUE "CONTENU EN PRÉPARATION"
══════════════════════════════════════════ */
.coming-soon-view {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 40px;
}
.coming-soon-content {
  text-align: center;
  max-width: 480px;
}
.coming-soon-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}
.coming-soon-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.coming-soon-msg {
  font-size: 0.84rem;
  color: var(--muted);
  margin-bottom: 20px;
}
.coming-soon-themes-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 10px;
}
.coming-soon-themes {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
  margin-bottom: 4px;
}
.coming-soon-themes li {
  font-size: 0.82rem;
  color: var(--text2);
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  border-left: 2px solid var(--gold);
}
/* Élément "coming soon" dans la sidebar */
.coming-soon-item {
  opacity: 0.55;
  cursor: default;
  pointer-events: none;
}
.soon-dot {
  font-size: 0.75rem;
  color: var(--muted);
  margin-right: 4px;
}
/* Icône de chapitre dans la sidebar SQL module 00 */
.chapitre-icon {
  font-size: 0.9rem;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════
   C5 — LABEL VIDÉO (intro / correction)
══════════════════════════════════════════ */
.video-label {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  padding: 5px 10px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
}

/* ══════════════════════════════════════════
   C6 — CHAPITRES THÉORIQUES SQL module 00
══════════════════════════════════════════ */
.sql-theory-view { padding: 28px 32px; overflow-y: auto; flex: 1; }
.chapter-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.chapter-icon { font-size: 1.5rem; }
.chapter-title { font-size: 1.05rem; font-weight: 700; color: var(--text); }
.chapter-theorie {
  font-size: 0.88rem;
  line-height: 1.75;
  color: var(--text);
  margin-bottom: 24px;
}
.chapter-section { margin-bottom: 24px; }
.chapter-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: 12px;
}
.chapter-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.chapter-list li {
  font-size: 0.84rem;
  color: var(--text2);
  padding: 8px 14px 8px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  position: relative;
}
.chapter-list li::before {
  content: '▸';
  position: absolute;
  left: 8px;
  color: var(--turquoise);
  font-size: 0.65rem;
  top: 11px;
}
/* Tableau chapitres (SGBD, types modélisation, analogie Excel) */
.chapter-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.chapter-table thead tr { background: var(--surface2); }
.chapter-table th {
  padding: 9px 14px;
  font-weight: 700;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.chapter-table td {
  padding: 9px 14px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.chapter-table tbody tr:last-child td { border-bottom: none; }
.chapter-table tbody tr:hover td { background: var(--surface2); }
.chapter-table-wide { font-size: 0.78rem; }
.chapter-table-wide th, .chapter-table-wide td { padding: 7px 10px; }
.chapter-table-wide code { font-family: var(--font-mono); font-size: 0.75rem; background: var(--surface2); padding: 1px 5px; border-radius: 3px; }
.sgbd-nom { font-weight: 600; color: var(--text); }
.sgbd-free { color: var(--gold); font-weight: 600; }
.sgbd-paid { color: var(--turquoise); font-weight: 600; }

/* ══════════════════════════════════════════
   C8 — PAGE STRATÉGIE DATA
══════════════════════════════════════════ */
.module-coming-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--gold-dim);
  border: 1px solid rgba(201,146,42,0.25);
  border-radius: var(--radius);
  margin-bottom: 32px;
}
.module-coming-icon { font-size: 1.6rem; flex-shrink: 0; }
.module-coming-info { flex: 1; }
.module-coming-title { font-size: 0.9rem; font-weight: 700; color: var(--text); }
.module-coming-sub { font-size: 0.78rem; color: var(--muted); margin-top: 3px; }

.strategie-modules {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.strategie-module-card {
  display: flex;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.strategie-module-num {
  width: 52px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--gold);
  background: var(--surface2);
  border-right: 1px solid var(--border);
}
.strategie-module-body { padding: 16px 20px; flex: 1; }
.strategie-module-title { font-size: 0.95rem; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.strategie-module-desc { font-size: 0.82rem; color: var(--muted); margin-bottom: 12px; line-height: 1.5; }
.strategie-module-themes {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.strategie-module-themes li {
  font-size: 0.72rem;
  padding: 3px 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text2);
}

/* ── Exercice Excel réel ────────────────────── */

/* Box "Résultat attendu" (bleue) — exercices Excel réel */
.resultat-attendu-box {
  margin: 12px 32px 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.resultat-attendu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 14px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  background: var(--surface2);
  border: none;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  font-family: var(--font-sans);
  transition: background var(--t);
}
.resultat-attendu-header:hover { color: var(--text); }
.resultat-attendu-chevron {
  font-size: 0.6rem;
  transition: transform var(--t);
}
.resultat-attendu-header[aria-expanded="true"] .resultat-attendu-chevron { transform: rotate(180deg); }
.resultat-attendu-content { padding: 12px 14px; }
.resultat-placeholder {
  font-size: 0.8rem;
  color: var(--muted);
  font-style: italic;
}
.resultat-table { border-collapse: collapse; font-size: 0.78rem; width: 100%; }
.resultat-table td { padding: 4px 10px; border: 1px solid var(--border); }
.res-ref { font-family: var(--font-mono); color: var(--muted); font-weight: 600; width: 60px; }
.res-val { color: var(--text2); }

/* ── Mini grille Excel (données de départ, exercices excel_reel) ── */
.xl-preview-grid {
  border-collapse: collapse;
  font-size: 0.74rem;
  width: auto;
  margin-top: 6px;
}
.xl-prev-corner {
  background: var(--surface2);
  border: 1px solid var(--border);
  width: 26px;
}
.xl-prev-col {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--muted);
  font-weight: 700;
  text-align: center;
  min-width: 70px;
  padding: 2px 8px;
  font-size: 0.68rem;
  letter-spacing: 0.05em;
}
.xl-prev-rownum {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--muted);
  font-weight: 600;
  text-align: center;
  padding: 2px 5px;
  font-size: 0.68rem;
}
.xl-prev-header {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text2);
  font-weight: 700;
  padding: 3px 8px;
}
.xl-prev-cell {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 3px 8px;
}

/* Box fichiers à télécharger */
.download-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.download-box-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.download-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: var(--text2);
  text-decoration: none;
  transition: border-color var(--t), color var(--t);
}
.download-item:hover { border-color: var(--turquoise); color: var(--turquoise); }
.download-item-icon { font-size: 0.75rem; opacity: 0.6; }
/* Lien désactivé — fichier pas encore disponible */
.download-item-soon {
  cursor: default;
  color: var(--muted);
  border-color: var(--border);
  opacity: 0.7;
}
.download-item-badge {
  font-size: 0.65rem;
  font-weight: 700;
  background: var(--surface2);
  color: var(--muted);
  padding: 2px 7px;
  border-radius: 10px;
}
/* Liste d'étapes numérotées (1. 2. 3. dans les théories et exercices)
   — gap augmenté à 14px pour mieux aérer chaque étape
   Pour ajuster l'espacement : modifiez 'gap' (minimum recommandé : 12px) */
.real-steps {
  margin: 10px 0 0;
  padding-left: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px; /* était 6px — trop serré. 14px donne de l'air entre chaque étape */
}
.real-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text2);
}
.step-num {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--turquoise);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}
.step-num-gold {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--gold);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}
.theorie-spacer { height: 8px; }
.theorie-line-block { display: block; }
.theorie-step-sub { display: block; margin-top: 3px; opacity: 0.85; }

/* ── Bouton "Voir la correction détaillée" ──────────────────────────
   Apparaît dans chaque exercice. Au clic, affiche le bloc .correction-detaillee.
   Pour changer la couleur du bouton : modifiez 'border-color' et 'color'.
   Pour changer le fond de la correction : modifiez 'background' dans .correction-detaillee */
.correction-toggle-btn {
  display: flex;            /* block-level pour s'aligner avec les blocs voisins */
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  margin-top: 12px;
  margin-left: 32px;        /* aligne avec .consigne-block */
  margin-right: 32px;
  background: transparent;
  border: 1.5px solid var(--turquoise);  /* bordure rose — couleur principale du site */
  border-radius: var(--radius-sm);
  color: var(--turquoise);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.correction-toggle-btn:hover {
  background: var(--turquoise-dim); /* léger fond rose au survol */
}

/* Zone de correction détaillée — fond rose pâle, visible seulement après clic sur le bouton */
.correction-detaillee {
  margin-top: 12px;
  margin-left: 32px;        /* aligne avec .consigne-block */
  margin-right: 32px;
  padding: 14px 18px;
  background: var(--turquoise-dim);           /* fond rose pâle défini dans les variables CSS */
  border: 1px solid rgba(232,49,122,.25);/* bordure rose légère */
  border-radius: var(--radius-sm);
  display: none; /* masqué par défaut — affiché via JS au clic du bouton */
}
.correction-detaillee.open {
  display: block; /* visible quand la classe .open est ajoutée par JS */
}
.correction-detaillee-title {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--turquoise);
  margin-bottom: 10px;
}

/* ── COMMENT FAIRE — section dans le bloc théorie ──────────────────
   Séparation visuelle entre "À quoi ça sert" et "Comment faire"
   Pour modifier le style : ajustez 'border-top' ou 'margin-top' */
.comment-faire-wrap {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border); /* ligne séparatrice entre les deux sections */
}
.comment-faire-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold); /* couleur dorée pour différencier de "À quoi ça sert" en rose */
  margin-bottom: 8px;
  display: block;
}

/* ── Résultat attendu (affiché après la consigne) ───────────────────
   Tableau simple montrant cellule cible + valeur attendue */
.resultat-inline {
  margin-top: 10px;
  margin-left: 32px;        /* aligne avec .consigne-block */
  margin-right: 32px;
  padding: 10px 14px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.resultat-inline-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 6px;
  display: block;
}
.resultat-inline-row {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 0.8rem;
}
.resultat-cell-ref {
  font-family: var(--font-mono);
  color: var(--turquoise);
  font-weight: 600;
}
.resultat-cell-val {
  color: var(--text);
}

/* ── Sélecteur de jeu de données (bandeau sectoriels) ────────────────
   Affiché sous la consigne pour les exercices interactifs ayant plusieurs
   jeux de données (champ datasets[] dans le JSON).
   Structure : .dataset-selector > .dataset-selector-header + .dataset-pills + .dataset-context */
.dataset-selector {
  margin: 12px 32px 0;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.dataset-selector-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}
.dataset-selector-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.dataset-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.dataset-pill {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.dataset-pill:hover {
  border-color: var(--gold);
  color: var(--gold);
}
.dataset-pill.active {
  background: var(--gold-dim);
  border-color: var(--gold);
  color: var(--gold);
}
/* Texte contextuel affiché sous les pills — explique pourquoi ce jeu est pertinent */
.dataset-context {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--text2);
}

/* ── Durée module ─────────────────────────── */
.xl-duration-badge {
  background: rgba(251,191,36,.15) !important;
  color: #b45309 !important;
  border: 1px solid rgba(251,191,36,.35) !important;
  font-weight: 500 !important;
  font-size: 0.68rem !important;
}
.dark .xl-duration-badge { color: #fbbf24 !important; background: rgba(251,191,36,.08) !important; }

/* ══════════════════════════════════════════
   QUIZ ENGINE
══════════════════════════════════════════ */

/* Item quiz dans la liste latérale */
.quiz-list-sep {
  /* now uses xl-exos-head for styling — no extra rules needed */
  margin-top: 6px;
}
.quiz-list-item {
  cursor: pointer;
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
  border: 1px solid transparent;
  transition: all var(--t);
}
.quiz-list-item:hover { background: var(--surface2); border-color: var(--border); }
.quiz-list-item.active { background: var(--gold-dim); border-color: var(--gold); }
.quiz-list-item.active .xl-exo-title { color: var(--gold); }
.quiz-label-badge { margin-bottom: 4px; display: inline-block; }
.quiz-list-text { flex: 1; min-width: 0; }
.quiz-list-score {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--gold);
  background: var(--gold-dim);
  padding: 2px 6px;
  border-radius: 10px;
  white-space: nowrap;
}

/* Panneau quiz principal */
.quiz-view { padding: 28px 32px; overflow-y: auto; flex: 1; }
.quiz-panel {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.quiz-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.quiz-title-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.quiz-counter {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text2);
}
.quiz-progress-bar {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.quiz-progress-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 2px;
  transition: width 0.4s ease;
}
.quiz-question {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.5;
}
.quiz-choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.quiz-choice-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: left;
  font-size: 0.85rem;
  color: var(--text);
  transition: all 0.15s;
}
.quiz-choice-card:not([disabled]):hover {
  background: var(--gold-dim);
  border-color: var(--gold);
}
.quiz-choice-card.correct {
  background: rgba(34,197,94,0.10);
  border-color: #22c55e;
  color: #16a34a;
}
.dark .quiz-choice-card.correct { color: #4ade80; }
.quiz-choice-card.wrong {
  background: rgba(239,68,68,0.10);
  border-color: #ef4444;
  color: #dc2626;
}
.dark .quiz-choice-card.wrong { color: #f87171; }
.quiz-choice-card.dimmed { opacity: 0.45; }
.quiz-choice-letter {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--surface2);
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text2);
}
.quiz-choice-card.correct .quiz-choice-letter { background: #22c55e; color: #fff; }
.quiz-choice-card.wrong   .quiz-choice-letter { background: #ef4444; color: #fff; }
.quiz-choice-text { line-height: 1.45; }

/* Explication */
.quiz-explication {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  line-height: 1.55;
  border: 1px solid transparent;
}
.quiz-explication.ok {
  background: rgba(34,197,94,0.08);
  border-color: rgba(34,197,94,0.30);
  color: var(--text);
}
.quiz-explication.ko {
  background: rgba(239,68,68,0.08);
  border-color: rgba(239,68,68,0.30);
  color: var(--text);
}
.quiz-exp-icon {
  flex-shrink: 0;
  font-size: 0.9rem;
  font-weight: 700;
  margin-top: 1px;
}
.quiz-explication.ok .quiz-exp-icon { color: #22c55e; }
.quiz-explication.ko .quiz-exp-icon { color: #ef4444; }

/* Bouton suivant */
.quiz-nav { justify-content: flex-end; }
.quiz-next-btn {
  padding: 10px 20px;
  background: var(--gold);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s;
}
.quiz-next-btn:hover { opacity: 0.85; }

/* Écran de score final */
.quiz-score-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 24px 0;
  text-align: center;
}
.quiz-score-emoji { font-size: 3rem; line-height: 1; }
.quiz-score-main  { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.quiz-score-badge { font-size: 0.72rem !important; padding: 4px 12px !important; }
.quiz-score-num   { font-size: 2.2rem; font-weight: 700; color: var(--text); }
.quiz-score-pct   { font-size: 0.9rem; color: var(--text2); }
.quiz-score-msg   { font-size: 0.88rem; color: var(--text2); max-width: 380px; line-height: 1.5; }
.quiz-result-detail {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}
.quiz-result-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
}
.quiz-result-row.ok { border-color: rgba(34,197,94,0.30); }
.quiz-result-row.ko { border-color: rgba(239,68,68,0.25); }
.quiz-result-icon { flex-shrink: 0; font-weight: 700; }
.quiz-result-row.ok .quiz-result-icon { color: #22c55e; }
.quiz-result-row.ko .quiz-result-icon { color: #ef4444; }
.quiz-result-q { color: var(--text2); line-height: 1.4; }
.quiz-retry-btn {
  padding: 10px 24px;
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.quiz-retry-btn:hover { background: var(--gold-dim); }

/* ══════════════════════════════════════════
   AUTOCOMPLETE BARRE DE FORMULE
══════════════════════════════════════════ */
.xl-fbar-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
}
.xl-fbar-wrap .formula-bar { flex: 1; width: 100%; }
.xl-autocomplete {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  box-shadow: 0 6px 20px rgba(0,0,0,.12);
  z-index: 200;
  max-height: 220px;
  overflow-y: auto;
  display: none;
}
.xl-ac-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 14px;
  cursor: pointer;
  transition: background var(--t);
}
.xl-ac-item:hover,
.xl-ac-item.focused { background: var(--surface2); }
.xl-ac-name {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--turquoise);
}
.xl-ac-en {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  margin-left: auto;
}

/* ── Tooltip syntaxe de formule ── */
.xl-formula-tooltip {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 6px 24px rgba(0,0,0,.18);
  z-index: 201;           /* au-dessus de l'autocomplétion (z-index 200) */
  padding: 8px 14px;
  font-size: 0.79rem;
  font-family: var(--font-mono);
  white-space: nowrap;
  pointer-events: none;   /* le clic passe à travers vers la formule */
  min-width: 280px;
  display: none;
}
/* Nom de la fonction */
.tt-fn { color: var(--turquoise); font-weight: 700; }
/* Argument actuellement en cours de saisie */
.tt-arg-active {
  color: var(--text);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}
/* Arguments inactifs */
.tt-arg { color: var(--muted); }
/* Séparateur ; */
.tt-sep { color: var(--muted2); }
/* Ligne de description sous la syntaxe */
.tt-desc {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.71rem;
  color: var(--muted);
  margin-top: 5px;
  font-style: italic;
  white-space: normal;
}
/* Valeurs possibles de l'argument courant (ex: FAUX/VRAI, 1/-1…) */
.tt-arg-options {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  color: var(--turquoise);
  background: rgba(var(--turquoise-rgb, 220,60,100), .07);
  border-left: 2px solid var(--turquoise);
  padding: 3px 7px;
  margin-top: 6px;
  border-radius: 0 3px 3px 0;
  white-space: normal;
}
/* Bandeau d'aide visible quand on tape une formule dans une cellule */
.xl-formula-edit-hint {
  display: none;             /* affiché via JS selon l'état */
  position: absolute;
  top: calc(100% + 2px);
  right: 0;
  font-family: var(--font-sans);
  font-size: 0.70rem;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  white-space: nowrap;
  pointer-events: none;
  z-index: 199;
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
}
/* Variante "formule complète" — parenthèses équilibrées */
.xl-formula-edit-hint.balanced {
  color: #1a9e5c;
  border-color: #1a9e5c;
  background: #f0faf5;
}

/* ══════════════════════════════════════════
   COMING-SOON ENRICHI
══════════════════════════════════════════ */
.csoon-desc {
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--text);
  margin: 12px 0 16px;
  text-align: left;
}
.csoon-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
  text-align: left;
}
.csoon-meta-item {
  display: flex;
  gap: 10px;
  align-items: baseline;
  font-size: 0.82rem;
}
.csoon-meta-key {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  flex-shrink: 0;
  min-width: 100px;
}
.csoon-usage {
  text-align: left;
  margin-bottom: 16px;
}
.csoon-usage-text {
  margin-top: 5px;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--text2);
  font-style: italic;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 2px solid var(--gold);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* ══════════════════════════════════════════
   PAGE POWER AUTOMATE
══════════════════════════════════════════ */
.automate-modules {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.automate-module-card {
  display: flex;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--t);
}
.automate-module-card:hover {
  border-color: var(--border2);
  box-shadow: 0 4px 16px rgba(0,0,0,.06);
}
.automate-module-num {
  width: 52px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: #f97316;
  background: rgba(249,115,22,.08);
  border-right: 1px solid var(--border);
}
.automate-module-body { padding: 16px 20px; flex: 1; }
.automate-module-title { font-size: 0.95rem; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.automate-module-desc { font-size: 0.82rem; color: var(--muted); margin-bottom: 12px; line-height: 1.5; }
.automate-module-themes {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.automate-module-themes li {
  font-size: 0.72rem;
  padding: 3px 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text2);
}

/* ══════════════════════════════════════════
   SÉLECTEURS SECTEUR — SQL
══════════════════════════════════════════ */

/* SQL — panneau vertical dans le schéma */
.sql-sector-picker {
  padding: 10px 12px 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.sql-sector-title {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
  margin-bottom: 3px;
}
.sql-sector-btn {
  width: 100%;
  text-align: left;
  padding: 5px 10px;
  font-size: 0.76rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text2);
  cursor: pointer;
  transition: all var(--t);
}
.sql-sector-btn:hover { background: var(--surface2); border-color: var(--border); }
.sql-sector-btn.active {
  background: var(--gold-dim);
  border-color: var(--gold);
  color: var(--gold);
  font-weight: 600;
}
.sql-sector-status {
  font-size: 0.7rem;
  color: var(--gold);
  min-height: 16px;
  padding: 2px 0 0 2px;
}

/* Requête SQL commentée ligne par ligne */
.sql-requete-commentee {
  background: var(--sidebar-bg);
  color: #e2e8f0;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.7;
  overflow-x: auto;
  white-space: pre;
  margin-bottom: 8px;
}
.sql-requete-explication {
  font-size: 0.8rem;
  color: var(--text2);
  line-height: 1.6;
  text-align: justify;
  padding: 8px 0;
}

/* ══════════════════════════════════════════
   FLUX COMPLET — Power Automate cas pratiques
══════════════════════════════════════════ */
.flux-declencheur {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(249,115,22,.08);
  border: 1px solid rgba(249,115,22,.2);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}
.flux-dec-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #f97316;
  flex-shrink: 0;
}
.flux-dec-value {
  font-size: 0.82rem;
  color: var(--text2);
}
.flux-steps {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.flux-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
/* Numéro d'étape dans les flux Power Automate
   — couleur dorée du site (#C9922A) à la place de l'orange (#f97316)
   Pour changer la couleur : modifiez 'background' et 'color' ci-dessous */
.flux-step-num {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(201, 146, 42, .15); /* fond doré léger — variable --gold avec 15% opacité */
  color: var(--gold);                  /* couleur dorée définie dans les variables CSS */
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.flux-step-text {
  font-size: 0.82rem;
  color: var(--text2);
  line-height: 1.5;
}

/* ══════════════════════════════════════════
   SQL INTRO — commandes fondamentales
══════════════════════════════════════════ */
.sql-cmds-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 900px) { .sql-cmds-grid { grid-template-columns: 1fr; } }
.sql-cmd-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.sql-cmd-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.sql-cmd-name {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--turquoise);
  background: var(--turquoise-dim);
  padding: 2px 8px;
  border-radius: 4px;
}
.sql-cmd-role {
  font-size: 0.72rem;
  color: var(--muted);
  margin-left: auto;
}
.sql-cmd-exemple {
  margin: 0;
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--gold);
  white-space: pre-wrap;
  word-break: break-all;
  background: transparent;
}

/* ══════════════════════════════════════════
   REDIMENSIONNEMENT COLONNES EXCEL
══════════════════════════════════════════ */
.xl-col-resizer {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  cursor: col-resize;
  user-select: none;
  z-index: 10;
}
.xl-col-resizer:hover,
.xl-col-resizer.resizing { background: var(--turquoise); opacity: 0.5; }
.xl-table th { position: relative; }

/* ══════════════════════════════════════════════
   KIT APP — Bannière + bouton + page iframe
══════════════════════════════════════════════ */
.kit-app-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--turquoise);   /* Rose Ocoda */
  color: #fff;
  padding: 20px 24px;
  border-radius: 10px;
  margin: 20px 0 24px;
}
.kit-app-banner-left { display: flex; align-items: center; gap: 16px; }
.kit-app-banner-icon { font-size: 2rem; line-height: 1; }
.kit-app-banner-title { font-weight: 700; font-size: .95rem; margin-bottom: 2px; }
.kit-app-banner-desc  { font-size: .78rem; opacity: .8; }

.btn-kit-app {
  background: #fff;
  color: var(--turquoise);        /* Texte rose sur fond blanc */
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  font-size: .88rem;
  flex-shrink: 0;
  transition: opacity .15s;
}
.btn-kit-app:hover { opacity: 0.88; }
.kit-file-card-app { border: 2px solid var(--turquoise); }

/* display:none hérité de .page — seulement flex quand active pour ne pas masquer les autres pages */
#page-kit-app.active { display: flex; flex-direction: column; height: 100%; padding: 0; }
.kit-app-page-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  flex-shrink: 0;
  height: 52px;
  box-sizing: border-box;
}
.btn-back-kit {
  background: none;
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: .83rem;
  color: var(--text);
  transition: background .15s;
}
.btn-back-kit:hover { background: var(--hover); }

/* ══════════════════════════════════════════════
   TÉMOIGNAGES
══════════════════════════════════════════════ */
.temoignages-section {
  padding: 56px 32px 40px;
  max-width: 1100px;
  margin: 0 auto;
}
.section-eyebrow {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--accent, #00C4B8);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.temoignages-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 20px 0 28px;
}
.temo-filter {
  background: none;
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  font-size: .82rem;
  color: var(--muted);
  transition: all .15s;
}
.temo-filter.active,
.temo-filter:hover {
  background: var(--accent, #00C4B8);
  border-color: var(--accent, #00C4B8);
  color: #fff;
}
.temoignages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.temo-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: box-shadow .15s;
}
.temo-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); }
.temo-stars { color: #F59E0B; font-size: 1rem; letter-spacing: 2px; }
.temo-text {
  font-size: .88rem;
  line-height: 1.6;
  color: var(--text);
  font-style: italic;
  flex: 1;
  margin: 0;
}
.temo-author { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.temo-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--accent, #00C4B8);
  color: #fff;
  font-size: .75rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.temo-name { font-weight: 600; font-size: .85rem; }
.temo-meta { font-size: .75rem; color: var(--muted); }

.temo-kits-strip {
  display: flex; gap: 16px; flex-wrap: wrap;
  padding: 24px 32px 32px;
  border-top: 1px solid var(--border);
  margin-top: 32px;
}
.temo-kit-item {
  flex: 1; min-width: 200px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  font-size: .82rem;
}
.temo-kit-item p { margin: 6px 0 8px; color: var(--text); font-style: italic; }
.temo-kit-item span { color: var(--muted); font-size: .75rem; }
.temo-stars-sm { color: #F59E0B; font-size: .85rem; letter-spacing: 1px; }

/* ============================================================
   PAGE MA PROGRESSION
   ============================================================ */

/* Rangée de stats (total / excel / sql) */
.progress-stats-row {
  display: flex;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.progress-stat-card {
  flex: 1;
  min-width: 120px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  text-align: center;
  box-shadow: var(--shadow);
}

.progress-stat-num {
  font-size: 2rem;
  font-weight: 700;
  color: var(--turquoise);
  line-height: 1;
  margin-bottom: 4px;
}

.progress-stat-label {
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

/* Groupes par moteur */
.progress-engine-block {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  overflow: hidden;
}

.progress-engine-title {
  background: var(--dark);
  color: var(--white);
  padding: 10px 18px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.4px;
}

/* Sous-groupe par module */
.progress-module-group {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
}

.progress-module-group:last-child { border-bottom: none; }

.progress-module-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

/* Liste des exercices */
.progress-exo-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.progress-exo-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
}

.progress-exo-item:last-child { border-bottom: none; }

/* Coche verte */
.progress-exo-check {
  color: var(--success);
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}

.progress-exo-titre {
  flex: 1;
  color: var(--text);
}

/* Date à droite en texte discret */
.progress-exo-date {
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
}

/* État vide */
.progress-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}

.progress-empty-icon { font-size: 2.5rem; margin-bottom: 12px; }
.progress-empty-title { font-size: 1.1rem; font-weight: 600; color: var(--text2); margin-bottom: 6px; }
.progress-empty-sub { font-size: 0.9rem; }

/* Bouton réinitialiser */
.progress-reset-row {
  margin-top: 24px;
  text-align: right;
}

/* Badge numérique dans la sidebar (près du lien "Ma progression") */
#progressBadge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  background: var(--turquoise);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 10px;
  padding: 0 5px;
  margin-left: 6px;
  line-height: 1;
}

/* ============================================================
   MODAL PAGES LÉGALES
   ============================================================ */

.legal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* Ouvert via JS */
.legal-overlay.open { display: flex; }

.legal-modal {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  max-width: 680px;
  width: 100%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

.legal-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--muted);
  line-height: 1;
  padding: 2px 6px;
}

.legal-modal-close:hover { color: var(--text); }

.legal-modal-title {
  padding: 20px 24px 14px;
  font-size: 1.2rem;
  font-weight: 700;
  border-bottom: 2px solid var(--turquoise);
  color: var(--text);
  flex-shrink: 0;
}

.legal-modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--text2);
}

/* Titres de section dans les modals légales */
.legal-modal-body h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  margin: 16px 0 4px;
}

.legal-modal-body h3:first-child { margin-top: 0; }

.legal-modal-body p {
  margin: 0 0 6px;
}

.legal-modal-body a {
  color: var(--turquoise);
  text-decoration: none;
}

.legal-modal-body a:hover { text-decoration: underline; }

/* ══════════════════════════════════════════════════════════
   Vue d'ensemble secteurs — page d'accueil des Kits Métier
   ══════════════════════════════════════════════════════════ */

/* Conteneur global avec titre et grille */
.kits-overview-wrap {
  padding: 36px 32px 48px;
}
.kits-overview-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 6px;
}
.kits-overview-sub {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 28px;
}

/* Grille des cartes secteur */
.kits-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}

/* Carte secteur individuelle */
.kits-overview-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 16px 18px;
  cursor: pointer;
  text-align: center;
  transition: border-color var(--t), background var(--t), transform var(--t);
}
.kits-overview-card:hover {
  border-color: var(--turquoise-border);
  background: var(--surface2);
  transform: translateY(-2px);
}
.kits-overview-icon {
  font-size: 1.8rem;
  margin-bottom: 10px;
  line-height: 1;
}
.kits-overview-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 5px;
}
.kits-overview-count {
  font-size: 0.7rem;
  color: var(--muted);
  font-weight: 500;
}

/* ── Écran paywall (exercices réservés aux abonnés) ── */
.paywall-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 40px;
  gap: 12px;
}
.paywall-icon {
  font-size: 3rem;
  line-height: 1;
  margin-bottom: 8px;
}
.paywall-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--dark);
  margin: 0;
}
.paywall-subtitle {
  font-size: 0.95rem;
  color: var(--muted);
  font-style: italic;
  margin: 0 0 8px;
}
.paywall-overlay p {
  color: var(--text);
  font-size: 0.92rem;
  margin: 0;
}
.paywall-overlay .btn-primary,
.paywall-overlay .btn-secondary {
  margin-top: 8px;
  cursor: pointer;
}

/* ── PAGE ADMIN ──────────────────────────────────────────────────
   Interface de gestion des utilisateurs, visible uniquement pour
   les comptes avec role='admin'.
   ─────────────────────────────────────────────────────────────── */

/* En-tête : titre + compteur */
.admin-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 24px;
}
.admin-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}
.admin-count {
  font-size: 0.85rem;
  color: var(--muted);
  background: var(--surface2);
  padding: 2px 10px;
  border-radius: 20px;
  border: 1px solid var(--border);
}

/* Conteneur avec défilement horizontal sur petits écrans */
.admin-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

/* Tableau utilisateurs */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  color: var(--text);
}
.admin-table th {
  text-align: left;
  padding: 10px 16px;
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
}
.admin-table td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.admin-table tbody tr:last-child td {
  border-bottom: none;
}
.admin-table tbody tr:hover {
  background: var(--turquoise-dim);
}

/* Ligne de l'admin connecté — mise en valeur subtile */
.admin-row-self td {
  background: var(--gold-dim);
}
.admin-row-self:hover td {
  background: rgba(201, 146, 42, 0.18);
}

/* Email tronqué sur petits écrans */
.admin-email {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text2);
  font-size: 0.85rem;
}

/* Sélecteur de rôle */
.admin-role-select {
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border2);
  background: var(--surface);
  color: var(--text);
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color var(--t);
}
.admin-role-select:hover:not(:disabled) {
  border-color: var(--turquoise);
}
.admin-role-select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Badge abonnement */
.admin-abo-badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: lowercase;
}
.admin-abo-badge.actif,
.admin-abo-badge.premium {
  background: rgba(34, 197, 94, 0.15);
  color: #16a34a;
}
.admin-abo-badge.essai {
  background: var(--gold-dim);
  color: var(--gold);
}
.admin-abo-badge.inactif,
.admin-abo-badge.gratuit {
  background: var(--surface2);
  color: var(--muted);
  border: 1px solid var(--border);
}

/* Badge essai (durée restante) */
.admin-trial-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--turquoise-dim);
  color: var(--turquoise);
  border: 1px solid var(--turquoise-border);
}
.admin-trial-badge.expired {
  background: var(--surface2);
  color: var(--muted);
  border-color: var(--border);
}

/* Badge essai dans le dropdown auth */
.auth-trial-badge {
  padding: 6px 16px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gold);
  background: var(--gold-dim);
  border-bottom: 1px solid var(--border);
  border-top: 1px solid var(--border);
  text-align: center;
  letter-spacing: 0.02em;
}

/* ============================================================
   ROADMAP DE PROGRESSION — progress-schema.js
   Page "Parcours et progression" — nœuds reliés par des lignes.
   ============================================================ */

/* Wrapper inséré dans la page #page-progress (héritage rétrocompat) */
.progress-schema-wrap { padding: 0 0 20px 0; }

/* ─── Carte de formation dans la page Parcours ──────────────── */
.ps-formation {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px 14px;
  margin-bottom: 16px;
}

/* ── En-tête : icône, nom, barre globale, compteur ── */
.ps-formation-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.ps-formation-icon { font-size: 1.1rem; }
.ps-formation-name { font-size: 0.92rem; font-weight: 700; color: var(--text); }
.ps-global-bar {
  flex: 1;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  max-width: 180px;
}
.ps-global-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s ease;
}
.ps-global-label { font-size: 0.72rem; color: var(--muted); white-space: nowrap; }

/* ── Roadmap horizontal — débordement horizontal autorisé ── */
.ps-roadmap-scroll { overflow-x: auto; padding-bottom: 4px; }
.ps-roadmap {
  display: flex;
  align-items: flex-start;
  gap: 0;
  min-width: max-content;  /* permet le scroll horizontal sans tronquage */
}

/* ── Séparateur entre niveaux (›) ── */
.ps-level-sep {
  display: flex;
  align-items: center;
  padding: 0 6px;
  padding-top: 18px;       /* aligner verticalement avec le centre des nœuds */
}
.ps-sep-chevron {
  font-size: 1.6rem;
  color: var(--border);
  font-weight: 300;
  line-height: 1;
  user-select: none;
}

/* ── Colonne d'un niveau ── */
.ps-level { display: flex; flex-direction: column; align-items: flex-start; }
.ps-level-head {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin-bottom: 8px;
  padding-left: 2px;
  white-space: nowrap;
}

/* ── Ligne horizontale de nœuds ── */
.ps-level-track {
  display: flex;
  align-items: flex-start;
}

/* ── Connecteur = barre de progression entre deux nœuds ── */
.ps-connector {
  position: relative;
  width: 26px;
  height: 5px;
  background: var(--border);
  border-radius: 3px;
  margin-top: 20px;           /* centre la barre : padding(3) + cercle/2(18) - barre/2(2) = 19px */
  flex-shrink: 0;
  overflow: hidden;
}
/* Fill de la barre — sa largeur est calculée en JS selon l'avancement */
.ps-connector-fill {
  position: absolute;
  left: 0; top: 0;
  height: 100%;
  background: #22c55e;
  border-radius: 3px;
  transition: width 0.6s ease;
}

/* ── Nœud de module — cercle seul, nom dans le tooltip ── */
.ps-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  position: relative;
  width: 42px;               /* plus étroit sans label texte */
  padding: 3px 2px;
  border-radius: 10px;
  transition: background 0.15s, transform 0.12s;
  user-select: none;
}
.ps-node:hover { background: var(--surface2); transform: translateY(-2px); }

/* Cercle du nœud */
.ps-node-ring {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2.5px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 5px;
  transition: all 0.2s;
}
.ps-node-icon { font-size: 0.7rem; font-weight: 700; color: var(--text); line-height: 1; }

/* Complété — vert */
.ps-node.ps-completed .ps-node-ring { background: #22c55e; border-color: #16a34a; }
.ps-node.ps-completed .ps-node-icon { color: #fff; font-size: 0.9rem; }

/* Actif (module ouvert) — rose pulsant */
.ps-node.ps-active .ps-node-ring {
  border-color: var(--turquoise);
  animation: ps-pulse 2s ease-in-out infinite;
}
.ps-node.ps-active .ps-node-icon { color: var(--turquoise); }

@keyframes ps-pulse {
  0%,100% { box-shadow: 0 0 0 3px rgba(232,49,122,0.18); }
  50%      { box-shadow: 0 0 0 7px rgba(232,49,122,0.05); }
}

/* En cours — or */
.ps-node.ps-in-progress .ps-node-ring { border-color: var(--gold); background: var(--gold-dim); }
.ps-node.ps-in-progress .ps-node-icon { color: var(--gold); }

/* Verrouillé */
.ps-node.ps-locked { opacity: 0.45; }
.ps-node.ps-locked .ps-node-ring { border-style: dashed; background: var(--surface2); }

/* À venir */
.ps-node.ps-soon { cursor: default; opacity: 0.3; }
.ps-node.ps-soon .ps-node-ring { border-style: dashed; }

/* Pas de label texte sous les cercles — le nom complet est dans le tooltip au survol.
   La largeur du nœud est réduite car il n'y a plus de texte à loger. */

/* ── Tooltip au survol ── */
.ps-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  min-width: 160px;
  max-width: 220px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.14);
  z-index: 300;
  pointer-events: none;
  white-space: normal;
}
.ps-node:hover .ps-tooltip { display: block; }
/* Évite que le tooltip soit coupé si le nœud est en bout de roadmap */
.ps-node:last-child .ps-tooltip { left: auto; right: 0; transform: none; }
.ps-tt-titre  { font-size: 0.8rem; font-weight: 600; color: var(--text); margin-bottom: 4px; line-height: 1.3; }
.ps-tt-duree  { font-size: 0.7rem; color: var(--muted); margin-bottom: 2px; }
.ps-tt-meta   { font-size: 0.7rem; color: var(--muted); margin-bottom: 2px; }
.ps-tt-statut { font-size: 0.7rem; font-weight: 500; color: var(--turquoise); }

/* ── Label visible directement sous le cercle (mobile uniquement) ── */
/* Sur desktop le tooltip au survol suffit, donc le label reste masqué */
.ps-node-label {
  display: none;
  font-size: 0.58rem;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
  max-width: 56px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.2;
  margin-top: 2px;
  user-select: none;
}

/* ── Bannière visiteur ── */
.ps-guest-banner {
  display: flex; align-items: center; gap: 10px;
  background: var(--gold-dim);
  border: 1px solid var(--gold);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.82rem;
  color: var(--text);
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.ps-cta-btn { margin-left: auto; padding: 5px 14px; font-size: 0.78rem; }

/* ── Légende ── */
.ps-legend {
  display: flex; gap: 14px; flex-wrap: wrap;
  margin-top: 12px; padding-top: 10px;
  border-top: 1px solid var(--border);
}
.ps-legend-item { display: flex; align-items: center; gap: 5px; font-size: 0.68rem; color: var(--muted); }
.ps-legend-dot {
  width: 14px; height: 14px;
  border-radius: 50%; border: 2px solid var(--border);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.55rem;
}
.ps-legend-dot.ps-ld-done  { background: #22c55e; border-color: #16a34a; color: #fff; }
.ps-legend-dot.ps-ld-prog  { background: var(--gold-dim); border-color: var(--gold); }
.ps-legend-dot.ps-ld-free  { border-color: #22c55e; }
.ps-legend-dot.ps-ld-lock  { border-style: dashed; }

/* ── Hero stats de la page Parcours ── */
.parcours-hero {
  display: flex; gap: 12px; flex-wrap: wrap;
  margin-bottom: 24px;
}
.parcours-stat-card {
  flex: 1; min-width: 120px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  text-align: center;
}
.parcours-stat-num  { font-size: 1.8rem; font-weight: 800; color: var(--turquoise); line-height: 1; }
.parcours-stat-lbl  { font-size: 0.72rem; color: var(--muted); margin-top: 4px; }

/* ── Activité récente ── */
.parcours-recent-title {
  font-size: 0.8rem; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.05em;
  margin: 20px 0 10px;
}
.parcours-recent-list { display: flex; flex-direction: column; gap: 6px; }
.parcours-recent-item {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 14px;
  font-size: 0.8rem; color: var(--text);
}
.parcours-recent-check { color: #22c55e; font-size: 0.85rem; }
.parcours-recent-date  { margin-left: auto; font-size: 0.7rem; color: var(--muted); white-space: nowrap; }

/* Responsive */
@media (max-width: 640px) {
  .ps-formation   { padding: 12px 10px; }
  .ps-node-ring   { width: 30px; height: 30px; }
  .ps-connector   { width: 14px; margin-top: 17px; }
  /* Noeud élargi pour loger le label texte sur mobile */
  .ps-node        { width: 58px; }
  /* Label visible directement sur mobile puisque le tooltip ne fonctionne pas au touch */
  .ps-node-label  { display: block; }
}

/* ── Vue d'ensemble globale (ps-overview) — en-tête de la page Parcours ── */
/* Affichée avant les roadmaps par formation — synthèse de toute la progression */
.ps-overview {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 20px;
}
/* Ligne titre + pourcentage */
.ps-overview-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
}
.ps-overview-title { font-size: 0.95rem; font-weight: 700; color: var(--text); }
.ps-overview-pct   { font-size: 1.4rem; font-weight: 800; color: var(--turquoise); }
/* Barre de progression globale */
.ps-overview-bar {
  height: 10px;
  background: var(--border);
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 8px;
}
.ps-overview-bar-fill {
  height: 100%;
  background: var(--turquoise);
  border-radius: 5px;
  transition: width 0.8s ease;
}
.ps-overview-label { font-size: 0.75rem; color: var(--muted); margin-bottom: 16px; }
/* Grille de statistiques : modules / exercices / quizzes / durée */
.ps-overview-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.ps-overview-stat {
  flex: 1;
  min-width: 70px;
  background: var(--surface2);
  border-radius: 10px;
  padding: 10px 12px;
  text-align: center;
}
.ps-overview-stat-num {
  display: block;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}
.ps-overview-stat-lbl {
  display: block;
  font-size: 0.65rem;
  color: var(--muted);
  margin-top: 4px;
}

/* ── Panneau détail d'un module (ps-dp) — s'ouvre au clic sur un noeud ── */
/* Overlay = fond semi-transparent plein écran */
#ps-detail-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
/* Classe ajoutée par JS pour afficher l'overlay */
#ps-detail-overlay.open { display: flex; }

/* Carte du panneau */
.ps-dp {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  width: 100%;
  max-width: 440px;
  position: relative;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  max-height: 90vh;
  overflow-y: auto;
}

/* Bouton X en haut à droite */
.ps-dp-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--muted);
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}
.ps-dp-close:hover { color: var(--text); background: var(--surface2); }

/* En-tête : icône formation + titre + badge */
.ps-dp-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
  padding-right: 30px;
}
.ps-dp-engine-icon { font-size: 1.8rem; flex-shrink: 0; line-height: 1.1; }
.ps-dp-header-text { flex: 1; min-width: 0; }
.ps-dp-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 4px;
}
.ps-dp-meta { font-size: 0.78rem; color: var(--muted); }

/* Badge de statut (Complété / En cours / Gratuit / Pro) */
.ps-dp-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 2px;
}
.ps-dp-b-done { background: rgba(34, 197, 94, 0.15); color: #16a34a; }
.ps-dp-b-prog { background: var(--gold-dim); color: var(--gold); }
.ps-dp-b-free { background: rgba(34, 197, 94, 0.12); color: #22c55e; }
.ps-dp-b-lock { background: var(--surface2); color: var(--muted); }

/* Barre de progression du module */
.ps-dp-bar-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.ps-dp-bar {
  flex: 1;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.ps-dp-bar-fill {
  height: 100%;
  background: var(--turquoise);
  border-radius: 4px;
  transition: width 0.6s ease;
}
.ps-dp-bar-label { font-size: 0.72rem; color: var(--muted); white-space: nowrap; }

/* Titre et liste des points clés */
.ps-dp-points-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}
.ps-dp-points {
  list-style: none;
  padding: 0;
  margin: 0 0 20px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
/* Chaque point avec une coche verte */
.ps-dp-points li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text);
  line-height: 1.4;
}
.ps-dp-points li::before {
  content: '\2713';  /* coche Unicode */
  color: #22c55e;
  font-size: 0.85rem;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Pied de page — boutons Fermer / Commencer */
.ps-dp-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 4px;
}
.ps-dp-cancel { flex-shrink: 0; }

@media (max-width: 480px) {
  /* Panneau pleine largeur sur très petits écrans */
  .ps-dp { padding: 18px 16px; border-radius: 12px; }
  .ps-dp-footer { flex-direction: column; }
  .ps-dp-footer .btn-primary,
  .ps-dp-footer .btn-secondary { width: 100%; justify-content: center; }
}

/* Responsive : masque l'email sur très petits écrans */
@media (max-width: 600px) {
  .admin-email { display: none; }
  .admin-table th:nth-child(2) { display: none; }
  .admin-table td:nth-child(2) { display: none; }
}

/* ============================================================
   Styles dynamiques -- pages de donnees
   ============================================================ */

/* -- Onglets pays (S'installer, Ecoles) -- */
.pays-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.pays-tab {
  padding: 7px 18px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--muted);
  font-size: .82rem;
  cursor: pointer;
  transition: all .15s;
}
.pays-tab.active, .pays-tab:hover {
  background: var(--turquoise-dim);
  color: var(--turquoise);
  border-color: var(--turquoise-border);
}

/* -- H3 sous-section (spec 2b) -- */
.info-section-titre {
  font-size: .85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--turquoise);
  margin: 28px 0 10px;
}
.info-section-titre:first-child { margin-top: 0; }

/* -- Separateur de sections (spec 2a) -- */
.section-sep { border: none; border-top: 1px solid var(--border); margin: 40px 0; }

/* -- Tableau de donnees (spec 2c) -- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .85rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.data-table th {
  text-align: left;
  padding: 10px 16px;
  background: var(--surface2);
  color: var(--muted);
  font-weight: 600;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
  line-height: 1.5;
}
.data-table tbody tr:last-child td { border-bottom: none; }
/* Lignes alternees subtiles */
.data-table tbody tr:nth-child(even) td { background: var(--surface2); }
.data-table tbody tr:hover td { background: var(--turquoise-dim); }
/* Bouton "Voir" dans colonne lien */
.btn-voir {
  display: inline-block;
  padding: 3px 10px;
  background: var(--turquoise-dim);
  border: 1px solid var(--turquoise-border);
  border-radius: 6px;
  color: var(--turquoise);
  font-size: .75rem;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s;
  white-space: nowrap;
}
.btn-voir:hover { background: var(--turquoise); color: #fff; }

/* -- Badge de type -- */
.type-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.type-congres   { background: rgba(0,196,184,.12); color: var(--turquoise); }
.type-journee   { background: rgba(100,116,139,.12); color: #64748b; }
.type-webinaire { background: rgba(139,92,246,.12); color: #7c3aed; }
.type-info      { background: var(--turquoise-dim); color: var(--turquoise); }
.type-dpc       { background: rgba(34,197,94,.12); color: #16a34a; }
.type-formation { background: rgba(249,115,22,.12); color: #ea580c; }

/* -- Liste des demarches -- */
.demarches-list { padding-left: 20px; margin: 0 0 16px; }
.demarches-list li {
  font-size: .85rem;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 8px;
}

/* section-sep defini dans le bloc data-table ci-dessus */

/* -- Banniere DPC -- */
.dpc-banner {
  background: rgba(34,197,94,.08);
  border: 1px solid rgba(34,197,94,.25);
  border-radius: 10px;
  padding: 14px 18px;
  font-size: .83rem;
  color: var(--text);
  line-height: 1.6;
}
.dpc-banner a { color: #16a34a; }

/* -- Encart cross-link OCODA -- */
.ocoda-link-encart {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 28px;
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface2);
}
.ocoda-link-text { font-size: .85rem; color: var(--text); line-height: 1.55; }
.ocoda-link-btn {
  flex-shrink: 0;
  padding: 8px 18px;
  background: var(--turquoise);
  color: #fff;
  border-radius: 8px;
  font-size: .82rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity .15s;
}
.ocoda-link-btn:hover { opacity: .85; }

/* -- Sous-onglets (spec 2e) -- */
.sub-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.sub-tab {
  padding: 6px 16px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
}
/* Onglet actif : fond turquoise plein, texte blanc */
.sub-tab.active {
  background: var(--turquoise);
  color: #fff;
  border-color: var(--turquoise);
}
/* Onglet inactif au survol : contour turquoise, texte turquoise */
.sub-tab:not(.active):hover {
  border-color: var(--turquoise);
  color: var(--turquoise);
}
.sub-content { margin-top: 4px; }

/* -- Etapes numerotees (step circles) -- */
.step-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--turquoise);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  flex-shrink: 0;
}
.step-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 20px;
}
.step-content { flex: 1; }
.step-content h4 {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.step-content p {
  font-size: 0.85rem;
  color: var(--text2);
  line-height: 1.6;
  margin: 0;
}

/* -- Accordeon troubles -- */
.troubles-liste { display: flex; flex-direction: column; gap: 8px; max-width: 760px; }
.trouble-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  overflow: hidden;
}
.trouble-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  cursor: pointer;
  user-select: none;
}
.trouble-header:hover { background: var(--surface); }
.trouble-nom { font-size: .88rem; font-weight: 700; color: var(--text); }
.trouble-chevron { color: var(--muted); font-size: .78rem; }
.trouble-detail { padding: 0 16px 14px; border-top: 1px solid var(--border); }
.trouble-def {
  font-size: .83rem;
  color: var(--muted);
  line-height: 1.6;
  margin: 12px 0 10px;
}
.trouble-label {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--turquoise);
  margin: 10px 0 4px;
}

/* -- Communaute -- */
.communaute-section { margin-bottom: 8px; }
.communaute-section-titre {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 4px;
}

/* -- Perles de patients -- */
.perles-form { margin-bottom: 20px; }
.perles-textarea {
  width: 100%;
  min-height: 90px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: .88rem;
  font-family: inherit;
  resize: vertical;
  margin-bottom: 6px;
  box-sizing: border-box;
}
.perles-mention { font-size: .72rem; color: var(--muted); margin-bottom: 10px; }
.perles-liste { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.perle-item {
  padding: 12px 16px;
  border-left: 3px solid var(--turquoise);
  background: var(--surface);
  border-radius: 0 8px 8px 0;
  font-size: .88rem;
  color: var(--text);
  font-style: italic;
  line-height: 1.55;
}

/* -- Volontaires -- */
.volontaires-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin-top: 4px;
}
.volontaire-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 16px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.volontaire-icon  { font-size: 1.6rem; line-height: 1; }
.volontaire-titre { font-size: .88rem; font-weight: 700; color: var(--text); }
.volontaire-desc  { font-size: .78rem; color: var(--muted); line-height: 1.5; flex: 1; }

/* -- Groupes Facebook -- */
.fb-groupes { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.fb-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  background: #1877F2;
  color: #fff;
  border-radius: 8px;
  font-size: .84rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity .15s;
}
.fb-btn:hover { opacity: .88; }

/* -- Catalogue -- filtres multi-dimensions -- */
.catalogue-filtres-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.filtres-groupe { display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.filtres-groupe-label {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  min-width: 52px;
  padding-top: 8px;
  flex-shrink: 0;
}
.filtres-ligne { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }
.filtres-tri { align-items: center; }
.cat-btn-sm { font-size: .72rem; padding: 4px 10px; }
.tri-select {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: .82rem;
  cursor: pointer;
}
.reset-link { color: var(--turquoise); font-size: .8rem; text-decoration: none; }
.reset-link:hover { text-decoration: underline; }
.catalogue-info-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .8rem;
  color: var(--muted);
  margin-bottom: 14px;
}

/* Apercu image / placeholder dans la carte */
.carte-apercu-img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 10px;
}
.carte-apercu-placeholder {
  width: 100%;
  height: 100px;
  border-radius: 8px;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  font-size: 2rem;
}
.carte-type { font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; color: var(--turquoise); }
.carte-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }

/* Cercle prix */
.jeu-prix { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.jeu-prix-circle {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--turquoise);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .78rem;
  font-weight: 800;
  flex-shrink: 0;
}
.jeu-prix-label { font-size: .72rem; color: var(--muted); }

/* Badge Nouveau */
.jeu-badge-nouveau {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--turquoise);
  color: #fff;
  font-size: .62rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* Mini point prix dans le filtre */
.prix-dot-mini {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  opacity: .7;
  margin-right: 4px;
  vertical-align: middle;
}

/* Boutons bas de carte */
.carte-btns { display: flex; gap: 8px; margin-top: 10px; }
.carte-btn-apercu,
.carte-btn-dl {
  flex: 1;
  padding: 6px 0;
  border-radius: 6px;
  font-size: .76rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  transition: all .15s;
}
.carte-btn-dl {
  background: var(--turquoise);
  border-color: var(--turquoise);
  color: #fff;
}
.carte-btn-apercu:hover { background: var(--surface2); }
.carte-btn-dl:hover { opacity: .85; }

/* Etat vide -- construction */
.en-construction { text-align: center; padding: 60px 20px; max-width: 400px; margin: 0 auto; }
.en-construction-icon  { font-size: 3rem; margin-bottom: 14px; }
.en-construction-titre { font-size: 1.1rem; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.en-construction-desc  { font-size: .85rem; color: var(--muted); line-height: 1.6; }

/* Bouton secondaire */
.btn-secondaire {
  padding: 8px 18px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: .84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}
.btn-secondaire:hover {
  background: var(--surface2);
  border-color: var(--turquoise-border);
  color: var(--turquoise);
}

/* ════════════════════════════════════════════════════════════
   Filtres logiciels (FIX 8)
   ════════════════════════════════════════════════════════════ */

.filtres-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.filtre-btn {
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.82rem;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-sans);
}
.filtre-btn:hover {
  border-color: var(--turquoise-border);
  color: var(--turquoise);
}
.filtre-btn.active {
  background: var(--turquoise);
  color: #fff;
  border-color: var(--turquoise);
}

/* ════════════════════════════════════════════════════════════
   Contact bas de sidebar
   ════════════════════════════════════════════════════════════ */

/* Item Contact discret en bas */
.nav-item--muted .nav-label {
  color: var(--muted);
  font-size: 0.78rem;
}
.nav-item--muted:hover .nav-label { color: var(--text); }

/* Bouton Tarifs dans la topbar */
.btn-tarifs {
  padding: 6px 14px;
  background: transparent;
  border: 1px solid var(--turquoise-border);
  border-radius: var(--radius-sm);
  color: var(--turquoise);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
.btn-tarifs:hover {
  background: var(--turquoise-dim);
  border-color: var(--turquoise);
}

/* ════════════════════════════════════════════════════════════
   Page Tarifs (T6)
   ════════════════════════════════════════════════════════════ */

.tarifs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}
.tarif-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px 20px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tarif-card--accent {
  border-color: var(--turquoise-border);
  background: var(--turquoise-dim);
}
.tarif-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--turquoise-dim);
  color: var(--turquoise);
  border: 1px solid var(--turquoise-border);
  align-self: flex-start;
}
.tarif-nom {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}
.tarif-prix {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--turquoise);
  line-height: 1;
}
.tarif-prix span {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--muted);
}
.tarif-liste {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.tarif-liste li {
  font-size: 0.84rem;
  color: var(--text2);
  padding-left: 18px;
  position: relative;
}
.tarif-liste li::before {
  content: 'ok';
  position: absolute;
  left: 0;
  color: var(--turquoise);
  font-size: 0.7rem;
  font-weight: 700;
  top: 2px;
}
.tarif-bundle {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  background: var(--surface2);
  max-width: 560px;
  margin-top: 8px;
}
.tarif-bundle-titre {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.tarif-bundle-texte {
  font-size: 0.85rem;
  color: var(--text2);
  line-height: 1.65;
  margin-bottom: 14px;
}
