/* ═══════════════════════════════════════════════════════════════
   ObjectifCyber — global.css
   Variables CSS · Reset · Typographie · Grid · Utilitaires
   ═══════════════════════════════════════════════════════════════ */

/* ═══ VARIABLES ═══ */
:root {
  /* Palette primaire */
  --navy:        #0C1B33;
  --navy-2:      #152540;
  --navy-3:      #1C3152;
  --blue:        #1A6FC4;
  --blue-light:  #2E88E0;
  --teal:        #0D8A7E;
  --teal-light:  #12A898;
  --orange:      #E55B04;
  --orange-lt:   #F07030;

  /* Sémantiques */
  --success:     #0C7E56;
  --success-bg:  #EAFAF1;
  --warning:     #C47A00;
  --warning-bg:  #FEF9EC;
  --danger:      #B83232;
  --danger-bg:   #FDF0F0;
  --info:        #1A6FC4;
  --info-bg:     #EBF4FF;

  /* Neutres */
  --white:       #FFFFFF;
  --off-white:   #F5F7FA;
  --gray-50:     #F0F2F5;
  --gray-100:    #E8ECF1;
  --gray-200:    #D4DAE4;
  --gray-400:    #8896AB;
  --gray-600:    #445566;
  --gray-800:    #1E2D3D;

  /* Texte */
  --text:        #0C1B33;
  --text-muted:  #526070;
  --text-light:  #7A8CA0;

  /* Ombres */
  --shadow-xs:   0 1px 2px rgba(12,27,51,.06);
  --shadow-sm:   0 2px 6px rgba(12,27,51,.08);
  --shadow-md:   0 6px 20px rgba(12,27,51,.10);
  --shadow-lg:   0 16px 48px rgba(12,27,51,.13);

  /* Rayons */
  --r-sm:  8px;
  --r:     12px;
  --r-lg:  18px;
  --r-xl:  24px;

  /* Espacements */
  --sp-1:  4px;
  --sp-2:  8px;
  --sp-3:  12px;
  --sp-4:  16px;
  --sp-5:  20px;
  --sp-6:  24px;
  --sp-8:  32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;
  --sp-20: 80px;

  /* Transitions */
  --ease: cubic-bezier(.4,0,.2,1);
  --dur-fast: 150ms;
  --dur: 250ms;
  --dur-slow: 400ms;

  /* Layout */
  --container: 1200px;
  --container-sm: 800px;
  --header-h: 68px;
}

/* ═══ RESET ═══ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
table { border-collapse: collapse; }

/* ═══ TYPOGRAPHIE ═══ */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--navy);
  letter-spacing: -0.3px;
}

h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); font-weight: 800; letter-spacing: -0.5px; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.35rem); }
h4 { font-size: 1.05rem; }
h5 { font-size: 0.95rem; }

p { margin-bottom: var(--sp-4); }
p:last-child { margin-bottom: 0; }

strong { font-weight: 600; }
em { font-style: italic; }

.mono {
  font-family: 'Fira Code', 'Cascadia Code', monospace;
  font-size: 0.9em;
}

/* ═══ LIENS ═══ */
.link {
  color: var(--blue);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--dur-fast) var(--ease);
}
.link:hover { color: var(--blue-light); }

/* ═══ CONTENEUR ═══ */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--sp-6);
}

.container-sm {
  width: 100%;
  max-width: var(--container-sm);
  margin-inline: auto;
  padding-inline: var(--sp-6);
}

/* ═══ GRILLE ═══ */
.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); gap: var(--sp-6); }
.grid-3 { grid-template-columns: repeat(3, 1fr); gap: var(--sp-6); }
.grid-4 { grid-template-columns: repeat(4, 1fr); gap: var(--sp-6); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--sp-6); }
.grid-auto-sm { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--sp-5); }

/* ═══ FLEXBOX UTILITAIRES ═══ */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--sp-2); }
.gap-3 { gap: var(--sp-3); }
.gap-4 { gap: var(--sp-4); }
.gap-6 { gap: var(--sp-6); }
.gap-8 { gap: var(--sp-8); }
.flex-wrap { flex-wrap: wrap; }

