/**
 * Styles modernisés pour l'auto-diagnostic de vulnérabilité ADAPTWISE
 */

/* Conteneur principal */
.auto-diagnostic-container {
  margin: 0 auto;
  padding: 40px 0px;
}

.auto-diagnostic-container h1 {
  text-align: center;
  margin-bottom: 40px;
  font-size: 28px;
  font-weight: 600;
  color: #222;
}

/* Barre de progression */
.progression {
  display: flex;
  justify-content: center;
  margin-bottom: 60px;
  position: relative;
  gap: 20px;
  max-width: 100%;
  align-items: flex-start;
}

.progression::before {
  content: "";
  position: absolute;
  top: 20px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: #e5e7eb;
  z-index: -1;
}

.etape-progress {
  text-align: center;
  position: relative;
  flex: 0 0 160px;
  max-width: 160px;
  min-width: 160px;
}

.etape-progress .numero {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: #fff;
  border: 2px solid #e5e7eb;
  border-radius: 50%;
  margin: 0 auto 10px;
  font-weight: 500;
  color: #9ca3af;
}

.etape-progress.active .numero {
  background-color: #003399;
  border-color: #003399;
  color: white;
}

.etape-progress.complete .numero {
  background-color: #003399;
  border-color: #003399;
  color: white;
}

.etape-progress .titre {
  font-size: 13px;
  font-weight: 500;
  display: block;
  color: #9ca3af;
  line-height: 1.3;
  word-wrap: break-word;
  padding: 0 5px;
}

.etape-progress.active .titre {
  color: #4b5563;
  font-weight: 600;
}

.etape-progress.complete .titre {
  color: #4b5563;
}

/* Étape-progression cliquable */
.etape-progress-link {
  text-decoration: none;
}

.etape-progress.clickable {
  cursor: pointer;
}

.question-container h3 {
  margin-bottom: 20px;
  color: #111827;
  font-size: 20px;
  font-weight: 600;
  border-bottom: none;
  padding-bottom: 0;
}

/* Titres de section */
.etape-header {
  margin-bottom: 20px;
}

.etape-header h2 {
  font-size: 22px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 10px;
}

.etape-description {
  color: #4b5563;
  font-size: 16px;
  line-height: 1.5;
}

.question-description {
  margin-bottom: 10px;
}

/* Options de réponse */
.options-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.option {
  margin-bottom: 0;
  padding: 0;
  background-color: transparent;
  border-radius: 8px;
  width: 100%;
  transition: all 0.2s ease;
  -webkit-transition: all 0.2s ease;
  -moz-transition: all 0.2s ease;
  -ms-transition: all 0.2s ease;
  -o-transition: all 0.2s ease;
}

.option label {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 15px;
  height: 100%;
  border-radius: 8px;
  transition: background-color 0.2s;
  background-color: #f3f4f6;
}

.option label:hover {
  background-color: #e5e7eb;
}

.option input[type="radio"],
.option input[type="checkbox"] {
  margin-right: 12px;
  width: 20px;
  height: 20px;
  accent-color: #003399;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.3s;
  background-color: #f9fafb;
}

.form-control:focus {
  outline: none;
  border-color: #003399;
  box-shadow: 0 0 0 3px rgba(0, 51, 153, 0.1);
}

input[type="date"].form-control {
  cursor: pointer;
  background-color: #fff;
}

/* Select dropdown */
select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
  cursor: pointer;
}

/* Contact section */
.contact-section {
  padding: 30px 0px;
  border-radius: 12px;
}

.contact-section h3 {
  margin-top: 0;
  color: #111827;
}

/* Boutons de navigation */
.navigation-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 25px;
}

.navigation-buttons .btn {
  height: 40px;
  /* Définir une hauteur fixe pour tous les boutons */
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-primary:hover {
  background-color: #002b80;
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: #e5e7eb;
  color: #4b5563;
}

/* Pour les icônes du calendrier */
input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: 0.7;
  cursor: pointer;
}

