/* Importing Google fonts - Montserrat */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@100..900&display=swap');
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Montserrat", sans-serif;
}


.containerxxx {
  padding: 1px;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  opacity: 1;
}

.container .quiz-box {
  
 background: #fff;
  border-radius: 8px;
  border-color: #7fd4e9;
  border-width: 1px;
  border-style: groove;
 
}
* { box-sizing: border-box; }

.cont {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 auto !important;
  padding: 0 !important;
  overflow-x: hidden !important;
  position: relative !important;
}
/* Quiz Configuration Stylings */
.question-progress-container {
  text-align: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px;
  margin-top: 20px;
  margin-left: 50px;
  margin-right: 50px;
  margin-bottom: 5px;
  justify-content: left;
  border-radius: 6px;
  border-color: #1997b7;
  border-style: solid;
  border-width: 2px;
}

.btnResult-container{
  text-align: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px;
  margin-top: 20px;
  margin-left: 50px;
  margin-right: 50px;
  margin-bottom: 5px;
  justify-content: left;
  border-radius: 6px;
  border-color: #349312;
  border-style: solid;
  border-width: 2px;
}
.legend-container {
  margin-left: 50px;
  
  gap: 6px;
  
  justify-content: left;
  
}



.question-option{
  padding: 2px;
  font-size: 1.1rem;
  color: #898787;
  cursor: pointer;
  font-weight: 500;
  border-radius: 6px;
  background: #fff;
  border: 1px solid #C6C6C6;
  transition: 0.3s ease;
  width: 35px;
  height: 35px;
  
}
.question-progress-container button.active, .legend-container .current,
.legend-container button.active{
  color:#1997b7;
  border-color: #1997b7;
  background: white;
  border-style: solid;
  border-width: 2px;
  text-decoration: solid;
  padding: 2px;
}
.current{
  color:#1997b7;
  border-color: #1997b7;
  background: white;
  border-width: 2px;
  text-decoration: solid;
}
.question-progress-container button.answered,
.legend-container button.answered{
  color:white;
  border-color: #1bce66;
  background: #1bce66;
  border-width: 2px;
  text-decoration: solid;
  padding: 2px;
  
}

.question-progress-container button.review,
.legend-container button.review{
  color:white;
  
  border-color: #e5d93a;
  background: #e5d93a;
  border-width: 2px;
  text-decoration: solid;
  padding: 2px;
  
}
.question-progress-container button:hover,
.quiz-content .answer-option:hover {
  background: #1997b7;
  border-color: #1997b7;
   color:white;
}

.question-progress-container {
  margin-top: 30px;
}

