/* ============================================
   CHARTE GRAPHIQUE MISTER IA
   ============================================ */
:root {
  --navy: #1A203D;
  --blue: #597DC1;
  --blue-light: #A0BCDF;
  --bg-light: #F1F5FA;
  --white: #FFFFFF;
  --black: #000000;
  --text: #1A203D;
  --text-muted: #5A6378;
  --border: #E1E8F2;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 3px rgba(26, 32, 61, 0.06);
  --shadow: 0 4px 16px rgba(26, 32, 61, 0.08);
  --shadow-lg: 0 12px 40px rgba(26, 32, 61, 0.12);
  --transition: 0.2s ease;
}

/* ============================================
   RESET
   ============================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--navy); }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ============================================
   TOPBAR
   ============================================ */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 14px 32px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand img { height: 40px; width: auto; }
.topbar-nav { display: flex; gap: 28px; }
.topbar-nav a {
  color: var(--text); font-weight: 500; font-size: 15px;
  position: relative;
}
.topbar-nav a::after {
  content: ""; position: absolute; left: 0; bottom: -4px;
  width: 0; height: 2px; background: var(--blue);
  transition: width var(--transition);
}
.topbar-nav a:hover::after { width: 100%; }

/* ============================================
   HERO
   ============================================ */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, #2A3258 100%);
  color: var(--white);
  padding: 80px 32px 100px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; top: -50%; right: -10%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(89,125,193,0.25) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner {
  max-width: 900px; margin: 0 auto;
  position: relative; z-index: 1;
}
.eyebrow {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(160, 188, 223, 0.15);
  border: 1px solid rgba(160, 188, 223, 0.4);
  color: var(--blue-light);
  border-radius: 999px;
  font-size: 13px; font-weight: 600;
  letter-spacing: 0.3px;
  margin-bottom: 24px;
}
.hero h1 {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}
.hero .lead {
  font-size: 20px;
  color: var(--blue-light);
  max-width: 700px;
  line-height: 1.5;
}
.hero-meta {
  display: flex; gap: 24px; flex-wrap: wrap;
  margin-top: 36px;
  font-size: 14px;
  color: rgba(255,255,255,0.7);
}
.hero-meta span { display: flex; align-items: center; gap: 6px; }
.hero-meta span::before {
  content: ""; width: 4px; height: 4px; border-radius: 50%;
  background: var(--blue);
}

/* ============================================
   LAYOUT — SOMMAIRE + CONTENU
   ============================================ */
.layout {
  max-width: 1200px; margin: 0 auto;
  padding: 60px 32px;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 64px;
  align-items: start;
}

/* ============================================
   SOMMAIRE
   ============================================ */
.toc {
  position: sticky; top: 90px;
  padding: 24px;
  background: var(--bg-light);
  border-radius: var(--radius);
}
.toc-title {
  font-size: 12px; font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 14px;
}
.toc ol { list-style: none; counter-reset: toc; }
.toc li { counter-increment: toc; margin-bottom: 8px; }
.toc a {
  display: block;
  padding: 8px 10px;
  color: var(--text);
  font-size: 14px;
  border-radius: var(--radius-sm);
  border-left: 2px solid transparent;
  transition: all var(--transition);
}
.toc a::before {
  content: counter(toc, decimal-leading-zero);
  color: var(--blue);
  font-weight: 600;
  margin-right: 10px;
  font-size: 12px;
}
.toc a:hover, .toc a.active {
  background: var(--white);
  border-left-color: var(--blue);
  color: var(--navy);
}

/* ============================================
   CONTENU
   ============================================ */
.content section {
  margin-bottom: 64px;
  scroll-margin-top: 90px;
}
.content h2 {
  font-size: 32px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.015em;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--bg-light);
}
.content h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 10px;
  margin-top: 24px;
}
.content p { margin-bottom: 16px; color: var(--text); }
.content ul, .content ol { margin-bottom: 16px; padding-left: 24px; }
.content li { margin-bottom: 6px; }
.content strong { color: var(--navy); font-weight: 600; }

/* ============================================
   CALLOUTS
   ============================================ */
