:root {
  --color-background: #e9f0ec;
  --color-dark-blue: #1a2a4b;
  --color-orange: ##c1752d;
  --color-text-dark: #000000;
  --color-white: #ffffff;
}

body {
  background-color: var(--color-background);
  font-family: 'Arial', sans-serif;
  margin: 0;
  padding: 0;
}

.formation-page {
  max-width: 1200px;
  margin: 0 auto;
}

/* --- Styles du banner de couverture --- */
.banner {
  width: 100%;
  height: 300px; /* Hauteur fixe pour l'effet de couverture */
  overflow: hidden; /* Cache les parties de l'image qui dépassent */
  position: relative;
}

.banner-image {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Recadre l'image pour qu'elle remplisse le conteneur */
  display: block;
}

.content-wrapper {
  max-width: 100%; /* Limite la largeur du contenu pour une meilleure lisibilité */
  margin: 0 auto;
  padding: 2rem !important;
}

h1 {
  font-size: 2.5em;
  color: var(--color-dark-blue);
  margin-bottom: 10px;
}

h2 {
  font-size: 1.8em;
  color: var(--color-dark-blue);
  margin-bottom: 20px;
}

p,
ul {
    font-family: 'Poppins', sans-serif;
   font-size: 1.1em;
  color: #000;
  line-height: 1.6;
}

ul {
  list-style-type: disc;
  margin-left: 20px;
}

.metadata {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
}

.metadata span {
  padding: 5px 10px;
  font-size: 0.9em; /* Ajout d'une ombre pour un meilleur relief */
}

.button-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap; /* Permet aux boutons de passer à la ligne */
}

.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  text-decoration: none; /* Pour les liens dans les boutons */
}

.btn a {
  color: inherit;
  text-decoration: none;
}

.btn-orange {
  background-color: var(--color-orange);
  color: var(--color-white);
}

.btn-dark-blue {
  background-color: var(--color-dark-blue);
  color: var(--color-white);
}

.candidat-status {
  font-size: 2rem;
  color: var(--color-dark-blue);
  margin: 0;
  padding: 10px 20px; /* Pour qu'il ait la même hauteur que les boutons */
}

/* Sections */
section {
  margin-bottom: 40px;
  border-bottom: 1px solid #e0e0e0; /* Couleur plus douce pour la ligne de séparation */
  padding-bottom: 40px;
}

.propos-content {
  display: flex;
  gap: 40px;
}

.text-content,
.details-content,
.criteres,
.procedure {
  flex: 1;
}

/* --- Grille pour les cartes de bourses --- */
.bourses-grid {
  display: grid;
  grid-template-columns: repeat(
    auto-fit,
    minmax(250px, 1fr)
  ); /* 3 cartes par ligne sur les grands écrans */
  gap: 50px;
}

.bourse-card {
  background-color: var(--color-white);
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  text-align: center;
  display: flex;
  flex-direction: column;
}

.bourse-card img {
  width: 100%;
  height: 180px; /* Hauteur fixe pour les images des cartes */
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 10px;
}

.bourse-card h3 {
  font-size: 1.1em;
  color: var(--color-dark-blue);
  margin: 0 0 10px;
  text-align: left;
}

.bourse-card p {
  text-align: left;
}

.bourse-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto; /* Pousse le footer vers le bas */
  padding-top: 10px;
  border-top: 1px solid #e0e0e0;
}

.bourse-footer span {
  font-weight: bold;
  color: var(--color-dark-blue);
}

.no-bourses-message {
  font-size: 1.5em;
  color: var(--color-dark-blue);
  text-align: center;
  width: 100%;
}

