/* ============================================================
   MASTERCLASS COMPTABILITÉ — styles.css
   Typographie : Space Grotesk (titres) + Archivo (corps)
   Icônes : Lucide (SVG via CDN, pas d'emojis)
   Palette : Navy · Blue · Amber · Teal · Purple
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700;800&family=Jost:ital,wght@0,300;0,400;0,500;0,600;1,400&display=swap');

/* ── Design tokens ─────────────────────────────────────── */
:root {
  --navy:       #0A1628;
  --navy-mid:   #112240;
  --blue-dark:  #1B3A6B;
  --blue:       #2563EB;
  --blue-lt:    #3B82F6;
  --accent:     #F59E0B;
  --accent-lt:  #FCD34D;
  --teal:       #0D9488;
  --red:        #DC2626;
  --green:      #16A34A;
  --purple:     #7C3AED;
  --white:      #FFFFFF;
  --off-white:  #F8FAFC;
  --gray-50:    #F1F5F9;
  --gray-100:   #E2E8F0;
  --gray-200:   #CBD5E1;
  --gray-400:   #94A3B8;
  --gray-600:   #475569;
  --gray-800:   #1E293B;

  --font-h: 'Space Grotesk', sans-serif;
  --font-b: 'Jost', sans-serif;

  --r:   8px;   /* border-radius standard */
  --t:   .25s ease; /* transition standard */
  --sh1: 0 2px 8px rgba(0,0,0,.06);
  --sh2: 0 4px 20px rgba(0,0,0,.10);
  --sh3: 0 8px 40px rgba(0,0,0,.14);
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 15px; }
body { font-family: var(--font-b); background: var(--off-white); color: var(--gray-800); line-height: 1.75; }

/* ── Scrollbar ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--gray-100); }
::-webkit-scrollbar-thumb { background: var(--blue); border-radius: 3px; }

/* ── Sélection ──────────────────────────────────────────── */
::selection { background: rgba(37,99,235,.2); }

/* ── Print ──────────────────────────────────────────────── */
@media print {
  .no-print, .toolbar, .sidebar, .timer-widget, .progress-bar { display: none !important; }
  body { font-size: 12px; }
}

/* ============================================================
   TOOLBAR
   ============================================================ */
.toolbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: 56px;
  background: rgba(10,22,40,.97);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,.07);
  display: flex; align-items: center; padding: 0 20px; gap: 16px;
}

.toolbar-logo {
  font-family: var(--font-h); font-size: 14px; font-weight: 700; color: var(--white);
  white-space: nowrap; letter-spacing: -.3px;
}
.toolbar-logo span { color: var(--accent); }

.toolbar-nav { display: flex; gap: 2px; list-style: none; flex: 1; }
.toolbar-nav a {
  font-family: var(--font-h); font-size: 12px; font-weight: 500;
  color: rgba(255,255,255,.5); text-decoration: none;
  padding: 6px 12px; border-radius: 6px; transition: var(--t);
  display: flex; align-items: center; gap: 6px;
}
.toolbar-nav a:hover, .toolbar-nav a.active {
  color: var(--white); background: rgba(255,255,255,.09);
}
/* L'icône lucide dans la nav hérite de la couleur du lien */
.toolbar-nav a svg { stroke: currentColor; width: 14px; height: 14px; flex-shrink: 0; }

.toolbar-module-badge {
  font-family: var(--font-h); font-size: 11px; font-weight: 700;
  background: rgba(245,158,11,.15); border: 1px solid rgba(245,158,11,.3);
  color: var(--accent-lt); padding: 4px 10px; border-radius: 4px;
  letter-spacing: .08em; text-transform: uppercase;
}

/* ── Barre de progression lecture ──────────────────────── */
.progress-bar {
  position: fixed; top: 56px; left: 0;
  height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--blue-lt));
  z-index: 999; transition: width .2s linear;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  position: fixed; left: 0; top: 56px; bottom: 0;
  width: 268px; background: var(--white);
  border-right: 1px solid var(--gray-100);
  overflow-y: auto; padding: 20px 0;
  transform: translateX(-100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  z-index: 900;
}
.sidebar.open { transform: translateX(0); box-shadow: var(--sh3); }

.sidebar-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 899; opacity: 0; pointer-events: none;
  transition: opacity .3s;
}
.sidebar-overlay.visible { opacity: 1; pointer-events: auto; }

.sidebar-head {
  padding: 0 20px 16px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--gray-100); margin-bottom: 12px;
}
.sidebar-head h3 { font-family: var(--font-h); font-size: 14px; font-weight: 700; color: var(--navy); }

