/* ============================================================================
   PO & IA Academy — Design System v2
   Modern + tech + chaleureux — violet/cyan sur dark blueish
============================================================================ */

/* ── Tokens (CSS variables) ──────────────────────────────────────────────── */
:root {
  /* Colors */
  --ink:        #0B0B12;
  --surface:    #13131C;
  --elevated:   #1A1A26;
  --line:       rgba(255,255,255,0.08);
  --line-2:     rgba(255,255,255,0.14);
  --bone:       #F5F5F7;
  --muted:      #9090A0;
  --muted-2:    #6B6B7B;
  --violet:     #8B5CF6;
  --violet-soft:#A78BFA;
  --cyan:       #22D3EE;
  --mint:       #34D399;
  --peach:      #FB923C;
  --pink:       #F472B6;
  --rose:       #FB7185;
  --warning:    #FBBF24;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Spacing */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 18px;
  --r-2xl: 24px;
  --r-full: 999px;
}

/* ── Reset & base ────────────────────────────────────────────────────────── */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--ink);
  color: var(--bone);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ── Backgrounds ─────────────────────────────────────────────────────────── */
.hero-glow {
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(139,92,246,0.18), transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 30%, rgba(34,211,238,0.10), transparent 50%);
}
.cta-bg {
  background:
    radial-gradient(ellipse 60% 80% at 50% 50%, rgba(139,92,246,0.18), transparent 70%),
    radial-gradient(ellipse 40% 60% at 30% 80%, rgba(34,211,238,0.12), transparent 60%);
}
.grid-bg {
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 40%, transparent 100%);
}

/* ── Typography ──────────────────────────────────────────────────────────── */
.headline {
  letter-spacing: -0.035em;
  line-height: 1;
  font-weight: 700;
}
.gradient-text {
  background: linear-gradient(135deg, var(--violet-soft) 0%, var(--cyan) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.gradient-text-warm {
  background: linear-gradient(135deg, var(--peach) 0%, var(--pink) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.gradient-text-cool {
  background: linear-gradient(135deg, var(--cyan) 0%, var(--mint) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  font-weight: 600;
  font-size: 14.5px;
  border-radius: var(--r-md);
  transition: all 0.2s ease;
  letter-spacing: -0.01em;
  white-space: nowrap;
  border: 1px solid transparent;
}
.btn-primary {
  background: linear-gradient(135deg, var(--violet) 0%, #7C3AED 100%);
  color: white;
  border-color: rgba(255,255,255,0.1);
  box-shadow: 0 1px 0 0 rgba(255,255,255,0.15) inset, 0 8px 24px -8px rgba(139,92,246,0.5);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 1px 0 0 rgba(255,255,255,0.2) inset, 0 12px 32px -8px rgba(139,92,246,0.65);
}
.btn-ghost {
  background: rgba(255,255,255,0.04);
  color: var(--bone);
  border-color: rgba(255,255,255,0.1);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.18);
}
.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: var(--r-sm); }
.btn-lg { padding: 16px 28px; font-size: 16px; }

/* ── Cards ───────────────────────────────────────────────────────────────── */
.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.025) 0%, rgba(255,255,255,0.01) 100%);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 28px;
  transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
  position: relative;
  overflow: hidden;
}
.card:hover {
  transform: translateY(-3px);
  border-color: rgba(139,92,246,0.4);
  background: linear-gradient(180deg, rgba(139,92,246,0.06) 0%, rgba(255,255,255,0.01) 100%);
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--r-xl);
  background: radial-gradient(circle at var(--x,50%) var(--y,0%), rgba(139,92,246,0.15), transparent 40%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.card:hover::before { opacity: 1; }
.card-flat {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px;
  transition: all 0.2s ease;
}
.card-flat:hover {
  border-color: rgba(139,92,246,0.3);
  background: rgba(139,92,246,0.04);
}

/* ── Tags ────────────────────────────────────────────────────────────────── */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  background: rgba(255,255,255,0.03);
  letter-spacing: 0.04em;
  color: #C5C5D2;
}
.tag-violet { color: var(--violet-soft); border-color: rgba(167,139,250,0.3); background: rgba(139,92,246,0.08); }
.tag-cyan   { color: var(--cyan);        border-color: rgba(34,211,238,0.3);  background: rgba(34,211,238,0.08); }
.tag-mint   { color: var(--mint);        border-color: rgba(52,211,153,0.3);  background: rgba(52,211,153,0.08); }
.tag-peach  { color: var(--peach);       border-color: rgba(251,146,60,0.3);  background: rgba(251,146,60,0.08); }
.tag-pink   { color: var(--pink);        border-color: rgba(244,114,182,0.3); background: rgba(244,114,182,0.08); }
.tag-rose   { color: var(--rose);        border-color: rgba(251,113,133,0.3); background: rgba(251,113,133,0.08); }
.tag-warning{ color: var(--warning);     border-color: rgba(251,191,36,0.3);  background: rgba(251,191,36,0.08); }

/* ── Section number ──────────────────────────────────────────────────────── */
.section-num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--violet-soft);
  letter-spacing: 0.08em;
  display: inline-block;
}