/* --- Responsive pour les écrans mobiles et tablettes --- */
@media (max-width: 992px) {
  .bourses-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

@media (max-width: 768px) {
  .content-wrapper {
    padding: 20px;
  }

  h1 {
    font-size: 1.8em;
  }

  h2 {
    font-size: 1.5em;
  }

  .propos-content,
  .criteres-candidature .propos-content {
    flex-direction: column;
    gap: 20px;
  }

  .text-content,
  .details-content,
  .criteres,
  .procedure {
    flex: none;
  }

  .button-group {
    flex-direction: column;
    gap: 10px;
  }

  .btn {
    width: 100%;
  }

  .bourse-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

/* --- Section "Toutes les bourses" --- */
.other-formations {
  padding: 40px 20px;
  text-align: left;
}

/* Titre de section */
.other-formations .section-title {
  font-family: 'Barlow', sans-serif;
  font-size: 40px;
  font-weight: 700;
  color: #1a1a40;
  margin-bottom: 30px;
}

/* Grille des cartes */
.bourses-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 cartes par ligne */
  gap: 30px; /* Espace entre les cartes */
  max-width: 1100px;
  margin: 0 auto 40px auto; /* Centre le conteneur et ajoute une marge en bas */
}

/* --- Mise en page des cartes --- */
.bourse-card {
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%; /* Assure que toutes les cartes ont la même hauteur */
}

.bourse-card:hover {
  transform: translateY(-5px);
}

.bourse-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  border-radius: 10px 10px 0 0;
}

.bourse-card-content {
  padding: 15px 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.bourse-card-title {
  font-family: 'Barlow', sans-serif;
  font-size: 20px;
  font-weight: bold;
  color: #1a1a40;
  margin: 0 0 10px 0;
  text-align: left;
}

/* Footer de la carte */
.bourse-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.bourse-card-ecole {
  color: #c1753d;
  font-size: 0.9em;
  margin: 0;
}

.btn-dark-blue {
  background-color: #1a1a40;
  color: #fff;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: bold;
  font-size: 0.9em;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
  text-decoration: none;
}

.btn-dark-blue:hover {
  background-color: #c1753d;
}

/* Responsive pour les mobiles */
@media (max-width: 768px) {
  .other-formations .section-title {
    font-size: 24px;
  }

  .bourses-grid {
    grid-template-columns: 1fr; /* 1 carte par ligne */
    gap: 20px;
  }
}
/* Section de candidature */
.criteres-candidature {
  padding: 40px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Conteneur principal */
.criteres-candidature .propos-content {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-bottom: 30px;
  text-align: left;
}

.criteres-candidature h2 {
  font-family: 'Barlow', sans-serif;
  font-size: 24px;
  font-weight: bold;
  color: #1a1a40;
  margin-bottom: 0;
}

/* Ajout d'espace au-dessus du texte de la liste */
.criteres-candidature ul {
  margin-top: 15px;
  color: #555;
  font-family: 'Poppins', sans-serif;
  line-height: 1.6;
}

.criteres-candidature ul li {
  list-style-type: disc;
  margin-left: 20px;
}

/* Groupe de boutons */
.button-group {
  display: flex;
  flex-wrap: wrap; /* Permet aux boutons de passer à la ligne */
  justify-content: left;
  gap: 20px;
  margin-top: 40px;
}

/* Styles des boutons (génériques) */
.btn {
  padding: 12px 25px;
  border-radius: 8px;
  font-weight: bold;
  font-size: 1em;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap; /* Empêche le texte de passer à la ligne */
  display: inline-block;
}

.btn-orange {
  background-color: #d66b00;
  color: #fff;
}

.btn-dark-blue {
  background-color: #1a1a40;
  color: #fff;
}

.btn-orange:hover {
  background-color: #b05c00;
}

/* .btn-dark-blue:hover {
  background-color: #2c2a56;
} */

/* Message "Déjà candidat" */
.candidat-status {
  background-color: #ccc;
  color: #555;
  padding: 12px 25px;
  border-radius: 8px;
  font-weight: bold;
  font-size: 1em;
}

/* Responsive pour les mobiles */
@media (max-width: 768px) {
  .criteres-candidature .propos-content {
    flex-direction: column;
    text-align: center;
  }

  .criteres-candidature .propos-content h2,
  .criteres-candidature .propos-content ul {
    text-align: center;
    margin: 0 auto;
  }

  /* Les deux boutons ont une taille égale et sont centrés */
  .button-group {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 300px;
  }
}
