/* Styles spécifiques à la page d'accueil */

/* Header dynamique */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: white;
  z-index: 100;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 15px 0;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
}

/* Logo styles */
.logo {
  height: 60px;
  transition: all 0.3s ease;
}

/* Header réduit après scroll */
.header-scrolled {
  padding: 8px 0;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.15);
  background-color: rgba(255, 255, 255, 0.95);
}

/* Logo réduit après scroll */
.logo-scrolled {
  height: 45px;
}

/* Navigation menu */
nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

nav ul li {
  margin: 0 5px;
}

nav ul li a {
  display: block;
  padding: 10px 15px;
  color: #333;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: all 0.3s ease;
  border-radius: 4px;
}

nav ul li a:hover {
  color: #3AC1C4;
  background-color: rgba(58, 193, 196, 0.05);
}

nav ul li a.active {
  color: #3AC1C4;
  border-bottom: 2px solid #3AC1C4;
}

/* Adaptation du menu lors du scroll */
.header-scrolled nav ul li a {
  font-size: 0.95rem;
  padding: 8px 12px;
}

/* Menu hamburger (mobile) */
.menu-toggle {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #333;
}

/* Section hero avec image et overlay */
.hero {
  position: relative;
  width: 100%;
  min-height: 500px;
  padding: 150px 0 80px; /* Ajusté pour compenser le header fixe */
  text-align: center;
  color: white;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('../../images/accueil.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: -1;
}

/* Suppression de l'overlay bleu turquoise */
.hero::after {
  display: none; /* Cette ligne désactive complètement l'overlay */
}

/* Léger assombrissement pour améliorer la lisibilité du texte blanc,
   décommenter les lignes ci-dessous et commentez la ligne "display: none" au-dessus */

.hero::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.3);
  z-index: -1;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 2.8rem;
  margin-bottom: 20px;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.hero p {
  font-size: 1.3rem;
  max-width: 750px;
  margin: 0 auto 30px;
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Styles révisés pour les boutons du hero */
.hero-buttons {
  margin-bottom: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.main-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 15px;
}

.hero-buttons .btn {
  margin: 0 10px 10px;
  font-weight: 600;
  padding: 12px 28px;
}

.hero-buttons .btn-secondary {
  background-color: transparent;
  color: white;
  border: 2px solid white;
}

.hero-buttons .btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.donate-button-container {
  margin-top: 10px;
}

.btn-donate {
  background-color: #F0855D;
  border: 2px solid #F0855D;
  position: relative;
  overflow: hidden;
  display: inline-block;
}

.btn-donate i {
  margin-left: 8px;
}

.btn-donate:hover {
  background-color: #e67649;
  border-color: #e67649;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(240, 133, 93, 0.4);
}

/* Animation de pulsation */
.pulse-animation {
  animation: pulse 2s infinite;
  box-shadow: 0 0 0 rgba(240, 133, 93, 0.4);
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(240, 133, 93, 0.7);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(240, 133, 93, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(240, 133, 93, 0);
  }
}

/* Section chiffres clés */
.key-figures {
  background-color: white;
  text-align: center;
  padding: 80px 0;
}

.key-figures h2 {
  color: #3AC1C4;
  margin-bottom: 40px;
  font-size: 2rem;
}

.figures-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
}

.figure-card {
  flex: 1;
  min-width: 220px;
  max-width: 280px;
  padding: 30px 20px;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.figure-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.figure-number {
  font-size: 3rem;
  font-weight: 700;
  color: #F0855D;
  margin-bottom: 15px;
}

.figure-card p {
  font-size: 1rem;
  line-height: 1.5;
}

/* Section avantages */
.benefits {
  background-color: var(--light-color);
  padding: 80px 0;
}

.benefits h2 {
  color: #3AC1C4;
  text-align: center;
  margin-bottom: 40px;
  font-size: 2rem;
}

.benefits-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.benefit {
  flex: 1;
  min-width: 280px;
  display: flex;
  align-items: flex-start;
  background-color: white;
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease;
}

.benefit:hover {
  transform: translateY(-5px);
}

/* Style uniforme pour les icônes */
.benefit-icon {
  width: 60px;
  height: 60px;
  min-width: 60px;
  margin-right: 20px;
  background-color: #F0855D;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Taille uniforme pour les icônes FontAwesome */
.benefit-icon i {
  color: white;
  font-size: 24px;
}

.benefit-content {
  flex: 1;
}

.benefit-content h3 {
  color: #3AC1C4;
  margin-bottom: 10px;
  font-size: 1.3rem;
}

.benefit-content p {
  color: #333;
  font-size: 1rem;
  line-height: 1.5;
}

/* Styles pour la modale */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.7);
  animation: fadeIn 0.3s;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  position: relative;
  background-color: #fff;
  margin: 5% auto;
  padding: 0;
  border-radius: 10px;
  width: 80%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
  animation: slideIn 0.4s;
}