/* ── Pillar number badge ─────────────────────────────────────────────────── */
.pillar-num {
  font-family: var(--font-mono);
  font-size: 12px;
  background: rgba(139,92,246,0.15);
  color: var(--violet-soft);
  padding: 3px 8px;
  border-radius: var(--r-sm);
  letter-spacing: 0.05em;
  display: inline-block;
}

/* ── Stats ───────────────────────────────────────────────────────────────── */
.stat {
  padding: 20px 24px;
  border-right: 1px solid var(--line);
}
.stat:last-child { border-right: none; }
.stat-num {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.stat-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

/* ── Audience card ───────────────────────────────────────────────────────── */
.aud-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--line);
  padding: 32px;
  border-radius: var(--r-lg);
  transition: all 0.25s ease;
}
.aud-card:hover {
  border-color: rgba(139,92,246,0.3);
  background: rgba(139,92,246,0.04);
  transform: translateY(-2px);
}

/* ── Marquee ─────────────────────────────────────────────────────────────── */
@keyframes marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 40s linear infinite;
}
.marquee-track > * {
  flex-shrink: 0;
  padding: 0 24px;
  display: inline-flex;
  align-items: center;
  gap: 24px;
}

/* ── Navbar ──────────────────────────────────────────────────────────────── */
.nav-link {
  color: #C5C5D2;
  transition: color 0.2s ease;
  position: relative;
  font-weight: 500;
  font-size: 14px;
}
.nav-link:hover { color: var(--bone); }
.nav-link.active { color: var(--bone); }
.nav-link.active::before {
  content: "";
  position: absolute;
  left: -12px; top: 50%;
  transform: translateY(-50%);
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--violet-soft);
}

.dropdown-group { position: relative; }
.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  min-width: 240px;
  padding: 8px;
  background: rgba(11, 11, 18, 0.95);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  box-shadow: 0 24px 48px -12px rgba(0,0,0,0.6);
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  z-index: 100;
  backdrop-filter: blur(20px);
}
.dropdown-group:hover .dropdown-menu,
.dropdown-group:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.dropdown-menu a {
  display: block;
  padding: 10px 12px;
  font-size: 14px;
  border-radius: var(--r-sm);
  color: #C5C5D2;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.dropdown-menu a:hover {
  background: rgba(139,92,246,0.1);
  color: var(--bone);
}
.dropdown-menu a span.sub {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
  font-family: var(--font-mono);
}

/* ── Logo mark ───────────────────────────────────────────────────────────── */
.logo-mark {
  width: 32px; height: 32px;
  border-radius: var(--r-sm);
  background: linear-gradient(135deg, var(--violet) 0%, var(--cyan) 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}

/* ── Footer ──────────────────────────────────────────────────────────────── */
.footer-link {
  color: var(--muted);
  transition: color 0.2s ease;
  font-size: 14px;
}
.footer-link:hover { color: var(--bone); }

/* ── Forms ───────────────────────────────────────────────────────────────── */
.input, .textarea, .select {
  width: 100%;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 12px 14px;
  font-family: inherit;
  font-size: 14.5px;
  color: var(--bone);
  transition: all 0.2s ease;
}
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--violet);
  background: rgba(139,92,246,0.05);
  box-shadow: 0 0 0 3px rgba(139,92,246,0.15);
}
.input::placeholder, .textarea::placeholder { color: var(--muted-2); }
.label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 6px;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

