/* ===============================
   🎨 Mise en forme image à droite
   =============================== */

.theme-selector .inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.selector-left {
    flex: 1;
}

.selector-image {
    flex: 0 0 auto;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.selector-image img {
    width: 420px !important;   /* 🔥 ajuste ici */
    height: auto !important;
    object-fit: contain !important;
    margin-left: 25px !important;
}


/*****************************************************
 * 🎨 STYLE - FILTRE ARTICLES / ACTUALITÉS (LPMMC)
 * Inspiré du style Publications
 *****************************************************/

/* === Conteneur général === */
#actus-results {
  display: flex;
  flex-direction: column;
  gap: 50px;
  margin-top: 40px;
}

/* === Carte article === */
#actus-results article.et_pb_post {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.25s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

#actus-results article.et_pb_post:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12);
}

/*****************************************************
 * 🖼️ IMAGE AVEC BARRE VIOLETTE VERTICALE
 *****************************************************/
#actus-results .et_pb_image_container {
  position: relative;
  width: 100%;
  height: 240px;
  background: #0f1230; /* fond bleu CNRS */
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

/* Barre violette épaisse et droite entre image et texte */
#actus-results article.et_pb_post::before {
  content: "";
  position: absolute;
  left: 100px;               /* position horizontale */
  top: 200px;                /* démarre à la jonction image/texte */
  width: 6px;               /* 🔹 épaisseur augmentée */
  height: calc(100% - 230px);
  background-color: #884081;
  border-radius: 4px;          /* 🔹 bords droits */
  z-index: 10;
}



/* Image centrée et ajustée */
#actus-results .et_pb_image_container img {
  width: auto;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transition: transform 0.3s ease;
}

#actus-results article.et_pb_post:hover .et_pb_image_container img {
  transform: scale(1.05);
}

/*****************************************************
 * 🧾 TITRE + MÉTADONNÉES
 *****************************************************/
#actus-results h2.entry-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: #000;
  margin: 1.2em 1.8em 0.4em 1.8em;
  line-height: 1.3em;
}

#actus-results h2.entry-title a:hover {
  color: #884081;
}

/* Date + catégorie */
#actus-results .post-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 1.8em 1em 1.8em;
  font-size: 0.95rem;
}

#actus-results .post-meta .published {
  color: #884081;
  font-weight: 500;
}

#actus-results .post-meta .cat-links a {
  color: #884081;
  border: 1.5px solid #884081;
  border-radius: 5px;
  padding: 2px 8px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

#actus-results .post-meta .cat-links a:hover {
  background: #884081;
  color: #fff;
}

/*****************************************************
 * 📜 CONTENU + LIEN
 *****************************************************/
#actus-results .et_pb_post_content {
  padding: 0 1.8em 2em 1.8em;
  font-size: 1rem;
  color: #333;
  line-height: 1.6em;
  max-width: 800px;          /* limite largeur texte */
}

#actus-results .more-link {
  display: inline-block;
  margin-top: 1em;
  font-weight: 600;
  color: #884081;
  text-decoration: none;
}

#actus-results .more-link:hover {
  text-decoration: underline;
}

/* Harmonisation globale du contenu sous l'image */
#actus-results article.et_pb_post > *:not(.et_pb_image_container) {
  padding-left: 85px;  /* même valeur pour tout le bloc */
  padding-right: 40px;
  text-align: left;
  box-sizing: border-box;
}

#actus-results .entry-title,
#actus-results .post-meta,
#actus-results .post-content,
#actus-results .more-link {
  margin-left: 0;           /* Supprime tout décalage interne éventuel */
}

/* Aligne parfaitement le titre à gauche du bloc texte */
#actus-results .entry-title {
  margin-left: 0 !important;
  padding-left: 0 !important;
  text-align: left;
  margin-top: 0.6em;
  margin-bottom: 0.4em;
}

/*****************************************************
 * 📱 Responsive (liste d'actus)
 *****************************************************/
@media (max-width: 980px) {
  #actus-results .et_pb_image_container {
    height: 180px;
  }
  #actus-results h2.entry-title {
    font-size: 1.25rem;
    margin: 1em 1.2em 0.4em 1.2em;
  }
  #actus-results .post-meta {
    margin: 0 1.2em 1em 1.2em;
  }
  #actus-results .et_pb_post_content {
    padding: 0 1.2em 1.8em 1.2em;
  }
}

/* ✅ Uniformisation des images UNIQUEMENT sur les pages catégorie */
body.archive #main-content img.wp-post-image {
  width: 100% !important;
  height: 260px !important;
  max-width: none !important;
  max-height: none !important;
  min-width: 100% !important;
  min-height: 260px !important;
  object-fit: cover !important;
  object-position: center !important;
  display: block !important;
}

body.archive #main-content .et_pb_image_container {
  height: 260px !important;
  background: #0B0D27 !important;
  overflow: hidden !important;
}

/* ✅ Sur la page d’accueil : désactiver toute modification */
body.home .et_pb_image_container,
body.home img.wp-post-image {
  height: auto !important;
  background: transparent !important;
  object-fit: initial !important;
}

/***********************************************
 * 📱 MOBILE & TABLETTE (≤1023px)
 ***********************************************/