@keyframes slideIn {
  from { transform: translateY(-50px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.close-modal {
  position: absolute;
  right: 20px;
  top: 15px;
  color: #fff;
  font-size: 30px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s;
}

.close-modal:hover {
  color: #F0855D;
  transform: scale(1.1);
}

.modal-header {
  background-color: #3AC1C4;
  color: white;
  padding: 20px 30px;
  border-radius: 10px 10px 0 0;
  text-align: center;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.8rem;
  color: white;
  line-height: 1.4;
  padding-right: 30px; /* Espace pour le bouton de fermeture */
}

.modal-body {
  padding: 25px 30px 30px;
}

/* CSS modifié pour l'image dans la modale */
.modal-image {
  width: 100%;
  height: auto;
  max-height: none; /* Suppression de la hauteur maximale contraignante */
  margin-bottom: 25px;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-img {
  width: auto; /* Modification pour ne pas étirer l'image */
  max-width: 100%; /* S'assurer que l'image ne dépasse pas la largeur du conteneur */
  height: auto; /* Hauteur automatique pour maintenir les proportions */
  object-fit: contain; /* Contenir l'image entière sans la couper */
  display: block;
  transition: transform 0.5s ease;
  max-height: 400px; /* Hauteur maximale pour éviter qu'elle prenne trop de place */
}

.modal-img:hover {
  transform: scale(1.03);
}

/* Media query pour grands écrans */
@media (min-width: 1200px) {
  .modal-img {
    max-height: 450px; /* Hauteur maximale plus grande pour grands écrans */
  }
}

.modal-intro {
  font-size: 1.15rem;
  color: #444;
  margin-bottom: 25px;
  line-height: 1.5;
}

.modal-body h3 {
  color: #3AC1C4;
  font-size: 1.6rem;
  margin: 20px 0 15px;
}

.modal-body h4 {
  color: #F0855D;
  font-size: 1.25rem;
  margin: 20px 0 10px;
}

.modal-body p {
  margin-bottom: 15px;
  line-height: 1.5;
}

.modal-body ul {
  margin-bottom: 20px;
  padding-left: 20px;
}

.modal-body li {
  margin-bottom: 8px;
  position: relative;
  line-height: 1.4;
}

.modal-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  margin: 25px 0;
}

.modal-column {
  flex: 1;
  min-width: 280px;
}

.modal-quote {
  font-size: 1.2rem;
  color: #3AC1C4;
  text-align: center;
  margin: 30px 0 20px;
  font-weight: 500;
}

.modal-cta {
  text-align: center;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

.btn-donate-large {
  display: inline-block;
  padding: 15px 40px;
  background-color: #F0855D;
  color: white;
  text-decoration: none;
  border-radius: 50px;
  font-size: 1.2rem;
  font-weight: 600;
  transition: all 0.3s;
  margin-bottom: 20px;
  border: none;
}

.btn-donate-large:hover {
  background-color: #e67649;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(240, 133, 93, 0.3);
}

.modal-thank-you {
  font-size: 1rem;
  color: #666;
  margin-top: 15px;
}

/* Responsive */
@media (max-width: 992px) {
  .benefit {
    min-width: 45%;
  }
}

@media (max-width: 768px) {
  /* Header responsive */
  .menu-toggle {
    display: block;
  }
  
  header {
    padding: 10px 0;
  }
  
  .header-scrolled {
    padding: 5px 0;
  }
  
  .logo {
    height: 50px;
  }
  
  .logo-scrolled {
    height: 40px;
  }
  
  nav ul {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: white;
    flex-direction: column;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  
  nav.active ul {
    max-height: 300px;
  }
  
  nav ul li {
    margin: 0;
  }
  
  nav ul li a {
    padding: 15px 20px;
    border-bottom: 1px solid #f1f1f1;
  }
  
  /* Adapter le hero pour mobile */
  .hero {
    min-height: 400px;
    padding: 120px 0 60px;
  }
  
  .hero h1 {
    font-size: 2.2rem;
  }
  
  .hero p {
    font-size: 1.1rem;
  }
  
  .main-buttons {
    flex-direction: row;
  }

  .figures-container {
    flex-direction: column;
    align-items: center;
  }

  .figure-card {
    width: 100%;
    max-width: 320px;
  }

  .benefits-container {
    flex-direction: column;
  }
  
  .benefit {
    min-width: 100%;
  }
  
  .modal-content {
    width: 95%;
    margin: 10% auto;
  }
  
  .modal-columns {
    flex-direction: column;
    gap: 15px;
  }
  
  .modal-header h2 {
    font-size: 1.5rem;
  }
  
  .btn-donate-large {
    width: 100%;
    padding: 12px 20px;
  }
  
  /* CSS modifié pour responsive */
  .modal-image {
    max-height: 200px;
  }
  
  .modal-img {
    max-height: 180px;
  }
}

@media (max-width: 480px) {
  /* Header pour très petits écrans */
  .header-container {
    padding: 0 15px;
  }
  
  .logo {
    height: 45px;
  }
  
  .logo-scrolled {
    height: 35px;
  }
  
  .hero {
    min-height: 350px;
  }
  
  .hero h1 {
    font-size: 1.8rem;
  }
  
  .main-buttons {
    flex-direction: column;
    width: 100%;
  }
  
  .hero-buttons .btn {
    display: block;
    margin: 0 auto 15px;
    width: 80%;
  }
  
  .donate-button-container {
    width: 100%;
  }
  
  .donate-button-container .btn-donate {
    width: 80%;
    margin: 0 auto;
    display: block;
  }
  
  .modal-content {
    margin: 5% auto;
  }
  
  .modal-header {
    padding: 15px 20px;
  }
  
  .modal-body {
    padding: 20px;
  }
  
  .modal-header h2 {
    font-size: 1.3rem;
    padding-right: 25px;
  }
  
  .close-modal {
    right: 15px;
    top: 10px;
  }
  
  /* CSS modifié pour petit écran */
  .modal-image {
    max-height: 150px;
  }
  
  .modal-img {
    max-height: 140px;
  }
}