/* ── Article / prose ─────────────────────────────────────────────────────── */
.prose {
  max-width: 72ch;
  font-size: 16px;
  line-height: 1.75;
  color: rgba(245,245,247,0.86);
}
.prose h1, .prose h2, .prose h3, .prose h4 {
  color: var(--bone);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-top: 2em;
  margin-bottom: 0.6em;
  font-weight: 700;
}
.prose h1 { font-size: 2.5em; margin-top: 0; }
.prose h2 { font-size: 1.875em; }
.prose h3 { font-size: 1.4em; }
.prose h4 { font-size: 1.15em; }
.prose p { margin: 1em 0; }
.prose strong { color: var(--bone); font-weight: 600; }
.prose a {
  color: var(--violet-soft);
  text-decoration: underline;
  text-decoration-color: rgba(167,139,250,0.4);
  text-underline-offset: 3px;
  transition: all 0.15s ease;
}
.prose a:hover { color: var(--cyan); text-decoration-color: var(--cyan); }
.prose ul, .prose ol { padding-left: 1.5em; margin: 1em 0; }
.prose li { margin: 0.5em 0; }
.prose ul li::marker { color: var(--violet-soft); }
.prose ol li::marker { color: var(--violet-soft); font-weight: 600; }
.prose blockquote {
  border-left: 3px solid var(--violet);
  padding: 4px 0 4px 20px;
  margin: 1.5em 0;
  font-style: italic;
  color: rgba(245,245,247,0.7);
}
.prose code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: rgba(139,92,246,0.12);
  color: var(--violet-soft);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(139,92,246,0.2);
}
.prose pre {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 16px 20px;
  overflow-x: auto;
  font-size: 13.5px;
  line-height: 1.6;
  margin: 1.5em 0;
}
.prose pre code {
  background: transparent;
  border: none;
  padding: 0;
  color: var(--bone);
  font-size: inherit;
}
.prose hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2.5em 0;
}
.prose img {
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  margin: 1.5em 0;
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: 14px;
}
.prose th, .prose td {
  border: 1px solid var(--line);
  padding: 10px 14px;
  text-align: left;
}
.prose th {
  background: rgba(139,92,246,0.08);
  color: var(--bone);
  font-weight: 600;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ── Callout / Info box ──────────────────────────────────────────────────── */
.callout {
  border-left: 3px solid var(--violet);
  background: rgba(139,92,246,0.06);
  border-radius: var(--r-md);
  padding: 16px 20px;
  margin: 1.5em 0;
}
.callout-title {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--violet-soft);
  margin-bottom: 6px;
  text-transform: uppercase;
}
.callout.cyan  { border-color: var(--cyan);  background: rgba(34,211,238,0.06); }
.callout.cyan  .callout-title { color: var(--cyan); }
.callout.mint  { border-color: var(--mint);  background: rgba(52,211,153,0.06); }
.callout.mint  .callout-title { color: var(--mint); }
.callout.peach { border-color: var(--peach); background: rgba(251,146,60,0.06); }
.callout.peach .callout-title { color: var(--peach); }
.callout.warning { border-color: var(--warning); background: rgba(251,191,36,0.06); }
.callout.warning .callout-title { color: var(--warning); }

/* ── TOC sidebar ─────────────────────────────────────────────────────────── */
.toc {
  position: sticky;
  top: 80px;
  font-size: 13.5px;
}
.toc-title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 14px;
  text-transform: uppercase;
}
.toc a {
  display: block;
  padding: 6px 0 6px 12px;
  border-left: 2px solid var(--line);
  color: var(--muted);
  transition: all 0.15s ease;
  line-height: 1.4;
}
.toc a:hover { color: var(--bone); border-color: var(--violet-soft); }
.toc a.active { color: var(--bone); border-color: var(--violet); }

/* ── Progress bar ────────────────────────────────────────────────────────── */
.progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--violet) 0%, var(--cyan) 100%);
  z-index: 100;
  transition: width 0.1s linear;
}

/* ── Back to top ─────────────────────────────────────────────────────────── */
.back-to-top {
  position: fixed;
  bottom: 24px; right: 24px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--violet) 0%, #7C3AED 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 50;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 8px 24px -8px rgba(139,92,246,0.5);
}
.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}
.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px -8px rgba(139,92,246,0.7);
}

/* ── Reveal on scroll ────────────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Module card (cours/entretien) ───────────────────────────────────────── */
.module-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px;
  transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
  display: block;
  position: relative;
  overflow: hidden;
}
.module-card:hover {
  transform: translateY(-3px);
  border-color: rgba(139,92,246,0.4);
  background: linear-gradient(180deg, rgba(139,92,246,0.05) 0%, rgba(255,255,255,0.01) 100%);
}
.module-num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--violet-soft);
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}
.module-title {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  line-height: 1.25;
}
.module-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 16px;
}

/* ── Print ───────────────────────────────────────────────────────────────── */
@media print {
  body { background: white !important; color: #0F0F0F !important; }
  nav, footer, .no-print, .progress-bar, .back-to-top, #mobile-menu { display: none !important; }
  .card, .card-flat, .module-card, .aud-card { background: white !important; border-color: #ddd !important; }
  .gradient-text, .gradient-text-warm, .gradient-text-cool { color: #7C3AED !important; -webkit-text-fill-color: #7C3AED !important; }
  .text-muted, .text-bone\\/60, .text-bone\\/70 { color: #555 !important; }
  a { color: #7C3AED !important; }
  .grid-bg, .hero-glow, .cta-bg { background: white !important; }
  @page { margin: 1.5cm; }
}

/* ── Utilities ───────────────────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--line-2) 50%, transparent 100%);
  margin: 32px 0;
}
.text-balance { text-wrap: balance; }
.scrollbar-hidden::-webkit-scrollbar { display: none; }
.scrollbar-hidden { scrollbar-width: none; }

/* ── Mobile burger ───────────────────────────────────────────────────────── */
.burger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 24px;
  height: 24px;
  justify-content: center;
  align-items: center;
}
.burger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--bone);
  border-radius: 2px;
  transition: all 0.2s ease;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .stat { padding: 16px 18px; }
  .stat-num { font-size: 26px; }
  .card { padding: 22px; }
  .aud-card { padding: 24px; }
  .prose { font-size: 15.5px; }
  .prose h1 { font-size: 2em; }
  .prose h2 { font-size: 1.5em; }
}