.callout {
  padding: 18px 20px;
  border-radius: var(--radius);
  margin: 20px 0;
  border-left: 4px solid;
  background: var(--bg-light);
}
.callout > strong { display: block; margin-bottom: 4px; font-size: 14px; text-transform: uppercase; letter-spacing: 0.5px; }
.callout p strong { color: var(--navy); font-weight: 600; }
.callout p { margin-bottom: 0; }
.callout-info { border-color: var(--blue); }
.callout-info strong { color: var(--blue); }
.callout-tip { border-color: #10B981; background: #F0FDF4; }
.callout-tip strong { color: #047857; }
.callout-warning { border-color: #F59E0B; background: #FFFBEB; }
.callout-warning strong { color: #B45309; }

/* ============================================
   ÉTAPES NUMÉROTÉES
   ============================================ */
.steps {
  list-style: none;
  padding: 0;
  counter-reset: step;
  position: relative;
}
.steps::before {
  content: ""; position: absolute;
  left: 22px; top: 24px; bottom: 24px;
  width: 2px; background: var(--blue-light);
}
.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 64px;
  margin-bottom: 28px;
  padding-bottom: 4px;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: 0;
  width: 44px; height: 44px;
  background: var(--navy);
  color: var(--white);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px;
  box-shadow: 0 0 0 4px var(--white), 0 0 0 6px var(--blue-light);
}
.steps h3 { margin-top: 4px; margin-bottom: 6px; }

/* ============================================
   ONGLETS
   ============================================ */
.tabs {
  margin: 24px 0;
  border-radius: var(--radius);
  background: var(--bg-light);
  overflow: hidden;
}
.tabs-list {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: var(--white);
  overflow-x: auto;
}
.tab {
  padding: 16px 24px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 3px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
}
.tab:hover { color: var(--navy); }
.tab.active {
  color: var(--navy);
  border-bottom-color: var(--blue);
  font-weight: 600;
}
.tab-panel {
  display: none;
  padding: 28px;
  animation: fadeIn 0.3s ease;
}
.tab-panel.active { display: block; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   MÉDIAS
   ============================================ */
.media { margin: 24px 0; }
.media img, .media video {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.media figcaption {
  margin-top: 10px;
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
  font-style: italic;
}
.placeholder {
  background: var(--bg-light);
  border: 2px dashed var(--blue-light);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  font-size: 14px;
}
.placeholder-image { aspect-ratio: 16/9; }
.placeholder-video { aspect-ratio: 16/9; }
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 24px 0;
}

/* ============================================
   CARDS & CTA
   ============================================ */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin: 24px 0;
}
.card {
  display: block;
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  transition: all var(--transition);
}
.card:hover {
  border-color: var(--blue);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.card h3 { margin-top: 0; color: var(--navy); }
.card p { color: var(--text-muted); margin-bottom: 12px; font-size: 14px; }
.card-link { color: var(--blue); font-weight: 600; font-size: 14px; }

.cta {
  margin-top: 48px;
  padding: 40px;
  background: linear-gradient(135deg, var(--navy) 0%, #2A3258 100%);
  border-radius: var(--radius);
  color: var(--white);
  text-align: center;
}
.cta h3 { color: var(--white); font-size: 24px; margin-bottom: 8px; }
.cta p { color: var(--blue-light); margin-bottom: 20px; }
.button {
  display: inline-block;
  padding: 14px 28px;
  background: var(--blue);
  color: var(--white);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 15px;
  transition: all var(--transition);
}
.button:hover {
  background: var(--white);
  color: var(--navy);
  transform: translateY(-1px);
}

/* ============================================
   TABLEAUX
   ============================================ */
.table-wrap { overflow-x: auto; margin: 20px 0; border-radius: var(--radius); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: 15px; background: var(--white); }
thead { background: var(--navy); color: var(--white); }
th { text-align: left; padding: 14px 16px; font-weight: 600; font-size: 14px; letter-spacing: 0.2px; }
td { padding: 14px 16px; border-top: 1px solid var(--border); vertical-align: top; }
tbody tr:nth-child(even) { background: var(--bg-light); }
tbody tr:hover { background: rgba(160, 188, 223, 0.15); }
td strong { color: var(--navy); }
.check { color: #10B981; font-weight: 700; }
.cross { color: #DC2626; font-weight: 700; }
.partial { color: #F59E0B; font-weight: 700; }

/* ============================================
   STATS / CHIFFRES CLÉS
   ============================================ */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin: 28px 0; }
.stat { padding: 24px; background: var(--bg-light); border-radius: var(--radius); border-left: 4px solid var(--blue); }
.stat-value { display: block; font-size: 36px; font-weight: 700; color: var(--navy); line-height: 1.1; letter-spacing: -0.02em; }
.stat-label { display: block; margin-top: 6px; font-size: 14px; color: var(--text-muted); }

/* ============================================
   PROS / CONS
   ============================================ */
.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 24px 0; }
.pros-cons .col { padding: 24px; border-radius: var(--radius); background: var(--bg-light); }
.pros-cons h3 { margin-top: 0; padding-bottom: 10px; border-bottom: 2px solid var(--white); }
.pros-cons ul { padding-left: 20px; }
.pros-cons li { margin-bottom: 10px; }
.pros-cons .col.pros { border-left: 4px solid #10B981; }
.pros-cons .col.cons { border-left: 4px solid #F59E0B; }
@media (max-width: 700px) { .pros-cons { grid-template-columns: 1fr; } }

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--bg-light);
  border-top: 1px solid var(--border);
  padding: 40px 32px;
  margin-top: 80px;
}
.footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  color: var(--text-muted);
  font-size: 14px;
}
.footer-logo { height: 32px; opacity: 0.6; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 40px 20px;
  }
  .toc {
    position: static;
    order: -1;
  }
  .topbar-nav { display: none; }
  .topbar-inner { padding: 12px 20px; }
  .hero { padding: 60px 20px 70px; }
  .grid-2 { grid-template-columns: 1fr; }
  .content section { margin-bottom: 48px; }
  .content h2 { font-size: 26px; }
  .steps li { padding-left: 56px; }
  .steps::before { left: 20px; }
  .steps li::before { width: 40px; height: 40px; }
}