/* ═══ SECTIONS ═══ */
.section {
  padding-block: var(--sp-20);
}

.section-sm {
  padding-block: var(--sp-12);
}

.section-dark {
  background: var(--navy);
  color: var(--white);
}

.section-dark h1,
.section-dark h2,
.section-dark h3,
.section-dark h4 {
  color: var(--white);
}

.section-gray {
  background: var(--off-white);
}

/* ═══ BOUTONS ═══ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 12px 24px;
  border-radius: var(--r-sm);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--dur-fast) var(--ease);
  white-space: nowrap;
  text-decoration: none;
}

.btn:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--orange);
  color: var(--white);
  border-color: var(--orange);
}
.btn-primary:hover {
  background: var(--orange-lt);
  border-color: var(--orange-lt);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--blue);
  color: var(--white);
  border-color: var(--blue);
}
.btn-secondary:hover {
  background: var(--blue-light);
  border-color: var(--blue-light);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--navy);
  border-color: var(--gray-200);
}
.btn-outline:hover {
  border-color: var(--navy);
  background: var(--gray-50);
}

.btn-outline-white {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.5);
}
.btn-outline-white:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--white);
}

.btn-ghost {
  background: transparent;
  color: var(--blue);
  border-color: transparent;
  padding-inline: var(--sp-3);
}
.btn-ghost:hover {
  background: var(--info-bg);
}

.btn-lg {
  padding: 14px 32px;
  font-size: 1.05rem;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

/* ═══ BADGES / TAGS ═══ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-blue  { background: var(--info-bg);    color: var(--blue);    }
.badge-teal  { background: #E0F5F4;            color: var(--teal);    }
.badge-orange{ background: #FEF0E6;            color: var(--orange);  }
.badge-green { background: var(--success-bg);  color: var(--success); }
.badge-red   { background: var(--danger-bg);   color: var(--danger);  }
.badge-gray  { background: var(--gray-100);    color: var(--gray-600);}

/* Audience badges */
.audience-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.audience-badge.pme       { background: var(--info-bg);   color: var(--blue);    }
.audience-badge.parents   { background: #E0F5F4;           color: var(--teal);    }
.audience-badge.aines     { background: #FEF0E6;           color: var(--orange);  }
.audience-badge.educateurs{ background: #F3E8FF;           color: #6B21A8;        }
.audience-badge.teletravail { background: var(--success-bg); color: var(--success); }
.audience-badge.organismes{ background: var(--gray-100);   color: var(--gray-600);}

/* ═══ TITRES DE SECTION ═══ */
.section-header {
  text-align: center;
  margin-bottom: var(--sp-12);
}

.section-header .overline {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--teal);
  margin-bottom: var(--sp-3);
}

.section-header h2 {
  margin-bottom: var(--sp-4);
}

.section-header p {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 620px;
  margin-inline: auto;
}

/* ═══ STAT BOXES ═══ */
.stat-box {
  text-align: center;
  padding: var(--sp-8);
  background: var(--white);
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
}

.stat-box .stat-num {
  display: block;
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--blue);
  font-family: 'Fira Code', monospace;
  line-height: 1;
  margin-bottom: var(--sp-2);
}

.stat-box .stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ═══ CARDS ═══ */
.card {
  background: var(--white);
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
  overflow: hidden;
  transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-body {
  padding: var(--sp-6);
}

/* ═══ ALERTES ═══ */
.alert {
  display: flex;
  gap: var(--sp-4);
  align-items: flex-start;
  padding: var(--sp-5);
  border-radius: var(--r-sm);
  border-left: 4px solid transparent;
  margin-block: var(--sp-5);
}

.alert-icon { font-size: 1.3rem; flex-shrink: 0; line-height: 1.4; }

.alert-info    { background: var(--info-bg);    border-color: var(--info);    }
.alert-success { background: var(--success-bg); border-color: var(--success); }
.alert-warning { background: var(--warning-bg); border-color: var(--warning); }
.alert-danger  { background: var(--danger-bg);  border-color: var(--danger);  }

.alert strong { display: block; margin-bottom: var(--sp-1); font-size: 0.95rem; }
.alert p { font-size: 0.9rem; color: var(--text); }

/* ═══ TAKEAWAY BOX ═══ */
.takeaway-box {
  display: flex;
  gap: var(--sp-4);
  align-items: flex-start;
  padding: var(--sp-5) var(--sp-6);
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
  border-radius: var(--r);
  margin-block: var(--sp-6);
}

.takeaway-icon { font-size: 1.5rem; flex-shrink: 0; }

.takeaway-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--teal-light);
  margin-bottom: var(--sp-1);
}

