/**
 * SimCrise - UI Components
 * Index Page Components
 * 
 * Description: Chat zone, simulation interface, timer, badges et bottom buttons
 * Usage: Import

é après layout pour composants UI
 * Version: 1.0.0
 */

/* 📋 Simulation pleine largeur */
.simulation-zone {
  position: relative !important;
  width: 100vw !important;
  left: 50% !important;
  right: 50% !important;
  margin-left: -50vw !important;
  margin-right: -50vw !important;
  max-width: none !important;
  padding: 0 !important;
  margin-bottom: 0 !important;
  box-sizing: border-box;
  overflow-x: visible !important;
  overflow-y: visible !important;
  z-index: 25000 !important;
  background: white !important;
  padding-bottom: 160px !important;
}

.simulation-zone > div:last-child {
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}

.simulation-zone > div {
  max-width: none !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}

.simulation-zone #chat {
  width: 100% !important;
  max-width: none !important;
  overflow-x: auto;
  padding: 0 !important;
  margin: 0 !important;
  padding-bottom: 20px;
}

/* Chat styles */
#chat { 
  display:flex; 
  flex-direction:column; 
  gap:16px; 
  min-height: clamp(200px, 40vh, 400px); 
  padding: 16px 0;
}

/* ─────────────────────────────────────────────────
   🔥 Mise en évidence des mots-clés importants
   ───────────────────────────────────────────────── */

.keyword-highlight {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 600;
  color: #92400e !important;
  border: 1px solid #fbbf24;
  box-shadow: 0 2px 4px rgba(251, 191, 36, 0.2);
  display: inline-block;
  margin: 0 2px;
  animation: highlightPulse 2s ease-in-out infinite;
}

.keyword-highlight.danger {
  background: linear-gradient(135deg, #fecaca 0%, #fca5a5 100%);
  color: #991b1b !important;
  border-color: #ef4444;
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.2);
}

.keyword-highlight.success {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  color: #065f46 !important;
  border-color: #10b981;
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.keyword-highlight.info {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  color: #1e40af !important;
  border-color: #3b82f6;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

@keyframes highlightPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.02);
  }
}

/* 🎨 Style messagerie professionnelle pour les messages */
.msg { 
  max-width: 75%; 
  padding: 14px 18px; 
  border-radius: 16px; 
  background: #fff; 
  line-height: 1.6; 
  white-space: pre-wrap;
  font-size: 0.95rem;
  color: #1e293b !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  position: relative;
  animation: fadeInMessage 0.3s ease-out;
}

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

/* Container pour message + avatar + timestamp */
.msg-container {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 8px;
}

.msg-container.assistant {
  flex-direction: row;
  justify-content: flex-start;
}

.msg-container.user {
  flex-direction: row-reverse;
  justify-content: flex-start;
}

