/* ============================================================================
   illustrations.css — IIAT Encre & Ivoire
   Illustrations SVG, séparateurs, badges de brique, animations scroll
   Complément à formation.css / formation-v4-premium.css
   ============================================================================ */

/* ============================================================================
   1. COULEURS DE BRIQUE
   ============================================================================ */

:root {
  --brique-00: #7A2E2E;
  --brique-00-soft: #F4E8E0;
  --brique-01: #2563EB;
  --brique-01-soft: #EFF6FF;
  --brique-02: #059669;
  --brique-02-soft: #ECFDF5;
  --brique-03: #7C3AED;
  --brique-03-soft: #F5F3FF;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brique-00: #C58A8A;
    --brique-00-soft: #221919;
    --brique-01: #60A5FA;
    --brique-01-soft: #172554;
    --brique-02: #34D399;
    --brique-02-soft: #0D2E22;
    --brique-03: #A78BFA;
    --brique-03-soft: #1E1638;
  }
}

/* ============================================================================
   2. BADGES DE BRIQUE
   ============================================================================ */

.he-badge--brique-00 {
  background: var(--brique-00);
  color: #fff;
}
.he-badge--brique-01 {
  background: var(--brique-01);
  color: #fff;
}
.he-badge--brique-02 {
  background: var(--brique-02);
  color: #fff;
}
.he-badge--brique-03 {
  background: var(--brique-03);
  color: #fff;
}

/* ============================================================================
   3. HERO ILLUSTRATIONS — fond subtil sur .he-article-header
   Ciblage par data-attribute : <div class="he-article-header" data-brique="00">
   ============================================================================ */

.he-article-header[data-brique]::before {
  content: '';
  position: absolute;
  right: -2rem;
  bottom: -2rem;
  width: 320px;
  height: 320px;
  opacity: 0.06;
  pointer-events: none;
  z-index: 0;
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
}

/* Brique 00 — Souveraineté : bouclier européen + réseau */
.he-article-header[data-brique="00"]::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200' fill='none' stroke='%23ffffff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3C!-- Bouclier --%3E%3Cpath d='M100 20 L160 50 L160 110 Q160 160 100 185 Q40 160 40 110 L40 50 Z'/%3E%3C!-- Etoiles EU --%3E%3Ccircle cx='100' cy='45' r='3' fill='%23ffffff' stroke='none'/%3E%3Ccircle cx='118' cy='50' r='3' fill='%23ffffff' stroke='none'/%3E%3Ccircle cx='130' cy='65' r='3' fill='%23ffffff' stroke='none'/%3E%3Ccircle cx='130' cy='85' r='3' fill='%23ffffff' stroke='none'/%3E%3Ccircle cx='118' cy='100' r='3' fill='%23ffffff' stroke='none'/%3E%3Ccircle cx='100' cy='105' r='3' fill='%23ffffff' stroke='none'/%3E%3Ccircle cx='82' cy='100' r='3' fill='%23ffffff' stroke='none'/%3E%3Ccircle cx='70' cy='85' r='3' fill='%23ffffff' stroke='none'/%3E%3Ccircle cx='70' cy='65' r='3' fill='%23ffffff' stroke='none'/%3E%3Ccircle cx='82' cy='50' r='3' fill='%23ffffff' stroke='none'/%3E%3C!-- Noeuds reseau --%3E%3Ccircle cx='100' cy='130' r='5'/%3E%3Ccircle cx='75' cy='150' r='4'/%3E%3Ccircle cx='125' cy='150' r='4'/%3E%3Ccircle cx='60' cy='170' r='3'/%3E%3Ccircle cx='100' cy='165' r='3'/%3E%3Ccircle cx='140' cy='170' r='3'/%3E%3Cline x1='100' y1='135' x2='75' y2='146'/%3E%3Cline x1='100' y1='135' x2='125' y2='146'/%3E%3Cline x1='75' y1='154' x2='60' y2='167'/%3E%3Cline x1='75' y1='154' x2='100' y2='162'/%3E%3Cline x1='125' y1='154' x2='140' y2='167'/%3E%3Cline x1='125' y1='154' x2='100' y2='162'/%3E%3C/svg%3E");
}

