/* ================================================================
   Défis Formation Emploi Jeune — Publications (galerie, byline, popup)
   Partagé entre index.php et nos-publications.php
   ================================================================ */

/* Mosaïque photos — affiche toutes les photos (au lieu d'un carrousel) */
.pub-gallery {
  display: grid; gap: 3px;
  width: 100%; height: 100%;
}
.pub-gallery img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pub-gallery-item { position: relative; overflow: hidden; }
.pub-gallery-1 { grid-template-columns: 1fr; }
.pub-gallery-2 { grid-template-columns: 1fr 1fr; }
.pub-gallery-3 { grid-template-columns: 1.3fr 1fr; grid-template-rows: 1fr 1fr; }
.pub-gallery-3 .pub-gallery-item:nth-child(1) { grid-row: 1 / 3; }
.pub-gallery-4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.pub-gallery-more {
  position: absolute; inset: 0; background: rgba(0,10,30,0.62);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.2rem; font-family: inherit;
}

/* Byline — logo + signature de l'auteur */
.pub-byline { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.6rem; }
.pub-byline img {
  width: 24px; height: 24px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
  border: 1px solid rgba(0,26,114,0.12);
}
.pub-byline-name { font-size: 0.78rem; font-weight: 700; color: rgba(0,26,114,0.65); }

/* Bouton "Lire plus" (texte personnalisable par l'admin) */
.pub-more-btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  margin-top: 0.75rem; padding: 0; border: none; background: none;
  font-size: 0.82rem; font-weight: 700; color: #008B15; cursor: pointer;
  text-decoration: none;
}
.pub-more-btn:hover { color: #006B10; }
.pub-more-btn i { transition: transform 0.2s; }
.pub-more-btn:hover i { transform: translateX(3px); }

/* Popup (Bootstrap modal) */
.pub-modal .modal-content { border: none; border-radius: 22px; overflow: hidden; }
.pub-modal .modal-header {
  border: none; padding: 0; position: relative; display: block;
}
.pub-modal .modal-cover {
  width: 100%; aspect-ratio: 21/9; object-fit: cover; display: block; background: #001A72;
}
.pub-modal .modal-cover-placeholder {
  width: 100%; aspect-ratio: 21/9;
  background: linear-gradient(135deg, #001A72 0%, #002694 100%);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.35); font-size: 2.4rem;
}
.pub-modal .btn-close {
  position: absolute; top: 14px; right: 14px; background-color: #fff;
  border-radius: 50%; padding: 8px; opacity: 0.9; z-index: 2;
}
.pub-modal .modal-body { padding: 1.75rem; }
.pub-modal .modal-date { font-size: 0.72rem; color: rgba(0,26,114,0.45); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 0.4rem; }
.pub-modal .modal-title-pub { font-size: 1.4rem; font-weight: 800; color: #001A72; letter-spacing: -0.02em; margin-bottom: 0.5rem; }
.pub-modal .modal-text { font-size: 0.92rem; color: rgba(0,26,114,0.7); line-height: 1.75; margin-bottom: 1.25rem; }
.pub-modal .modal-text p { margin: 0 0 0.75rem; }
.pub-modal .modal-text a { color: #008B15; }
.pub-modal .modal-text h2, .pub-modal .modal-text h3 { font-weight: 800; color: #001A72; margin: 0.9rem 0 0.5rem; }
.pub-modal .modal-text ul, .pub-modal .modal-text ol { margin: 0 0 0.75rem; padding-left: 1.3rem; }
.pub-modal .modal-video { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: 14px; margin-bottom: 1.25rem; }
.pub-modal .modal-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.pub-modal .modal-gallery-full { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; border-radius: 14px; overflow: hidden; }
.pub-modal .modal-gallery-full img { width: 100%; aspect-ratio: 1/1; object-fit: cover; display: block; }
@media (max-width: 480px) { .pub-modal .modal-gallery-full { grid-template-columns: repeat(2, 1fr); } }