/* Avatar dans les messages */
.msg-avatar {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
  border-radius: 50%;
  background: #f3f4f6;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.msg-avatar.assistant {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.msg-avatar.user {
  background: linear-gradient(135deg, #10b981, #059669);
}

/* Wrapper pour message + timestamp */
.msg-wrapper {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 75%;
}

.msg-wrapper.assistant {
  align-items: flex-start;
}

.msg-wrapper.user {
  align-items: flex-end;
}

/* Messages IA (gauche) */
.msg.assistant { 
  align-self:flex-start; 
  color: #1e293b !important;
  background: #ffffff !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 16px 16px 16px 4px;
}

/* Messages utilisateur (droite) */
.msg.user { 
  align-self:flex-end; 
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 16px 16px 4px 16px;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Timestamp relatif */
.msg-timestamp {
  font-size: 0.75rem;
  color: #9ca3af;
  padding: 0 8px;
  font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════════
   🎨 INDICATEUR DE FRAPPE IA
   ═══════════════════════════════════════════════════════════════ */

.typing-indicator {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 12px;
  margin-bottom: 16px;
  max-width: 200px;
}

.typing-indicator.active {
  display: flex;
}

.typing-avatar {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.typing-bubble {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px 16px 16px 4px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.typing-text {
  font-size: 0.85rem;
  color: #6b7280;
  font-weight: 500;
  margin-right: 4px;
}

.typing-dots {
  display: flex;
  gap: 4px;
}

.typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3b82f6;
  animation: typingAnimation 1.4s infinite;
}

.typing-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typingAnimation {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.7;
  }
  30% {
    transform: translateY(-8px);
    opacity: 1;
  }
}

.msg.thinking { 
  font-style: italic; 
  color: #4b5563 !important; 
  background:#f0f0f7;
  font-weight: 400 !important;
}

.msg.evaluation { 
  align-self:center; 
  background:#f8f9fa; 
  border:1px solid #e9ecef; 
  max-width:90%; 
  font-size:0.9rem; 
  color: #1e293b !important; /* ✅ Couleur foncée explicite */
}

/* Barre de contrôle pleine largeur */
.bar { 
  position: relative !important;
  width: 100vw !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  margin-top: 12px !important;
  margin-bottom: 0 !important;
  z-index: 10000 !important;
  border-top: 1px solid var(--line, #e5e7eb);
  background: var(--card, #ffffff);
  box-sizing: border-box !important;
  padding: 0 !important;
  overflow: hidden !important;
}

/* Input message */
#msgInput {
  flex: 1;
  min-width: 200px;
  min-height: 62px;
  max-height: 300px;
  height: auto;
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  font-size: 1.05rem;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  line-height: 1.5;
  resize: none;
  overflow-y: auto;
  transition: all 0.3s ease, height 0.1s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

#msgInput:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12), 0 4px 12px rgba(0, 0, 0, 0.08);
  outline: none;
}

/* Bouton Envoyer - Bleu primaire */
#sendBtn {
  background: linear-gradient(135deg, var(--primary, #1a3f6e), #164a83);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 12px 24px;
  align-self: flex-end;
  height: auto;
  min-height: 70px;
  font-weight: 600;
  font-size: 0.95rem;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  cursor: pointer;
  transition: var(--transition, all 0.3s ease);
  box-shadow: 0 2px 12px rgba(26, 63, 110, 0.3);
  min-width: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#sendBtn span {
  line-height: 1.4;
  text-align: center;
  white-space: nowrap;
}

#sendBtn:hover:not(:disabled) {
  background: linear-gradient(135deg, #164a83, #0f3a6b);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(26, 63, 110, 0.4);
}

#sendBtn:active {
  transform: translateY(0);
}

#sendBtn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 2px 8px rgba(26, 63, 110, 0.15);
}

/* Bouton Terminer - Rouge */
#endBtn {
  background: linear-gradient(135deg, var(--danger, #dc2626), #b91c1c);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 12px 24px;
  align-self: flex-end;
  height: auto;
  min-height: 70px;
  font-weight: 600;
  font-size: 0.95rem;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  cursor: pointer;
  transition: var(--transition, all 0.3s ease);
  box-shadow: 0 2px 12px rgba(220, 38, 38, 0.3);
  min-width: 110px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

#endBtn span {
  line-height: 1.4;
  text-align: center;
  white-space: nowrap;
}

#endBtn:hover:not(:disabled) {
  background: linear-gradient(135deg, #b91c1c, #991b1b);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(220, 38, 38, 0.4);
}

#endBtn:active {
  transform: translateY(0);
}

/* Bouton Auto Scroll */
#autoScrollToggle {
  background: linear-gradient(135deg, var(--muted, #5a5a6d), #4a4a5a);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 12px 20px;
  align-self: flex-end;
  height: auto;
  min-height: 70px;
  font-weight: 600;
  font-size: 0.88rem;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  cursor: pointer;
  transition: var(--transition, all 0.3s ease);
  box-shadow: 0 2px 12px rgba(90, 90, 109, 0.3);
  min-width: 90px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

#autoScrollToggle span {
  line-height: 1.4;
  text-align: center;
  white-space: nowrap;
}

#autoScrollToggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(90, 90, 109, 0.35);
}

#autoScrollToggle.active {
  background: linear-gradient(135deg, var(--accent, #1f6feb), #1557c7);
  box-shadow: 0 2px 8px rgba(31, 111, 235, 0.25);
}

#autoScrollToggle.active:hover {
  background: linear-gradient(135deg, #1557c7, #1048a3);
  box-shadow: 0 4px 12px rgba(31, 111, 235, 0.35);
}

/* Tooltips personnalisés */
.custom-tooltip {
  position: fixed !important;
  background: #333;
  color: white;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  line-height: 1.4;
  z-index: 50000 !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  max-width: 400px;
  word-wrap: break-word;
  white-space: normal;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.custom-tooltip.show {
  opacity: 1;
}

/* 🚑 Styles spécifiques PSE */
.pse-welcome {
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe) !important;
  border-left: 4px solid #0ea5e9 !important;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.15);
}

.pse-welcome strong {
  color: #0369a1 !important;
}

/* Notification en mode correction */
.correction-notice {
  background: linear-gradient(135deg, #1f6feb 60%, #2a4f7e 100%);
  color: #fff;
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 16px;
  text-align: center;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(31, 111, 235, 0.18);
}

.correction-notice .icon {
  font-size: 1.2rem;
  margin-right: 8px;
}

/* Toast notifications */
#toast { 
  position: fixed; 
  right: 16px; 
  bottom: 16px; 
  background: #111827; 
  color: #fff; 
  padding: 10px 12px; 
  border-radius: 8px; 
  opacity: 0; 
  transition: opacity .2s; 
  z-index: 19999;
}

#toast.show { opacity:1; }

@media (max-width: 600px) {
  #toast {
    bottom: 90px;
    right: 20px;
  }
  
  /* 📱 Messages optimisés mobile */
  .simulation-zone .msg {
    color: #000000 !important;
    font-weight: 600 !important;
    font-size: 16px !important;
    line-height: 1.5 !important;
    max-width: 95% !important;
    margin: 0 auto !important;
  }
  
  .simulation-zone .msg.assistant {
    background: #ffffff !important;
    border: 2px solid #e5e7eb !important;
  }
  
  .simulation-zone .msg.user {
    background: #bfdbfe !important;
    color: #000000 !important;
  }
  
  .simulation-zone .msg.thinking {
    color: #374151 !important;
    background: #f9fafb !important;
    font-weight: 500 !important;
    max-width: 95% !important;
  }
}

@media (max-width: 480px) {
  .simulation-zone .msg {
    max-width: 98% !important;
    margin: 0 1% !important;
  }
  
  .simulation-zone .msg.assistant,
  .simulation-zone .msg.user {
    max-width: 98% !important;
    align-self: stretch !important;
  }
}

/* ========================================
   ✅ NOUVELLES CLASSES RÉUTILISABLES
   Extraction des styles inline répétitifs
   ======================================== */

/* 🎨 Logo et Images */
.logo-main {
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: contain;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  transition: all 0.4s ease;
  display: block;
}

.logo-main:hover {
  transform: scale(1.02);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.logo-partner {
  max-height: 150px;
  height: auto;
  object-fit: contain;
  cursor: pointer;
}

/* 📦 Conteneurs */
.container-centered {
  text-align: center;
  margin-bottom: 32px;
  padding: 0;
  overflow: visible;
}

.container-content {
  margin-top: 48px;
  padding: 32px 24px;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

.text-content {
  margin-bottom: 20px;
}

/* 📝 Textes et Typographie */
.text-intro {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.6;
  color: #4a5568;
  font-weight: 500;
  text-align: justify;
}

.text-subtitle {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: clamp(0.2px, 0.5vw, 0.5px);
  line-height: 1.4;
  text-align: center;
  padding: 0 var(--space-xs);
}

.text-center {
  text-align: center;
}

.text-strong {
  color: #2d3748;
}

.text-highlight {
  font-weight: 600;
  color: #718096;
}

/* 🔗 Liens interactifs */
.link-interactive {
  display: inline-block;
  transition: transform 0.2s ease;
  text-decoration: none;
}

.link-interactive:hover {
  transform: scale(1.05);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
/* NOTE: CSS d'orientation déplacé vers ligne ~1110 pour meilleure organisation */
/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* ℹ️ Aide et conseils */
.orientation-help {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 16px;
  margin-top: 24px;
  font-size: 0.85rem;
  color: #666;
}

/* 🎨 Bottom Buttons - Admin, Correcteur, Dashboard */
.btn-bottom {
  border: none;
  padding: 14px 24px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 160px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: white;
}

.btn-bottom-dashboard {
  background: linear-gradient(135deg, #1a3f6e, #0f2a4a);
  box-shadow: 0 6px 20px rgba(26, 63, 110, 0.35);
}

.btn-bottom-dashboard:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 10px 30px rgba(26, 63, 110, 0.45);
}

.btn-bottom-corrector {
  background: linear-gradient(135deg, #9badc2, #7a8fa5);
  box-shadow: 0 6px 20px rgba(155, 173, 194, 0.35);
}

.btn-bottom-corrector:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 10px 30px rgba(155, 173, 194, 0.45);
}

.btn-bottom-admin {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  box-shadow: 0 6px 20px rgba(220, 38, 38, 0.35);
}

.btn-bottom-admin:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 10px 30px rgba(220, 38, 38, 0.45);
}

/* ============================================ */
/* SECTIONS PSC1 & PSE                          */
/* ============================================ */

/* Section PSC1 - Premier Secours Citoyen */
.section-card-psc {
  border: 3px solid #8C3048;
  background: linear-gradient(135deg, #f8f5f6 0%, #f2eff0 100%);
}

.section-badge-psc {
  background: #8C3048;
  box-shadow: 0 2px 8px rgba(140, 48, 72, 0.3);
}

.section-title-psc {
  color: #8C3048;
  text-shadow: 0 1px 2px rgba(140, 48, 72, 0.1);
}

.section-description-psc {
  color: #2c4f6e;
}

/* Input group PSC1 */
.input-group-flex-psc {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 15px;
}

.input-group-flex-psc input {
  width: 250px;
  padding: 12px 16px;
  border: 2px solid #8C3048;
  border-radius: 10px;
  font-size: 1rem;
  background: #F2F2F2;
}

.input-group-flex-psc button {
  background: linear-gradient(135deg, #8C3048, #BF2424);
  color: #F2F2F2;
  padding: 14px 20px;
  border-radius: 10px;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(140, 48, 72, 0.4);
  flex: 1;
  min-width: 240px;
  font-size: 1rem;
  border: none;
}

.input-group-flex-psc button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Consent box PSC1 */
.consent-box-psc {
  background: #f8f5f6;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #8C3048;
  margin-bottom: 12px;
}

.consent-text-psc {
  color: #1e293b;
  font-weight: 500;
}

.consent-link-psc {
  color: #8C3048;
  text-decoration: underline;
  font-weight: 600;
}

.consent-checkbox-psc {
  margin-top: 2px;
  cursor: pointer;
  accent-color: #8C3048;
}

.section-footer-psc {
  margin-top: 15px;
  text-align: center;
  font-size: 0.9rem;
  color: #2c4f6e;
  font-weight: 500;
}

.section-footer-psc div:not(:first-child) {
  margin-top: 4px;
}

/* Section PSE - Premier Secours en Équipe */
.section-card-pse {
  margin-top: 64px;
  border: 3px solid #8C3048;
  background: linear-gradient(135deg, #f8f5f6 0%, #f2eff0 100%);
}

.section-badge-pse {
  background: #8C3048;
  box-shadow: 0 2px 8px rgba(140, 48, 72, 0.3);
  z-index: 10;
}

.section-title-pse {
  color: #8C3048;
  text-shadow: 0 1px 2px rgba(140, 48, 72, 0.1);
}

.section-description-pse {
  color: #2c4f6e;
}

/* Bannière "Disponible" PSE */
.banner-new-feature {
  background: linear-gradient(135deg, #059669, #047857);
  color: white;
  padding: 12px 16px;
  border-radius: 8px;
  text-align: center;
  margin-bottom: 16px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.banner-new-feature-subtitle {
  font-size: 0.85rem;
  margin-top: 4px;
  font-weight: 400;
}

/* Input group PSE */
.input-group-flex-pse {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 15px;
}

.input-group-flex-pse input {
  width: 250px;
  padding: 12px 16px;
  border: 2px solid #059669;
  border-radius: 10px;
  font-size: 1rem;
  background: #ffffff;
  color: #1f2937;
}

.input-group-flex-pse button {
  background: linear-gradient(135deg, #059669, #047857);
  color: #ffffff;
  padding: 14px 20px;
  border-radius: 10px;
  font-weight: 700;
  flex: 1;
  min-width: 240px;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

/* Consent box PSE */
.consent-box-pse {
  background: #ecfdf5;
  padding: 12px;
  border-radius: 8px;
  border: 2px solid #059669;
  margin-bottom: 12px;
}

.consent-text-pse {
  color: #065f46;
  font-weight: 500;
}

.consent-link-pse {
  color: #047857;
  text-decoration: underline;
  font-weight: 600;
}

.consent-checkbox-pse {
  margin-top: 2px;
  cursor: pointer;
  accent-color: #059669;
  width: 18px;
  height: 18px;
}

.section-footer-pse {
  margin-top: 15px;
  text-align: center;
  font-size: 0.9rem;
  color: #6b7280;
  font-weight: 500;
}

.section-footer-pse div:not(:first-child) {
  margin-top: 4px;
}

/* ============================================ */
/* ÉLÉMENTS DIVERS & FOOTER                    */
/* ============================================ */

/* Start hint */
.start-hint {
  color: #6b7280;
  font-size: 0.9rem;
}

/* Access code input & button */
.access-code-input {
  flex: 1;
  min-width: 220px;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid var(--line);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  font-weight: 600;
}

.access-code-button {
  padding: 12px 16px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary, #1a3f6e), #164a83);
  color: white;
  border: none;
  white-space: nowrap;
  font-weight: bold;
  min-width: 160px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(26, 63, 110, 0.25);
}

/* Lien simulation sur mesure */
.link-custom-order {
  display: inline-block;
  background: #64748b;
  color: #fff;
  padding: 12px 24px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(100, 116, 139, 0.15);
  transition: background 0.2s;
  margin-bottom: 8px;
}

.link-custom-order:hover {
  background: #546376;
}

.link-custom-order-container {
  text-align: center;
  margin-top: 18px;
}

.access-code-msg {
  margin-top: 8px;
}

.section-footer-access-email a {
  color: #64748b;
  text-decoration: underline;
}

.section-footer-access-adjusted {
  margin-top: 10px;
  margin-bottom: 0;
}

/* Footer principal */
.footer-main {
  background: #f8f9fa;
  padding: 20px;
  margin-top: 40px;
  border-top: 1px solid #e9ecef;
  text-align: center;
  font-size: 0.85rem;
  color: #6c757d;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-intro {
  margin: 0 0 12px 0;
  font-size: 0.85rem;
  color: #495057;
}

.footer-email-link {
  color: #007bff;
  text-decoration: underline;
  font-weight: 600;
}

.footer-links {
  margin: 0 0 12px 0;
}

.footer-link {
  color: #007bff;
  text-decoration: underline;
  margin: 0 15px;
}

.footer-mission {
  margin: 0 0 8px 0;
  font-size: 0.85rem;
  font-style: italic;
  color: #666;
}

.footer-copyright {
  margin: 0;
  font-size: 0.8rem;
}

/* Zone simulation */
.simulation-zone-full {
  width: 100%;
  margin: 0;
  max-width: 100vw;
  border-radius: 0;
  box-shadow: none;
  overflow-x: hidden;
}

.simulation-container-responsive {
  width: 100%;
  margin: 0;
  padding: clamp(12px, 4vw, 20px);
}

/* ✅ Titre de simulation dans index.html (ancienne structure) */
.simulation-zone-full h2,
.simulation-container-responsive h2 {
  margin: 0 0 20px 0;
  font-size: 1.75rem;
  font-weight: 700;
  color: #1a3f6e !important;
  line-height: 1.2;
  text-align: center;
}

.simulation-zone-full h2:first-child,
.simulation-container-responsive > h2:first-child {
  padding: 20px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* ✅ Timer dans simulation (ancienne structure index.html) */
#timer {
  color: white !important;
  background: linear-gradient(135deg, #1a3f6e, #0f2a4a) !important;
  font-weight: 700 !important;
}

/* ✅ Notice de correction */
.correction-notice {
  padding: 16px 20px;
  background: #fef3c7;
  border: 2px solid #fbbf24;
  border-radius: 8px;
  margin-bottom: 20px;
  color: #92400e !important;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
}

.correction-notice .icon {
  font-size: 1.5rem;
}

.corrector-assignment {
  display: block;
  margin-top: 8px;
  color: #b45309 !important;
  font-size: 0.9rem;
}

/* ✅ Placeholder du textarea */
#msgInput::placeholder {
  color: #9ca3af !important;
  opacity: 1;
}

/* ═══════════════════════════════════════════════════════════════
   🎨 EN-TÊTE PROFESSIONNEL AVEC INDICATEURS
   ═══════════════════════════════════════════════════════════════ */

.simulation-header-pro {
  background: linear-gradient(135deg, #1a3f6e 0%, #0f2a4a 100%);
  padding: 16px 20px;
  border-radius: 12px 12px 0 0;
  margin: -20px -20px 20px -20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.header-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.simulation-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.badge-icon {
  font-size: 1.25rem;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.badge-text {
  color: white;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.3px;
}

.participant-info {
  display: flex;
  align-items: center;
  gap: 8px;
  color: white;
  font-weight: 500;
  font-size: 0.95rem;
}

.participant-icon {
  font-size: 1.1rem;
}

.timer-compact {
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(76, 175, 80, 0.95), rgba(56, 142, 60, 0.95));
  padding: 8px 16px;
  border-radius: 20px;
  color: white;
  font-weight: 700;
  font-size: 0.95rem;
  border: 2px solid rgba(255, 255, 255, 0.4);
  min-width: 90px;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  /* 🔥 FIXE EN HAUT À DROITE */
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  transition: all 0.3s ease;
}

.timer-compact:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

/* Animation de pulsation quand temps faible */
.timer-compact.grace-period {
  background: linear-gradient(135deg, rgba(255, 152, 0, 0.95), rgba(245, 124, 0, 0.95));
  animation: timerPulse 1s ease-in-out infinite;
}

@keyframes timerPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.timer-icon {
  font-size: 1.1rem;
  animation: timerTick 1s linear infinite;
}

@keyframes timerTick {
  0%, 100% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(5deg);
  }
}

/* Responsive mobile */
@media (max-width: 640px) {
  .header-top-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  
  .simulation-badge,
  .participant-info {
    justify-content: center;
  }
  
  /* Timer compact fixe aussi sur mobile, mais position ajustée */
  .timer-compact {
    top: 10px;
    right: 10px;
    padding: 6px 12px;
    font-size: 0.85rem;
    min-width: 80px;
  }
  
  .timer-icon {
    font-size: 0.95rem;
  }
}

/* ✅ Interface de simulation moderne (simulation-interface.html) */
.simulation-container {
  width: 100%;
  margin: 0;
  padding: clamp(12px, 4vw, 20px);
  background: #f7f7fb;
  min-height: 100vh;
}

/* En-tête de simulation */
.simulation-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 24px;
  padding: 20px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.simulation-info {
  flex: 1;
}

#simulation-title {
  margin: 0 0 8px 0;
  font-size: 1.75rem;
  font-weight: 700;
  color: #1a3f6e;
  line-height: 1.2;
}

#simulation-subtitle {
  margin: 0;
  font-size: 1rem;
  color: #64748b;
  font-weight: 400;
}

.simulation-controls {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-shrink: 0;
}

/* Timer */
.timer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: linear-gradient(135deg, #1a3f6e, #0f2a4a);
  color: white;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1.1rem;
  box-shadow: 0 2px 8px rgba(26, 63, 110, 0.25);
}

.timer-icon {
  font-size: 1.25rem;
}

#timer-text {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.5px;
}

/* Zone de chat */
.chat-container {
  background: white;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  min-height: 400px;
  max-height: 600px;
  overflow-y: auto;
}

.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 200px;
}

/* Messages chat */
.chat-message {
  max-width: 78%;
  padding: 12px 16px;
  border-radius: 12px;
  line-height: 1.5;
  font-size: 1rem;
  color: #1e293b !important;
  word-wrap: break-word;
}

.chat-message.assistant {
  align-self: flex-start;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #1e293b !important;
}

.chat-message.user {
  align-self: flex-end;
  background: #dbeafe;
  border: 1px solid #bfdbfe;
  color: #1e293b !important;
}

.chat-message.system {
  align-self: center;
  background: #fef3c7;
  border: 1px solid #fde68a;
  color: #92400e !important;
  max-width: 90%;
  text-align: center;
  font-style: italic;
}

/* Indicateur de frappe */
.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 12px 16px;
  background: #f1f5f9;
  border-radius: 12px;
  max-width: 60px;
  align-self: flex-start;
}

.typing-indicator span {
  width: 8px;
  height: 8px;
  background: #64748b;
  border-radius: 50%;
  animation: typing-bounce 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(1) {
  animation-delay: -0.32s;
}

.typing-indicator span:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes typing-bounce {
  0%, 80%, 100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Zone de saisie */
.chat-input-container {
  background: white;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.chat-input {
  width: 100%;
  min-height: 80px;
  max-height: 200px;
  padding: 12px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 1rem;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  line-height: 1.5;
  resize: vertical;
  transition: border-color 0.3s ease;
  color: #1e293b !important;
}

.chat-input:focus {
  outline: none;
  border-color: #1a3f6e;
  box-shadow: 0 0 0 3px rgba(26, 63, 110, 0.1);
}

.chat-input-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  gap: 12px;
}

.char-count {
  font-size: 0.875rem;
  color: #64748b;
  font-variant-numeric: tabular-nums;
}

.send-button {
  background: linear-gradient(135deg, #1a3f6e, #0f2a4a);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(26, 63, 110, 0.25);
}

.send-button:hover:not(:disabled) {
  background: linear-gradient(135deg, #0f2a4a, #1a3f6e);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(26, 63, 110, 0.35);
}

.send-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Responsive mobile */
@media (max-width: 768px) {
  .simulation-header {
    flex-direction: column;
    gap: 16px;
  }

  .simulation-controls {
    width: 100%;
    justify-content: space-between;
  }

  #simulation-title {
    font-size: 1.5rem;
  }

  .chat-message {
    max-width: 85%;
  }
}

/* Corrector assignment */
.corrector-assignment {
  color: #ffe066;
  font-weight: 700;
  text-shadow: 0 1px 2px #1a3f6e;
}

/* Messages IA */
.ia-message {
  margin-bottom: 16px;
  padding: 16px;
  background: #f0f4ff;
  border-radius: 8px;
  border-left: 4px solid var(--primary, #1a3f6e);
}

/* Modal avancé */
.modal-close-btn {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 1.5rem;
  background: none;
  border: none;
  color: var(--blue);
  cursor: pointer;
}

.modal-title-advanced {
  margin-top: 0;
  color: #1a3f6e;
  font-size: 1.1rem;
}

.modal-content-buttons {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 18px;
}

/* Boutons modal (déjà créés mais ajustés) */
.btn-modal-dashboard {
  background: linear-gradient(135deg, #1a3f6e, #2a4f7e);
  color: white;
  border: none;
  padding: 16px 0;
  border-radius: 30px;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 0 6px 20px rgba(26, 63, 110, 0.35);
  cursor: pointer;
}

.btn-modal-corrector {
  background: linear-gradient(135deg, #9badc2, #7a8fa5);
  color: white;
  border: none;
  padding: 16px 0;
  border-radius: 30px;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 0 6px 20px rgba(155, 173, 194, 0.35);
  cursor: pointer;
}

.btn-modal-admin {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  color: white;
  border: none;
  padding: 16px 0;
  border-radius: 30px;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 0 6px 20px rgba(220, 38, 38, 0.35);
  cursor: pointer;
}

/* Utility classes */
.d-none {
  display: none;
}

/* ============================================ */
/* SECTION ORIENTATION (Guide)                  */
/* ============================================ */

/* Container orientation guide */
.card-orientation {
  margin-top: 64px;
  padding: 32px;
  border: 3px solid #475569;
  background: linear-gradient(135deg, #f8f9fa 0%, #f1f3f4 100%);
  position: relative;
  border-radius: 16px;
}

/* Badge orientation (aussi .orientation-badge-title pour compatibilité) */
.orientation-badge,
.orientation-badge-title {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  background: #475569;
  color: white;
  padding: 10px 28px;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
  box-shadow: 0 4px 12px rgba(71, 85, 105, 0.3);
  animation: pulse-subtle 3s ease-in-out infinite;
}

/* Contenu de la section orientation */
.orientation-content {
  text-align: center;
  padding-top: 16px;
}

/* Titre principal de la section */
.orientation-title {
  margin: 0 0 20px;
  color: #2c3e50;
  font-size: 1.4rem;
  font-weight: 600;
}

/* Description de la section */
.orientation-description {
  color: #34495e;
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 32px;
}

/* Grille des options d'orientation */
.orientation-grid {
  margin-bottom: 28px;
}

/* Cartes d'options */
.option-card {
  padding: 20px;
  background: white;
  border-radius: 12px;
  cursor: pointer;
  text-align: center;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 2px solid;
  transition: all 0.3s ease;
}

.option-card:hover {
  transform: scale(1.05);
}

/* Variantes des cartes d'orientation */
.option-card-citizen {
  border-color: #c52529;
}

.option-card-rescuer {
  border-color: #dc2626;
}

.option-card-professional {
  border-color: #1a3f6e;
}

/* Icône des options */
.option-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

/* Titre des options */
.option-title {
  margin: 0 0 8px;
  font-size: 1.15rem;
  font-weight: 600;
}

.option-title-citizen {
  margin: 0 0 8px;
  font-size: 1.15rem;
  font-weight: 600;
  color: #c52529;
}

.option-title-rescuer {
  margin: 0 0 8px;
  font-size: 1.15rem;
  font-weight: 600;
  color: #dc2626;
}

.option-title-professional {
  margin: 0 0 8px;
  font-size: 1.15rem;
  font-weight: 600;
  color: #1a3f6e;
}

/* Description des options */
.option-description {
  margin: 0 0 12px;
  color: #666;
  font-size: 0.85rem;
  line-height: 1.4;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Actions au bas des cartes */
.option-action-citizen {
  padding: 10px;
  background: #c52529;
  color: white;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
}

.option-action-rescuer {
  padding: 10px;
  background: #dc2626;
  color: white;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
}

.option-action-professional {
  padding: 10px;
  background: #1a3f6e;
  color: white;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
}

/* Badge au bas des cartes (legacy - garder pour compatibilité) */
.option-badge {
  padding: 8px 12px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.8rem;
  color: white;
}

.option-badge-citizen {
  background: #c52529;
}

.option-badge-rescuer {
  background: #dc2626;
}

.option-badge-professional {
  background: #1a3f6e;
}

/* Section d'aide */
.orientation-help {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 16px;
  margin-top: 24px;
  font-size: 0.85rem;
  color: #666;
}

/* Responsive orientation */
@media (max-width: 768px) {
  .orientation-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  
  .option-card {
    padding: 16px;
    min-height: 160px;
  }
  
  .option-title {
    font-size: 1.05rem;
  }
  
  .option-description {
    font-size: 0.8rem;
    height: 35px;
  }
  
  .option-icon {
    font-size: 2.2rem;
  }
}

@media (max-width: 600px) {
  .orientation-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .option-card {
    padding: 18px;
    min-height: 150px;
  }
  
  .option-title {
    font-size: 1.1rem;
  }
  
  .option-description {
    font-size: 0.85rem;
    height: 40px;
  }
  
  .option-icon {
    font-size: 2.3rem;
  }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
/* SECTIONS CARDS - Conteneurs des différents modes de simulation          */
/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.section-card {
  margin-top: 80px;
  padding: 24px;
  position: relative;
  border-radius: 16px;
}

.section-card-risk {
  border: 3px solid #c52529;
  background: linear-gradient(135deg, #fef5f5 0%, #fcf1f1 100%);
}

.section-card-normal {
  border: 3px solid #1a3f6e;
  background: linear-gradient(135deg, #f0f4f8 0%, #f7f9fc 100%);
}

.section-card-access {
  border: 3px solid #64748b;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
/* SECTION BADGES - Badges "Public Cible" en haut des sections             */
/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.section-badge {
  position: absolute;
  top: -12px;
  left: 20px;
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.section-badge-risk {
  background: #c52529;
  box-shadow: 0 2px 8px rgba(197, 37, 41, 0.3);
}

.section-badge-normal {
  background: #1a3f6e;
  box-shadow: 0 2px 8px rgba(26, 63, 110, 0.3);
}

.section-badge-access {
  background: #64748b;
  box-shadow: 0 2px 8px rgba(100, 116, 139, 0.3);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
/* SECTION TITLES - Titres principaux des sections                         */
/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.section-title {
  margin: 0 0 12px;
  font-size: 1.2rem;
  text-align: center;
  padding-top: 8px;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.section-title-risk {
  color: #7c2d2f;
  text-shadow: 0 1px 2px rgba(124, 45, 47, 0.1);
}

.section-title-normal {
  color: #1e293b;
  text-shadow: 0 1px 2px rgba(30, 41, 59, 0.1);
}

.section-title-access {
  color: #334155;
  text-shadow: 0 1px 2px rgba(51, 65, 85, 0.1);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
/* SECTION DESCRIPTIONS - Descriptions sous les titres                     */
/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.section-description {
  font-size: 0.95rem;
  line-height: 1.4;
  margin-bottom: 24px;
  text-align: center;
}

.section-description-risk {
  color: #8b1538;
}

.section-description-normal {
  color: #2c4f6e;
}

.section-description-access {
  color: #475569;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
/* FORM LABELS - Labels des formulaires                                     */
/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.form-label {
  font-weight: 600;
}

.form-label-normal {
  color: #1e293b;
}

.form-label-access {
  color: #334155;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
/* INPUT GROUPS - Groupes d'inputs avec layout flex                        */
/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.input-group-flex {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.input-group-flex input[type="text"] {
  width: 250px;
  padding: 8px 12px;
}

.input-group-flex button {
  flex: 1;
  min-width: 220px;
  padding: 12px 16px;
  border-radius: 8px;
  font-weight: bold;
  transition: all var(--motion-duration-normal) var(--motion-easing-standard);
}

.input-group-flex button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.input-group-flex-risk button {
  background: #c52529;
  color: white;
}

.input-group-flex-access button {
  background: #64748b;
  color: white;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
/* CONSENT BOXES - Boîtes de consentement RGPD                             */
/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.consent-box {
  padding: 16px;
  border-radius: 8px;
  border: 1px solid;
  margin-top: 16px;
}

.consent-box-risk {
  background: #fef5f5;
  border-color: #f5b7b7;
}

.consent-box-normal {
  background: #f0f4f8;
  border-color: #5a7a96;
  padding: 8px;
  border-radius: 6px;
  margin: 16px 0 12px 0;
}

.consent-box-access {
  background: #f1f5f9;
  border-color: #cbd5e1;
  padding: 8px;
  border-radius: 6px;
  margin: 12px 0;
}

.consent-label {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1.3;
  margin: 0;
}

.consent-checkbox {
  margin-top: 2px;
  cursor: pointer;
}

.consent-text {
  font-weight: 500;
}

.consent-text-risk {
  color: #7c2d2f;
}

.consent-text-normal {
  color: #1e293b;
}

.consent-text-access {
  color: #334155;
}

.consent-link {
  text-decoration: underline;
  font-weight: 600;
}

.consent-link-risk {
  color: #c52529;
}

.consent-link-normal {
  color: #1a3f6e;
}

.consent-link-access {
  color: #475569;
}

.consent-error {
  color: #dc3545;
  font-size: 0.8rem;
  margin-top: 4px;
  display: none;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
/* SECTION FOOTER - Informations en bas des sections                       */
/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.section-footer {
  font-size: 0.85rem;
  text-align: center;
  margin-top: 20px;
}

.section-footer-risk {
  color: #8b1538;
}

.section-footer-access {
  color: #64748b;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
/* BUTTON GROUPS - Groupes de boutons avec layout flex                     */
/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.button-group-flex {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.button-group-flex button {
  flex: 1;
  min-width: 200px;
  position: relative;
  overflow: hidden;
}

.button-group-flex button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.button-group-normal {
  background: #1a3f6e;
}

.button-group-custom {
  background: #c52529;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
/* SELECT OPTIONS - Styles pour options disabled                           */
/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

select option[disabled],
select option[style*="color: #999"] {
  color: #999;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
/* HINT TEXT - Textes d'aide et indications                                */
/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.hint-text {
  color: #6b7280;
  font-size: 0.9rem;
}
