/* ============================================================
   manual.css — GeReMS User Manual Design
   ============================================================ */

:root {
  --color-primary: #2563eb;
  --color-primary-dark: #1d4ed8;
  --color-primary-light: #eff6ff;
  --color-accent: #f59e0b;
  --color-success: #16a34a;
  --color-error: #dc2626;
  --color-bg: #8aa3bc;
  --color-surface: #ffffff;
  --color-text: #0f172a;
  --color-text-muted: #475569;
  --color-border: #e2e8f0;
  --font-family: 'Inter', system-ui, -apple-system, sans-serif;
  --sidebar-width: 280px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  font-size: 16px;
  color: var(--color-text);
  background-color: #f8fafc;
  line-height: 1.6;
  display: flex;
  min-height: 100dvh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: #1e293b;
  color: #f1f5f9;
  height: 100dvh;
  position: sticky;
  top: 0;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-badge {
  width: 36px;
  height: 36px;
  background: var(--color-primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: white;
  font-family: 'Montserrat', sans-serif;
}

.sidebar-title {
  font-size: 1.25rem;
  font-weight: 700;
  font-family: 'Montserrat', sans-serif;
  letter-spacing: 0.02em;
}

.brand {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  color: var(--color-primary);
}

.nav-menu {
  list-style: none;
}

.nav-item {
  margin-bottom: 0.5rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1rem;
  color: #94a3b8;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.2s;
  font-size: 0.95rem;
}

.nav-link:hover, .nav-link.active {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.nav-link.active {
  background: var(--color-primary);
  margin-bottom: 0.25rem;
}

/* Carte mentale link */
.nav-item-mindmap {
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-link-mindmap {
  color: #a78bfa !important;
  font-weight: 600;
}
.nav-link-mindmap:hover {
  background: rgba(167, 139, 250, 0.15) !important;
  color: #c4b5fd !important;
}

/* Print All Button Styling */
.nav-item.print-all-item {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.print-all-btn {
  display: flex !important;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: rgba(245, 158, 11, 0.1) !important;
  color: #f59e0b !important;
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s;
  border: 1px dashed rgba(245, 158, 11, 0.3) !important;
}

.print-all-btn:hover {
  background: var(--color-accent) !important;
  color: white !important;
  border-style: solid !important;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

/* Table of Contents (Dynamic TOC) */
.toc-menu {
  list-style: none;
  margin-left: 1rem;
  margin-top: 0.5rem;
  margin-bottom: 1.5rem;
  padding-left: 1.25rem;
  border-left: 1px solid rgba(255, 255, 255, 0.05); /* Very subtle line */
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
}

.toc-link {
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.85rem;
  display: block;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  line-height: 1.5;
  position: relative;
}

.toc-link:hover {
  color: white;
  padding-left: 2px;
}

.toc-link.active {
  color: var(--color-accent);
  font-weight: 600;
}

/* Indicator line for active section */
.toc-link.active::before {
  content: "";
  position: absolute;
  left: -1.35rem; /* Exactly on the container's border-left */
  top: 0.2rem;
  bottom: 0.2rem;
  width: 2px;
  background-color: var(--color-accent);
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
}

.toc-link.h3 {
  font-size: 0.75rem;
  padding-left: 0.5rem;
  color: #64748b;
  opacity: 0.8;
}

.toc-link.h3:hover {
  opacity: 1;
}

.toc-link.h3.active::before {
  left: -1.85rem; /* Adjust for indentation */
}

/* Content */
.main-content {
  flex: 1;
  padding: 3rem 4rem;
  max-width: 1200px; /* Increased from 1000px */
}

h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--color-text);
}

h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-primary-light);
}

p {
  margin-bottom: 1.25rem;
}

.illustration {
  margin: 2rem 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  border: 1px solid var(--color-border);
  background: #f8fafc;
  display: flex;
  flex-direction: column;
}

.illustration img {
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 4px;
}

/* Modes Comparison */
.modes-container {
  display: flex;
  gap: 2rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.mode-box {
  flex: 1;
  min-width: 300px;
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 10px rgba(0,0,0,0.03);
}

.mode-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.mode-box h2 {
  margin-top: 0;
  font-size: 1.25rem;
  color: var(--color-primary-dark);
  border-bottom: 2px solid var(--color-primary-light);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.mode-box .illustration {
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.mode-box ul {
  padding-left: 1.25rem;
  margin-top: 1rem;
}

.mode-box li {
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  color: var(--color-text);
}

.caption {
  padding: 0.75rem 1rem;
  background: #f1f5f9;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  font-style: italic;
  text-align: center;
}

/* Illustration Grid for multi-tab views */
.illustration-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin: 2rem 0;
}

@media (max-width: 900px) {
  .illustration-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* Triptych (synthese.html) : trois captures dans le bloc .illustration */
.illustration--triptych .illustration-grid--synthese {
  margin: 0;
  padding: 0.75rem 0.75rem 0.5rem;
  align-items: stretch;
}

.illustration--triptych .illustration-grid__cell {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.illustration--triptych .illustration-grid__cell img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}

.illustration-grid__label {
  margin: 0.5rem 0 0;
  padding: 0 0.25rem;
  font-size: 0.8rem;
  font-weight: 600;
  font-style: normal;
  color: var(--color-text-muted);
  text-align: center;
  line-height: 1.3;
}

/* Image Grid */
.image-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2 columns by default */
  gap: 1.5rem;
  margin: 2.5rem 0;
}

@media (min-width: 1200px) {
  .image-grid {
    grid-template-columns: repeat(4, 1fr); /* Restored to 4 columns */
  }
  .image-grid.grid-2-cols {
    grid-template-columns: repeat(2, 1fr); /* Specific class for 2 columns */
  }
}

@media (max-width: 600px) {
  .image-grid {
    grid-template-columns: 1fr; /* 1 column on mobile */
  }
}

.grid-item {
  background: white;
  padding: 1rem;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s;
}

.grid-item:hover {
  transform: translateY(-5px);
  z-index: 10;
}

.grid-item img:hover {
  transform: scale(1.05);
  transition: transform 0.3s ease;
  cursor: zoom-in;
}

.grid-item img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  border: 1px solid #f1f5f9;
}

.grid-caption {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  font-weight: 600;
  text-align: center;
}

.note {
  background: var(--color-primary-light);
  border-left: 4px solid var(--color-primary);
  padding: 1.25rem;
  border-radius: 0 8px 8px 0;
  margin: 1.5rem 0;
}

.note-title {
  font-weight: 700;
  color: var(--color-primary-dark);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.alert {
  background: #fef2f2;
  border-left: 4px solid var(--color-error);
  padding: 1.25rem;
  border-radius: 0 8px 8px 0;
  margin: 1.5rem 0;
}

.note-warning {
  background: #fffbeb;
  border-left: 4px solid var(--color-accent);
  padding: 1.25rem;
  border-radius: 0 8px 8px 0;
  margin: 1.5rem 0;
}

.alert-title {
  font-weight: 700;
  color: var(--color-error);
  margin-bottom: 0.5rem;
}

/* Informative Components Lists (Ensuring bullets are not stuck to border) */
.note ul, .alert ul, .note-warning ul {
  padding-left: 1.5rem;
  margin-top: 0.75rem;
  margin-bottom: 0.25rem;
}

.note li, .alert li, .note-warning li {
  margin-bottom: 0.5rem;
  display: list-item;
}

/* Standard List Styles (Restore browser defaults inside content) */
.main-content ul {
  list-style-type: disc;
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.main-content li {
  margin-bottom: 0.5rem;
}

.step-list {
  list-style: none;
  counter-reset: steps;
}

.step-item {
  position: relative;
  padding-left: 3.5rem;
  margin-bottom: 1.5rem;
}

.step-item::before {
  counter-increment: steps;
  content: counter(steps);
  position: absolute;
  left: 0;
  top: 0.8rem; /* Centered with first line (line-height 1.6rem / 2) */
  transform: translateY(-50%);
  width: 2.5rem;
  height: 2.5rem;
  background: var(--color-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.step-item.no-number {
  padding-left: 0;
}

.step-item.no-number::before {
  display: none;
}

footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

/* ============================================================
   RESPONSIVE DESIGN
   ============================================================ */

/* Mobile Header (Hidden by default on Desktop) */
.mobile-header {
  display: none;
  background: #1e293b;
  color: white;
  padding: 1rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
  justify-content: space-between;
  align-items: center;
}

.menu-toggle {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.2);
  color: white;
  padding: 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1.25rem;
}

@media (max-width: 1024px) {
  body {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    height: auto;
    position: fixed;
    left: -100%;
    top: 60px; /* Below mobile header */
    height: calc(100dvh - 60px);
    transition: left 0.3s ease;
    z-index: 90;
  }

  .sidebar.active {
    left: 0;
  }

  .mobile-header {
    display: flex;
  }

  .main-content {
    padding: 2rem 1.5rem;
    max-width: 100%;
  }

  h1 {
    font-size: 2rem;
  }

  .modes-container {
    flex-direction: column;
    gap: 1.5rem;
  }

  .mode-box {
    min-width: 0;
  }
}

/* ============================================================
   PRINT STYLES
   ============================================================ */

@media print {
  .sidebar, .mobile-header, .menu-toggle, .nav-menu, .video-companion {
    display: none !important;
  }

  body {
    background: white;
    display: block;
  }

  .main-content {
    padding: 0;
    margin: 0;
    max-width: 100%;
    width: 100%;
    counter-reset: chapter;
  }

  h1 {
    font-size: 24pt;
    margin-top: 0;
    break-after: avoid;
  }

  h2 {
    font-size: 18pt;
    border-bottom: 2px solid #ccc;
    padding-top: 1cm;
    break-after: avoid;
  }

  h3 {
    break-after: avoid;
  }

  .illustration img {
    max-height: 8cm;
  }

  .image-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.5cm !important;
    margin: 1cm 0 !important;
  }

  .grid-item {
    padding: 0.5rem !important;
    break-inside: avoid;
  }

  .grid-item img {
    max-height: 4.5cm !important;
    width: auto !important;
    margin: 0 auto !important;
    display: block !important;
  }

  .mode-box {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #eee;
    margin-bottom: 1cm;
  }

  .note, .alert {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #eee;
    background: white !important;
  }

  a::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #666;
  }

  footer {
    display: none;
  }

  /* Specific for Full Manual Print */
  .manual-section {
    page-break-before: always;
    position: relative;
  }

  .manual-section:first-of-type {
    page-break-before: auto;
  }
}

/* Lightbox overlay */
.lightbox-overlay {
  display: none;
  position: fixed;
  z-index: 10000;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 23, 42, 0.95);
  cursor: zoom-out;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(5px);
}

.lightbox-overlay.active {
  display: flex;
  opacity: 1;
}

.lightbox-img {
  max-width: 95%;
  max-height: 95%;
  object-fit: contain;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  border-radius: 8px;
  border: 4px solid white;
}

.lightbox-overlay.active .lightbox-img {
  transform: scale(1);
}

.main-content img:not(.no-zoom) {
  cursor: zoom-in;
  transition: all 0.3s ease;
}

.main-content img:not(.no-zoom):hover {
  filter: brightness(1.05);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* Status Badges */
.badge-tension { 
  background: #dc3545; 
  color: white; 
  padding: 2px 8px; 
  border-radius: 4px; 
  font-weight: bold; 
  font-size: 0.8rem; 
  white-space: nowrap; 
  display: inline-block; 
}

/* Badges du modal d'analyse individuelle (Voir) */
.badge-dans { 
    background: #28a745; 
    color: #fff; 
    padding: 2px 6px; 
    border-radius: 12px; 
    font-weight: bold; 
    font-size: 0.8rem; 
}

.badge-vacance { 
  background: #ca9a05; 
  color: white; 
  padding: 2px 8px; 
  border-radius: 4px; 
  font-weight: bold; 
  font-size: 0.8rem; 
  white-space: nowrap; 
  display: inline-block; 
}

.badge-equilibre { 
  background: #28a745; 
  color: white; 
  padding: 2px 8px; 
  border-radius: 4px; 
  font-weight: bold; 
  font-size: 0.8rem; 
  white-space: nowrap; 
  display: inline-block; 
}

/* ── Mindmap Specific Styles (No overall body/root override) ── */

:root {
  --c-setup:   #0f766e; /* Paramétrage */
  --c-struct:  #1d4ed8; /* Structure */
  --c-service: #7c3aed; /* Services */
  --c-voeux:   #dc2626; /* Vœux */
  --c-analyse: #059669; /* Analyse */
  --c-edition: #b45309; /* Éditions */
}

/* ── Header ── */
.page-header {
  text-align: center;
  margin-bottom: 2rem;
}
.page-header h1 {
  font-size: 1.6rem;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 0.3rem;
}
.page-header h1 .logo-font {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #1e293b;
}
.page-header p {
  font-size: 0.85rem;
  color: #64748b;
}
.page-header a { color: #2563eb; }

/* ── Groupes thématiques ── */
.groups {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  max-width: 1600px;
  margin: 0 auto;
}

.group {
  background: white;
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  overflow: hidden;
}

.group-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.9rem 1.25rem;
  color: white;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}
.group-header .gh-icon { font-size: 1.2rem; }
.group-header .gh-sub {
  font-size: 0.72rem;
  font-weight: 500;
  opacity: 0.85;
  margin-left: auto;
  background: rgba(255,255,255,0.2);
  padding: 2px 10px;
  border-radius: 10px;
}

/* ── Ligne de modules dans un groupe ── */
.modules {
  display: flex;
  gap: 0;
  overflow-x: auto;
  padding: 1.25rem 1rem;
  align-items: flex-start;
}

/* Flèche entre modules */
.mod-arrow {
  display: flex;
  align-items: center;
  padding-top: 36px;
  flex-shrink: 0;
}
.mod-arrow-line {
  width: 24px;
  height: 2px;
  background: #cbd5e1;
  position: relative;
}
.mod-arrow-line::after {
  content: '';
  position: absolute;
  right: -1px; top: -4px;
  border: 5px solid transparent;
  border-left-color: #cbd5e1;
}

/* ── Module ── */
.module {
  min-width: 180px;
  max-width: 200px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mod-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  border-radius: 10px;
  color: white;
  font-weight: 700;
  font-size: 0.78rem;
  text-align: center;
  width: 100%;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.18);
  transition: transform 0.12s, box-shadow 0.12s;
  user-select: none;
}
.mod-head:hover { transform: translateY(-2px); box-shadow: 0 5px 14px rgba(0,0,0,0.22); }
.mod-head .mh-icon { font-size: 1.2rem; }
.mod-head .mh-link {
  font-size: 0.65rem;
  opacity: 0.75;
}

.vl { width: 2px; height: 14px; background: #e2e8f0; margin: 0 auto; }

.mod-items {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 100%;
}

.mi {
  background: #f8fafc;
  border-radius: 7px;
  padding: 6px 9px;
  font-size: 0.72rem;
  line-height: 1.4;
  border-left: 3px solid #e2e8f0;
  color: #334155;
}
.mi i { margin-right: 5px; width: 13px; text-align: center; opacity: 0.8; }

.tag {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  margin-left: 3px;
  vertical-align: middle;
  letter-spacing: 0.03em;
}
.ti { background: #eff6ff; color: #1d4ed8; }
.tw { background: #fff7ed; color: #c2410c; }
.to { background: #f0fdf4; color: #15803d; }
.tp { background: #f5f3ff; color: #7c3aed; }

/* ── Couleurs par groupe ── */
.g-setup   .group-header { background: linear-gradient(135deg, var(--c-setup), #0d9488); }
.g-struct  .group-header { background: linear-gradient(135deg, var(--c-struct), #1e40af); }
.g-service .group-header { background: linear-gradient(135deg, var(--c-service), #6d28d9); }
.g-voeux   .group-header { background: linear-gradient(135deg, var(--c-voeux), #b91c1c); }
.g-analyse .group-header { background: linear-gradient(135deg, var(--c-analyse), #047857); }
.g-edition .group-header { background: linear-gradient(135deg, var(--c-edition), #92400e); }

/* Couleurs mod-head héritées du groupe */
.g-setup   .mod-head { background: linear-gradient(135deg, #0f766e, #0d9488); }
.g-struct  .mod-head { background: linear-gradient(135deg, #1d4ed8, #2563eb); }
.g-service .mod-head { background: linear-gradient(135deg, #7c3aed, #8b5cf6); }
.g-voeux   .mod-head { background: linear-gradient(135deg, #dc2626, #ef4444); }
.g-analyse .mod-head { background: linear-gradient(135deg, #059669, #10b981); }
.g-edition .mod-head { background: linear-gradient(135deg, #b45309, #d97706); }

/* Bordure gauche des items selon groupe */
.g-setup   .mi { border-left-color: #0d9488; }
.g-struct  .mi { border-left-color: #2563eb; }
.g-service .mi { border-left-color: #8b5cf6; }
.g-voeux   .mi { border-left-color: #ef4444; }
.g-analyse .mi { border-left-color: #10b981; }
.g-edition .mi { border-left-color: #d97706; }

/* ── Panneau latéral (Mindmap) ── */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.18);
  z-index: 99;
}
.overlay.open { display: block; }

.panel {
  display: none;
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 360px;
  background: white;
  border-left: 1px solid #e2e8f0;
  box-shadow: -4px 0 24px rgba(0,0,0,0.13);
  z-index: 100;
  overflow-y: auto;
  padding: 1.5rem 1.25rem 2rem;
}
.panel.open { display: block; }

.panel-close {
  position: absolute;
  top: 1rem; right: 1rem;
  background: #f1f5f9;
  border: none;
  border-radius: 7px;
  width: 32px; height: 32px;
  cursor: pointer;
  font-size: 0.95rem;
  color: #475569;
}
.panel-close:hover { background: #e2e8f0; }

.panel h2 {
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
  padding-right: 2rem;
}
.panel .panel-actor {
  font-size: 0.75rem;
  color: #64748b;
  margin-bottom: 1.1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #f1f5f9;
}
.panel .sec-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #94a3b8;
  margin: 1rem 0 0.35rem;
}
.panel ul {
  padding-left: 1.1rem;
  font-size: 0.83rem;
  line-height: 1.75;
  color: #334155;
}
.panel ul li { margin-bottom: 0.25rem; }
.panel a { color: #2563eb; font-size: 0.82rem; }

/* ── Flux global en bas ── */
.global-flow {
  max-width: 1600px;
  margin: 2.5rem auto 0;
  background: white;
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}
.global-flow h3 {
  font-size: 0.85rem;
  font-weight: 700;
  color: #475569;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.gf-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
}
.gf-item {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f8fafc;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid #e2e8f0;
}
.gf-arrow {
  width: 28px;
  height: 2px;
  background: #94a3b8;
  position: relative;
  flex-shrink: 0;
}
.gf-arrow::after {
  content: '';
  position: absolute;
  right: -1px; top: -4px;
  border: 5px solid transparent;
  border-left-color: #94a3b8;
}
.gf-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

.sync-note {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.8rem;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

@media print {
  .group, .module, .global-flow, .page-header {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .modules {
    flex-wrap: wrap;
    gap: 1.5rem;
  }
  .mod-arrow {
    display: none;
  }
}

/* Workflow Sessions Grid */
.workflow-grid {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    margin: 3rem 0;
}

.workflow-card {
    background: white;
    border-radius: 16px;
    border: 1px solid var(--color-border);
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.workflow-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.1);
}

.workflow-card__header {
    background: linear-gradient(135deg, var(--color-primary-light), #ffffff);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    border-bottom: 1px solid var(--color-border);
}

.workflow-card__icon {
    width: 48px;
    height: 48px;
    background: white;
    color: var(--color-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.15);
}

.workflow-card__title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text);
}

.workflow-card__body {
    padding: 1.5rem;
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 2rem;
    align-items: center;
}

.workflow-card__text {
    font-size: 1rem;
    color: var(--color-text-muted);
}

.workflow-card__illustration {
    margin: 0 !important;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08) !important;
}

@media (max-width: 900px) {
    .workflow-card__body {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* ============================================================
   TUTORIELS VIDÉO (LECTEUR COMPAGNON)
   ============================================================ */
.video-companion {
    float: right;
    width: 320px;
    margin-left: 2rem;
    margin-bottom: 1.5rem;
    background: white;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid var(--color-border);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-companion:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    border-color: var(--color-primary);
}

.video-companion-thumb {
    position: relative;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 10px;
}

.video-companion-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9;
}

.video-companion-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(30, 41, 59, 0.4);
    color: white;
    font-size: 2rem;
    transition: background 0.3s;
}

.video-companion:hover .video-companion-play {
    background: rgba(37, 99, 235, 0.6);
}

.video-companion-info {
    font-size: 0.85rem;
    color: var(--color-text);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.video-companion-info i {
    color: var(--color-primary);
}

/* Modal spécial Manuel */
.manual-video-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    padding: 2rem;
}

.manual-video-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.manual-video-modal-content {
    width: 100%;
    max-width: 1000px;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.manual-video-modal-close {
    position: absolute;
    top: -45px;
    right: 0;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

@media (max-width: 800px) {
    .video-companion {
        float: none;
        width: 100%;
        margin-left: 0;
    }
}