/* Style pour les messages d'erreur */
.error-message {
  background-color: #fef2f2;
  color: #b91c1c;
  padding: 15px;
  margin-bottom: 20px;
  border: 1px solid #fca5a5;
  border-radius: 8px;
}

.admin-notice {
  background-color: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 15px;
  margin-top: 15px;
}

.admin-notice ul {
  margin-left: 20px;
}

.bilan-header {
  display: flex;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.score-global {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin-right: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.score-global.eleve {
  background-color: #28a745;
  color: white;
}

.score-global.moyen {
  background-color: #ffc107;
  color: #333;
}

.score-global.faible {
  background-color: #dc3545;
  color: white;
}

.score-value {
  font-size: 36px;
  font-weight: bold;
  line-height: 1;
}

.score-smiley {
  font-size: 30px;
  margin-top: 5px;
}

.bilan-info {
  flex-grow: 1;
}

/* Tableau de bilan */
.tableau-bilan {
  margin: 30px 0;
}

.tableau-bilan table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

.tableau-bilan th,
.tableau-bilan td {
  padding: 10px;
  text-align: center;
  border: 1px solid #ddd;
}

.tableau-bilan th {
  background-color: #f0f0f0;
}

.risque-box {
  background-color: #1a4da1;
  color: white;
  padding: 10px;
  border-radius: 5px;
  display: inline-block;
  width: 100%;
}

.score-circle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  margin: 0 auto;
}

.score-circle.faible {
  background-color: #dc3545;
}

.score-circle.moyen {
  background-color: #ffc107;
}

.score-circle.eleve {
  background-color: #28a745;
}

.legende {
  display: flex;
  justify-content: center;
  margin-top: 20px;
  gap: 20px;
}

.legende-item {
  display: flex;
  align-items: center;
  margin-right: 15px;
}

.legende-item .score-circle {
  margin-right: 8px;
}

/* Recommandations */
.bilan-recommandations {
  background-color: #f0f7ff;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 30px;
}

.bilan-recommandations ul {
  padding-left: 20px;
}

.bilan-recommandations li {
  margin-bottom: 10px;
}

/* Actions du bilan */
.actions-bilan {
  text-align: center;
  margin-top: 30px;
}

/* Actions du bilan */
.bilan-actions {
  text-align: center;
  margin: 40px 0;
  padding: 30px;
  background: #f8f9fa;
  border-radius: 8px;
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.bilan-actions .btn {
  display: inline-block;
  padding: 12px 24px;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.2s ease;
  border: 2px solid transparent;
  cursor: pointer;
  min-width: 160px;
  text-align: center;
}

.bilan-actions .btn-primary {
  background-color: #0066cc;
  color: white;
  border-color: #0066cc;
}

.bilan-actions .btn-primary:hover {
  background-color: #0052a3;
  border-color: #0052a3;
  transform: translateY(-1px);
}

.bilan-actions .btn-secondary {
  background-color: #6c757d;
  color: white;
  border-color: #6c757d;
}

.bilan-actions .btn-secondary:hover {
  background-color: #545b62;
  border-color: #545b62;
  transform: translateY(-1px);
}

.bilan-actions .btn-outline {
  background-color: transparent;
  color: #0066cc;
  border-color: #0066cc;
}

.bilan-actions .btn-outline:hover {
  background-color: #0066cc;
  color: white;
  transform: translateY(-1px);
}

.actions-bilan .btn {
  margin: 0 10px;
}

/* Styles d'impression */
@media print {
  .bilan-actions {
    display: none !important;
  }

  .smiley-details-panel,
  .detail-button,
  .score-display {
    display: none !important;
  }

  .diagnostic-container {
    max-width: none !important;
    margin: 0 !important;
    padding: 20px !important;
    box-shadow: none !important;
  }

  .section-bilan {
    break-inside: avoid;
    margin-bottom: 30px;
  }

  .table-responsive {
    overflow: visible !important;
  }

  .score-bar {
    print-color-adjust: exact !important;
    -webkit-print-color-adjust: exact !important;
  }

  .smiley-image {
    width: 24px !important;
    height: 24px !important;
  }

  /* Forcer l'impression des couleurs pour les barres de score */
  .score-bar.tres-bon,
  .score-bar.bon,
  .score-bar.moyen,
  .score-bar.mauvais,
  .score-bar.tres-mauvais {
    print-color-adjust: exact !important;
    -webkit-print-color-adjust: exact !important;
  }
}

/* Loading states et protection double-clic */
.loading-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
  margin-right: 8px;
}

.loading-spinner.large {
  width: 32px;
  height: 32px;
  border-width: 3px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.btn.loading {
  opacity: 0.7;
  cursor: not-allowed;
  position: relative;
  pointer-events: none;
}

.btn.loading:hover {
  transform: none !important;
  background-color: #6b7280 !important;
}

.btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  pointer-events: none;
  background-color: #6b7280 !important;
}

.btn:disabled:hover {
  transform: none !important;
  background-color: #6b7280 !important;
}

.loading-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-left: 8px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* Styles pour le bouton de démarrage de l'auto-diagnostic */
.start-diagnostic.loading {
  opacity: 0.7;
  cursor: not-allowed;
  pointer-events: none;
  position: relative;
}

.start-diagnostic.loading:hover {
  transform: none !important;
  background-color: #6b7280 !important;
}

/* Styles pour tous les boutons de diagnostic qui peuvent avoir un loading */
a[href*="auto-diagnostic"].loading {
  opacity: 0.7;
  cursor: not-allowed;
  pointer-events: none;
  background-color: #6b7280 !important;
}

a[href*="auto-diagnostic"].loading:hover {
  transform: none !important;
  background-color: #6b7280 !important;
}

/* États de chargement pour boutons */
.btn-loading {
  background-color: #6c757d !important;
  border-color: #6c757d !important;
  color: #fff !important;
  cursor: not-allowed !important;
  opacity: 0.8 !important;
  pointer-events: none !important;
  transition: all 0.2s ease;
}

.btn-loading:hover,
.btn-loading:focus,
.btn-loading:active {
  background-color: #6c757d !important;
  border-color: #6c757d !important;
  transform: none !important;
  box-shadow: none !important;
}

.loading-spinner-inline {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}

.diagnostic-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(2px);
}

