:root {
  --eafc-blue: #0A2E50;
  --eafc-yellow: #FFD200;
  --eafc-gray-light: #F4F6F9;
  --eafc-gray: #DCDCDC;
  --eafc-text-dark: #333333;
}

/* ------------------------------------------- */
/* Styles de base                */
/* ------------------------------------------- */

body {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  background-color: var(--eafc-gray-light);
  color: var(--eafc-text-dark);
}

h1, h2, h3 {
  font-family: 'Georgia', serif;
  color: var(--eafc-blue);
  line-height: 1.2;
  font-weight: bold;
}

.container {
  max-width: 960px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

/* ------------------------------------------- */
/* Bannière                    */
/* ------------------------------------------- */

.page-header {
  height: 250px;
  background-image: url('../img/banner-hybridation.jpg');
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.page-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(10, 46, 80, 0.7); /* Overlay sombre pour améliorer la lisibilité */
}

.header-container {
  position: relative;
  z-index: 2;
  color: white;
}

.header-title {
  font-size: 2.5rem;
  color: white;
  margin: 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.header-subtitle {
  font-size: 1.2rem;
  margin-top: 0.5rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* ------------------------------------------- */
/* Styles pour la navigation interne aux cartes */
/* ------------------------------------------- */

.card-navigation-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem auto; /* Ajuste l'espace pour un rendu compact */
  flex-wrap: wrap;
  max-width: 900px;
  padding: 0 1.5rem;
}
/* ------------------------------------------- */
/* Carte et Contenu                 */
/* ------------------------------------------- */

.card {
  background-color: white;
  border-radius: 12px;
  padding: 1.5rem; /* Ajustez ce padding pour un espace intérieur plus petit */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  max-width: 900px;
  margin: 1rem auto; /* Ajustez cette marge pour un espace extérieur plus petit */
}
/* Boutons de navigation en bas de page */
.navigation-buttons {
  display: flex;
  justify-content: space-between;
  margin: 1rem auto; /* Marge réduite pour un rendu plus compact */
  gap: 1rem;
  flex-wrap: wrap;
  max-width: 900px;
  padding: 0 1.5rem;
}
.intro {
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 2rem;
}

.toggle-link {
  color: var(--eafc-blue);
  font-weight: bold;
  text-decoration: underline;
  cursor: pointer;
  display: block;
  margin-bottom: 1rem;
}

.explanation-block {
  background-color: var(--eafc-gray-light);
  border-left: 4px solid var(--eafc-yellow);
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 4px;
}

/* ------------------------------------------- */
/* Boutons                      */
/* ------------------------------------------- */

.btn {
  display: inline-block;
  padding: 1rem;
  font-size: 1rem;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
  border-radius: 8px;
  transition: background-color 0.3s ease, transform 0.2s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.btn-primary {
  background-color: var(--eafc-blue);
  color: white;
  border: 2px solid var(--eafc-blue);
}

.btn-secondary {
  background-color: transparent;
  color: var(--eafc-blue);
  border: 2px solid var(--eafc-blue);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary:hover {
  background-color: #08223B;
}

.btn-secondary:hover {
  background-color: rgba(10, 46, 80, 0.1);
}

/* Styles pour les boutons à l'intérieur d'une carte (les boutons de choix) */
.choice-buttons {
  display: block;
  margin-top: 1.5rem;
}

.choice-buttons a.btn {
  display: block;
  width: 100%;
  margin-bottom: 1rem;
  box-sizing: border-box;
}

/* Styles pour les boutons de navigation en bas de page */
.navigation-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 2rem auto;
    flex-wrap: wrap;
    max-width: 900px;
    padding: 0 1.5rem;
}

/* ------------------------------------------- */
/* Barre de progression                */
/* ------------------------------------------- */

.progress-container {
  width: min(90%, 900px); /* Alignement avec la carte et les boutons de navigation */
  margin: 1rem auto 0;
  height: 8px;
  background-color: #e9ecef;
  border-radius: 4px;
}

.progress-bar {
  height: 100%;
  width: var(--progress-width, 0%); /* Utilise la variable pour la progression */
  background-color: var(--eafc-blue); /* Couleur de la barre de progression */
  border-radius: 4px;
  transition: width 0.4s ease; /* Animation fluide de la progression */
}

/* ------------------------------------------- */
/* Pied de page                */
/* ------------------------------------------- */

.page-footer {
  background-color: var(--eafc-blue);
  color: white;
  padding: 2rem; /* Augmentation du padding pour plus d'espace */
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.page-footer p {
  margin: 0;
  font-size: 0.9rem;
}

.footer-logo {
  max-width: 200px; /* Augmentation de la taille maximale du logo */
  height: auto;
  margin-left: 1rem;
}

/* Media Queries pour la responsivité */
@media (max-width: 768px) {
  .page-footer {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem;
  }
  .page-footer p {
    margin-bottom: 1rem;
  }
  .footer-logo {
    margin-left: 0;
    max-width: 50px; /* Ajuster la taille du logo pour les petits écrans */
  }
  .card, .progress-container, .navigation-buttons {
    margin-left: 1rem;
    margin-right: 1rem;
  }
}

/* Style du Pop-up */
.popup-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(33, 33, 33, 0.8);
  display: none; /* Caché par défaut */
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.popup-content {
  background-color: #fff;
  padding: 2rem;
  border-radius: 10px;
  text-align: left; /* CHANGEMENT ICI : aligne le texte à gauche */
  max-width: 500px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  position: relative;
}

.popup-content h3 {
  color: var(--eafc-blue);
  text-align: left; /* Assure que le titre du pop-up est aussi aligné à gauche */
}

.popup-content p {
  margin: 1rem 0;
  text-align: left; /* Assure que les paragraphes sont aussi alignés à gauche */
}

.popup-content ul {
    list-style: disc;
    padding-left: 1.5rem; /* Ajuste l'indentation de la liste */
    margin: 1rem 0; /* Ajoute un peu d'espace autour de la liste */
    text-align: left;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  border: none;
  background: transparent;
  color: #aaa;
}
/* Styles pour les boutons de navigation en bas de page */
.navigation-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}
/* Styles pour les boutons à l'intérieur d'une carte */
.card .btn,
.card button.btn {
  display: block; /* Force le bouton à se comporter comme un bloc (pleine largeur) */
  width: 100%; /* Prend la largeur de l'encadré parent */
  margin-top: 1rem; /* Ajoute un espace au-dessus du bouton */
  box-sizing: border-box; /* S'assure que le padding et la bordure sont inclus dans la largeur */
}
/* ===== Footer EAFC unifié ===== */
.eafc-footer {
  background: #0a2e50;   /* bleu EAFC */
  color: #fff;
  padding: 1.25rem 0;
}

.eafc-footer .footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.eafc-footer .footer-copy {
  margin: 0;
  font-size: 0.95rem;
  opacity: 0.95;
}

.eafc-footer .footer-desc {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.85;
}

.eafc-footer .footer-logos img {
  height: 36px;      /* ajuste si besoin */
  width: auto;
  display: block;
}
/* Adaptation mobile : pile les éléments */
@media (max-width: 768px) {
  .eafc-footer .footer-inner {
    justify-content: center;
    text-align: center;
  }
}

/* Style pour l'encadré "Pourquoi cette question ?" */
.note-box {
  border-left: 4px solid var(--eafc-yellow);
  padding: 1.5rem; /* Augmentez cette valeur pour plus d'espace */
  margin-top: 1.25rem;
  border-radius: 4px; /* Un petit arrondi pour adoucir le coin */
  background-color: var(--eafc-gray-light); /* Fond gris clair pour la clarté */
}

/* Style pour le titre à l'intérieur de l'encadré */
.note-box h3 {
  margin-top: 0;
  color: var(--eafc-blue);
}
.footer-synthese .footer-logos img {
  height: 35px !important;
  width: auto !important;
}
.footer-synthese .footer-inner {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  max-width: 900px;
  margin: 0 auto;
}

.footer-synthese {
  background-color: var(--eafc-blue);
  color: white;
}

.main-nav {
  text-align: center;
  padding: 15px 0;
  background-color: #f8f8f8;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-top: 25px; /* Ajustez cette valeur si nécessaire pour la hauteur de votre bannière */
}

.main-nav a {
  text-decoration: none;
  color: #333;
  font-weight: bold;
  margin: 0 20px;
}

.main-nav a:hover {
  color: #007bff;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  /* ... le reste de vos styles ... */
}

.filters-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    padding: 2rem 1rem;
    background-color: #f9f9f9;
    border-radius: 12px;
    margin-top: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.filter-group {
    flex: 1;
    min-width: 250px;
}

.filter-group h3 {
    font-size: 1.2rem;
    color: var(--eafc-blue);
    margin-bottom: 0.75rem;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-btn {
    background-color: #eee;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 0.75rem 1.25rem;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
}

.filter-btn:hover {
    background-color: #e0e0e0;
}

.filter-btn.active {
    background-color: var(--eafc-blue);
    color: white;
    border-color: var(--eafc-blue);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    color: #555;
    margin-top: 0.5rem;
}

.tool-card {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    border-radius: 12px;
    background-color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.tool-card img {
    max-width: 100px;
    height: auto;
    margin-bottom: 1rem;
}

.tool-card h4 {
    color: var(--eafc-blue);
    font-size: 1.5rem;
    margin: 0 0 0.5rem;
}

.tool-card p {
    font-size: 1rem;
    color: #666;
    margin: 0 0 1rem;
}
