/* ======================================================================
   RESEARCH SECTION – thèmes de recherche
   ----------------------------------------------------------------------
   .research-section            – wrapper (padding + centering)
   .research-section__container – grille 2 colonnes (statique | dynamiques)
   .research-card--static       – carte fixe à gauche
   .research-section__cards     – pile de cartes accordéon à droite
   .research-card               – carte accordéon
   .research-card__header       – entête cliquable
   .research-card__content      – contenu masqué
   ====================================================================== */

/* === SECTION GLOBALE ================================================== */
.research-section {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 50px;
  padding-top: 0;
}

/* === GRILLE PRINCIPALE =============================================== */
.research-section__container {
  display: grid;
  grid-template-columns: 1.2fr 1fr; /* statique | dynamiques */
  gap: 50px;
  align-items: start;
  max-width: 1400px;
  width: 100%;
}

/* ======================================================================
   CARTE STATIQUE (gauche)
   ====================================================================== */
.research-card--static {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 480px;
  padding: 30px;
  background: #f7fafe;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  color: #555;
}

.research-card--static h2 {
  margin: 0 0 20px;
  font-size: 26px;
  color: #557c8c;
}

.research-card--static p {
  margin: 0 0 12px;
  font-size: 16px;
  line-height: 1.6;
  text-align: justify;
}

/* --- listes internes -------------------------------------------------- */
.research-card--static ul,
.research-card__content ul {
  list-style: disc inside;
  margin: 0 0 1rem;
  padding: 10px 0 0 1.25rem;
  color: #555;
}

.research-card--static li,
.research-card__content li {
  margin-bottom: 6px;
  line-height: 1.6;
}

/* ======================================================================
   CARTES DYNAMIQUES (droite)
   ====================================================================== */
.research-section__cards {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.research-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden; /* masque le contenu fermé */
  transition: transform 0.3s, box-shadow 0.3s;
}

.research-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* --- entête cliquable ------------------------------------------------- */
.research-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  cursor: pointer;
}

.research-card__header h3 {
  margin: 0;
  font-size: 18px;
  color: #557c8c;
}

.expand-icon {
  font-size: 24px;
  font-weight: 700;
  color: #7da0bf;
  transition: transform 0.3s, color 0.3s;
}

/* --- contenu accordéon ----------------------------------------------- */
.research-card__content {
  max-height: 0; /* fermé par défaut */
  padding: 0 25px;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.research-card.open .research-card__content {
  max-height: 300px; /* desktop : suffisant pour le texte */
  padding: 15px 25px;
}

.research-card.open .expand-icon {
  transform: rotate(180deg);
  color: #d9534f;
}

/* ======================================================================
   RESPONSIVE
   ====================================================================== */

/* ------------ <= 1024 px --------------------------------------------- */
@media (max-width: 1024px) {
  .research-section__container {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .research-card {
    width: 100%;
  }

  .research-card--static {
    min-height: auto;
    text-align: left; /* reste aligné à gauche */
  }
}

/* ------------ <= 768 px ---------------------------------------------- */
@media (max-width: 768px) {
  .research-section {
    padding: 40px 20px;
  }

  .research-card--static h2 {
    font-size: 24px;
  }
  .research-card--static p {
    font-size: 15px;
  }

  /* Cartes dynamiques : pleine largeur et contenu non coupé quand ouvert */
  .research-card {
    max-width: 100%;
    width: 100%;
  }

  /* état fermé (inchangé) */
  .research-card__content {
    max-height: 0;
    overflow: hidden;
  }

  /* état ouvert : grand max-height pour tout afficher */
  .research-card.open .research-card__content {
    max-height: 2000px; /* quasi illimité pour mobile */
    overflow: visible;
  }

  /* prévention débordement de mots */
  .research-card__content,
  .research-card--static {
    word-break: break-word;
  }
}

/* ------------ <= 600 px ---------------------------------------------- */
@media (max-width: 600px) {
  .research-section {
    padding: 30px 15px;
  }

  .research-card--static h2 {
    font-size: 22px;
  }
  .research-card--static p {
    font-size: 14px;
  }

  .research-card__header {
    padding: 15px 20px;
  }

  .research-card__header h3 {
    font-size: 17px;
  }
  .expand-icon {
    font-size: 22px;
  }
}