.loading-content {
  text-align: center;
  padding: 30px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  max-width: 300px;
}

.loading-content p {
  margin: 15px 0 5px;
  font-weight: 500;
  color: #333;
}

.loading-content small {
  color: #666;
  font-size: 12px;
}

/* Styles pour les questions en erreur */
.question-container.highlight {
  border: 2px solid #e74c3c;
  border-radius: 8px;
  padding: 15px;
  background-color: #fdf2f2;
  animation: shake 0.3s ease-in-out;
}

@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-5px);
  }

  75% {
    transform: translateX(5px);
  }
}

/* Protection contre les interactions pendant le loading */
.form-disabled {
  pointer-events: none;
  opacity: 0.6;
}

.form-disabled input,
.form-disabled button,
.form-disabled select,
.form-disabled textarea {
  cursor: not-allowed;
}


/* Styles spécifiques au classement */
.ranking-container {
  max-width: 100%;
  margin: 20px 0 30px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  overflow: hidden;
  background-color: #f9fafb;
}

.ranking-instruction {
  margin-bottom: 20px;
  font-style: italic;
  color: #6b7280;
  font-size: 14px;
}

.ranking-item {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  background-color: #fff;
  border-bottom: 1px solid #e5e7eb;
  transition: all 0.2s ease;
}

.ranking-item:last-child {
  border-bottom: none;
}

.ranking-item:hover {
  background-color: #f3f4f6;
}