@media (max-width: 1023px) {

  /* === CONTENEUR PRINCIPAL === */
  #actus-results {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    margin-bottom: 60px !important;
    padding-bottom: 40px !important;
  }

  /* === CHAQUE CARTE === */
  #actus-results article.et_pb_post {
    width: 100% !important;
    margin: 0 0 30px 0 !important;
    padding: 0 0 20px 0 !important; /* espace bas */
    border-radius: 10px !important;
    box-sizing: border-box;
    overflow: hidden;
  }

  /* === IMAGE === */
  #actus-results .et_pb_image_container {
    width: 100% !important;
    height: 160px !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    overflow: hidden !important;
  }

  #actus-results .et_pb_image_container img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
    display: block !important;
    background: transparent !important;
  }

  #actus-results .et_pb_image_container::before {
    content: none !important;
  }

  /* === TEXTE === */
  #actus-results article.et_pb_post > *:not(.et_pb_image_container) {
    padding-left: 20px !important;
    padding-right: 20px !important;
    text-align: left !important;
    box-sizing: border-box !important;
  }

  #actus-results h2.entry-title {
    margin: 15px 0 8px 0 !important;
    padding: 0 !important;
  }

  /* === BARRE VIOLETTE === */
  #actus-results article.et_pb_post::before {
    content: "" !important;
    position: absolute !important;
    left: 25px !important;
    top: 120px !important;
    width: 6px !important;
    height: calc(100% - 150px) !important;
    background: #884081 !important;
    border-radius: 4px !important;
    z-index: 5 !important;
  }

  /* Neutralisation archive */
  body.archive #main-content img.wp-post-image {
    height: 100% !important;
    width: 100% !important;
    max-height: none !important;
    min-height: 0 !important;
    object-fit: contain !important;
    object-position: center !important;
  }

  body.archive #main-content .et_pb_image_container {
    height: 160px !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
  }
  
  /* 📅 Date rapprochée de la barre violette */
	#actus-results .post-meta,
	#actus-results .published,
	#actus-results .post-meta span,
	#actus-results .entry-meta {
	  margin-left: 0px !important;   /* 🔑 rapproche vers la barre */
	  padding-left: 0 !important;
	}
}



/***********************************************
 * Text sur image dynamique
 ***********************************************/
.selector-image {
	position: relative;
}


#actu-image-label {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%) rotate(-18deg);

	font-family: 'Rubik Dirt', sans-serif;
	font-size: 48px;
	letter-spacing: 4px;
	text-transform: uppercase;

	color: #ffffff;

	text-shadow:
		2px 2px 0 rgba(0,0,0,0.5),
		4px 4px 0 rgba(0,0,0,0.35),
		8px 8px 20px rgba(0,0,0,0.8);

	pointer-events: none;
	user-select: none;
	white-space: nowrap;
	z-index: 2;
}


/* 🔒 Masquer la catégorie HOMEDIR dans les actualités */
#actus-results .post-meta .cat-links a[title="HOMEPAGE"],
#actus-results .post-meta .cat-links a[href*="homepage"],
#actus-results .post-meta .cat-links a:contains("HOMEPAGE") {
  display: none !important;
}

/* ============================================================
   PAGINATION ACTUALITÉS
============================================================ */

.actus-pagination {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	margin-top: 32px;
}

/* Boutons */
.actus-pagination button {
	background: #6a1b9a;
	color: #fff;
	border: none;
	padding: 12px 20px;
	border-radius: 30px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.25s ease;

	/* On masque le texte original (PHP) */
	font-size: 0;
}

/* ============================
   VERSION FR
============================ */

html[lang^="fr"] .actus-pagination button[data-dir="prev"]::before {
	content: "← Actualités suivantes";
}

html[lang^="fr"] .actus-pagination button[data-dir="next"]::before {
	content: "Actualités précédentes →";
}

/* ============================
   VERSION EN
============================ */

html[lang^="en"] .actus-pagination button[data-dir="prev"]::before {
	content: "← Next news";
}

html[lang^="en"] .actus-pagination button[data-dir="next"]::before {
	content: "Previous news →";
}

/* Taille du texte injecté */
.actus-pagination button::before {
	font-size: 15px;
	font-weight: 600;
}

/* Hover */
.actus-pagination button:hover:not(:disabled) {
	background: #4a148c;
	transform: translateY(-2px);
	box-shadow: 0 6px 18px rgba(106, 27, 154, 0.3);
}

/* Disabled */
.actus-pagination button:disabled {
	background: #d8cde2;
	color: #ffffff;
	cursor: not-allowed;
	box-shadow: none;
	transform: none;
}

@media (max-width: 600px) {

  /* On masque le texte original */
  .actus-pagination button {
	font-size: 0;
	min-width: 0;
	padding: 14px 18px;
  }

  /* ============================
	 VERSION FR
  ============================ */

  html[lang^="fr"] .actus-pagination button[data-dir="prev"]::before {
	content: "← Suivantes";
  }

  html[lang^="fr"] .actus-pagination button[data-dir="next"]::before {
	content: "Précédentes →";
  }

  /* ============================
	 VERSION EN
  ============================ */

  html[lang^="en"] .actus-pagination button[data-dir="prev"]::before {
	content: "← Next";
  }

  html[lang^="en"] .actus-pagination button[data-dir="next"]::before {
	content: "Previous →";
  }

  /* Rétablit la taille du texte injecté */
  .actus-pagination button::before {
	font-size: 15px;
	font-weight: 600;
  }
}