.takeaway-text {
  font-size: 1rem;
  font-weight: 500;
  color: var(--white);
  font-style: italic;
}

/* ═══ SCENARIO BOX ═══ */
.scenario-box {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--r);
  padding: var(--sp-5) var(--sp-6);
  margin-block: var(--sp-5);
}

.scenario-label {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--blue);
  margin-bottom: var(--sp-3);
}

.scenario-box p {
  font-size: 0.95rem;
  color: var(--text);
  font-style: italic;
}

/* ═══ CHECKLIST COCHABLE ═══ */
.checklist-interactive {
  list-style: none;
}

.checklist-interactive li {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--gray-100);
  cursor: pointer;
  transition: background var(--dur-fast);
}

.checklist-interactive li:last-child { border-bottom: none; }

.checklist-interactive li input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--success);
  cursor: pointer;
}

.checklist-interactive li label {
  font-size: 0.93rem;
  cursor: pointer;
  line-height: 1.5;
}

.checklist-interactive li.checked label {
  text-decoration: line-through;
  color: var(--text-muted);
}

/* ═══ BONNE PRATIQUE / ERREURS ═══ */
.good-practices, .common-errors {
  border-radius: var(--r-sm);
  padding: var(--sp-5);
  margin-block: var(--sp-5);
}

.good-practices {
  background: var(--success-bg);
  border-left: 4px solid var(--success);
}

.common-errors {
  background: var(--warning-bg);
  border-left: 4px solid var(--warning);
}

.good-practices h4, .common-errors h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: var(--sp-3);
}

.good-practices h4 { color: var(--success); }
.common-errors h4  { color: var(--warning); }

.good-practices ul, .common-errors ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.good-practices li, .common-errors li {
  font-size: 0.9rem;
  display: flex;
  align-items: flex-start;
  gap: var(--sp-2);
}

.good-practices li::before { content: '✓'; color: var(--success); font-weight: 700; flex-shrink: 0; }
.common-errors li::before  { content: '✗'; color: var(--warning);  font-weight: 700; flex-shrink: 0; }

/* ═══ HERO ═══ */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 60%, var(--navy-3) 100%);
  color: var(--white);
  padding-block: var(--sp-20);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 70% 50%, rgba(13,138,126,.15) 0%, transparent 70%);
  pointer-events: none;
}

.hero h1, .hero h2 { color: var(--white); }

.hero-overline {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--teal-light);
  margin-bottom: var(--sp-4);
}

.hero-sub {
  font-size: 1.15rem;
  color: rgba(255,255,255,.8);
  margin-block: var(--sp-5);
  max-width: 560px;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  gap: var(--sp-4);
  flex-wrap: wrap;
  margin-top: var(--sp-6);
}

/* ═══ ANIMATIONS ═══ */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease);
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ═══ IMPRESSION ═══ */
@media print {
  .no-print, nav, header, footer, .btn, .quiz-nav { display: none !important; }
  body { font-size: 12pt; color: #000; }
  h1, h2, h3 { color: #000; }
  .container { max-width: 100%; padding: 0; }
  a::after { content: ' (' attr(href) ')'; font-size: 0.8em; color: #555; }
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 1023px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section { padding-block: var(--sp-12); }
  .section-sm { padding-block: var(--sp-8); }
  .hero { padding-block: var(--sp-12); }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; text-align: center; }
}

@media (max-width: 479px) {
  .container { padding-inline: var(--sp-4); }
  h1 { font-size: 1.6rem; }
}