.sidebar-section { margin-bottom: 20px; }
.sidebar-label {
  font-family: var(--font-h); font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .12em;
  color: var(--gray-400); padding: 0 20px; margin-bottom: 6px;
}
.sidebar-link {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 20px; font-size: 13px; color: var(--gray-600);
  text-decoration: none; transition: var(--t);
  border-left: 3px solid transparent;
}
.sidebar-link svg { width: 15px; height: 15px; stroke: currentColor; flex-shrink: 0; }
.sidebar-link:hover { background: var(--gray-50); color: var(--navy); border-left-color: var(--accent); }
.sidebar-link.active { background: #EFF6FF; color: var(--blue); border-left-color: var(--blue); font-weight: 600; }

/* ── Chips familles dans sidebar ────────────────────────── */
.fam-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.fd-f1 { background: var(--blue); }
.fd-f2 { background: var(--teal); }
.fd-f3 { background: var(--purple); }

/* ============================================================
   LAYOUT
   ============================================================ */
.content-wrapper { margin-top: 56px; }

.section {
  padding: 64px 80px; border-bottom: 1px solid var(--gray-100);
}
.section:nth-child(even) { background: var(--white); }

@media (max-width: 900px) {
  .section { padding: 40px 24px; }
}

.section-tag {
  font-family: var(--font-h); font-size: 11px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--blue); margin-bottom: 10px;
  display: flex; align-items: center; gap: 7px;
}
.section-tag svg { width: 14px; height: 14px; stroke: currentColor; }

.section-title {
  font-family: var(--font-h); font-size: clamp(24px,3vw,38px);
  font-weight: 700; color: var(--navy); line-height: 1.15; margin-bottom: 10px;
}
.section-title .accent { color: var(--accent); }

.section-sub {
  font-size: 17px; color: var(--gray-600); font-weight: 300;
  max-width: 720px; line-height: 1.65; margin-bottom: 40px;
}

/* ============================================================
   COVER
   ============================================================ */
.cover {
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue-dark) 65%, #1E40AF 100%);
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 80px 100px; position: relative; overflow: hidden;
}
.cover::before {
  content: '';
  position: absolute; top: -140px; right: -140px;
  width: 600px; height: 600px; border-radius: 50%;
  background: radial-gradient(circle, rgba(37,99,235,.2) 0%, transparent 70%);
  animation: pulse-bg 7s ease-in-out infinite;
}
@keyframes pulse-bg {
  0%,100% { transform: scale(1); opacity: .8; }
  50%      { transform: scale(1.07); opacity: 1; }
}

.cover-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(245,158,11,.15); border: 1px solid rgba(245,158,11,.4);
  color: var(--accent-lt); font-family: var(--font-h);
  font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  padding: 6px 16px; border-radius: 20px; margin-bottom: 32px;
  animation: fadeUp .6s ease both;
}
.cover-badge svg { width: 13px; height: 13px; stroke: currentColor; }

.cover h1 {
  font-family: var(--font-h); font-size: clamp(36px,6vw,64px);
  font-weight: 800; color: var(--white); line-height: 1.08;
  max-width: 700px; margin-bottom: 20px; letter-spacing: -2px;
  animation: fadeUp .6s ease .1s both;
}
.cover h1 span { color: var(--accent); }

.cover-sub {
  font-size: 17px; color: rgba(255,255,255,.7);
  max-width: 540px; font-weight: 300; margin-bottom: 48px;
  line-height: 1.65; animation: fadeUp .6s ease .2s both;
}

.cover-stats {
  display: flex; gap: 36px; flex-wrap: wrap;
  border-top: 1px solid rgba(255,255,255,.12); padding-top: 28px;
  animation: fadeUp .6s ease .3s both;
}
.stat-item label {
  display: block; font-family: var(--font-h); font-size: 10px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.38); margin-bottom: 3px;
}
.stat-item span { font-family: var(--font-h); font-size: 15px; font-weight: 700; color: rgba(255,255,255,.88); }

.cover-cards {
  position: absolute; right: 80px; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 12px; z-index: 2;
  animation: fadeRight .8s ease .4s both;
}
.cover-card {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  border-left: 3px solid var(--accent);
  padding: 14px 18px; border-radius: 8px; width: 248px;
  text-decoration: none; transition: var(--t);
  display: flex; align-items: flex-start; gap: 12px;
}
.cover-card:hover { background: rgba(255,255,255,.1); transform: translateX(-4px); }
.cover-card svg { width: 18px; height: 18px; stroke: var(--accent); flex-shrink: 0; margin-top: 1px; }
.cover-card .c-num { font-family: var(--font-h); font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.cover-card .c-title { font-family: var(--font-h); font-size: 13px; font-weight: 600; color: rgba(255,255,255,.85); line-height: 1.35; margin-top: 2px; }

@media (max-width: 900px) {
  .cover { padding: 60px 28px; }
  .cover-cards { display: none; }
}

/* ============================================================
   MODULE HEADER
   ============================================================ */
.mod-header {
  background: linear-gradient(135deg, var(--navy), var(--blue-dark));
  padding: 56px 80px; position: relative; overflow: hidden;
}
.mod-header::after {
  content: attr(data-num);
  position: absolute; right: 60px; top: 50%; transform: translateY(-50%);
  font-family: var(--font-h); font-size: 220px; font-weight: 800;
  color: rgba(255,255,255,.025); line-height: 1; pointer-events: none;
}
.mod-num {
  font-family: var(--font-h); font-size: 11px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--accent);
  margin-bottom: 10px; display: flex; align-items: center; gap: 8px;
}
.mod-num svg { width: 14px; height: 14px; stroke: currentColor; }
.mod-header h2 {
  font-family: var(--font-h); font-size: clamp(24px,3.5vw,44px);
  font-weight: 800; color: var(--white); line-height: 1.12; max-width: 620px; margin-bottom: 14px;
}
.mod-header p { font-size: 15px; color: rgba(255,255,255,.62); max-width: 560px; font-weight: 300; }

