/* ═══════════════════════════════════════════════════════════════
   ObjectifCyber — components.css
   Module cards · Audience tabs · Accordéon · Modals · Démos
   ═══════════════════════════════════════════════════════════════ */

/* ═══ MODULE CARD ═══ */
.module-card {
  background: var(--white);
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.module-card::before {
  content: '';
  display: block;
  height: 4px;
  background: var(--accent, var(--blue));
}

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

.module-card.done {
  border-color: var(--success);
}

.module-card.done::before {
  background: var(--success);
}

.module-card-inner {
  padding: var(--sp-5);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.module-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-3);
}

.module-number {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
}

.module-duration {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-light);
}

.module-icon {
  font-size: 2rem;
  margin-bottom: var(--sp-3);
  line-height: 1;
}

.module-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: var(--sp-2);
  line-height: 1.3;
}

.module-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  flex: 1;
  margin-bottom: var(--sp-4);
}

.module-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1);
  margin-bottom: var(--sp-4);
}

.module-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: var(--sp-4);
  border-top: 1px solid var(--gray-100);
}

.module-status {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.module-card.done .module-status {
  color: var(--success);
}

.btn-module {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: 7px 14px;
  background: var(--navy);
  color: var(--white);
  border-radius: var(--r-sm);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: background var(--dur-fast) var(--ease);
}

.btn-module:hover {
  background: var(--blue);
}

/* ═══ AUDIENCE CARD (hub parcours / accueil) ═══ */
.audience-card {
  background: var(--white);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
  padding: var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
  position: relative;
  overflow: hidden;
}

.audience-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent, var(--blue));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur) var(--ease);
}

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

.audience-card:hover::after { transform: scaleX(1); }

.audience-card-icon {
  font-size: 2.5rem;
  line-height: 1;
}

.audience-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
}

.audience-card-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
  flex: 1;
}

.audience-card-modules {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1);
  margin-top: var(--sp-2);
}

.audience-card-modules span {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  background: var(--gray-50);
  border-radius: 20px;
  color: var(--text-muted);
}

.btn-audience {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--navy);
  color: var(--white);
  border-radius: var(--r-sm);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: background var(--dur-fast);
}

.btn-audience:hover { background: var(--blue); }

/* ═══ ONGLETS AUDIENCE (dans les modules) ═══ */
.audience-tabs {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
  border-bottom: 2px solid var(--gray-100);
  margin-bottom: var(--sp-5);
}

.tab-btn {
  padding: 8px 16px;
  border: none;
  background: none;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  border-radius: var(--r-sm) var(--r-sm) 0 0;
  transition: color var(--dur-fast), border-color var(--dur-fast), background var(--dur-fast);
}

.tab-btn:hover {
  color: var(--navy);
  background: var(--gray-50);
}

.tab-btn.active {
  color: var(--blue);
  border-bottom-color: var(--blue);
  background: var(--info-bg);
}

.tab-content {
  display: none;
  padding: var(--sp-5);
  background: var(--gray-50);
  border-radius: 0 var(--r-sm) var(--r-sm) var(--r-sm);
  border: 1px solid var(--gray-100);
  font-size: 0.93rem;
  line-height: 1.65;
  animation: fadeIn var(--dur-fast) var(--ease);
}

.tab-content.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ═══ ACCORDÉON FAQ ═══ */
.accordion {
  border: 1px solid var(--gray-200);
  border-radius: var(--r);
  overflow: hidden;
}

.accordion-item {
  border-bottom: 1px solid var(--gray-200);
}

.accordion-item:last-child { border-bottom: none; }

.accordion-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: var(--sp-5) var(--sp-6);
  background: var(--white);
  border: none;
  cursor: pointer;
  text-align: left;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--navy);
  transition: background var(--dur-fast);
  gap: var(--sp-4);
}

.accordion-trigger:hover { background: var(--gray-50); }

.accordion-trigger[aria-expanded="true"] { background: var(--info-bg); color: var(--blue); }

.accordion-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  transition: transform var(--dur) var(--ease), background var(--dur-fast);
  line-height: 1;
}

.accordion-trigger[aria-expanded="true"] .accordion-icon {
  transform: rotate(45deg);
  background: var(--blue);
  color: var(--white);
}

.accordion-content {
  display: none;
  padding: 0 var(--sp-6) var(--sp-5);
  font-size: 0.93rem;
  color: var(--text-muted);
  line-height: 1.65;
  background: var(--white);
}

.accordion-content.open { display: block; }

.accordion-category-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--teal);
  padding: var(--sp-4) var(--sp-6) var(--sp-2);
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-100);
}

