/* ==========================================================================
   ADVANCIA TRAINING — Design System
   Centre de formation & certification IT — Tunisie / Maroc / Côte d'Ivoire
   Feuille de style autonome (dépendance externe : Google Fonts uniquement).
   Charte dérivée du logo officiel : rouge #b4002d + anthracite #161615 + blanc.
   ========================================================================== */

/* ---------------------------------------------------------------- Variables */
:root {
  /* Fonds & surfaces (neutres chauds) */
  --bg: #f6f6f7;
  --surface: #ffffff;
  --surface-2: #f1f1f2;
  --surface-3: #eaeaec;
  --border: #e5e5e8;
  --border-strong: #d6d6da;

  /* Texte */
  --text: #161615;      /* anthracite du logo — titres */
  --ink: #33312f;       /* corps de texte */
  --muted: #77746f;     /* secondaire */
  --faint: #a7a4a0;

  /* Primaire (rouge Advancia) */
  --primary: #b4002d;
  --primary-700: #7e001f;
  --primary-600: #980026;
  --primary-500: #c60734;
  --primary-300: #e2607e;
  --primary-100: #f7c9d3;
  --primary-050: #fdeaee;

  /* Anthracite (sombre) */
  --dark: #161615;
  --dark-2: #221f1d;
  --dark-3: #2e2a27;

  /* Or certification (accent secondaire, badges certifiants) */
  --gold: #b78628;
  --gold-050: #fbf3df;
  --gold-300: #e3c37a;

  /* Sémantique */
  --success: #1f9d55;
  --warning: #d98c00;
  --danger:  #d92d20;
  --info:    #2f6feb;
  --success-050: #e8f7ee;
  --warning-050: #fdf3e0;
  --danger-050:  #fdebea;
  --info-050:    #eaf1fe;

  /* Ombres neutres */
  --shadow-xs: 0 1px 2px rgba(22, 22, 21, .06);
  --shadow-sm: 0 2px 6px rgba(22, 22, 21, .07);
  --shadow-md: 0 8px 24px rgba(22, 22, 21, .09);
  --shadow-lg: 0 18px 46px rgba(22, 22, 21, .13);
  --shadow-primary: 0 10px 26px rgba(180, 0, 45, .30);

  /* Dégradés */
  --grad-primary: linear-gradient(135deg, #c60734 0%, #8f0021 100%);
  --grad-dark:    linear-gradient(150deg, #221f1d 0%, #161615 60%, #0f0f0e 100%);
  --grad-soft:    linear-gradient(135deg, #fdeaee 0%, #f6f6f7 60%);
  --grad-vignette:linear-gradient(140deg, #b4002d 0%, #7e001f 60%, #161615 100%);

  /* Rayons */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 26px;
  --r-pill: 999px;

  /* Typo */
  --font-title: "Sora", "Inter", system-ui, sans-serif;
  --font-body:  "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Layout */
  --container: 1200px;
  --header-h: 76px;
  --sidebar-w: 268px;
  --sidebar-w-collapsed: 78px;

  /* Transitions */
  --t: .22s cubic-bezier(.4, 0, .2, 1);
}

/* --------------------------------------------------------------- Reset base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; transition: color var(--t); }
a:hover { color: var(--primary-700); }
button { font-family: inherit; }
h1, h2, h3, h4, h5 {
  font-family: var(--font-title);
  color: var(--text);
  line-height: 1.16;
  margin: 0 0 .5em;
  font-weight: 700;
  letter-spacing: -.015em;
}
h1 { font-size: clamp(2.1rem, 4.4vw, 3.15rem); }
h2 { font-size: clamp(1.65rem, 3vw, 2.35rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1rem; }
ul { margin: 0; padding: 0; }
hr { border: 0; border-top: 1px solid var(--border); margin: 1.5rem 0; }
:focus-visible { outline: 3px solid var(--primary-300); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--primary); color: #fff; }

/* --------------------------------------------------------- Grilles & layout */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 860px; }
.section { padding: 76px 0; }
.section--tight { padding: 46px 0; }
.section--alt { background: var(--surface-2); }
.section--dark { background: var(--dark); color: #d8d6d3; }
.section--dark h1, .section--dark h2, .section--dark h3, .section--dark h4 { color: #fff; }

.section-head { max-width: 720px; margin: 0 auto 46px; text-align: center; }
.section-head.left { margin-left: 0; text-align: left; }
.section-title { margin-bottom: .5rem; }
.eyebrow {
  display: inline-block;
  font-family: var(--font-title);
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-050);
  padding: .38rem .9rem;
  border-radius: var(--r-pill);
  margin-bottom: 1rem;
}
.section--dark .eyebrow { background: rgba(180,0,45,.18); color: #ff8ba2; }
.text-muted { color: var(--muted); }
.text-center { text-align: center; }
.text-white { color: #fff; }
.gradient-text {
  background: var(--grad-primary);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.flex { display: flex; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.wrap { flex-wrap: wrap; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-sm { gap: 8px; } .gap-md { gap: 16px; } .gap-lg { gap: 24px; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; }
.w-full { width: 100%; }

/* --------------------------------------------------------------- Boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  font-family: var(--font-title); font-size: .95rem; font-weight: 600; line-height: 1;
  padding: .85rem 1.55rem; border: 1px solid transparent; border-radius: var(--r-pill);
  cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: transform var(--t), box-shadow var(--t), background var(--t), color var(--t), border-color var(--t);
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 1.05em; height: 1.05em; }

.btn-primary { background: var(--grad-primary); color: #fff; box-shadow: var(--shadow-primary); }
.btn-primary:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 14px 32px rgba(180,0,45,.4); }

.btn-dark { background: var(--dark); color: #fff; }
.btn-dark:hover { color: #fff; background: #000; transform: translateY(-2px); }

.btn-outline { background: var(--surface); color: var(--primary); border-color: var(--primary-100); }
.btn-outline:hover { background: var(--primary-050); color: var(--primary-700); border-color: var(--primary); }

.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.btn-outline-light:hover { background: rgba(255,255,255,.12); color: #fff; border-color: #fff; }

.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); color: var(--primary); }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { color: #fff; background: #b91c1c; }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { color: #fff; background: #157f43; }

.btn-sm { padding: .55rem 1rem; font-size: .85rem; }
.btn-lg { padding: 1.02rem 2rem; font-size: 1.05rem; }
.btn-block { display: flex; width: 100%; }
.btn-icon { padding: .6rem; border-radius: var(--r-md); }

/* --------------------------------------------------------------- Cartes */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs); overflow: hidden;
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}
.card-body { padding: 22px; }
.card-head { padding: 18px 22px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.card-head h3 { margin: 0; font-size: 1.1rem; }
.card-foot { padding: 16px 22px; border-top: 1px solid var(--border); background: var(--surface-2); }
.card--hover:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--primary-100); }

/* Carte formation */
.formation-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs); overflow: hidden; display: flex; flex-direction: column;
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}
.formation-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--primary-100); }
.formation-card .vignette {
  position: relative; height: 132px; background: var(--grad-vignette);
  display: flex; align-items: center; justify-content: center; color: #fff; overflow: hidden;
}
.formation-card .vignette::after { content: ""; position: absolute; inset: 0; background: radial-gradient(140px 140px at 82% 18%, rgba(255,255,255,.22), transparent 70%); }
.formation-card .vignette .ico { font-size: 2.4rem; position: relative; z-index: 1; }
.formation-card .vignette .editor {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  background: rgba(255,255,255,.95); color: var(--dark);
  font-size: .72rem; font-weight: 700; padding: .32rem .7rem; border-radius: var(--r-sm);
  font-family: var(--font-title); letter-spacing: .02em;
}
.formation-card .vignette .ref { position: absolute; bottom: 12px; right: 14px; z-index: 2; font-size: .72rem; opacity: .85; font-family: var(--font-title); letter-spacing: .05em; }
.formation-card .fc-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.formation-card h3 { font-size: 1.08rem; margin-bottom: .4rem; }
.formation-card .fc-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: .5rem 0 1rem; color: var(--muted); font-size: .82rem; }
.formation-card .fc-meta span { display: inline-flex; align-items: center; gap: .3rem; }
.formation-card .fc-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding-top: 14px; border-top: 1px solid var(--border); }
.formation-card .price { font-family: var(--font-title); font-weight: 700; font-size: 1.18rem; color: var(--text); }
.formation-card .price small { font-size: .72rem; color: var(--muted); font-weight: 400; }