/* ============================================================
   FAMILY DIVIDER
   ============================================================ */
.family-div {
  padding: 28px 80px; display: flex; align-items: center; gap: 18px;
}
.family-div.f1 { background: linear-gradient(135deg, var(--blue-dark), var(--blue)); }
.family-div.f2 { background: linear-gradient(135deg, #0F766E, var(--teal)); }
.family-div.f3 { background: linear-gradient(135deg, #5B21B6, var(--purple)); }

.fam-ico {
  width: 50px; height: 50px; background: rgba(255,255,255,.12);
  border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.fam-ico svg { width: 22px; height: 22px; stroke: white; }
.family-div h3 { font-family: var(--font-h); font-size: 20px; font-weight: 700; color: white; margin-bottom: 2px; }
.family-div p { font-size: 13px; color: rgba(255,255,255,.65); font-weight: 300; }

/* ============================================================
   PROSE
   ============================================================ */
.prose { max-width: 820px; line-height: 1.82; }
.prose p { margin-bottom: 18px; }
.prose h3 {
  font-family: var(--font-h); font-size: 21px; font-weight: 700; color: var(--navy);
  margin: 36px 0 14px; border-left: 4px solid var(--accent); padding-left: 14px;
  display: flex; align-items: center; gap: 9px;
}
.prose h3 svg { width: 18px; height: 18px; stroke: var(--accent); flex-shrink: 0; }
.prose h4 { font-family: var(--font-h); font-size: 16px; font-weight: 600; color: var(--blue-dark); margin: 24px 0 8px; }
.prose strong { font-weight: 600; color: var(--navy); }

/* ============================================================
   CALLOUT BOXES
   ============================================================ */
.box {
  border-radius: var(--r); padding: 18px 22px; margin: 22px 0;
  font-size: 14px; line-height: 1.72;
}
.box-head {
  font-family: var(--font-h); font-weight: 700; font-size: 11px;
  letter-spacing: .08em; text-transform: uppercase; margin-bottom: 7px;
  display: flex; align-items: center; gap: 7px;
}
.box-head svg { width: 14px; height: 14px; stroke: currentColor; flex-shrink: 0; }
.box-blue   { background: #EFF6FF; border-left: 4px solid var(--blue);   color: #1E3A5F; }
.box-amber  { background: #FFFBEB; border-left: 4px solid var(--accent);  color: #78350F; }
.box-green  { background: #F0FDF4; border-left: 4px solid var(--green);   color: #14532D; }
.box-red    { background: #FEF2F2; border-left: 4px solid var(--red);     color: #7F1D1D; }
.box-purple { background: #F5F3FF; border-left: 4px solid var(--purple);  color: #3B0764; }

/* ============================================================
   SOURCE CHIPS & FLOW DIAGRAM
   — Expliquent d'où provient chaque donnée
   ============================================================ */
.source-trail { display: flex; flex-wrap: wrap; gap: 7px; margin: 14px 0; }

.src-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px; border-radius: 20px;
  font-family: var(--font-h); font-size: 11px; font-weight: 600;
  cursor: help; transition: var(--t); position: relative;
}
.src-chip svg { width: 12px; height: 12px; stroke: currentColor; flex-shrink: 0; }
.src-chip:hover { transform: translateY(-1px); box-shadow: var(--sh1); }

/* Couleurs sémantiques par type de source */
.src-logiciel { background: #EFF6FF; color: var(--blue);   border: 1px solid #BFDBFE; }
.src-banque   { background: #F0FDF4; color: var(--green);  border: 1px solid #BBF7D0; }
.src-facture  { background: #FFFBEB; color: #B45309;       border: 1px solid #FDE68A; }
.src-paie     { background: #F5F3FF; color: var(--purple); border: 1px solid #DDD6FE; }
.src-terrain  { background: var(--gray-50); color: var(--gray-600); border: 1px solid var(--gray-200); }

/* Tooltip informatif au survol */
.src-chip::after {
  content: attr(data-tip);
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  background: var(--navy); color: rgba(255,255,255,.9);
  font-family: var(--font-b); font-size: 11.5px; font-weight: 400;
  padding: 8px 13px; border-radius: 7px;
  white-space: normal; max-width: 280px; text-align: center;
  pointer-events: none; opacity: 0; transition: opacity .2s ease; z-index: 200;
  box-shadow: 0 4px 14px rgba(0,0,0,.3);
}
.src-chip:hover::after { opacity: 1; }

/* Diagramme de flux source → compte → indicateur */
.source-flow {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  padding: 16px 18px; background: var(--gray-50);
  border-radius: var(--r); border: 1px solid var(--gray-100); margin: 14px 0;
}
.flow-step {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  min-width: 90px;
}
.flow-step .f-ico {
  width: 38px; height: 38px; background: var(--white); border: 1.5px solid var(--gray-200);
  border-radius: 9px; display: flex; align-items: center; justify-content: center; margin-bottom: 5px;
}
.flow-step .f-ico svg { width: 18px; height: 18px; stroke: var(--blue-dark); }
.flow-step .f-label { font-family: var(--font-h); font-size: 11px; font-weight: 600; color: var(--navy); line-height: 1.3; }
.flow-step .f-sub   { font-size: 10px; color: var(--gray-400); margin-top: 1px; }
.flow-arrow svg { width: 18px; height: 18px; stroke: var(--gray-400); }

/* ============================================================
   FINANCIAL TABLES — Bilan & Compte de Résultat
   ============================================================ */
.fin-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  border: 2px solid var(--navy); border-radius: 10px;
  overflow: hidden; margin: 28px 0; font-size: 13.5px;
}
@media (max-width: 700px) {
  .fin-grid { grid-template-columns: 1fr; }
  .fin-col:first-child { border-right: none; border-bottom: 2px solid var(--navy); }
}
.fin-col { border-right: 2px solid var(--navy); }
.fin-col:last-child { border-right: none; }

.fin-col-head {
  background: var(--navy); color: var(--white); font-family: var(--font-h);
  font-size: 13px; font-weight: 700; padding: 13px 20px;
  text-align: center; text-transform: uppercase; letter-spacing: .06em;
}
.fin-sec-head {
  background: var(--blue-dark); color: rgba(255,255,255,.85);
  font-family: var(--font-h); font-size: 11px; font-weight: 600;
  padding: 7px 20px; text-transform: uppercase; letter-spacing: .05em;
}
.fin-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 7px 20px; border-bottom: 1px solid var(--gray-100); font-size: 13px;
}
.fin-row:last-child { border-bottom: none; }
.fin-row.total { background: var(--gray-50); font-family: var(--font-h); font-weight: 700; border-top: 2px solid var(--navy); color: var(--navy); font-size: 14px; }
.fin-row.subtot { background: #EFF6FF; font-weight: 600; color: var(--blue-dark); }
.fin-amt { font-family: var(--font-h); font-weight: 600; color: var(--navy); }
.fin-amt.pos { color: var(--green); }
.fin-amt.neg { color: var(--red); }

/* Lien entre les cellules du bilan et leur source */
.fin-row .src-inline {
  font-family: var(--font-h); font-size: 9px; font-weight: 600;
  background: var(--gray-100); color: var(--gray-400);
  padding: 1px 6px; border-radius: 4px; margin-left: 8px; cursor: help;
}

/* ── SIG Table ──────────────────────────────────────────── */
.sig-table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 14px; }
.sig-table tr { border-bottom: 1px solid var(--gray-100); }
.sig-table td { padding: 10px 16px; }
.sig-table td:last-child { text-align: right; font-family: var(--font-h); font-weight: 600; }
.sig-table .sig-h { background: var(--navy); }
.sig-table .sig-h td { color: white; font-family: var(--font-h); font-weight: 700; }
.sig-table .sig-r td { background: #EFF6FF; font-family: var(--font-h); font-weight: 700; color: var(--blue-dark); border-top: 2px solid var(--blue); }

/* ============================================================
   DATA TABLES
   ============================================================ */
.dt-wrap { overflow-x: auto; margin: 18px 0; border-radius: var(--r); box-shadow: var(--sh1); }
.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.data-table thead th {
  background: var(--navy); color: white;
  font-family: var(--font-h); font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em;
  padding: 11px 14px; text-align: left; white-space: nowrap;
}
.data-table thead th:first-child { border-radius: 0; }
.data-table tbody tr:nth-child(even) { background: var(--gray-50); }
.data-table tbody tr:hover td { background: #EFF6FF; transition: background .15s; }
.data-table tbody td { padding: 9px 14px; border-bottom: 1px solid var(--gray-100); vertical-align: top; }
.data-table tfoot td {
  background: var(--gray-50); font-family: var(--font-h); font-weight: 700;
  color: var(--navy); padding: 11px 14px; border-top: 2px solid var(--navy);
}
/* Annotations source dans les cellules (survol) */
td.src-cell { position: relative; }
td.src-cell::after {
  content: attr(data-src);
  position: absolute; top: 3px; right: 5px;
  font-size: 9px; font-family: var(--font-h); color: var(--gray-400);
  background: var(--gray-100); padding: 1px 5px; border-radius: 3px;
  opacity: 0; transition: opacity .2s; pointer-events: none; white-space: nowrap;
}
td.src-cell:hover::after { opacity: 1; }

.t-ok   { color: var(--green); font-weight: 600; }
.t-warn { color: #B45309; font-weight: 600; }
.t-err  { color: var(--red); font-weight: 600; }

/* ============================================================
   KPI CARDS
   ============================================================ */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px,1fr)); gap: 14px; margin: 22px 0; }
.kpi-card {
  background: var(--white); border: 1px solid var(--gray-100); border-radius: var(--r);
  padding: 18px; text-align: center; box-shadow: var(--sh1); transition: var(--t);
}
.kpi-card:hover { transform: translateY(-2px); box-shadow: var(--sh2); }
.kpi-val { font-family: var(--font-h); font-size: 28px; font-weight: 800; color: var(--navy); line-height: 1; margin-bottom: 5px; }
.kpi-val.pos  { color: var(--green); }
.kpi-val.neg  { color: var(--red); }
.kpi-val.warn { color: var(--accent); }
.kpi-lbl { font-family: var(--font-h); font-size: 10px; font-weight: 600; color: var(--gray-400); text-transform: uppercase; letter-spacing: .08em; }

/* ============================================================
   INDICATOR CARDS (Module 2)
   ============================================================ */
.ind-card {
  background: var(--white); border: 1px solid var(--gray-100); border-radius: 12px;
  overflow: hidden; margin: 40px 0; box-shadow: var(--sh1); transition: box-shadow .3s;
}
.ind-card:hover { box-shadow: var(--sh2); }

.ind-card-head {
  padding: 18px 26px; border-bottom: 1px solid var(--gray-100);
  display: flex; align-items: flex-start; gap: 14px;
}
.ind-num {
  width: 44px; height: 44px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-h); font-size: 17px; font-weight: 800;
  color: var(--white); flex-shrink: 0;
}
.ind-num.f1 { background: var(--blue); }
.ind-num.f2 { background: var(--teal); }
.ind-num.f3 { background: var(--purple); }

.ind-head-text h3 { font-family: var(--font-h); font-size: 18px; font-weight: 700; color: var(--navy); line-height: 1.2; }
.ind-fam { font-family: var(--font-h); font-size: 11px; color: var(--gray-400); margin-top: 4px; font-weight: 500; display: flex; align-items: center; gap: 5px; }
.ind-fam svg { width: 12px; height: 12px; stroke: currentColor; }

/* ── Onglets intra-fiche ─────────────────────────────────── */
.ind-tabs { display: flex; background: var(--gray-50); border-bottom: 1px solid var(--gray-100); }
.ind-tab {
  padding: 10px 20px; font-family: var(--font-h); font-size: 11px; font-weight: 700;
  color: var(--gray-400); cursor: pointer; border-bottom: 3px solid transparent;
  transition: var(--t); text-transform: uppercase; letter-spacing: .06em;
  display: flex; align-items: center; gap: 6px; user-select: none;
}
.ind-tab svg { width: 13px; height: 13px; stroke: currentColor; }
.ind-tab:hover { color: var(--navy); }
.ind-tab.active { color: var(--blue); border-bottom-color: var(--blue); background: var(--white); }

.ind-pane { display: none; padding: 22px 26px; }
.ind-pane.active { display: block; }

.ind-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 18px; }
@media (max-width: 680px) { .ind-grid { grid-template-columns: 1fr; } }

.ind-box { background: var(--gray-50); border-radius: 6px; padding: 13px 15px; font-size: 13.5px; line-height: 1.65; }
.ind-box-t { font-family: var(--font-h); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--gray-400); margin-bottom: 6px; display: flex; align-items: center; gap: 5px; }
.ind-box-t svg { width: 12px; height: 12px; stroke: currentColor; }

/* ── Formule ─────────────────────────────────────────────── */
.formula-box {
  background: var(--navy); border-radius: var(--r);
  padding: 16px 20px; color: var(--accent-lt);
  font-family: 'Courier New', monospace; font-size: 13px; margin: 14px 0; line-height: 1.7;
}
.formula-lbl { font-family: var(--font-h); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.38); margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.formula-lbl svg { width: 11px; height: 11px; stroke: currentColor; }
.formula-box .cmt { color: rgba(255,255,255,.32); }
.formula-box .res { color: #86EFAC; font-weight: 700; }

/* ── Accordéon exemples ──────────────────────────────────── */
.ex-item { margin-bottom: 8px; }
.ex-toggle {
  width: 100%; text-align: left; background: var(--gray-50);
  border: 1px solid var(--gray-100); border-radius: var(--r);
  padding: 11px 16px; font-family: var(--font-h); font-size: 13px; font-weight: 600;
  color: var(--navy); cursor: pointer;
  display: flex; align-items: center; gap: 10px; transition: var(--t);
}
.ex-toggle:hover { background: var(--gray-100); }
.ex-num { background: var(--blue); color: white; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 10px; white-space: nowrap; }
.ex-chevron { margin-left: auto; transition: transform .3s; display: flex; align-items: center; }
.ex-chevron svg { width: 16px; height: 16px; stroke: var(--gray-400); }
.ex-toggle.open .ex-chevron { transform: rotate(180deg); }
.ex-toggle.open { background: #EFF6FF; border-color: var(--blue); }

.ex-body {
  display: none; border: 1px solid var(--gray-100); border-top: none;
  border-radius: 0 0 var(--r) var(--r);
  padding: 16px 18px; font-size: 13.5px; line-height: 1.72;
}
.ex-body.open { display: block; }

.ex-step { margin-bottom: 11px; }
.ex-lbl { font-family: var(--font-h); font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; display: flex; align-items: center; gap: 5px; margin-bottom: 3px; }
.ex-lbl svg { width: 12px; height: 12px; stroke: currentColor; flex-shrink: 0; }
.l-ctx { color: var(--blue); }
.l-ana { color: #B45309; }
.l-act { color: var(--green); }

/* ── Pro Tip ─────────────────────────────────────────────── */
.pro-tip {
  background: linear-gradient(135deg, var(--navy), var(--blue-dark)); border-radius: var(--r);
  padding: 13px 17px; color: rgba(255,255,255,.84); font-size: 13px; margin-top: 14px;
  display: flex; gap: 10px; align-items: flex-start;
}
.pro-tip svg { width: 16px; height: 16px; stroke: var(--accent-lt); flex-shrink: 0; margin-top: 2px; }
.pro-tip strong { color: var(--accent-lt); font-family: var(--font-h); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; display: block; margin-bottom: 3px; }

/* ============================================================
   CALCULATRICES INTERACTIVES
   ============================================================ */
.calc-widget {
  background: var(--white); border: 2px solid var(--blue);
  border-radius: 12px; overflow: hidden; margin: 24px 0; box-shadow: var(--sh2);
}
.calc-hdr {
  background: var(--blue); padding: 12px 20px;
  display: flex; align-items: center; gap: 10px;
}
.calc-hdr svg { width: 16px; height: 16px; stroke: rgba(255,255,255,.8); }
.calc-hdr h4 { font-family: var(--font-h); font-size: 14px; font-weight: 700; color: white; }

.calc-body { padding: 22px 24px; }
.calc-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
@media (max-width: 600px) { .calc-row { grid-template-columns: 1fr; } }

.calc-field label {
  font-family: var(--font-h); font-size: 11px; font-weight: 600;
  color: var(--gray-600); text-transform: uppercase; letter-spacing: .07em;
  display: flex; align-items: center; gap: 5px; margin-bottom: 5px;
}
.calc-field label svg { width: 12px; height: 12px; stroke: currentColor; }
.calc-field .src-hint { font-weight: 400; font-size: 10px; color: var(--gray-400); text-transform: none; letter-spacing: 0; }

.calc-field input, .calc-field select {
  width: 100%; padding: 9px 13px;
  border: 1.5px solid var(--gray-200); border-radius: 6px;
  font-family: var(--font-b); font-size: 14px; color: var(--gray-800);
  background: var(--gray-50); transition: border-color .2s;
}
.calc-field input:focus, .calc-field select:focus {
  outline: none; border-color: var(--blue); background: white;
  box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}

.calc-result {
  background: var(--navy); border-radius: var(--r);
  padding: 14px 18px; margin-top: 18px;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px;
}
.calc-result-lbl { font-family: var(--font-h); font-size: 11px; color: rgba(255,255,255,.45); text-transform: uppercase; letter-spacing: .1em; }
.calc-result-val { font-family: var(--font-h); font-size: 26px; font-weight: 800; color: var(--accent-lt); }
.calc-result-detail { font-size: 12px; color: rgba(255,255,255,.5); width: 100%; margin-top: 4px; line-height: 1.65; }
.calc-result-detail strong { color: rgba(255,255,255,.8); }

/* Tableau résultat amortissements */
.am-result-table { display: none; margin-top: 20px; }
.am-result-table.visible { display: block; }

.btn-calc {
  padding: 9px 20px; background: var(--accent); color: var(--navy);
  border: none; border-radius: var(--r); font-family: var(--font-h);
  font-size: 13px; font-weight: 700; cursor: pointer; transition: var(--t);
  display: inline-flex; align-items: center; gap: 7px;
}
.btn-calc svg { width: 14px; height: 14px; stroke: currentColor; }
.btn-calc:hover { background: var(--accent-lt); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(245,158,11,.3); }

/* ============================================================
   QUIZ
   ============================================================ */
.quiz-widget {
  background: var(--white); border: 2px solid var(--teal);
  border-radius: 12px; overflow: hidden; margin: 28px 0; box-shadow: var(--sh1);
}
.quiz-hdr { background: var(--teal); padding: 12px 20px; display: flex; align-items: center; gap: 10px; }
.quiz-hdr svg { width: 16px; height: 16px; stroke: rgba(255,255,255,.8); }
.quiz-hdr span { font-family: var(--font-h); font-size: 14px; font-weight: 700; color: white; }
.quiz-body { padding: 22px 26px; }
.quiz-q { font-family: var(--font-h); font-size: 15px; font-weight: 600; color: var(--navy); margin-bottom: 14px; line-height: 1.45; }
.quiz-opts { display: flex; flex-direction: column; gap: 9px; }
.quiz-opt {
  padding: 11px 15px; border: 1.5px solid var(--gray-200); border-radius: var(--r);
  cursor: pointer; font-size: 14px; transition: var(--t);
  display: flex; align-items: center; gap: 11px; background: var(--gray-50);
}
.quiz-opt:hover:not(.disabled) { border-color: var(--teal); background: #F0FDFA; }
.quiz-opt.correct { border-color: var(--green); background: #F0FDF4; color: var(--green); }
.quiz-opt.wrong   { border-color: var(--red);   background: #FEF2F2; color: var(--red); }
.quiz-opt.disabled { pointer-events: none; }
.quiz-letter {
  width: 28px; height: 28px; border-radius: 50%; background: var(--gray-200);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-h); font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.quiz-opt.correct .quiz-letter { background: var(--green); color: white; }
.quiz-opt.wrong   .quiz-letter { background: var(--red);   color: white; }
.quiz-fb { display: none; margin-top: 13px; padding: 12px 15px; border-radius: var(--r); font-size: 13.5px; line-height: 1.65; }
.quiz-fb.show { display: block; }
.quiz-fb.ok { background: #F0FDF4; color: #14532D; border-left: 4px solid var(--green); }
.quiz-fb.ko { background: #FEF2F2; color: #7F1D1D; border-left: 4px solid var(--red); }

/* ============================================================
   CASE STUDY HEADER (Module 3)
   ============================================================ */
.case-hdr {
  background: linear-gradient(135deg, #1B1B2F, #2D1B69);
  padding: 56px 80px; position: relative; overflow: hidden;
}
.case-hdr .case-deco {
  position: absolute; right: 60px; top: 50%; transform: translateY(-50%);
  opacity: .04;
}
.case-hdr .case-deco svg { width: 180px; height: 180px; stroke: white; }
.case-badge {
  display: inline-block; background: rgba(245,158,11,.18); border: 1px solid var(--accent);
  color: var(--accent-lt); font-family: var(--font-h); font-size: 11px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; padding: 5px 14px; border-radius: 4px; margin-bottom: 18px;
}
.case-hdr h2 { font-family: var(--font-h); font-size: clamp(24px,3.5vw,38px); font-weight: 800; color: white; margin-bottom: 12px; line-height: 1.2; }
.case-hdr p  { font-size: 15px; color: rgba(255,255,255,.6); font-weight: 300; max-width: 540px; }

/* ── Tâches module 3 ─────────────────────────────────────── */
.task-card {
  background: var(--white); border: 1px solid var(--gray-100);
  border-radius: 10px; padding: 20px 24px; margin-bottom: 14px;
  display: flex; gap: 16px; box-shadow: var(--sh1); transition: var(--t);
}
.task-card:hover { border-color: var(--accent); box-shadow: var(--sh2); }
.task-num {
  background: var(--accent); color: var(--navy);
  font-family: var(--font-h); font-weight: 800; font-size: 17px;
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.task-content h4 { font-family: var(--font-h); font-size: 15px; font-weight: 700; color: var(--navy); margin-bottom: 5px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.task-content p  { font-size: 13.5px; color: var(--gray-600); line-height: 1.65; }
.time-bdg {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(245,158,11,.1); border: 1px solid rgba(245,158,11,.28);
  color: #B45309; font-family: var(--font-h); font-size: 11px; font-weight: 600;
  padding: 2px 9px; border-radius: 12px;
}
.time-bdg svg { width: 11px; height: 11px; stroke: currentColor; }

/* Checklist interactive */
.task-check-wrap { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 13px; color: var(--gray-600); cursor: pointer; }
.task-check-wrap input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--blue); cursor: pointer; }

.progress-task { background: var(--gray-100); border-radius: 4px; height: 6px; margin: 16px 0 8px; overflow: hidden; }
.progress-task-bar { height: 100%; background: linear-gradient(90deg, var(--blue), var(--teal)); border-radius: 4px; transition: width .4s ease; width: 0%; }
.progress-task-lbl { font-family: var(--font-h); font-size: 11px; color: var(--gray-400); font-weight: 600; }

/* ── Correction ──────────────────────────────────────────── */
.corr-section {
  background: #F0FDF4; border: 2px solid var(--green);
  border-radius: 10px; padding: 26px 30px; margin: 26px 0;
}
.corr-title {
  font-family: var(--font-h); font-size: 13px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--green); margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}
.corr-title svg { width: 16px; height: 16px; stroke: currentColor; }
.slide-card { background: white; border: 1px solid var(--gray-200); border-radius: var(--r); padding: 16px 20px; margin-bottom: 10px; }
.slide-num { font-family: var(--font-h); font-size: 10px; font-weight: 700; color: var(--blue); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 4px; display: flex; align-items: center; gap: 5px; }
.slide-num svg { width: 12px; height: 12px; stroke: currentColor; }
.slide-title { font-family: var(--font-h); font-size: 15px; font-weight: 700; color: var(--navy); margin-bottom: 7px; }
.slide-content { font-size: 13.5px; color: var(--gray-600); line-height: 1.7; }

/* ============================================================
   TIMER WIDGET
   ============================================================ */
.timer-widget {
  position: fixed; bottom: 22px; right: 22px;
  background: var(--navy); color: white; border-radius: 12px;
  padding: 12px 16px; box-shadow: var(--sh3); z-index: 800;
  font-family: var(--font-h); min-width: 156px; transition: var(--t);
}
.timer-widget:hover { transform: translateY(-2px); }
.timer-lbl { font-size: 9px; color: rgba(255,255,255,.38); text-transform: uppercase; letter-spacing: .1em; display: flex; align-items: center; gap: 4px; }
.timer-lbl svg { width: 11px; height: 11px; stroke: currentColor; }
.timer-disp { font-size: 26px; font-weight: 800; color: var(--accent-lt); letter-spacing: .02em; line-height: 1.2; }
.timer-disp.reached { color: #86EFAC; }
.timer-acts { display: flex; gap: 6px; margin-top: 8px; }
.timer-btn {
  flex: 1; padding: 5px 0; border: 1px solid rgba(255,255,255,.18);
  border-radius: 5px; background: transparent; color: rgba(255,255,255,.65);
  font-family: var(--font-h); font-size: 11px; font-weight: 600;
  cursor: pointer; transition: var(--t); display: flex; align-items: center; justify-content: center; gap: 3px;
}
.timer-btn svg { width: 11px; height: 11px; stroke: currentColor; }
.timer-btn:hover { background: rgba(255,255,255,.1); color: white; }
.timer-btn.go { border-color: var(--green); color: var(--green); }
.timer-btn.go:hover { background: rgba(22,163,74,.15); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 20px; border-radius: var(--r); font-family: var(--font-h);
  font-size: 13px; font-weight: 700; cursor: pointer; transition: var(--t);
  border: none; text-decoration: none; white-space: nowrap;
}
.btn svg { width: 14px; height: 14px; stroke: currentColor; }
.btn-primary { background: var(--blue); color: white; }
.btn-primary:hover { background: var(--blue-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(37,99,235,.3); }
.btn-outline { background: transparent; color: var(--blue); border: 2px solid var(--blue); }
.btn-outline:hover { background: #EFF6FF; }
.btn-ghost { background: var(--gray-100); color: var(--gray-600); }
.btn-ghost:hover { background: var(--gray-200); color: var(--navy); }
.btn-sm { padding: 6px 13px; font-size: 12px; }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeUp   { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }
@keyframes fadeRight{ from { opacity:0; transform:translateX(30px); } to { opacity:1; transform:translateX(0); } }
@keyframes countUp  { from { opacity:0; transform:scale(.85); }        to { opacity:1; transform:scale(1); } }

.reveal { opacity: 0; transform: translateY(22px); transition: opacity .55s ease, transform .55s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }


/* --- Footer Minimaliste & Percutant --- */
.main-footer {
  background-color: var(--navy-mid);
  color: white;
  padding: 1.2rem 0; /* Encore plus fin */
  margin-top: 2rem;
  border-top: 2px solid var(--blue-dark);
  text-align: center;
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: 'Space Grotesk', sans-serif;
  margin-bottom: 0.2rem;
}

.footer-logo {
  font-weight: 700;
  font-size: 1rem;
}

.footer-logo i {
  color: var(--white);
}

.footer-separator-pipe {
  color: var(--gray);
  opacity: 0.4;
}

.footer-tagline {
  color: var(--gray);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-bottom {
  font-size: 0.8rem;
}

.header-logo-img {
    height: 40px; /* Ajuste la hauteur selon tes besoins */
    width: auto;  /* Garde les proportions */
    display: block;
    transition: transform 0.3s ease;
}

.header-logo-img:hover {
    transform: scale(1.05); /* Petit effet dynamique au survol */
}

/* Ajustement pour mobile */
@media (max-width: 768px) {
    .header-logo-img {
        height: 35px;
    }
}