.ranking-item.ui-sortable-helper {
  background-color: #e6f0ff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  border: 1px solid #c0d7ff;
}

.ranking-item .position {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #003399;
  color: white;
  border-radius: 50%;
  font-weight: bold;
  margin-right: 15px;
}

/* Media queries */
.ranking-item .item-name {
  flex-grow: 1;
  font-size: 16px;
  padding-right: 10px;
}

.ranking-item .drag-handle {
  cursor: grab;
  padding: 8px;
  color: #777;
  margin-right: 10px;
  border-radius: 4px;
}

.ranking-item .drag-handle:hover {
  background-color: #eaeaea;
  color: #333;
}

.ranking-item .action-buttons {
  display: flex;
  gap: 5px;
}

.ranking-item .action-buttons button {
  border: none;
  background-color: #f0f0f0;
  border-radius: 4px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.ranking-item .action-buttons button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Éléments prioritaires dans le classement */
.ranking-item.top-priority {
  background-color: #f0f7ff;
}

.ranking-item.top-priority[data-position="1"] .position,
.ranking-item.top-priority-1 .position {
  background-color: #ff5722;
  font-size: 16px;
  font-weight: bold;
}

.ranking-item.top-priority[data-position="2"] .position {
  background-color: #ff9800;
}

.ranking-item.top-priority[data-position="3"] .position {
  background-color: #ffc107;
}

/* Résultats du classement dans le bilan */
.classement-resultats {
  margin: 30px 0;
  padding: 20px;
  background-color: #f8f9fa;
  border-radius: 5px;
  border: 1px solid #eaeaea;
}

.ranking-result-list {
  padding-left: 20px;
  margin-top: 15px;
}

.ranking-result-item {
  padding: 8px 0;
  font-size: 16px;
}

.ranking-result-item.top-priority-1 {
  font-weight: bold;
  color: #ff5722;
}

.ranking-result-item.top-priority-2 {
  font-weight: bold;
  color: #ff9800;
}

.ranking-result-item.top-priority-3 {
  font-weight: bold;
  color: #ffc107;
}

.ranking-interpretation {
  margin-top: 20px;
  padding: 15px;
  background-color: #e8f4f8;
  border-radius: 5px;
  font-style: italic;
}

/* Mise à jour des styles pour les 5 niveaux de notation */

/* Très bon (0-2) - Vert foncé */
.classement-table .niveau.tres-bon,
.classement-table .score.tres-bon {
  color: #ffffff !important;
  background-color: #1b5e20 !important;
}

/* Bon (2-4) - Vert clair */
.classement-table .niveau.bon,
.classement-table .score.bon {
  color: #ffffff !important;
  background-color: #43a047 !important;
}

/* Moyen (4-6) - Jaune */
.classement-table .niveau.moyen,
.classement-table .score.moyen {
  color: #000000 !important;
  background-color: #ffa000 !important;
}

/* Mauvais (6-8) - Orange */
.classement-table .niveau.mauvais,
.classement-table .score.mauvais {
  color: #ffffff !important;
  background-color: #f57c00 !important;
}

/* Très mauvais (8-10) - Rouge */
.classement-table .niveau.tres-mauvais,
.classement-table .score.tres-mauvais {
  color: #ffffff !important;
  background-color: #d32f2f !important;
}

/* Pour le graphique à barres */
.score-bar.tres-bon {
  background-color: #1b5e20 !important;
  color: #ffffff !important;
}

.score-bar.bon {
  background-color: #43a047 !important;
  color: #ffffff !important;
}

.score-bar.moyen {
  background-color: #ffa000 !important;
  color: #000000 !important;
}

.score-bar.mauvais {
  background-color: #f57c00 !important;
  color: #ffffff !important;
}

.score-bar.tres-mauvais {
  background-color: #d32f2f !important;
  color: #ffffff !important;
}

/* Style pour les cellules du tableau */
.classement-table td.niveau,
.classement-table td.score {
  padding: 10px;
  font-weight: bold;
  text-align: center;
  border-radius: 4px;
}

/* Amélioration de la lisibilité */
.classement-table td.niveau.moyen,
.classement-table td.score.moyen {
  color: #000000 !important;
  /* Texte noir sur fond jaune */
}

/* S'assurer que le score prend toute la largeur */
.classement-table td.score {
  min-width: 100px;
}

/* Style pour la mise en évidence des 3 premiers */
.classement-table tr.top-1 {
  background-color: rgba(255, 215, 0, 0.1);
}

.classement-table tr.top-2 {
  background-color: rgba(192, 192, 192, 0.1);
}

.classement-table tr.top-3 {
  background-color: rgba(205, 127, 50, 0.1);
}

/* Styles pour l'impression */
@media print {

  header,
  footer,
  .actions-bilan {
    display: none !important;
  }

  .bilan-container {
    padding: 0;
    margin: 0;
  }

  .tableau-bilan table {
    page-break-inside: avoid;
  }

  body {
    font-size: 12pt;
  }

  .score-global,
  .risque-box,
  .score-circle {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* Styles responsifs */
@media (max-width: 768px) {



  .bilan-header {
    flex-direction: column;
    text-align: center;
  }

  .score-global {
    margin-right: 0;
    margin-bottom: 20px;
  }

  .progression {
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    max-width: 100%;
  }

  .etape-progress {
    flex: 0 0 120px;
    max-width: 120px;
    min-width: 120px;
  }

  .etape-progress .titre {
    font-size: 12px;
    padding: 0 2px;
  }

  .navigation-buttons {
    flex-direction: column;
    gap: 15px;
  }

  .btn {
    width: 100%;
    text-align: center;
  }
}


/* Styles pour les images des smileys */
.smiley-indicator .smiley-image {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.result-cell .smiley-image {
  width: 30px;
  height: 30px;
}

@media (max-width: 1200px) {

  .auto-diagnostic-container {
    padding: 20px 15px;
  }

}

/* Responsive pour mobile et tablette - Masquer toutes les étapes sauf l'active */
@media (max-width: 1024px) {
  .progression {
    justify-content: center;
    margin-bottom: 40px;
  }

  /* Masquer toutes les étapes par défaut */
  .etape-progress-link,
  .etape-progress:not(.active) {
    display: none;
  }

  /* Design simple pour l'étape active */
  .etape-progress.active {
    display: block;
    flex: none;
    width: auto;
    max-width: 280px;
    text-align: center;
    background: #003399;
    padding: 15px 18px;
    border-radius: 8px;
  }

  /* Masquer la ligne de connexion */
  .progression::before {
    display: none;
  }

  .etape-progress.active .numero {
    width: 45px;
    height: 45px;
    font-size: 18px;
    font-weight: 600;
    margin: 0 auto 10px;
    background: #ffffff;
    color: #003399;
  }

  .etape-progress.active .titre {
    font-size: 15px;
    font-weight: 500;
    color: #ffffff;
    line-height: 1.3;
  }
}

/* Responsive pour mobile */
@media (max-width: 480px) {
  .etape-progress.active {
    max-width: 240px;
    padding: 12px 15px;
  }

  .etape-progress.active .numero {
    width: 38px;
    height: 38px;
    font-size: 16px;
    margin: 0 auto 8px;
  }

  .etape-progress.active .titre {
    font-size: 13px;
    line-height: 1.2;
  }
}

/* Styles pour la légende des niveaux d'impact */
.impact-legend {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 30px;
}

.impact-legend h3 {
  margin: 0 0 15px 0;
  font-size: 18px;
  font-weight: 600;
  color: #333;
  text-align: left;
}

.legend-items {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: flex-start;
  align-items: center;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background-color: #fff;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.legend-item:hover {
  background-color: #f1f3f4;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.legend-item .smiley-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
}

.legend-item .legend-smiley {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.legend-item .legend-text {
  font-size: 14px;
  color: #495057;
  font-weight: 500;
  white-space: nowrap;
}

/* Responsive pour la légende */
@media (max-width: 768px) {
  .legend-items {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }

  .legend-item {
    width: 100%;
    justify-content: flex-start;
  }

  .legend-item .legend-text {
    white-space: normal;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .impact-legend {
    padding: 15px;
    margin-bottom: 20px;
  }

  .impact-legend h3 {
    font-size: 16px;
    margin-bottom: 12px;
  }

  .legend-item .legend-smiley {
    width: 24px;
    height: 24px;
  }

  .legend-item .legend-text {
    font-size: 12px;
  }
}

/* Section des blocs d'accompagnement dans le bilan */
.bilan-accompagnement-section {
  background-color: #003399;
  padding: 60px 0;
  margin-top: 60px;
}

.bilan-accompagnement-section .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.bilan-accompagnement-section .section-title {
  color: #ffffff;
  text-align: center;
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 50px;
}

/* Container des steps */
.bilan-accompagnement-section .steps-container {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: center;
}

/* Style pour les cartes d'étapes */
.bilan-accompagnement-section .step-card {
  background-color: #D5D7EE;
  border-radius: 18px;
  padding: 20px 40px;
  position: relative;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin-left: 50px;
  flex: 1 1 calc(33.333% - 30px);
  min-width: 300px;
}

.bilan-accompagnement-section .step-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Numéro de l'étape */
.bilan-accompagnement-section .step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background-color: #ECEFFA;
  color: #003399;
  font-size: 36px;
  font-weight: bold;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: -30px;
  transform: translateY(-50%);
  z-index: 1;
}

/* Contenu de l'étape */
.bilan-accompagnement-section .step-content {
  margin-top: 0;
}

.bilan-accompagnement-section .step-title-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 15px;
}

.bilan-accompagnement-section .step-title {
  font-size: 20px;
  font-weight: 600;
  background-color: #fff;
  color: #9ACA3C;
  margin: 0;
  padding: 5px 15px;
  border-radius: 5px;
}

.bilan-accompagnement-section .step-tag {
  color: #003399;
  font-size: 14px;
  font-style: italic;
}

.bilan-accompagnement-section .step-time {
  color: #666666;
  font-size: 14px;
  margin-bottom: 10px;
  font-weight: 500;
}

.bilan-accompagnement-section .step-description {
  font-size: 14px;
  line-height: 1.6;
  color: #003399;
}

.bilan-accompagnement-section .step-description p {
  margin-bottom: 0.5rem;
}

.bilan-accompagnement-section .step-description p:last-child {
  margin-bottom: 0;
}

.bilan-accompagnement-section .step-description strong {
  font-weight: 600;
}

/* Responsive pour les blocs d'accompagnement */
@media (max-width: 1024px) {
  .bilan-accompagnement-section .step-card {
    flex: 1 1 calc(50% - 30px);
  }
}

@media (max-width: 768px) {
  .bilan-accompagnement-section {
    padding: 40px 0;
    margin-top: 40px;
  }

  .bilan-accompagnement-section .section-title {
    font-size: 28px;
    margin-bottom: 30px;
  }

  .bilan-accompagnement-section .steps-container {
    gap: 20px;
  }

  .bilan-accompagnement-section .step-card {
    flex: 1 1 100%;
    margin-left: 40px;
    padding: 20px 30px;
  }

  .bilan-accompagnement-section .step-number {
    width: 50px;
    height: 50px;
    font-size: 28px;
    left: -25px;
  }

  .bilan-accompagnement-section .step-title {
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .bilan-accompagnement-section .step-card {
    margin-left: 30px;
    padding: 15px 20px;
  }

  .bilan-accompagnement-section .step-number {
    width: 40px;
    height: 40px;
    font-size: 24px;
    left: -20px;
  }

  .bilan-accompagnement-section .step-title {
    font-size: 16px;
    padding: 3px 10px;
  }

  .bilan-accompagnement-section .step-description {
    font-size: 13px;
  }
}

/* ========================================
   Sélecteur de département (intro parent)
   ======================================== */
.diagnostic-department-selector {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: 2px solid #003399;
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 40px;
  box-shadow: 0 4px 12px rgba(0, 51, 153, 0.1);
}

/* Version dans l'introduction */
.intro-department-selector {
  margin: 30px 0;
  background: white;
  border: 2px solid #9ACA3C;
}

/* Select natif caché */
.diagnostic-department-selector .department-dropdown {
  display: none;
}

/* Interface personnalisée du sélecteur */
.custom-department-selector {
  position: relative;
  width: 100%;
  max-width: 450px;
}

.custom-department-button {
  width: 100%;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
  color: #222;
  background-color: white;
  border: 2px solid #9ACA3C;
  border-radius: 8px;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
}

.custom-department-button:hover {
  border-color: #003399;
  box-shadow: 0 2px 8px rgba(0, 51, 153, 0.2);
}

.custom-department-button.active {
  border-color: #003399;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.custom-department-button .arrow {
  font-size: 12px;
  transition: transform 0.3s ease;
}

.custom-department-button.active .arrow {
  transform: rotate(180deg);
}

.custom-department-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 2px solid #003399;
  border-top: none;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
  max-height: 400px;
  overflow-y: auto;
  display: none;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.custom-department-dropdown.show {
  display: block;
}

.custom-department-group-label {
  display: none;
}

.custom-department-option {
  padding: 10px 16px;
  font-size: 14px;
  color: #222;
  cursor: pointer;
  transition: background-color 0.2s ease;
  border-bottom: 1px solid #f0f0f0;
}

.custom-department-option:last-child {
  border-bottom: none;
}

.custom-department-option:hover {
  background-color: #f0f7ff;
  color: #003399;
}

.custom-department-option.selected {
  background-color: #9ACA3C;
  color: white;
  font-weight: 500;
}

.department-selector-header {
  text-align: left;
  margin-bottom: 25px;
}

.department-selector-header h3 {
  color: #003399;
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 10px 0;
}

.department-selector-header p {
  color: #4b5563;
  font-size: 14px;
  margin: 0;
}

/* ========================================
   Styles pour l'intro de l'auto-diagnostic
   ======================================== */
.auto-diagnostic-intro {
  padding: 40px;
  background: #ffffff;
  border-radius: 12px;
}

.auto-diagnostic-intro .intro-header h1 {
  margin-bottom: 20px;
}

.auto-diagnostic-intro .intro-stats {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-bottom: 30px;
}

.auto-diagnostic-intro .intro-content {
  margin-bottom: 30px;
}

.auto-diagnostic-intro .intro-action {
  text-align: center;
  margin-top: 30px;
}

/* Responsive */
@media (max-width: 768px) {
  .diagnostic-department-selector {
    padding: 20px;
    margin-bottom: 30px;
  }

  .department-selector-header {
    text-align: left;
  }

  .department-selector-header h3 {
    font-size: 18px;
  }

  .department-selector-header p {
    font-size: 13px;
  }

  .custom-department-selector {
    max-width: 100%;
  }

  .custom-department-button {
    font-size: 14px;
    padding: 10px 12px;
  }

  .custom-department-dropdown {
    max-height: 300px;
  }

  .custom-department-option {
    font-size: 13px;
    padding: 8px 12px;
  }

  /* Auto-diagnostic intro - Mobile */
  .auto-diagnostic-intro {
    padding: 20px 15px;
  }

  .auto-diagnostic-intro .intro-header h1 {
    text-align: left;
    font-size: 24px;
  }

  .auto-diagnostic-intro .intro-stats {
    justify-content: flex-start;
  }
}