/* Quiz Container Stylings */
.quiz-container {
  width: 100%;
  margin: auto;
}
.quiz-container .quiz-header {
  display: flex;
  padding: 5px 5px;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.09);
}
.quiz-header .quiz-title {
  font-size: 1.1rem;
  font-weight: 600;
}
.quiz-header .quiz-timer {
  display: flex;
  width:120px;
  color: #fff;
  gap: 5px;
  align-items: center;
  background: #32313C;
  border-radius: 6px;
  padding: 5px 5px;
  font-weight: 500;
  transition: 0.2s ease;
  height: 30px;
}
.quiz-header .quiz-timer span {
  font-size: 1.5rem;
}
.timer-duration{
  margin-top: 15px;
font-weight: 700;
color: whitesmoke;

}
.quiz-container .quiz-content {
  padding: 5px 5px 5px;
 
}
.quiz-content .question-text {
  font-size: 1.2rem;
  font-weight: 600;
}
.quiz-content .buttonrow {
    display: flex;
      justify-content: space-between;
      padding: 10px;
      background-color: green;
  }

  
 .quiz-content {
    padding: 1rem;
    border-radius: 10px;
  }

  
  .question-text {
    font-size: 1rem;
    margin-top: 0.5rem;
  }
 h2 {
      text-align: center;
      color: #004080;
      font-size: 20px;
      margin-bottom: 10px;
    }

    /* rendre image responsive */  
    .img-responsive {
    max-width: 50%;
    height: auto;
    display: block;
    margin: 0 auto;
  }

 .buttonrow {
    display: flex;
      justify-content: space-between;
      padding: 10px;
      background-color: green;
  }

  .quiz-content .answer-options {
  list-style: none;
  display: flex;
  gap: 10px;
  margin-top: 10px;
  flex-direction: column;
}
.quiz-content .answer-option {
  width: 80%;
  margin: auto;
  display: flex;
  cursor: pointer;
  align-items: center;
  font-size: 0.9rem;
  border-radius: 6px;
  padding: 6px 6px;
  border: 1px solid #79afbd;
  color: #0b5568;
  background: white;
  justify-content: space-between;
  transition: 0.3s ease;
}
.quiz-content .answer-option span {
  display: block;
  flex-shrink: 0;
  margin: -4px -3px -4px 12px;
  font-size: 0.9rem;
}
.quiz-content .answer-option.correct {
  border-color: #B7E1C1;
  background: #D4EDDA;
  color: #155724;
}
.quiz-content .answer-option.correct span {
  color: #16AE56;
}
.quiz-content .answer-option.incorrect {
  border-color: #F4BEC3;
  background: #F8D7DA;
  color: #721C24;
}
.btnIncorrect {
  width: 35px;
  height: 35px;
  border: 1px solid #F4BEC3;
  border-radius: 2px;
  padding: 2px 2px;
  background: #F8D7DA;
  color: #721C24;
}
.incorrect {
  width: 100%;
  border: 1px solid #F4BEC3;
  border-radius: 6px;
  padding: 8px 10px;
  background: #F8D7DA;
  color: #721C24;
}
.correct {
  width: 100%;
  border: 1px solid #B7E1C1;
  border-radius: 6px;
  padding: 8px 10px;
  background: #D4EDDA;
  color: #155724;
}
.btnCorrect {
  width: 35px;
  height: 35px;
  border: 1px solid #B7E1C1;
  border-radius: 2px;
  padding: 2px 2px;
  background: #D4EDDA;
  color: #155724;
}
.quiz-content .answer-option.selected {
  border-color: #0d718a;
  background: #a4eaf2;
  color: #0b6176;
  font-weight: bolder;
}
.quiz-content .answer-option.incorrect span {
  color: #F23723;
}
.btnAff {
  height: 35px;
  
  font-size: 1rem;
}

.quiz-footer  {
width: 80%;
}




/* Media query code for mobile screens */



/*mise en page image et audio video */
    .audio-player {
  width: 80%;
  height: 35px;
  max-width: 100%;
  margin: auto;
  padding: 1px;
  text-align: center;
}
 

