/* ======================================= */
/* STYLES SPÉCIFIQUES POUR LA PAGE DE TEST D'ANGLAIS */
/* ======================================= */

/* Section hero avec image */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: auto;
}

.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 59, 92, 0.6);
  z-index: 1;
}



.hero-text {
  text-align: center;
  color: white;
  z-index: 2;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 800px;
  padding: 0 20px;
  width: 90%;
}

.hero-text h2 {
  font-size: 3em;
  font-weight: bold;
  margin-bottom: 20px;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
  color: white;
  /* Fallback pour Safari */
  -webkit-text-fill-color: white;
}

.hero-text p {
  font-size: 1.2em;
  line-height: 1.6;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
  margin: 0;
  color: white;
}

/* Conteneur principal du test */
.test-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e3f2fd 50%, #f8f9fa 100%);
  border-radius: 15px;
  box-shadow: 0 15px 40px rgba(0, 174, 239, 0.15);
  border: 1px solid rgba(0, 174, 239, 0.1);
  position: relative;
  overflow: hidden;
}

.test-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #00AEEF, #008fbf, #00AEEF);
  background-size: 200% 100%;
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* En-tête du test */
.test-header {
  text-align: center;
  margin-bottom: 40px;
  padding: 30px;
  background: linear-gradient(135deg, #ffffff 0%, #f0f8ff 100%);
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 174, 239, 0.1);
  border: 1px solid rgba(0, 174, 239, 0.05);
}

.test-header h1 {
  color: #003B5C;
  font-size: 2.5em;
  margin-bottom: 15px;
  background: linear-gradient(135deg, #003B5C, #00AEEF);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.test-header p {
  color: #555;
  font-size: 1.1em;
  line-height: 1.6;
  margin: 0;
}

/* Section d'information du test */
.test-info {
  background: #eaf6fb;
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 30px;
  border-left: 4px solid #00AEEF;
}

.test-info h3 {
  color: #003B5C;
  margin-bottom: 10px;
}

.test-info ul {
  margin: 0;
  padding-left: 20px;
}

.test-info li {
  margin-bottom: 5px;
  color: #555;
}

/* Conteneur des questions */
.question-container {
  display: none;
  margin-bottom: 30px;
}

.question-container.active {
  display: block;
}

/* Style des questions */
.question {
  background: #f8f9fa;
  padding: 25px;
  border-radius: 10px;
  margin-bottom: 20px;
  border-left: 4px solid #00AEEF;
}

.question h3 {
  color: #003B5C;
  margin-bottom: 15px;
  font-size: 1.2em;
}

.question-text {
  font-size: 1.1em;
  margin-bottom: 20px;
  color: #333;
  line-height: 1.5;
}

/* Options de réponse */
.options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.option {
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  padding: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.option:hover {
  border-color: #00AEEF;
  background: #f0f8ff;
}

.option.selected {
  border-color: #00AEEF;
  background: #eaf6fb;
}

.option input[type="radio"] {
  margin-right: 10px;
}

/* Barre de progression */
.progress-bar {
  width: 100%;
  height: 8px;
  background: #e0e0e0;
  border-radius: 4px;
  margin-bottom: 30px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #00AEEF, #003B5C);
  width: 0%;
  transition: width 0.3s ease;
}

/* Navigation du test */
.test-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 30px;
}

/* Boutons de navigation */
.btn-test {
  background: #00AEEF;
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1em;
  transition: all 0.3s ease;
}

.btn-test:hover {
  background: #0098d1;
  transform: translateY(-2px);
}

.btn-test:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
}

/* Compteur de questions */
.question-counter {
  color: #666;
  font-size: 0.9em;
}

/* Conteneur des résultats */
.result-container {
  display: none;
  text-align: center;
  padding: 40px 20px;
}

.result-container.active {
  display: block;
}

/* Badge de résultat */
.result-badge {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2em;
  font-weight: bold;
  color: white;
}

/* Couleurs des niveaux CEFR */
.level-a1 { background: linear-gradient(135deg, #ff6b6b, #ee5a52); }
.level-a2 { background: linear-gradient(135deg, #ffa726, #ff9800); }
.level-b1 { background: linear-gradient(135deg, #66bb6a, #4caf50); }
.level-b2 { background: linear-gradient(135deg, #42a5f5, #2196f3); }
.level-c1 { background: linear-gradient(135deg, #ab47bc, #9c27b0); }
.level-c2 { background: linear-gradient(135deg, #26a69a, #009688); }

/* Niveau de résultat */
.result-level {
  font-size: 2.5em;
  color: #003B5C;
  margin-bottom: 15px;
  font-weight: bold;
}

/* Description du résultat */
.result-description {
  color: #666;
  font-size: 1.1em;
  line-height: 1.6;
  margin-bottom: 30px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Détails du résultat */
.result-details {
  background: #f8f9fa;
  padding: 25px;
  border-radius: 10px;
  margin-bottom: 30px;
  text-align: left;
}

.result-details h4 {
  color: #003B5C;
  margin-bottom: 15px;
}

.result-details ul {
  margin: 0;
  padding-left: 20px;
}

.result-details li {
  margin-bottom: 8px;
  color: #555;
}

/* Actions du test */
.test-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 768px) {
  .test-container {
    padding: 20px 15px;
  }
  
  .test-header h1 {
    font-size: 2em;
  }
  
  .question {
    padding: 20px;
  }
  
  .test-navigation {
    flex-direction: column;
    gap: 15px;
  }
  
  .test-actions {
    flex-direction: column;
    align-items: center;
  }
}

/* Styles spécifiques pour Safari et autres navigateurs */
@supports (-webkit-appearance: none) {
  .hero-text h1 {
    -webkit-text-fill-color: white;
    color: white;
  }
  
  .hero-text p {
    -webkit-text-fill-color: white;
    color: white;
  }
}

/* Styles spécifiques pour Safari */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
  .hero-text {
    text-align: center !important;
    color: white !important;
    z-index: 2 !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    max-width: 800px !important;
    padding: 0 20px !important;
    width: 90% !important;
  }
  
  .hero-text h2 {
    font-size: 3em !important;
    font-weight: bold !important;
    margin-bottom: 20px !important;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5) !important;
    color: white !important;
    -webkit-text-fill-color: white !important;
  }
  
  .hero-text p {
    font-size: 1.2em !important;
    line-height: 1.6 !important;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5) !important;
    margin: 0 !important;
    color: white !important;
    -webkit-text-fill-color: white !important;
  }
}

/* Fallback pour tous les navigateurs */
.hero-text h2,
.hero-text p {
  color: white !important;
  -webkit-text-fill-color: white !important;
}

/* Forcer l'affichage sur Chrome - Override des styles de styles.css */
body.test-page .hero-text {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  z-index: 2 !important;
  text-align: center !important;
  color: white !important;
  max-width: 800px !important;
  padding: 0 20px !important;
  width: 90% !important;
}

body.test-page .hero-text h2 {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  font-size: 3em !important;
  font-weight: bold !important;
  color: white !important;
  -webkit-text-fill-color: white !important;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5) !important;
  margin-bottom: 20px !important;
  line-height: 1.2 !important;
}

body.test-page .hero-text p {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  font-size: 1.2em !important;
  color: white !important;
  -webkit-text-fill-color: white !important;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5) !important;
  margin: 0 !important;
  line-height: 1.6 !important;
}