/* ═══ DEMO INTERACTIVE — BASE ═══ */
.demo-container {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--r-lg);
  padding: var(--sp-8);
  margin-block: var(--sp-8);
}

.demo-title {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
}

.demo-title h3 {
  font-size: 1rem;
  color: var(--navy);
}

.demo-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: 3px 10px;
  background: var(--navy);
  color: var(--white);
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.demo-feedback {
  margin-top: var(--sp-5);
  padding: var(--sp-4) var(--sp-5);
  border-radius: var(--r-sm);
  font-size: 0.9rem;
  line-height: 1.6;
  display: none;
}

.demo-feedback.show { display: block; }
.demo-feedback.correct { background: var(--success-bg); border-left: 4px solid var(--success); color: var(--success); }
.demo-feedback.incorrect { background: var(--danger-bg); border-left: 4px solid var(--danger); color: var(--danger); }
.demo-feedback.neutral { background: var(--info-bg); border-left: 4px solid var(--info); color: var(--navy); }

/* ═══ DEMO — EMAIL SIMULÉ (M03) ═══ */
.email-sim {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--r);
  overflow: hidden;
  max-width: 580px;
  margin-inline: auto;
  box-shadow: var(--shadow-md);
}

.email-sim-header {
  background: var(--gray-50);
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--gray-200);
}

.email-sim-header .field {
  display: flex;
  gap: var(--sp-3);
  font-size: 0.85rem;
  margin-bottom: var(--sp-1);
}

.email-sim-header .label {
  font-weight: 600;
  color: var(--text-muted);
  min-width: 60px;
}

.email-sim-header .val { color: var(--text); }

.email-sim-header .suspicious {
  background: var(--danger-bg);
  color: var(--danger);
  border-radius: 3px;
  padding: 1px 6px;
  cursor: help;
  position: relative;
}

.email-sim-body {
  padding: var(--sp-5);
  font-size: 0.92rem;
  line-height: 1.65;
}

.email-sim-body .clue {
  background: rgba(229,91,4,.15);
  border-bottom: 2px dashed var(--orange);
  cursor: pointer;
  border-radius: 2px;
  padding: 0 2px;
  transition: background var(--dur-fast);
}

.email-sim-body .clue:hover, .email-sim-body .clue.revealed {
  background: rgba(229,91,4,.3);
}

.email-sim-actions {
  display: flex;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  border-top: 1px solid var(--gray-200);
  background: var(--gray-50);
  flex-wrap: wrap;
}

/* ═══ DEMO — TESTEUR MDP (M04) ═══ */
.pwd-tester {
  max-width: 480px;
  margin-inline: auto;
}

.pwd-tester input {
  width: 100%;
  padding: var(--sp-3) var(--sp-4);
  border: 2px solid var(--gray-200);
  border-radius: var(--r-sm);
  font-size: 1rem;
  outline: none;
  transition: border-color var(--dur-fast);
  font-family: 'Fira Code', monospace;
}

.pwd-tester input:focus { border-color: var(--blue); }

.pwd-strength-bar {
  height: 6px;
  background: var(--gray-100);
  border-radius: 3px;
  margin-top: var(--sp-3);
  overflow: hidden;
}

.pwd-strength-fill {
  height: 100%;
  border-radius: 3px;
  transition: width var(--dur) var(--ease), background var(--dur) var(--ease);
  width: 0%;
}

.pwd-criteria {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-2);
  margin-top: var(--sp-4);
}

.pwd-criterion {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.pwd-criterion .criterion-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  flex-shrink: 0;
  transition: background var(--dur-fast);
}

.pwd-criterion.ok .criterion-icon {
  background: var(--success);
  color: var(--white);
}

.pwd-criterion.ok { color: var(--success); }

.pwd-time {
  margin-top: var(--sp-4);
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.pwd-time strong { font-size: 1.1rem; }

/* ═══ DEMO — URL INSPECTOR (M06) ═══ */
.url-inspector {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.url-item {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-4);
  background: var(--white);
  border: 2px solid var(--gray-200);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: border-color var(--dur-fast), background var(--dur-fast);
}

.url-item:hover { border-color: var(--blue); background: var(--info-bg); }

.url-item code {
  font-family: 'Fira Code', monospace;
  font-size: 0.85rem;
  flex: 1;
  word-break: break-all;
}

.url-item .url-badge {
  flex-shrink: 0;
  display: none;
}

.url-item.legit  { border-color: var(--success); background: var(--success-bg); }
.url-item.suspect{ border-color: var(--danger);  background: var(--danger-bg);  }

.url-item.legit  .url-badge { display: flex; }
.url-item.suspect .url-badge { display: flex; }

/* ═══ STAT BAND ═══ */
.stat-band {
  background: var(--navy);
  border-radius: var(--r);
  display: flex;
  flex-wrap: wrap;
  overflow: hidden;
}

.stat-band-item {
  flex: 1 1 140px;
  padding: var(--sp-6) var(--sp-5);
  text-align: center;
  border-right: 1px solid rgba(255,255,255,.1);
}

.stat-band-item:last-child { border-right: none; }

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

.stat-band-item .desc {
  font-size: 0.78rem;
  color: rgba(255,255,255,.65);
  line-height: 1.4;
}

/* ═══ STEP / TIMELINE ═══ */
.steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

.steps::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--gray-200);
}