audio {
  width: 80%;
  height: 30px;
  outline: none;
  margin: auto;
}

   /*affichage score */
    .card {
      max-width: 600px;
      margin: 0 auto;
      background: white;
      border-radius: 16px;
      box-shadow: 0 10px 20px rgba(0,0,0,0.1);
      padding: 30px;
      text-align: center;
    }
    .interpre {
      max-width: 90%;
      margin: 0 auto;
      margin-top: 20px;
      margin-bottom: 20px;
      background: white;
      border-radius: 16px;
      box-shadow: 0 10px 20px rgba(0,0,0,0.1);
      padding: 30px;
      text-align: center;
    }

    .card h2 {
      color: #004080;
      margin-bottom: 10px;
    }

    .score {
      font-size: 48px;
      font-weight: bold;
      color: #0275d8;
    }

    .subtitle {
      font-size: 20px;
      color: #777;
      margin-bottom: 30px;
    }

    .level-badge {
      display: inline-block;
      padding: 8px 16px;
      font-size: 16px;
      border-radius: 30px;
      color: #fff;
      font-weight: bold;
      margin: 10px 0;
    }

    .B2 {
      background-color: #0275d8;
    }

    .progress-container {
      background-color: #e6e9ec;
      border-radius: 30px;
      overflow: hidden;
      height: 25px;
      margin: 20px 0;
    }


    .progress-bar {
      height: 100%;
      width: 65%; /* adjust this % based on the score */
      background: linear-gradient(90deg, #00aaff, #004080);
      transition: width 0.4s ease;
    }

    .details {
      margin-top: 20px;
      font-size: 16px;
      color: #333;
    }

    .details span {
      font-weight: bold;
    }


    /*tableau des resultat tcf NCLC */

      .table-container {
      width: 80%;
      margin: 0 auto;
      overflow-x: auto;
      box-shadow: 0 0 10px rgba(0,0,0,0.1);
      background: white;
      border-radius: 6px;
    }

    table {
      width: 100%;
      min-width: 600px;
      border-collapse: collapse;
    }

    th, td {
      border: 1px solid #dee2e6;
      padding: 5px 10px;
      text-align: center;
      font-size: 12px;
    }

    th {
      background-color: #004080;
      color: white;
    }

    tr:nth-child(even) {
      background-color: #f2f2f2;
    }

 body {
      font-family: Arial, sans-serif;
      padding: 0px;
    }

    .player {
      display: flex;
      flex-direction: column;
      gap: 10px;
      background: #f0f0f0;
      padding: 20px;
      border-radius: 12px;
      box-shadow: 0 2px 6px rgba(0,0,0,0.1);
      max-width: 500px;
      min-height: 100px;
      justify-content: center;
    }

    .controls {
      display: flex;
      align-items: center;
      gap: 15px;
    }

    

    .progress {
      flex: 1;
      height: 6px;
      background: #ddd;
      border-radius: 5px;
      overflow: hidden;
      cursor: pointer;
    }

    .progress-filled {
      width: 0%;
      height: 100%;
      background: #3498db;
      transition: width 0.2s linear;
    }

    .time {
      font-size: 14px;
      color: #333;
      min-width: 80px;
      text-align: right;
    }

    .volume {
      display: flex;
      align-items: center;
      position: relative;
    }

    .volume-icon {
      cursor: pointer;
      font-size: 18px;
      padding: 5px;
    }

    .volume-slider {
      display: none; /* cachée par défaut */
      position: absolute;
      right: 30px; /* ✅ sort vers la gauche */
      top: 50%;
      transform: translateY(-50%);
      background: #fff;
      padding: 3px;
      border-radius: 6px;
      box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    }

    .volume-slider input {
      cursor: pointer;
    }

    .mon-div {
    position: fixed;
    /* Fixe l'élément par rapport à la fenêtre */
    bottom: 0;
    /* Le positionne en bas de la page */
    left: 0;
    /* Optionnel, pour le positionner à gauche */
    width: 100%;
    margin: auto;
    /* Optionnel, pour occuper toute la largeur */
    /* ... autres styles ... */
    }

    .my-custom-progressbar .ui-progressbar {
    border: 1px solid rgb(36, 121, 158);
    border-radius: 5px;
    width: 70%;
    margin: auto;
    text-align: center;

    }
    .ui-progressbar {
    border: 1px solid rgb(36, 121, 158);
    border-radius: 5px;
    width: 70%;
    margin: auto;
    text-align: center;

    }

    /* Customizing the filled value part */
    .my-custom-progressbar .ui-progressbar-value {
    background-color: rgb(36, 121, 158);
    /* Blue color */
    border-radius: 3px;
   
    }
    .ui-progressbar-value {
    background-color: rgb(36, 121, 158);
    /* Blue color */
    border-radius: 3px;
   
    }



     /* ============================================
   BARRE DE CHARGEMENT INITIAL
   ============================================ */
   
.progress-wrapper {
  width: 100% !important;
  max-width: 600px !important;
  margin: 0 auto 30px !important;
  padding: 0 15px !important;
  display: block !important;
  position: relative !important;
  z-index: 1 !important;
  min-height: 250px !important;
}

.progress-card {
  background: white !important;
  border-radius: 16px !important;
  padding: 30px 25px !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 20px !important;
  animation: fadeInUp 0.5s ease-out !important;
  border: 1px solid #e9ecef !important;
  width: 100% !important;
  position: relative !important;
  min-height: 220px !important;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.progress-spinner {
  position: relative !important;
  width: 60px !important;
  height: 60px !important;
  flex-shrink: 0 !important;
}

.spinner-ring {
  position: absolute !important;
  width: 100% !important;
  height: 100% !important;
  border: 3px solid transparent !important;
  border-top-color: #667eea !important;
  border-radius: 50% !important;
  animation: spin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite !important;
}

.spinner-ring:nth-child(1) { animation-delay: -0.45s !important; border-top-color: #667eea !important; }
.spinner-ring:nth-child(2) { animation-delay: -0.3s !important; border-top-color: #764ba2 !important; }
.spinner-ring:nth-child(3) { animation-delay: -0.15s !important; border-top-color: #28a745 !important; }

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.progress-content {
  width: 100% !important;
  text-align: center !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
}

.progress-title {
  font-size: 20px !important;
  font-weight: 700 !important;
  color: #2c3e50 !important;
  margin: 0 !important;
}

.progress-text {
  font-size: 15px !important;
  color: #6c757d !important;
  margin: 0 !important;
  line-height: 1.5 !important;
}

.progress-bar-container {
  width: 100% !important;
  margin-top: 5px !important;
  
}

.progress-bar {
  width: 100% !important;
  height: 3px !important;
  background: #00aaff !important;

  border-radius: 10px !important;
  overflow: hidden !important;
  position: relative !important;
}

.progress-bar-fill {
  height: 100% !important;
  background: linear-gradient(90deg, #667eea, #764ba2) !important;
  border-radius: 10px !important;
  width: 0 !important;
  animation: progressLoad 2s ease-in-out infinite !important;
  position: relative !important;
}

@keyframes progressLoad {
  0% { width: 0%; }
  50% { width: 70%; }
  100% { width: 100%; }
}  

  

  @media (max-width: 768px) {
    .question-text {
      font-size: 1rem;
    }
      .answer-option {
  width: 90%;
  margin: 0;
  font-size: 0.9rem;
    }
    .img-responsive {
    max-width: 80%;
   
  }
  }


  @media (max-width: 480px) {
    .my-custom-progressbar.ui-progressbar {
    border: 1px solid rgb(36, 121, 158);
    border-radius: 2px;
    width: 95%;
    font-size: small;

    }
     .btnResult-container{
  gap: 3px;
  padding: 5px;
  margin-top: 5px;
  margin-left: 5px;
  margin-right: 5px;
  margin-bottom: 5px;
  border-radius: 3px;
  border-width: 1px;
}
   .quiz-container .quiz-footer  {
width: 98%;
}

    .quiz-footer .btnSub{
  height: 22px;  
  padding: 2px; 
  font-size:0.7rem;
   
}
   
    .question-option{
      padding: 1px;
      font-size: 0.9rem;
      font-weight: 500;
      border-radius: 3px;
      width: 25px;
      height: 25px;
      
    }
    .quiz-content .question-text {
      font-size: 0.9rem;
    }
    .quiz-header .quiz-title {
  font-size: 0.8rem;
  font-weight: 600;
}
   .quiz-content .answer-options .answer-option {
      width: 97%;
  margin: 2;
    padding: 3px 3px 3px 3px;
   font-size: 0.75rem;
  border-radius: 3px;
  padding: 3px 3px;
  border: 1px solid #79afbd;
  
}
.quiz-content .answer-options .answer-option span {
  display: block;
  flex-shrink: 0;
  margin: -2px -2px -2px 4px;
  font-size: 0.8rem;
}
    .quiz-header .quiz-timer {
      width:100px;
      gap: 2px;
      border-radius: 3px;
      padding: 2px 2px;
      font-size: 0.8rem;
      font-weight: 700;
      color:whitesmoke;
      
}
    .question-progress-container {
  max-width: 99%;
  gap: 3px;
  padding: 2px;
  margin: auto;
  border-radius: 3px;
  border-width: 1px;
}
    .cont{
      margin: 3px; 
      padding: 2px; 
      }
     .quiz-content .img-responsive {
      max-width: 95%;
    }
    .quiz-container .quiz-content  {
      max-width: 100%;
    }
     .card {
      max-width: 98%;
      
      border-radius: 6px;
      box-shadow: 0 10px 20px rgba(0,0,0,0.1);
      padding: 10px;
      
    }
    .cont .interpre {
      max-width: 98%;
      margin: 0 auto;
      margin-top: 5px;
      margin-bottom: 5px;
      background: white;
      border-radius: 6px;
      box-shadow: 0 6px 10px rgba(0,0,0,0.1);
      padding: 2px;
      text-align: center;
      font-size: 0.8rem;
    }
    .card .score {
      font-size: 30px;
      
    }
    h2{
      font-size: 1.1rem;
    }

    .quiz-footer .incorrect {
      height: 25px;
  width: 95%;
  border-radius: 3px;
  padding: 4px 5px;
  background: #F8D7DA;
  color: #721C24;
  font-size: 0.75rem;
}
.quiz-footer .correct {
  height: 25px;
  width: 95%;
  border: 1px solid #B7E1C1;
  border-radius: 3px;
  padding: 4px 5px;
  background: #D4EDDA;
  color: #155724;
  font-size: 0.75rem;
}
.bb .btnAff {
  height: 25px;
  
  font-size: 0.8rem;
}
.quiz-container .quiz-footer  {
width: 100%;
font-size: 0.9rem;
}
.test_results .interpre {
      max-width: 100%;
      margin: 0 auto;
      margin-top: 10px;
      margin-bottom: 10px;
      background: white;
      border-radius: 8px;
      box-shadow: 0 10px 20px rgba(0,0,0,0.1);
      padding: 2px;
      text-align: center;
      font-size: 0.8rem;
    }
  }


    @media (max-width: 768px) {
      .table-container {
        width: 95%;
      }
      th, td {
        font-size: 12px;
        padding: 6px 8px;
      }
    }


    /* ============================================
   HEADER DU TEST
   ============================================ */
.test-header {
  position: relative !important;
  height: 120px !important;
  width: 100% !important;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
  margin-bottom: 30px !important;
}

.test-header::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  background: radial-gradient(circle at 20% 50%, rgba(255,255,255,0.1) 0%, transparent 50%),
              radial-gradient(circle at 80% 50%, rgba(255,255,255,0.1) 0%, transparent 50%) !important;
  animation: shimmer 3s ease-in-out infinite !important;
}

@keyframes shimmer {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.test-header-overlay {
  position: absolute !important;
  inset: 0 !important;
  background: rgba(0, 0, 0, 0.1) !important;
}

.test-header-content {
  position: relative !important;
  z-index: 10 !important;
  width: 100% !important;
  max-width: 1200px !important;
  padding: 0 20px !important;
}

.test-title-wrapper {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 15px !important;
  animation: slideInDown 0.6s ease-out !important;
}

@keyframes slideInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

.test-icon {
  width: 50px !important;
  height: 50px !important;
  background: rgba(255, 255, 255, 0.2) !important;
  backdrop-filter: blur(10px) !important;
  border-radius: 12px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 24px !important;
  color: white !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
}

.test-title {
  font-size: 28px !important;
  font-weight: 800 !important;
  color: white !important;
  margin: 0 !important;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2) !important;
  letter-spacing: -0.5px !important;
}

 /* ============================================
   BARRE D'ANALYSE IA - STYLES SPÉCIFIQUES
   ============================================ */
.progress-wrapper-ai {
  width: 100% !important;
  max-width: 600px !important;
  margin: 0 auto 30px !important;
  padding: 0 15px !important;
  position: relative !important;
  z-index: 1 !important;
  min-height: 500px !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.progress-card-ai {
  background: linear-gradient(135deg, #f8f9ff 0%, #fff 100%) !important;
  border: 2px solid #667eea !important;
  border-radius: 16px !important;
  padding: 30px 25px !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 20px !important;
  width: 100% !important;
  position: relative !important;
  min-height: 470px !important;
  animation: fadeInUp 0.5s ease-out !important;
}

.ai-animation {
  position: relative !important;
  flex-shrink: 0 !important;
  width: 70px !important;
  height: 70px !important;
}

.ai-icon-wrapper {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 70px !important;
  height: 70px !important;
}

.ai-icon {
  width: 60px !important;
  height: 60px !important;
  position: relative !important;
  z-index: 2 !important;
  filter: drop-shadow(0 4px 10px rgba(102, 126, 234, 0.3)) !important;
  display: block !important;
}

.ai-glow {
  position: absolute !important;
  width: 80px !important;
  height: 80px !important;
  background: radial-gradient(circle, rgba(102, 126, 234, 0.3) 0%, transparent 70%) !important;
  border-radius: 50% !important;
  animation: glow 2s ease-in-out infinite !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
}

@keyframes glow {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
  50% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
}

.progress-content-ai {
  width: 100% !important;
  text-align: center !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 15px !important;
  flex: 1 !important;
}

.progress-title-ai {
  font-size: 20px !important;
  font-weight: 700 !important;
  color: #2c3e50 !important;
  margin: 0 !important;
  line-height: 1.3 !important;
}

.ai-title {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  color: #667eea !important;
  flex-wrap: wrap !important;
  min-height: 32px !important;
}

.ai-badge {
  background: linear-gradient(135deg, #667eea, #764ba2) !important;
  color: white !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  padding: 4px 10px !important;
  border-radius: 20px !important;
  letter-spacing: 0.5px !important;
  display: inline-block !important;
}

.progress-text-ai {
  font-size: 15px !important;
  color: #6c757d !important;
  margin: 0 !important;
  line-height: 1.5 !important;
  min-height: 24px !important;
}

.ai-steps {
  display: flex !important;
  justify-content: space-between !important;
  gap: 10px !important;
  width: 100% !important;
  padding: 15px !important;
  background: white !important;
  border-radius: 12px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
  min-height: 80px !important;
  box-sizing: border-box !important;
}

.ai-step {
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 8px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  color: #adb5bd !important;
  min-height: 50px !important;
}

.ai-step i {
  font-size: 20px !important;
  display: block !important;
  width: 20px !important;
  height: 20px !important;
  line-height: 20px !important;
}

.ai-step.active { color: #28a745 !important; }
.ai-step.active i {
  color: #28a745 !important;
  animation: bounceIn 0.5s ease !important;
}

@keyframes bounceIn {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

.ai-step.processing { color: #667eea !important; }

.step-spinner {
  width: 20px !important;
  height: 20px !important;
  border: 3px solid #e9ecef !important;
  border-top-color: #667eea !important;
  border-radius: 50% !important;
  animation: spin 1s linear infinite !important;
  display: block !important;
}

.ai-step.pending i { color: #adb5bd !important; }
.ai-step span { display: block !important; text-align: center !important; }

.progress-bar-container-ai {
  width: 100% !important;
  margin-top: 5px !important;
  min-height: 8px !important;
}

.progress-bar-ai {
  width: 100% !important;
  height: 8px !important;
  background: #e9ecef !important;
  border-radius: 10px !important;
  overflow: hidden !important;
  position: relative !important;
  display: block !important;
}

.progress-bar-fill-ai {
  height: 100% !important;
  background: linear-gradient(90deg, #667eea, #764ba2) !important;
  border-radius: 10px !important;
  width: 0 !important;
  position: relative !important;
  display: block !important;
}

.ai-progress .ai-fill {
  background: linear-gradient(90deg, #667eea, #764ba2, #667eea) !important;
  background-size: 200% 100% !important;
  animation: aiProgress 2s ease-in-out infinite !important;
}

@keyframes aiProgress {
  0% { width: 30%; background-position: 0% 50%; }
  50% { width: 70%; background-position: 100% 50%; }
  100% { width: 95%; background-position: 0% 50%; }
}

.wait-message-ai {
  font-size: 13px !important;
  color: #6c757d !important;
  margin: 8px 0 0 !important;
  font-style: italic !important;
  min-height: 20px !important;
  line-height: 1.4 !important;
}


/* ============================================
   PANNEAU SUCCÈS
   ============================================ */
.success-wrapper {
  max-width: 500px !important;
  margin: 20px auto !important;
  padding: 15px !important;
  animation: slideUp 0.5s ease-out !important;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.success-checkmark {
  width: 60px !important;
  height: 60px !important;
  margin: 0 auto 15px !important;
  animation: scaleIn 0.4s ease-out !important;
}

@keyframes scaleIn {
  from { transform: scale(0); }
  to { transform: scale(1); }
}

.success-checkmark svg {
  width: 100% !important;
  height: 100% !important;
  border-radius: 50% !important;
  stroke-width: 3 !important;
  stroke: #28a745 !important;
  background: #e8f5e9 !important;
  padding: 10px !important;
}

.success-checkmark svg circle {
  stroke-dasharray: 166 !important;
  stroke-dashoffset: 166 !important;
  stroke: #28a745 !important;
  animation: drawCircle 0.4s ease-out 0.2s forwards !important;
}

.success-checkmark svg path {
  stroke-dasharray: 48 !important;
  stroke-dashoffset: 48 !important;
  stroke: #28a745 !important;
  stroke-width: 4 !important;
  animation: drawCheck 0.3s ease-out 0.5s forwards !important;
}

@keyframes drawCircle { to { stroke-dashoffset: 0; } }
@keyframes drawCheck { to { stroke-dashoffset: 0; } }

.success-card-compact {
  background: white !important;
  border-radius: 16px !important;
  padding: 20px !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
  text-align: center !important;
  border: 1px solid #e9ecef !important;
}

.success-title-compact {
  color: #28a745 !important;
  font-size: 22px !important;
  font-weight: 700 !important;
  margin: 0 0 12px !important;
  animation: fadeIn 0.5s ease 0.3s both !important;
}

.success-msg {
  color: #6c757d !important;
  font-size: 15px !important;
  line-height: 1.5 !important;
  margin: 0 0 20px !important;
  animation: fadeIn 0.5s ease 0.4s both !important;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.mini-progress {
  display: flex !important;
  justify-content: space-between !important;
  gap: 8px !important;
  margin-bottom: 20px !important;
  padding: 12px !important;
  background: #f8f9fa !important;
  border-radius: 10px !important;
}

.step {
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 6px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  color: #adb5bd !important;
  animation: fadeInUp2 0.4s ease both !important;
}

.step:nth-child(1) { animation-delay: 0.5s !important; }
.step:nth-child(2) { animation-delay: 0.6s !important; }
.step:nth-child(3) { animation-delay: 0.7s !important; }

@keyframes fadeInUp2 {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.step i {
  width: 32px !important;
  height: 32px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 50% !important;
  font-size: 14px !important;
  background: #e9ecef !important;
  color: #adb5bd !important;
  transition: all 0.3s ease !important;
}

.step.done i {
  background: linear-gradient(135deg, #28a745, #20c997) !important;
  color: white !important;
  box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3) !important;
}

.step.done { color: #28a745 !important; }

.step.active i {
  background: linear-gradient(135deg, #667eea, #764ba2) !important;
  color: white !important;
  animation: pulse 1.5s infinite !important;
}

.step.active { color: #667eea !important; }

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.compact-actions {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  animation: fadeIn 0.5s ease 0.8s both !important;
}

/* ============================================
   RESPONSIVE MOBILE
   ============================================ */
@media (max-width: 768px) {
  .test-header { height: 100px !important; }
  .test-title { font-size: 22px !important; }
  .test-icon { width: 45px !important; height: 45px !important; font-size: 20px !important; }
}

@media (max-width: 576px) {
  .test-header { height: 80px !important; margin-bottom: 20px !important; }
  .test-title { font-size: 18px !important; }
  .test-icon { width: 40px !important; height: 40px !important; font-size: 18px !important; }
  
  .progress-wrapper, .progress-wrapper-ai {
    padding: 0 10px !important;
    margin-bottom: 20px !important;
  }
  
  .progress-wrapper-ai { min-height: 550px !important; }
  
  .progress-card, .progress-card-ai {
    padding: 25px 18px !important;
    gap: 18px !important;
  }
  
  .progress-card-ai { min-height: 520px !important; }
  
  .progress-spinner { width: 50px !important; height: 50px !important; }
  
  .ai-animation, .ai-icon-wrapper {
    width: 60px !important;
    height: 60px !important;
  }
  
  .ai-icon { width: 50px !important; height: 50px !important; }
  
  .progress-title, .progress-title-ai { font-size: 18px !important; }
  .progress-text, .progress-text-ai { font-size: 14px !important; }
  
  .ai-steps {
    flex-direction: column !important;
    gap: 12px !important;
    padding: 12px !important;
    min-height: 150px !important;
  }
  
  .ai-step {
    flex-direction: row !important;
    justify-content: flex-start !important;
    gap: 12px !important;
    width: 100% !important;
    min-height: 40px !important;
  }
  
  .ai-step i, .step-spinner { flex-shrink: 0 !important; }
  .ai-step span { text-align: left !important; font-size: 13px !important; }
  
  .wait-message-ai { font-size: 12px !important; }
  
  .success-wrapper { padding: 10px !important; margin: 15px auto !important; }
  .success-checkmark { width: 50px !important; height: 50px !important; margin-bottom: 12px !important; }
  .success-card-compact { padding: 18px 15px !important; border-radius: 12px !important; }
  .success-title-compact { font-size: 20px !important; margin-bottom: 10px !important; }
  .success-msg { font-size: 14px !important; margin-bottom: 16px !important; }
  
  .mini-progress {
    padding: 10px 8px !important;
    gap: 6px !important;
    margin-bottom: 16px !important;
  }
  
  .step { font-size: 11px !important; gap: 5px !important; }
  .step i { width: 28px !important; height: 28px !important; font-size: 12px !important; }
  
  .compact-actions { gap: 8px !important; }
}

@media (max-width: 380px) {
  .test-header { height: 70px !important; }
  .test-title { font-size: 16px !important; }
  .test-icon { width: 35px !important; height: 35px !important; font-size: 16px !important; }
  
  .progress-wrapper-ai { min-height: 570px !important; }
  .progress-card, .progress-card-ai { padding: 20px 15px !important; }
  .progress-card-ai { min-height: 540px !important; }
  
  .progress-title, .progress-title-ai { font-size: 17px !important; }
  .progress-text, .progress-text-ai { font-size: 13px !important; }
  
  .ai-badge { font-size: 11px !important; padding: 3px 8px !important; }
  .ai-steps { padding: 10px !important; gap: 10px !important; min-height: 160px !important; }
  .ai-step span { font-size: 12px !important; }
  
  .success-title-compact { font-size: 18px !important; }
  .success-msg { font-size: 13px !important; }
  .step { font-size: 10px !important; }
  .step i { width: 26px !important; height: 26px !important; font-size: 11px !important; }
  
  
}

/* ============================================
   ANIMATION RÉDUITE (ACCESSIBILITÉ)
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}