/* Stat / KPI */
.stat-card, .kpi {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 22px; box-shadow: var(--shadow-xs); display: flex; align-items: center; gap: 16px;
}
.stat-card .stat-ico, .kpi .kpi-ico {
  width: 52px; height: 52px; flex: none; border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center; font-size: 1.4rem; color: #fff;
  background: var(--grad-primary); box-shadow: var(--shadow-md);
}
.kpi .kpi-ico.dark { background: var(--grad-dark); }
.kpi .kpi-ico.gold { background: linear-gradient(135deg, #d9b451, #b78628); }
.stat-card .stat-val, .kpi .kpi-val { font-family: var(--font-title); font-size: 1.8rem; font-weight: 700; line-height: 1; color: var(--text); }
.stat-card .stat-lbl, .kpi .kpi-lbl { color: var(--muted); font-size: .85rem; margin-top: 4px; }
.kpi .kpi-trend { font-size: .8rem; font-weight: 600; }
.kpi .kpi-trend.up { color: var(--success); }
.kpi .kpi-trend.down { color: var(--danger); }

/* --------------------------------------------------------- Badges / tags */
.badge {
  display: inline-flex; align-items: center; gap: .35rem; font-size: .74rem; font-weight: 600;
  padding: .28rem .7rem; border-radius: var(--r-pill);
  background: var(--surface-2); color: var(--ink); border: 1px solid var(--border);
}
.badge-primary { background: var(--primary-050); color: var(--primary-700); border-color: var(--primary-100); }
.badge-dark { background: #2a2724; color: #fff; border-color: #2a2724; }
.badge-success { background: var(--success-050); color: var(--success); border-color: #b7e6c8; }
.badge-warning { background: var(--warning-050); color: var(--warning); border-color: #f2d59b; }
.badge-danger  { background: var(--danger-050); color: var(--danger); border-color: #f4bcb8; }
.badge-cert { background: var(--gold-050); color: #8a6413; border-color: var(--gold-300); }
.badge-cert::before { content: "🏅"; }
.badge-new::before { content: "✦ "; }
.badge-new { background: var(--dark); color: #fff; border-color: var(--dark); }

.tag { display: inline-block; font-size: .78rem; color: var(--muted); background: var(--surface-2); padding: .3rem .7rem; border-radius: var(--r-sm); border: 1px solid var(--border); }
.chip {
  display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; font-weight: 500; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); padding: .5rem 1rem; border-radius: var(--r-pill);
  cursor: pointer; transition: all var(--t);
}
.chip:hover { border-color: var(--primary-300); color: var(--primary); }
.chip.active { background: var(--primary-050); border-color: var(--primary); color: var(--primary-700); font-weight: 600; }
.chip .x { opacity: .6; }

/* ------------------------------------------------------------- Header public */
.site-header {
  position: sticky; top: 0; z-index: 900;
  background: rgba(255, 255, 255, .92); backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border); box-shadow: var(--shadow-xs);
}
.topbar {
  background: var(--dark); color: #cfccc8; font-size: .82rem;
}
.topbar .container { display: flex; align-items: center; justify-content: space-between; height: 38px; gap: 16px; }
.topbar a { color: #cfccc8; }
.topbar a:hover { color: #fff; }
.topbar .tb-left { display: flex; gap: 20px; align-items: center; }
.topbar .tb-right { display: flex; gap: 16px; align-items: center; }
.topbar .tb-item { display: inline-flex; align-items: center; gap: .4rem; }
.site-header .container.nav { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 20px; }
.site-header .brand { display: flex; align-items: center; gap: .6rem; flex: none; }
.site-header .brand img { height: 40px; width: auto; }

.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav > a, .main-nav .has-dropdown > a, .main-nav .has-mega > a {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .6rem .85rem; border-radius: var(--r-md);
  color: var(--text); font-weight: 500; font-size: .95rem; transition: all var(--t);
}
.main-nav a:hover, .main-nav a.active { background: var(--primary-050); color: var(--primary); }

.has-dropdown, .has-mega { position: relative; }
.has-dropdown > a::after, .has-mega > a::after { content: "▾"; font-size: .7rem; opacity: .7; }
.dropdown {
  position: absolute; top: calc(100% + 10px); left: 0; min-width: 250px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  box-shadow: var(--shadow-lg); padding: 8px;
  opacity: 0; visibility: hidden; transform: translateY(8px); transition: all var(--t); z-index: 950;
}
.has-dropdown:hover .dropdown, .has-dropdown.open .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown a { display: block; padding: .6rem .8rem; border-radius: var(--r-sm); font-weight: 500; }
.dropdown a:hover { background: var(--surface-2); }
.dropdown a small { display: block; color: var(--muted); font-weight: 400; font-size: .78rem; }

/* Méga-menu (éditeurs + domaines) */
.mega {
  position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%) translateY(8px);
  width: min(920px, 92vw); background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: 26px;
  opacity: 0; visibility: hidden; transition: all var(--t); z-index: 950;
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 26px;
}
.has-mega:hover .mega, .has-mega.open .mega { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.mega h5 { font-family: var(--font-title); font-size: .74rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 0 0 14px; }
.mega .mega-col + .mega-col { border-left: 1px solid var(--border); padding-left: 26px; }
.mega .mega-links { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 10px; }
.mega .mega-links a { display: flex; align-items: center; gap: .5rem; padding: .5rem .6rem; border-radius: var(--r-sm); color: var(--ink); font-weight: 500; font-size: .9rem; }
.mega .mega-links a:hover { background: var(--primary-050); color: var(--primary); }
.mega .mega-links a .dot { width: 8px; height: 8px; border-radius: 2px; flex: none; background: var(--primary); }
.mega .mega-editors { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.mega .mega-editors a {
  aspect-ratio: 3/2; border: 1px solid var(--border); border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center; padding: 8px;
  font-family: var(--font-title); font-weight: 700; font-size: .8rem; color: var(--ink);
  background: var(--surface); transition: all var(--t);
}
.mega .mega-editors a:hover { border-color: var(--primary); color: var(--primary); box-shadow: var(--shadow-sm); }
.mega .mega-foot { grid-column: 1 / -1; border-top: 1px solid var(--border); padding-top: 16px; display: flex; align-items: center; justify-content: space-between; }

.header-actions { display: flex; align-items: center; gap: 10px; flex: none; }
.header-actions .icon-btn { width: 42px; height: 42px; border-radius: var(--r-md); border: 1px solid var(--border); background: var(--surface); display: flex; align-items: center; justify-content: center; color: var(--text); cursor: pointer; }
.header-actions .icon-btn:hover { background: var(--surface-2); color: var(--primary); }

.nav-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--border); background: var(--surface); border-radius: var(--r-md); cursor: pointer; padding: 0; align-items: center; justify-content: center; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after { content: ""; display: block; width: 20px; height: 2px; background: var(--text); border-radius: 2px; position: relative; transition: all var(--t); }
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }
.site-header.open .nav-toggle span { background: transparent; }
.site-header.open .nav-toggle span::before { transform: rotate(45deg); top: 0; }
.site-header.open .nav-toggle span::after { transform: rotate(-45deg); top: 0; }

/* ------------------------------------------------------------- Footer sombre */
.site-footer { background: var(--dark); color: #b8b4af; padding: 60px 0 0; }
.site-footer .footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 40px; }
.site-footer .brand img { height: 42px; margin-bottom: 1.1rem; }
.site-footer p { color: #9a9691; font-size: .92rem; }
.site-footer h4 { font-family: var(--font-title); font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; color: #fff; margin-bottom: 1.1rem; }
.site-footer ul li { list-style: none; margin-bottom: .6rem; }
.site-footer ul li a { color: #9a9691; font-size: .92rem; }
.site-footer ul li a:hover { color: var(--primary-300); }
.site-footer .foot-contact li { display: flex; gap: .55rem; color: #9a9691; font-size: .92rem; align-items: flex-start; }
.site-footer .foot-contact .ic { color: var(--primary-300); flex: none; }
.site-footer .social { display: flex; gap: 10px; margin-top: 1.1rem; }
.site-footer .social a { width: 38px; height: 38px; border-radius: var(--r-md); background: #262320; border: 1px solid #322e2a; display: flex; align-items: center; justify-content: center; color: #cfccc8; transition: all var(--t); }
.site-footer .social a:hover { background: var(--primary); color: #fff; transform: translateY(-2px); border-color: var(--primary); }
.site-footer .foot-badges { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 1rem; }
.site-footer .foot-badges .fb { border: 1px solid #322e2a; border-radius: var(--r-sm); padding: .35rem .6rem; font-size: .72rem; color: #cfccc8; font-family: var(--font-title); }
.site-footer .copyright { border-top: 1px solid #2a2724; padding: 22px 0; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; color: #78746f; font-size: .85rem; }
.site-footer .copyright a { color: #9a9691; }
.site-footer .copyright a:hover { color: #fff; }

/* --------------------------------------------------------- Bandes marquantes */
.cta-band { background: var(--grad-vignette); color: #fff; border-radius: var(--r-xl); padding: 48px; position: relative; overflow: hidden; }
.cta-band::after { content: ""; position: absolute; width: 360px; height: 360px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.14), transparent 70%); top: -140px; right: -80px; }
.cta-band h2 { color: #fff; }
.cta-band .container, .cta-band > * { position: relative; z-index: 1; }

.stat-band { background: var(--grad-dark); color: #fff; }
.stat-band .sb-item { text-align: center; padding: 12px; }
.stat-band .sb-val { font-family: var(--font-title); font-weight: 700; font-size: clamp(2rem, 4vw, 2.8rem); color: #fff; line-height: 1; }
.stat-band .sb-val .u { color: var(--primary-300); }
.stat-band .sb-lbl { color: #b8b4af; margin-top: 8px; font-size: .92rem; }

/* Méthodes de formation (présentiel / distanciel / intra) */
.method-card { position: relative; border-radius: var(--r-lg); overflow: hidden; min-height: 260px; display: flex; align-items: flex-end; padding: 26px; color: #fff; background: var(--grad-dark); }
.method-card::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(22,22,21,.1), rgba(22,22,21,.85)); z-index: 0; }
.method-card .mc-body { position: relative; z-index: 1; }
.method-card .mc-ico { font-size: 1.8rem; margin-bottom: 10px; }
.method-card h3 { color: #fff; margin-bottom: .3rem; }
.method-card p { color: #d8d6d3; font-size: .92rem; margin: 0; }
.method-card.alt { background: var(--grad-vignette); }

/* Feature icône */
.feature { display: flex; gap: 16px; }
.feature .f-ico { width: 50px; height: 50px; flex: none; border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; background: var(--primary-050); color: var(--primary); }
.feature h4 { margin-bottom: .25rem; font-size: 1.05rem; }
.feature p { color: var(--muted); font-size: .92rem; margin: 0; }

/* Ruban de logos partenaires (marquee) */
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee .track { display: flex; gap: 56px; align-items: center; width: max-content; animation: marquee 34s linear infinite; }
.marquee:hover .track { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.marquee .logo-item { height: 34px; display: flex; align-items: center; font-family: var(--font-title); font-weight: 700; font-size: 1.15rem; color: var(--muted); white-space: nowrap; }

.logo-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 30px 44px; }
.logo-row .logo-item { height: 42px; display: flex; align-items: center; color: var(--muted); font-family: var(--font-title); font-weight: 700; font-size: 1.15rem; opacity: .7; transition: all var(--t); }
.logo-row .logo-item:hover { opacity: 1; color: var(--primary); }
.editor-badge { display: inline-flex; align-items: center; justify-content: center; height: 64px; padding: 0 18px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); font-family: var(--font-title); font-weight: 700; color: var(--ink); transition: all var(--t); }
.editor-badge:hover { border-color: var(--primary); color: var(--primary); box-shadow: var(--shadow-sm); transform: translateY(-3px); }

/* ------------------------------------------------------------- Layout admin */
.admin-layout { display: flex; min-height: 100vh; background: var(--bg); }
.admin-sidebar { width: var(--sidebar-w); flex: none; background: var(--dark); color: #cfccc8; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; transition: width var(--t); z-index: 800; }
.admin-sidebar .sb-brand { height: var(--header-h); display: flex; align-items: center; gap: .6rem; padding: 0 22px; border-bottom: 1px solid #2a2724; }
.admin-sidebar .sb-brand img { height: 34px; }
.admin-sidebar .sb-nav { flex: 1; padding: 16px 12px; overflow-y: auto; }
.admin-sidebar .sb-section { font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; color: #6f6b66; padding: 16px 12px 6px; }
.admin-sidebar .sb-nav a { display: flex; align-items: center; gap: .8rem; padding: .72rem .85rem; border-radius: var(--r-md); color: #cfccc8; font-weight: 500; font-size: .92rem; margin-bottom: 2px; transition: all var(--t); }
.admin-sidebar .sb-nav a .ico { width: 20px; text-align: center; flex: none; font-size: 1.05rem; }
.admin-sidebar .sb-nav a:hover { background: #262320; color: #fff; }
.admin-sidebar .sb-nav a.active { background: var(--primary); color: #fff; font-weight: 600; box-shadow: var(--shadow-primary); }
.admin-sidebar .sb-nav a .count { margin-left: auto; font-size: .72rem; background: #322e2a; color: #cfccc8; padding: .1rem .5rem; border-radius: var(--r-pill); }
.admin-sidebar .sb-nav a.active .count { background: rgba(255,255,255,.25); color: #fff; }
.admin-sidebar .sb-foot { padding: 14px 12px; border-top: 1px solid #2a2724; }
.admin-sidebar .sb-label { transition: opacity var(--t); }

.admin-layout.collapsed .admin-sidebar { width: var(--sidebar-w-collapsed); }
.admin-layout.collapsed .admin-sidebar .sb-label, .admin-layout.collapsed .admin-sidebar .sb-section, .admin-layout.collapsed .admin-sidebar .sb-brand img, .admin-layout.collapsed .admin-sidebar .count { display: none; }
.admin-layout.collapsed .admin-sidebar .sb-nav a { justify-content: center; }

.admin-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.admin-topbar { height: var(--header-h); flex: none; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 16px; padding: 0 24px; position: sticky; top: 0; z-index: 700; }
.admin-topbar .sb-collapse { width: 42px; height: 42px; border: 1px solid var(--border); background: var(--surface); border-radius: var(--r-md); cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--text); font-size: 1.1rem; }
.admin-topbar .sb-collapse:hover { background: var(--surface-2); color: var(--primary); }
.admin-topbar .topbar-search { flex: 1; max-width: 420px; position: relative; }
.admin-topbar .topbar-search input { width: 100%; padding: .6rem 1rem .6rem 2.5rem; border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--surface-2); color: var(--text); font-size: .9rem; }
.admin-topbar .topbar-search input:focus { background: var(--surface); border-color: var(--primary-300); outline: none; }
.admin-topbar .topbar-search .s-ico { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--muted); }
.admin-topbar .spacer { flex: 1; }
.admin-topbar .t-btn { position: relative; width: 42px; height: 42px; border-radius: var(--r-md); border: 1px solid var(--border); background: var(--surface); display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text); }
.admin-topbar .t-btn:hover { background: var(--surface-2); }
.admin-topbar .t-btn .dot { position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; background: var(--primary); border-radius: 50%; border: 2px solid var(--surface); }
.admin-topbar .admin-user { display: flex; align-items: center; gap: .6rem; cursor: pointer; }
.admin-topbar .admin-user .name { font-size: .9rem; font-weight: 600; color: var(--text); }
.admin-topbar .admin-user .role { font-size: .75rem; color: var(--muted); }

.admin-main { flex: 1; padding: 28px; background: var(--bg); }
.admin-main .page-head { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 24px; }
.admin-main .page-head h1 { font-size: 1.6rem; margin-bottom: .2rem; }
.admin-main .page-head p { color: var(--muted); margin: 0; }

/* --------------------------------------------------------- Formulaires */
.form-group { margin-bottom: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-row-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; }
.form-label { display: block; font-size: .88rem; font-weight: 600; color: var(--text); margin-bottom: .4rem; }
.form-label .req { color: var(--primary); }
.form-control { width: 100%; padding: .74rem .95rem; border: 1px solid var(--border-strong); border-radius: var(--r-md); background: var(--surface); color: var(--text); font-size: .95rem; font-family: inherit; transition: border-color var(--t), box-shadow var(--t); }
.form-control::placeholder { color: var(--faint); }
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-050); }
textarea.form-control { min-height: 120px; resize: vertical; }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2377746f' d='M6 8L0 0h12z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; padding-right: 2.4rem; }
.form-hint { font-size: .8rem; color: var(--muted); margin-top: .35rem; }

.input-icon { position: relative; }
.input-icon .form-control { padding-left: 2.6rem; }
.input-icon .ic { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--muted); }

.checkbox { display: inline-flex; align-items: center; gap: .55rem; cursor: pointer; font-size: .92rem; }
.checkbox input { width: 18px; height: 18px; accent-color: var(--primary); }

.switch { position: relative; display: inline-flex; align-items: center; gap: .6rem; cursor: pointer; font-size: .92rem; }
.switch input { position: absolute; opacity: 0; }
.switch .track { width: 44px; height: 24px; background: var(--border-strong); border-radius: var(--r-pill); position: relative; transition: background var(--t); }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; background: #fff; border-radius: 50%; box-shadow: var(--shadow-sm); transition: transform var(--t); }
.switch input:checked + .track { background: var(--primary); }
.switch input:checked + .track::after { transform: translateX(20px); }

/* --------------------------------------------------------------- Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-xs); }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; font-family: var(--font-title); font-weight: 600; color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; padding: 14px 18px; border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap; }
.table td { padding: 14px 18px; border-bottom: 1px solid var(--border); color: var(--text); vertical-align: middle; }
.table tbody tr:hover { background: var(--primary-050); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .cell-main { font-weight: 600; }
.table .cell-sub { color: var(--muted); font-size: .82rem; }
.table td.actions { text-align: right; white-space: nowrap; }
.table .row-check { width: 42px; }

.pill { display: inline-flex; align-items: center; gap: .4rem; font-size: .78rem; font-weight: 600; padding: .28rem .7rem; border-radius: var(--r-pill); }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill-paid, .pill-confirmed, .pill-active { background: var(--success-050); color: var(--success); }
.pill-pending, .pill-draft { background: var(--warning-050); color: var(--warning); }
.pill-unpaid, .pill-cancelled { background: var(--danger-050); color: var(--danger); }
.pill-info { background: var(--info-050); color: var(--info); }

/* --------------------------------------------------------------- Hero */
.hero { position: relative; overflow: hidden; background: var(--grad-soft); padding: 84px 0; }
.hero::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(180,0,45,.05) 1px, transparent 1px); background-size: 22px 22px; opacity: .6; }
.hero .glow { position: absolute; border-radius: 50%; filter: blur(80px); z-index: 0; pointer-events: none; }
.hero .glow.g1 { width: 440px; height: 440px; background: rgba(180,0,45,.14); top: -140px; right: -80px; }
.hero .glow.g2 { width: 340px; height: 340px; background: rgba(22,22,21,.06); bottom: -160px; left: -60px; }
.hero .container { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero h1 { margin-bottom: 1rem; }
.hero p.lead { font-size: 1.15rem; color: var(--ink); max-width: 560px; }
.hero .hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 1.8rem; }
.hero .hero-stats { display: flex; gap: 30px; margin-top: 2.4rem; flex-wrap: wrap; }
.hero .hero-stats .hs strong { font-family: var(--font-title); font-size: 1.7rem; color: var(--primary); display: block; }
.hero .hero-stats .hs span { color: var(--muted); font-size: .85rem; }
.hero .hero-visual { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); padding: 22px; }

/* Hero interne (bannière de page, sombre) */
.page-hero { background: var(--grad-dark); color: #d8d6d3; padding: 56px 0; position: relative; overflow: hidden; }
.page-hero::after { content: ""; position: absolute; width: 380px; height: 380px; border-radius: 50%; background: radial-gradient(circle, rgba(180,0,45,.35), transparent 70%); top: -160px; right: -100px; }
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { color: #fff; margin-bottom: .4rem; }
.page-hero p { color: #b8b4af; max-width: 640px; margin: 0; }

/* Barre de recherche/filtres formations */
.search-bar { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-pill); box-shadow: var(--shadow-md); padding: 8px; display: flex; gap: 8px; align-items: center; }
.search-bar .form-control { border: 0; box-shadow: none; }
.search-bar .form-control:focus { box-shadow: none; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* ------------------------------------------------------ Steps / Timeline */
.steps { display: grid; gap: 22px; grid-template-columns: repeat(4, 1fr); }
.steps .step { position: relative; text-align: center; }
.steps .step .num { width: 54px; height: 54px; margin: 0 auto 14px; border-radius: 50%; background: var(--grad-primary); color: #fff; display: flex; align-items: center; justify-content: center; font-family: var(--font-title); font-weight: 700; font-size: 1.2rem; box-shadow: var(--shadow-primary); }
.steps .step h4 { margin-bottom: .3rem; font-size: 1.05rem; }
.steps .step p { color: var(--muted); font-size: .9rem; margin: 0; }
.timeline { border-left: 2px solid var(--border); padding-left: 24px; margin-left: 8px; }
.timeline .tl-item { position: relative; padding-bottom: 26px; }
.timeline .tl-item::before { content: ""; position: absolute; left: -32px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--primary); border: 3px solid var(--surface); box-shadow: 0 0 0 2px var(--primary-100); }
.timeline .tl-item .tl-date { font-size: .8rem; color: var(--primary); font-weight: 600; }

/* --------------------------------------------------------------- Accordéon */
.accordion { border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.accordion .acc-item { border-bottom: 1px solid var(--border); }
.accordion .acc-item:last-child { border-bottom: 0; }
.accordion .acc-head { width: 100%; text-align: left; background: none; border: 0; cursor: pointer; padding: 18px 22px; font-family: var(--font-title); font-weight: 600; font-size: 1.02rem; color: var(--text); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.accordion .acc-head:hover { color: var(--primary); }
.accordion .acc-head .chev { transition: transform var(--t); color: var(--muted); flex: none; }
.accordion .acc-item.open .acc-head .chev { transform: rotate(180deg); color: var(--primary); }
.accordion .acc-body { max-height: 0; overflow: hidden; transition: max-height var(--t); }
.accordion .acc-item.open .acc-body { max-height: 900px; }
.accordion .acc-body .inner { padding: 0 22px 20px; color: var(--ink); }

/* --------------------------------------------------------------- Onglets */
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); margin-bottom: 24px; flex-wrap: wrap; }
.tabs [data-tab] { background: none; border: 0; border-bottom: 2px solid transparent; padding: .8rem 1.1rem; cursor: pointer; font-family: var(--font-title); font-weight: 600; font-size: .95rem; color: var(--muted); transition: all var(--t); margin-bottom: -1px; }
.tabs [data-tab]:hover { color: var(--primary); }
.tabs [data-tab].active { color: var(--primary); border-bottom-color: var(--primary); }
[data-pane] { display: none; }
[data-pane].active { display: block; animation: fadeIn .3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* --------------------------------------------------------------- Progression */
.progress { height: 10px; background: var(--surface-2); border-radius: var(--r-pill); overflow: hidden; }
.progress-bar { height: 100%; background: var(--grad-primary); border-radius: var(--r-pill); transition: width .5s ease; }
.progress-lbl { display: flex; justify-content: space-between; font-size: .82rem; color: var(--muted); margin-bottom: .35rem; }

/* --------------------------------------------------------------- Avatars */
.avatar { width: 40px; height: 40px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-title); font-weight: 700; font-size: .9rem; color: #fff; background: var(--grad-primary); overflow: hidden; }
.avatar.dark { background: var(--grad-dark); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-sm { width: 30px; height: 30px; font-size: .75rem; }
.avatar-lg { width: 64px; height: 64px; font-size: 1.3rem; }
.avatar-group { display: flex; }
.avatar-group .avatar { border: 2px solid var(--surface); margin-left: -10px; }
.avatar-group .avatar:first-child { margin-left: 0; }

/* --------------------------------------------------------------- Breadcrumb */
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; font-size: .85rem; color: var(--muted); margin-bottom: 1rem; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { opacity: .5; }
.breadcrumb .current { color: var(--text); font-weight: 600; }
.page-hero .breadcrumb, .page-hero .breadcrumb a { color: #b8b4af; }
.page-hero .breadcrumb .current { color: #fff; }

/* --------------------------------------------------------------- Pagination */
.pagination { display: flex; gap: 6px; align-items: center; justify-content: center; margin-top: 28px; }
.pagination a, .pagination span { min-width: 40px; height: 40px; padding: 0 .6rem; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: var(--r-md); color: var(--text); font-weight: 500; background: var(--surface); transition: all var(--t); }
.pagination a:hover { border-color: var(--primary-300); color: var(--primary); background: var(--primary-050); }
.pagination .active { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination .disabled { opacity: .45; pointer-events: none; }

/* --------------------------------------------------------------- Alertes */
.alert { display: flex; gap: .8rem; padding: 14px 18px; border-radius: var(--r-md); border: 1px solid; font-size: .92rem; align-items: flex-start; }
.alert .a-ico { flex: none; font-size: 1.1rem; }
.alert-info { background: var(--info-050); border-color: #bcd2fb; color: var(--info); }
.alert-success { background: var(--success-050); border-color: #b7e6c8; color: var(--success); }
.alert-warning { background: var(--warning-050); border-color: #f2d59b; color: var(--warning); }
.alert-danger { background: var(--danger-050); border-color: #f4bcb8; color: var(--danger); }

/* --------------------------------------------------------------- Calendrier */
.calendar { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-xs); overflow: hidden; }
.calendar .cal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.calendar .cal-head h3 { margin: 0; text-transform: capitalize; }
.calendar .cal-nav { display: flex; gap: 8px; }
.calendar .cal-nav button { width: 38px; height: 38px; border: 1px solid var(--border); background: var(--surface); border-radius: var(--r-md); cursor: pointer; color: var(--text); }
.calendar .cal-nav button:hover { background: var(--surface-2); color: var(--primary); }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.calendar-grid .cal-dow { text-align: center; padding: 12px 4px; font-size: .78rem; font-weight: 600; color: var(--muted); text-transform: uppercase; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.cal-day { min-height: 112px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 8px; position: relative; background: var(--surface); }
.cal-day:nth-child(7n) { border-right: 0; }
.cal-day.other { background: #fafafa; color: var(--muted); }
.cal-day.today { background: var(--primary-050); }
.cal-day .d-num { font-size: .82rem; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.cal-day.today .d-num { color: var(--primary); }
.cal-event { display: block; font-size: .74rem; padding: .28rem .5rem; border-radius: 6px; margin-bottom: 4px; color: #fff; font-weight: 600; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--primary); transition: filter var(--t); }
.cal-event:hover { filter: brightness(1.08); }
.cal-event.cat-cloud   { background: #0a84c4; }
.cal-event.cat-cyber   { background: #b4002d; }
.cal-event.cat-devops  { background: #7c3aed; }
.cal-event.cat-infra   { background: #0891b2; }
.cal-event.cat-mgmt    { background: #d98c00; }
.cal-event.cat-data    { background: #1f9d55; }
.cal-event.cat-office  { background: #556070; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 14px; padding: 16px 22px; border-top: 1px solid var(--border); }
.cal-legend .lg { display: inline-flex; align-items: center; gap: .45rem; font-size: .82rem; color: var(--muted); }
.cal-legend .lg .sw { width: 12px; height: 12px; border-radius: 4px; }

/* Ligne de session (liste planning) */
.session-row { display: grid; grid-template-columns: 92px 1fr auto; gap: 18px; align-items: center; padding: 16px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); transition: all var(--t); }
.session-row:hover { border-color: var(--primary-100); box-shadow: var(--shadow-sm); }
.session-row .s-date { text-align: center; border-right: 1px solid var(--border); padding-right: 18px; }
.session-row .s-date .d { font-family: var(--font-title); font-weight: 700; font-size: 1.5rem; color: var(--text); line-height: 1; }
.session-row .s-date .m { font-size: .78rem; color: var(--muted); text-transform: uppercase; }
.session-row .s-title { font-weight: 600; color: var(--text); }
.session-row .s-meta { color: var(--muted); font-size: .84rem; margin-top: .2rem; display: flex; gap: 14px; flex-wrap: wrap; }

/* ------------------------------------------------- Graphiques CSS purs */
.bar-chart { display: flex; align-items: flex-end; gap: 14px; height: 220px; padding: 16px 0; }
.bar-chart .bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.bar-chart .bar { width: 100%; max-width: 46px; border-radius: 8px 8px 0 0; background: var(--grad-primary); position: relative; transition: height .6s ease; }
.bar-chart .bar.alt { background: var(--grad-dark); }
.bar-chart .bar .val { position: absolute; top: -22px; left: 50%; transform: translateX(-50%); font-size: .78rem; font-weight: 700; color: var(--text); }
.bar-chart .bar-lbl { font-size: .78rem; color: var(--muted); }

.donut { --p: 68; --c: var(--primary); width: 150px; height: 150px; border-radius: 50%; background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--surface-2) 0); display: flex; align-items: center; justify-content: center; position: relative; }
.donut::before { content: ""; position: absolute; width: 104px; height: 104px; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); }
.donut .donut-lbl { position: relative; text-align: center; font-family: var(--font-title); font-weight: 700; font-size: 1.5rem; color: var(--text); }
.donut-wrap { position: relative; display: inline-flex; }

.line-chart { position: relative; height: 220px; padding: 12px; }
.line-chart svg { width: 100%; height: 100%; overflow: visible; }
.line-chart .lc-line { fill: none; stroke: var(--primary); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.line-chart .lc-area { fill: url(#lcgrad); opacity: .45; }
.line-chart .lc-dot { fill: var(--surface); stroke: var(--primary); stroke-width: 3; }

/* --------------------------------------------------------- Drawer / Modal */
.overlay { position: fixed; inset: 0; background: rgba(22,22,21,.45); backdrop-filter: blur(2px); opacity: 0; visibility: hidden; transition: all var(--t); z-index: 1000; }
.overlay.open { opacity: 1; visibility: visible; }
.drawer { position: fixed; top: 0; right: 0; height: 100vh; width: 460px; max-width: 92vw; background: var(--surface); box-shadow: var(--shadow-lg); z-index: 1010; transform: translateX(100%); transition: transform var(--t); display: flex; flex-direction: column; }
.drawer.open { transform: translateX(0); }
.drawer .drawer-head { padding: 20px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.drawer .drawer-head h3 { margin: 0; }
.drawer .drawer-body { padding: 24px; overflow-y: auto; flex: 1; }
.drawer .drawer-foot { padding: 18px 24px; border-top: 1px solid var(--border); display: flex; gap: 12px; justify-content: flex-end; }

.modal { position: fixed; inset: 0; z-index: 1010; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal.open { display: flex; }
.modal .modal-card { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); width: 100%; max-width: 540px; max-height: 90vh; overflow: hidden; display: flex; flex-direction: column; animation: modalIn .25s ease; }
@keyframes modalIn { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
.modal .modal-head { padding: 20px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal .modal-head h3 { margin: 0; }
.modal .modal-body { padding: 24px; overflow-y: auto; }
.modal .modal-foot { padding: 18px 24px; border-top: 1px solid var(--border); display: flex; gap: 12px; justify-content: flex-end; }
.modal-close, .drawer-close { background: none; border: 0; font-size: 1.4rem; line-height: 1; color: var(--muted); cursor: pointer; }
.modal-close:hover, .drawer-close:hover { color: var(--primary); }

/* --------------------------------------------------------- Témoignages */
.testimonial { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 26px; box-shadow: var(--shadow-xs); position: relative; }
.testimonial::before { content: "\201C"; position: absolute; top: 8px; right: 22px; font-size: 4rem; color: var(--primary-050); font-family: var(--font-title); line-height: 1; }
.testimonial .quote { font-size: 1rem; color: var(--ink); position: relative; z-index: 1; }
.testimonial .who { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
.testimonial .who .name { font-weight: 700; font-family: var(--font-title); font-size: .95rem; }
.testimonial .who .role { color: var(--muted); font-size: .82rem; }
.testimonial .stars { color: #e5a300; margin-bottom: 10px; letter-spacing: 2px; }

/* --------------------------------------------------- Certificat imprimable */
.certificate { background: var(--surface); border: 2px solid var(--gold-300); border-radius: var(--r-lg); padding: 54px 60px; text-align: center; position: relative; overflow: hidden; box-shadow: var(--shadow-lg); max-width: 880px; margin: 0 auto; }
.certificate::before { content: ""; position: absolute; inset: 12px; border: 1px solid var(--gold-050); border-radius: var(--r-md); pointer-events: none; }
.certificate .cert-glow { position: absolute; width: 300px; height: 300px; border-radius: 50%; background: radial-gradient(circle, rgba(180,0,45,.08), transparent 70%); top: -100px; right: -80px; }
.certificate .cert-logo { height: 48px; margin: 0 auto 18px; position: relative; }
.certificate .cert-eyebrow { font-family: var(--font-title); letter-spacing: .3em; text-transform: uppercase; color: var(--primary); font-size: .82rem; font-weight: 600; }
.certificate .cert-title { font-family: var(--font-title); font-size: 2.2rem; margin: 10px 0 6px; color: var(--text); }
.certificate .cert-sub { color: var(--muted); }
.certificate .cert-name { font-family: var(--font-title); font-size: 2rem; color: var(--primary); margin: 22px 0 6px; border-bottom: 2px solid var(--primary-050); display: inline-block; padding: 0 24px 8px; }
.certificate .cert-course { font-size: 1.15rem; font-weight: 600; margin-top: 14px; }
.certificate .cert-foot { display: flex; justify-content: space-between; margin-top: 44px; align-items: flex-end; }
.certificate .cert-sign { text-align: center; }
.certificate .cert-sign .line { width: 180px; border-top: 1px solid var(--ink); margin-bottom: 6px; }
.certificate .cert-sign small { color: var(--muted); }
.certificate .cert-seal { width: 92px; height: 92px; border-radius: 50%; background: linear-gradient(135deg, #d9b451, #b78628); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 2rem; box-shadow: var(--shadow-md); }
.certificate .cert-id { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); font-size: .74rem; color: var(--muted); }

/* --------------------------------------------------------------- Login */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-visual { position: relative; overflow: hidden; background: var(--grad-vignette); color: #fff; padding: 60px; display: flex; flex-direction: column; justify-content: center; }
.auth-visual .glow { position: absolute; width: 380px; height: 380px; border-radius: 50%; background: rgba(255,255,255,.12); filter: blur(60px); top: -80px; right: -80px; }
.auth-visual .brand img { height: 44px; margin-bottom: 2rem; position: relative; }
.auth-visual .a-list { list-style: none; margin-top: 1.5rem; }
.auth-visual .a-list li { display: flex; gap: .6rem; padding: .5rem 0; color: #fff; position: relative; }
.auth-visual .a-list li::before { content: "✓"; font-weight: 700; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 40px; background: var(--bg); }
.auth-form .auth-card { width: 100%; max-width: 410px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 36px; box-shadow: var(--shadow-md); }
.auth-form .auth-card img.logo { height: 42px; margin-bottom: 22px; }

/* --------------------------------------------------------------- Utilities */
.empty-state { text-align: center; padding: 56px 20px; color: var(--muted); }
.empty-state .es-ico { font-size: 3rem; margin-bottom: 12px; opacity: .5; }
.divider-text { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: .85rem; margin: 18px 0; }
.divider-text::before, .divider-text::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.list-check { list-style: none; }
.list-check li { display: flex; gap: .6rem; padding: .38rem 0; color: var(--ink); }
.list-check li::before { content: "✓"; color: var(--success); font-weight: 700; flex: none; }
.list-arrow { list-style: none; }
.list-arrow li { display: flex; gap: .6rem; padding: .38rem 0; color: var(--ink); }
.list-arrow li::before { content: "→"; color: var(--primary); font-weight: 700; flex: none; }
.ratio-box { position: relative; border-radius: var(--r-lg); overflow: hidden; background: var(--surface-2); }

/* --------------------------------------------------------------- Responsive */
@media (max-width: 980px) {
  .mega { grid-template-columns: 1fr; width: min(520px, 92vw); }
  .mega .mega-col + .mega-col { border-left: 0; padding-left: 0; border-top: 1px solid var(--border); padding-top: 18px; }
}
@media (max-width: 900px) {
  .topbar { display: none; }
  .nav-toggle { display: flex; }
  .main-nav {
    position: fixed; top: var(--header-h); left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-lg); padding: 12px;
    transform: translateY(-120%); opacity: 0; visibility: hidden; transition: all var(--t);
    max-height: calc(100vh - var(--header-h)); overflow-y: auto;
  }
  .site-header.open .main-nav { transform: translateY(0); opacity: 1; visibility: visible; }
  .main-nav a { padding: .9rem 1rem; }
  .dropdown, .mega { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding-left: 12px; display: none; width: auto; }
  .mega { grid-template-columns: 1fr; padding: 8px 12px; gap: 10px; }
  .has-dropdown.open .dropdown, .has-mega.open .mega { display: block; }
  .mega .mega-editors { grid-template-columns: repeat(3,1fr); }

  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .hero-grid { grid-template-columns: 1fr; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .site-footer .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
  .session-row { grid-template-columns: 72px 1fr; }
  .session-row .s-action { grid-column: 1 / -1; }

  .admin-sidebar { position: fixed; top: 0; left: 0; transform: translateX(-100%); transition: transform var(--t); box-shadow: var(--shadow-lg); }
  .admin-layout.sb-open .admin-sidebar { transform: translateX(0); }
  .admin-layout.collapsed .admin-sidebar { width: var(--sidebar-w); }
  .certificate { padding: 32px 24px; }
  .certificate .cert-foot { flex-direction: column; gap: 24px; align-items: center; }
}
@media (max-width: 560px) {
  .section { padding: 50px 0; }
  .steps { grid-template-columns: 1fr; }
  .site-footer .footer-grid { grid-template-columns: 1fr; }
  .hero { padding: 60px 0; }
  .admin-main { padding: 18px; }
  .cal-day { min-height: 72px; }
  .cta-band { padding: 30px 24px; }
}

/* --------------------------------------------------------------- Print */
@media print {
  .site-header, .topbar, .site-footer, .admin-sidebar, .admin-topbar, .no-print { display: none !important; }
  body { background: #fff; }
  .certificate { box-shadow: none; border-color: var(--gold); }
}

/* --------------------------------------------------- Animations d'entrée */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
