/* =========================
   BASE ENCART
========================= */

.grille-encart {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* TOUJOURS 4 colonnes */
  gap: 20px;
  box-sizing: border-box;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 10px;
}

.encart {
  background-color: #fff;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.07);
  box-sizing: border-box;
}


/* =========================
   POSITION DES ENCARTS
========================= */

/* Ligne 1 : 4 blocs */
.encart1 { grid-column: 1; }
.encart2 { grid-column: 2; }
.encart3 { grid-column: 3; }
.encart4 { grid-column: 4; }

/* Ligne 2 : pleine largeur */
.encart5 { grid-column: 1 / -1; }


/* =========================
   TITRES
========================= */

.encart h2 {
  margin-top: 0;
  margin-bottom: 8px;
}

.encart h3 {
  margin-top: 0;
  font-size: clamp(0.8rem, 1.2vw, 0.9rem);
}


h2 {
  margin-bottom: 10px;
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: #7dc8e5;
  text-align: left;
}




/* =========================
   CARTES CHOIX
========================= */

.encart.choix {
  text-align: center;
  cursor: pointer;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  transition: transform 0.25s ease, box-shadow 0.25s ease, outline 0.25s ease;

  min-width: 70px; /* évite que ça devienne trop petit sur mobile */
}

.encart.choix:hover {
  transform: translateY(-4px);
}

.encart.choix.active {
  outline: 2px solid #00315a;
}


/* =========================
   ICÔNES
========================= */

.encart.choix .media-icon {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.encart.choix .media-icon svg {
  width: 42px;
  height: 42px;
  stroke: #00315a;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;

  transition: transform 0.25s ease;
}

.encart.choix:hover .media-icon svg {
  transform: scale(1.08);
}


/* ============================= */
/*        LISTE ARTICLES         */
/* ============================= */

.liste-articles {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* bloc cliquable */
.article-lien {
  display: block;
  text-decoration: none;
  color: inherit;

  padding: 15px;
  border-radius: 10px;

  transition: all 0.2s ease;
}

/* titre */
.article-lien h3 {
  margin: 0 0 5px;
  font-size: clamp(0.8rem, 1.2vw, 0.9rem);
  color: #000000;
}

/* meta (source + date) */
.article-lien .meta {
  font-size: 0.85rem;
  color: #555;
  font-style: italic;
}

/* hover */
.article-lien:hover {
  background: #f2f8fc;
  transform: translateX(5px);
}

/* =========================
   CONTENU DYNAMIQUE
========================= */

.content-medias {
  display: block;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}


/* =========================
   RESPONSIVE (SANS CASSER LA LIGNE)
========================= */

@media (max-width: 600px) {
  .encart.choix .media-icon svg {
    width: 32px;
    height: 32px;
  }

  .encart {
    padding: 15px;
  }
}