/* Brique 01 — Sécurité : cadenas + circuits */
.he-article-header[data-brique="01"]::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200' fill='none' stroke='%23ffffff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3C!-- Cadenas --%3E%3Crect x='60' y='85' width='80' height='70' rx='8'/%3E%3Cpath d='M80 85 L80 60 Q80 35 100 35 Q120 35 120 60 L120 85'/%3E%3Ccircle cx='100' cy='115' r='8'/%3E%3Cline x1='100' y1='123' x2='100' y2='135'/%3E%3C!-- Circuits gauche --%3E%3Cline x1='60' y1='100' x2='30' y2='100'/%3E%3Ccircle cx='25' cy='100' r='3'/%3E%3Cline x1='60' y1='120' x2='40' y2='120'/%3E%3Cline x1='40' y1='120' x2='40' y2='145'/%3E%3Ccircle cx='40' cy='148' r='3'/%3E%3Cline x1='60' y1='140' x2='20' y2='140'/%3E%3Cline x1='20' y1='140' x2='20' y2='165'/%3E%3Ccircle cx='20' cy='168' r='3'/%3E%3C!-- Circuits droite --%3E%3Cline x1='140' y1='100' x2='170' y2='100'/%3E%3Ccircle cx='175' cy='100' r='3'/%3E%3Cline x1='140' y1='120' x2='160' y2='120'/%3E%3Cline x1='160' y1='120' x2='160' y2='145'/%3E%3Ccircle cx='160' cy='148' r='3'/%3E%3Cline x1='140' y1='140' x2='180' y2='140'/%3E%3Cline x1='180' y1='140' x2='180' y2='165'/%3E%3Ccircle cx='180' cy='168' r='3'/%3E%3C!-- Circuits haut --%3E%3Cline x1='90' y1='35' x2='90' y2='15'/%3E%3Ccircle cx='90' cy='12' r='3'/%3E%3Cline x1='110' y1='35' x2='110' y2='20'/%3E%3Cline x1='110' y1='20' x2='130' y2='20'/%3E%3Ccircle cx='133' cy='20' r='3'/%3E%3C/svg%3E");
}

/* Brique 02 — RGPD : document + sceau */
.he-article-header[data-brique="02"]::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200' fill='none' stroke='%23ffffff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3C!-- Document --%3E%3Cpath d='M55 20 L130 20 L145 35 L145 175 L55 175 Z'/%3E%3Cpath d='M130 20 L130 35 L145 35'/%3E%3C!-- Lignes de texte --%3E%3Cline x1='70' y1='55' x2='130' y2='55'/%3E%3Cline x1='70' y1='70' x2='125' y2='70'/%3E%3Cline x1='70' y1='85' x2='115' y2='85'/%3E%3Cline x1='70' y1='100' x2='120' y2='100'/%3E%3Cline x1='70' y1='115' x2='110' y2='115'/%3E%3C!-- Sceau de protection --%3E%3Ccircle cx='120' cy='145' r='25'/%3E%3Ccircle cx='120' cy='145' r='18'/%3E%3C!-- Coche dans le sceau --%3E%3Cpolyline points='110,145 117,152 132,137'/%3E%3C!-- Contour scallop --%3E%3Ccircle cx='120' cy='120' r='2' fill='%23ffffff' stroke='none'/%3E%3Ccircle cx='137' cy='125' r='2' fill='%23ffffff' stroke='none'/%3E%3Ccircle cx='145' cy='140' r='2' fill='%23ffffff' stroke='none'/%3E%3Ccircle cx='143' cy='155' r='2' fill='%23ffffff' stroke='none'/%3E%3Ccircle cx='133' cy='167' r='2' fill='%23ffffff' stroke='none'/%3E%3Ccircle cx='120' cy='172' r='2' fill='%23ffffff' stroke='none'/%3E%3Ccircle cx='107' cy='167' r='2' fill='%23ffffff' stroke='none'/%3E%3Ccircle cx='97' cy='155' r='2' fill='%23ffffff' stroke='none'/%3E%3Ccircle cx='95' cy='140' r='2' fill='%23ffffff' stroke='none'/%3E%3Ccircle cx='103' cy='125' r='2' fill='%23ffffff' stroke='none'/%3E%3C/svg%3E");
}

