/* ==================================== */
/* 🌍 CONTENU DES PAGES */
/* ==================================== */

.page-content {
  width: 80%;
  margin: 40px auto;
  text-align: center;
}

.page-content h1 {
  font-size: 28px;
  color: black;
  margin-bottom: 10px;
}






.ressources-page .main-container {
    display: flex;
    min-height: 100vh;
}

.ressources-page .sidebar {
    height: 100vh;
    background: #f5f5f5;
    padding: 30px 10px;
    border-right: 2px solid #ddd;
}
.main-container {
    display: flex;
    height: calc(100vh - 140px); /* ajuste selon la hauteur de ton header + navbar */
  }
  
  /* ================= */
  /* SIDEBAR GAUCHE    */
  /* ================= */
  .sidebar {
    width: 220px;
    background: #f5f5f5;
    padding: 30px 10px;
    border-right: 2px solid #ddd;
  }
  
  .sidebar ul {
    list-style: none;
  }
  
  .sidebar li {
    margin-bottom: 20px;
  }
  
  .sidebar a {
    text-decoration: none;
    display: block;
    text-align: center;
    font-weight: bold;
    color: black;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 12px;
    transition: all 0.2s;
  }
  
  .sidebar a:hover,
  .sidebar a.active {
    background-color: #d6f1e3;
    border-color: #1f9c6b;
    color: #1f9c6b;
  }
  
  /* ================= */
  /* CONTENU CENTRAL   */
  /* ================= */
  .content-area {
    flex-grow: 1;
    padding: 40px;
    background: #fff;
  }
  
  /* Grille des cartes */
  .cards-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
  }
  
  /* Carte verte */
  .card {
    background: #f7fff8;
    border-radius: 10px;
    border: 2px solid rgb(69, 128, 69);
    padding: 25px;
    height: 300px;
    width: 80%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
  }
  
  .card-image {
    width: 60%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
  }
  
  .card h3 {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 15px;
  }
  
  .card p {
    font-size: 16px;
    color: #555;
  }
  
  .btn-details {
    text-align: center;
    background-color: #1e7a1e;
    color: white;
    margin-top: 10px;
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.3s ease;
  }
  
  .btn-details:hover {
    background-color: #145214;
  }
  /* =================== */
/* RENDRE LA PAGE RESPONSIVE */
/* =================== */

@media (max-width: 1024px) {
  /* Adaptation pour les tablettes et petits écrans */



  .main-container {
      flex-direction: column;
      height: auto;
  }

  .sidebar {
      width: 100%;
      padding: 20px 10px;
      border-right: none;
      border-bottom: 2px solid #ddd;
  }

  .content-area {
      padding: 20px;
  }

  /* Cartes en une seule colonne pour les tablettes et plus petits écrans */
  .cards-container {
      grid-template-columns: 1fr 1fr; /* 2 colonnes */
  }

  .card {
      width: 100%; /* S'étend sur toute la largeur disponible */
      height: auto;
  }
}

@media (max-width: 600px) {
  /* Adaptation pour les smartphones */


  .main-container {
      flex-direction: column;
  }

  .sidebar {
      width: 100%;
      padding: 15px;
      border-bottom: 2px solid #ddd;
  }

  .content-area {
      padding: 15px;
  }

  /* Cartes en une seule colonne sur mobile */
  .cards-container {
      grid-template-columns: 1fr; /* 1 colonne pour mobile */
  }

  .card {
      padding: 15px;
  }

  .card h3 {
      font-size: 16px;
  }

  .card p {
      font-size: 14px;
  }

  .btn-details {
      padding: 10px 20px;
  }
}
/* partie projet dans espace projet (description du projet) */
/* DESCRIPTION PROJET  */
.projet-description {
  width: 75%;              /* ✅ Largeur contrôlée mais pas bloquée */
  margin: 40px auto;       /* ✅ Centre horizontalement */
  padding: 60px 40px;
  border-radius: 10px;
  transition: all 0.3s ease-in-out;
  background-color: #fff;
  ;
}