.step {
  display: flex;
  gap: var(--sp-5);
  padding-bottom: var(--sp-6);
  position: relative;
}

.step-num {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--blue);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9rem;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  border: 3px solid var(--white);
  box-shadow: var(--shadow-sm);
}

.step-content { flex: 1; padding-top: var(--sp-2); }
.step-content h4 { margin-bottom: var(--sp-2); }
.step-content p { font-size: 0.9rem; color: var(--text-muted); }

/* ═══ TIMELINE (Veille Cyber) ═══ */
.timeline-list {
  list-style: none;
  position: relative;
  padding-left: 44px;
}

.timeline-list::before {
  content: '';
  position: absolute;
  left: 16px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--gray-200);
}

.timeline-list li {
  position: relative;
  padding-bottom: var(--sp-6);
}

.timeline-list li::before {
  content: '';
  position: absolute;
  left: -36px;
  top: 6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--blue);
  border: 3px solid var(--white);
  box-shadow: 0 0 0 2px var(--blue);
}

.timeline-date {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: var(--sp-1);
}

.timeline-event {
  font-weight: 700;
  color: var(--navy);
  margin-bottom: var(--sp-2);
}

.timeline-body {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ═══ MODAL ═══ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(12,27,51,.7);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-4);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur) var(--ease), visibility var(--dur);
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--white);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: var(--sp-8);
  position: relative;
  transform: translateY(16px);
  transition: transform var(--dur) var(--ease);
}

.modal-overlay.open .modal { transform: translateY(0); }

.modal-close {
  position: absolute;
  top: var(--sp-4);
  right: var(--sp-4);
  width: 32px;
  height: 32px;
  border: none;
  background: var(--gray-100);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--text-muted);
  transition: background var(--dur-fast);
}

.modal-close:hover { background: var(--gray-200); }

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

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

.article-card-header {
  height: 6px;
  background: var(--accent, var(--blue));
}

.article-card-body {
  padding: var(--sp-6);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
  font-size: 0.8rem;
  color: var(--text-light);
}

.article-meta .read-time { display: flex; align-items: center; gap: var(--sp-1); }

.article-card h3 {
  font-size: 1.05rem;
  margin-bottom: var(--sp-3);
  line-height: 1.35;
}

.article-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
  margin-bottom: var(--sp-5);
}

.btn-article {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--blue);
  text-decoration: none;
  transition: gap var(--dur-fast);
}

.btn-article:hover { gap: var(--sp-3); }

/* ═══ PARCOURS CARD ═══ */
.parcours-card {
  background: var(--white);
  border-radius: var(--r-lg);
  padding: var(--sp-8);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
}

.parcours-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  margin-bottom: var(--sp-3);
}

.parcours-modules-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  margin-bottom: var(--sp-6);
}

.parcours-module-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--gray-50);
  border-radius: var(--r-sm);
  border: 1px solid var(--gray-100);
  text-decoration: none;
  color: var(--text);
  transition: background var(--dur-fast), border-color var(--dur-fast);
}

.parcours-module-item:hover {
  background: var(--info-bg);
  border-color: var(--blue);
}

.parcours-module-num {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--white);
  background: var(--blue);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.parcours-module-info { flex: 1; }
.parcours-module-info strong { display: block; font-size: 0.88rem; }
.parcours-module-info span { font-size: 0.78rem; color: var(--text-muted); }

/* ═══ SITUATION CARD ═══ */
.situation-card {
  background: var(--navy);
  border-radius: var(--r);
  padding: var(--sp-6);
  color: var(--white);
}

.situation-icon { font-size: 2rem; margin-bottom: var(--sp-3); }
.situation-card h4 { color: var(--white); margin-bottom: var(--sp-2); }
.situation-card p { font-size: 0.88rem; color: rgba(255,255,255,.75); }