/* Brique 03 — IA Act : cerveau + cadre réglementaire */
.he-article-header[data-brique="03"]::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200' fill='none' stroke='%23ffffff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3C!-- Cadre reglementaire --%3E%3Crect x='25' y='25' width='150' height='150' rx='10' stroke-dasharray='8 4'/%3E%3C!-- Cerveau gauche --%3E%3Cpath d='M85 65 Q60 55 55 75 Q45 80 50 95 Q42 105 55 115 Q55 130 70 130 Q75 140 90 135'/%3E%3C!-- Cerveau droit --%3E%3Cpath d='M115 65 Q140 55 145 75 Q155 80 150 95 Q158 105 145 115 Q145 130 130 130 Q125 140 110 135'/%3E%3C!-- Ligne mediane --%3E%3Cpath d='M100 55 L100 140'/%3E%3C!-- Connexions neurales --%3E%3Ccircle cx='80' cy='80' r='3'/%3E%3Ccircle cx='120' cy='80' r='3'/%3E%3Ccircle cx='75' cy='105' r='3'/%3E%3Ccircle cx='125' cy='105' r='3'/%3E%3Ccircle cx='90' cy='95' r='3'/%3E%3Ccircle cx='110' cy='95' r='3'/%3E%3Cline x1='80' y1='80' x2='90' y2='95'/%3E%3Cline x1='120' y1='80' x2='110' y2='95'/%3E%3Cline x1='90' y1='95' x2='110' y2='95'/%3E%3Cline x1='75' y1='105' x2='90' y2='95'/%3E%3Cline x1='125' y1='105' x2='110' y2='95'/%3E%3C!-- Paragraphes reglementaires --%3E%3Cline x1='50' y1='155' x2='90' y2='155'/%3E%3Cline x1='50' y1='163' x2='80' y2='163'/%3E%3Cline x1='110' y1='155' x2='150' y2='155'/%3E%3Cline x1='120' y1='163' x2='150' y2='163'/%3E%3C/svg%3E");
}

/* ============================================================================
   4. ICÔNES CALLOUT — remplacent les emojis par des SVG propres
   ============================================================================ */

.he-callout--key::before {
  content: '' !important;
  display: block;
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  background: currentColor;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='7.5' cy='15.5' r='5.5'/%3E%3Cpath d='m21 2-9.6 9.6'/%3E%3Cpath d='m15.5 7.5 3 3L22 7l-3-3'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='7.5' cy='15.5' r='5.5'/%3E%3Cpath d='m21 2-9.6 9.6'/%3E%3Cpath d='m15.5 7.5 3 3L22 7l-3-3'/%3E%3C/svg%3E");
  mask-size: contain;
  -webkit-mask-size: contain;
  mask-repeat: no-repeat;
  -webkit-mask-repeat: no-repeat;
}

.he-callout--glossary::before {
  content: '' !important;
  display: block;
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  background: currentColor;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19.5A2.5 2.5 0 0 1 6.5 17H20'/%3E%3Cpath d='M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19.5A2.5 2.5 0 0 1 6.5 17H20'/%3E%3Cpath d='M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z'/%3E%3C/svg%3E");
  mask-size: contain;
  -webkit-mask-size: contain;
  mask-repeat: no-repeat;
  -webkit-mask-repeat: no-repeat;
}

/* ============================================================================
   5. SÉPARATEURS VISUELS SVG
   ============================================================================ */

.he-separator {
  display: block;
  width: 100%;
  max-width: var(--he-max-w, 820px);
  margin: 3rem auto;
  height: 24px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: 0.15;
}

.he-separator--wave {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 24' fill='none' stroke='%237A2E2E' stroke-width='1.5' stroke-linecap='round'%3E%3Cpath d='M0 12 Q50 0 100 12 T200 12 T300 12 T400 12 T500 12 T600 12 T700 12 T800 12'/%3E%3C/svg%3E");
}

.he-separator--chevron {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 24' fill='none' stroke='%237A2E2E' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M340 4 L400 20 L460 4'/%3E%3Ccircle cx='320' cy='12' r='2' fill='%237A2E2E'/%3E%3Ccircle cx='480' cy='12' r='2' fill='%237A2E2E'/%3E%3Cline x1='0' y1='12' x2='310' y2='12'/%3E%3Cline x1='490' y1='12' x2='800' y2='12'/%3E%3C/svg%3E");
}