.projet-description .container {
  padding: 20px 30px;
  background-color: white;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}

.projet-description h1 {
  font-size: 1.5rem;
  color: #1a202c;
  font-weight: bold;
  margin-bottom: 12px;
  text-align: center;
}

.projet-description h3 {
  font-size: 1.4rem;
  color: #2d3748;
  margin-top: 30px;
  margin-bottom: 10px;
  border-left: 4px solid #38a169;
  padding-left: 12px;
}

.projet-description .intro {
  font-size: 1.125rem;
  color: #4a5568;
  line-height: 1.8;
  margin-bottom: 25px;
}

.projet-description p {
  font-size: 1.05rem;
  color: #2d3748;
  line-height: 1.7;
}

@media screen and (max-width: 992px) {
  .projet-description {
    width: 90%;
    padding: 40px 20px;
  }

  .projet-description .container {
    padding: 20px;
  }

 @media screen and (max-width: 992px) {
  .projet-description h1 {
    font-size: 1.6rem;   /* légèrement plus gros pour rester lisible */
    word-break: break-word;
    text-align: center;
    margin-bottom: 20px;
  }
}

@media screen and (max-width: 576px) {
  .projet-description h1 {
    font-size: 1.4rem;
    padding: 0 10px;
    line-height: 1.3;
  }
}


  .projet-description h3 {
    font-size: 1.2rem;
  }

  .projet-description .intro,
  .projet-description p {
    font-size: 1rem;
  }
}

@media screen and (max-width: 576px) {
  .projet-description {
    width: 95%;
    padding: 30px 15px;
  }

 

  .projet-description h3 {
    font-size: 1rem;
    padding-left: 8px;
  }

  .projet-description .intro,
  .projet-description p {
    font-size: 0.95rem;
    line-height: 1.6;
  }
}



/* partie projet dans espace projet (description du projet) */


/* ============================ */
/*  Rendre responsive la page ressource */
/* ============================ */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  overflow-x: hidden;
  max-width: 100%;
  width: 100%;
}

body {
  overflow-x: hidden;
  max-width: 100vw;
  position: relative;
}

/* Mise en page principale */
.main-container {
  display: flex;
  flex-wrap: wrap;
  padding: 20px;
  gap: 30px;
  box-sizing: border-box;
  max-width: 100%;
}

/* Sidebar */
.sidebar {
  flex: 1 1 200px;
  min-width: 200px;
  background-color: #f9f9f9;
  padding: 15px;
  border-radius: 10px;
}

.sidebar ul {
  list-style: none;
  padding: 0;
}

.sidebar li {
  margin-bottom: 15px;
}

.sidebar a {
  text-decoration: none;
  color: #333;
  font-weight: bold;
}

/* Zone principale */
.content-area {
  flex: 3 1 600px;
  max-width: 100%;
  box-sizing: border-box;
}

/* Cartes */
.cards-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: flex-start;
  overflow-x: hidden;
}

.card {
  background-color: white;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 15px;
  flex: 1 1 300px;
  max-width: 350px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-x: hidden;
}

.card img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

.btn-details {
  margin-top: auto;
  background-color: green;
  color: white;
  padding: 10px;
  text-align: center;
  border-radius: 8px;
  font-weight: bold;
  text-decoration: none;
}

.btn-details:hover {
  background-color: darkgreen;
}

/* Responsive layout pour petits écrans */
@media (max-width: 768px) {
  .main-container {
    flex-direction: column;
    padding: 15px;
    gap: 20px;
  }

  .sidebar {
    width: 100%;
    margin-bottom: 20px;
    text-align: center;
  }

  .content-area {
    width: 100%;
  }

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

  .card {
    width: 90%;
    margin-bottom: 20px;
  }
}

/* Sous-navbar responsive */
.sub-navbar ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  padding: 0;
  margin: 0;
  overflow-x: hidden;
}