.he-separator--diamond {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 24' fill='none' stroke='%237A2E2E' stroke-width='1.5'%3E%3Cline x1='0' y1='12' x2='365' y2='12'/%3E%3Crect x='388' y='0' width='24' height='24' rx='3' transform='rotate(45 400 12)'/%3E%3Cline x1='435' y1='12' x2='800' y2='12'/%3E%3C/svg%3E");
}

.he-separator--dots {
  height: 8px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 8'%3E%3Ccircle cx='80' cy='4' r='2.5' fill='%237A2E2E'/%3E%3Ccircle cx='100' cy='4' r='2.5' fill='%237A2E2E'/%3E%3Ccircle cx='120' cy='4' r='2.5' fill='%237A2E2E'/%3E%3C/svg%3E");
}

/* Séparateurs auto entre sections majeures h2 */
.he-article-corps h2 {
  position: relative;
}
.he-article-corps h2:not(:first-of-type)::before {
  content: '';
  display: block;
  width: 100%;
  height: 20px;
  margin-bottom: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 20' fill='none'%3E%3Cline x1='0' y1='10' x2='260' y2='10' stroke='%237A2E2E' stroke-width='0.5' opacity='0.3'/%3E%3Cpath d='M275 4 L300 16 L325 4' stroke='%237A2E2E' stroke-width='1' fill='none' opacity='0.4'/%3E%3Cline x1='340' y1='10' x2='600' y2='10' stroke='%237A2E2E' stroke-width='0.5' opacity='0.3'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: 0.6;
}

/* ============================================================================
   6. ANIMATIONS SCROLL — classes appliquées par animations.js
   ============================================================================ */

.he-animate {
  opacity: 0;
  transition: opacity 0.6s cubic-bezier(0.2, 0.7, 0.2, 1),
              transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.he-animate.he-visible {
  opacity: 1;
  transform: none;
}

.he-animate--fade-up {
  transform: translateY(24px);
}

.he-animate--slide-left {
  transform: translateX(-20px);
}

.he-animate--scale {
  transform: scale(0.95);
}

.he-animate--fade {
  transform: none;
}

/* Stagger pour les cartes — délais appliqués en JS via --stagger-delay */
.he-animate--stagger {
  transform: translateY(16px);
  transition-delay: var(--stagger-delay, 0ms);
}

/* ============================================================================
   7. RESPECT prefers-reduced-motion
   ============================================================================ */

@media (prefers-reduced-motion: reduce) {
  .he-animate {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .he-article-header[data-brique]::before {
    animation: none;
  }

  .he-article-corps h2:not(:first-of-type)::before {
    opacity: 0.3;
  }
}

/* ============================================================================
   8. SCHÉMAS PÉDAGOGIQUES SVG
   ============================================================================ */

.he-schema {
  margin: 2.5rem 0;
  padding: 1.5rem;
  background: #FAFAF8;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  overflow-x: auto;
}

.he-schema__svg {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  font-family: 'Inter', system-ui, sans-serif;
}

.he-schema__caption {
  display: block;
  text-align: center;
  margin-top: 1rem;
  font-size: .82rem;
  color: #6B7280;
  font-style: italic;
  line-height: 1.5;
}

/* ============================================================================
   9. RESPONSIVE
   ============================================================================ */

@media (max-width: 768px) {
  .he-article-header[data-brique]::before {
    width: 200px;
    height: 200px;
    right: -1rem;
    bottom: -1rem;
    opacity: 0.04;
  }

  .he-separator {
    margin: 2rem auto;
  }
}
/* Encadré rouge « Un point de départ » (31/10/2026, TEXTES-RESSOURCES-SECURITE § 1 bis) : bordure et titre rouges, texte foncé ; contraste AA mesuré dans les deux thèmes */
.iiat-depart{margin:1.5rem 0;padding:1rem 1.25rem;border:2px solid #B42318;border-left-width:6px;border-radius:8px;background:#FFF5F5;color:#1A1F2B;text-align:left;font-size:1rem;line-height:1.6}
.iiat-depart p{margin:0 0 .6rem;color:inherit}
.iiat-depart p:last-child{margin-bottom:0}
.iiat-depart .iiat-depart__titre{color:#B42318;font-weight:700;font-size:1.05rem;letter-spacing:0;text-transform:none}
.iiat-depart .iiat-depart__citation{font-style:italic}
