/* ══════════════════════════════════════════════
   ACTUALITES.CSS — Mini-Lab Numérique
   ══════════════════════════════════════════════ */

/* ── 4. HEADER ────────────────────────────────────────────── */
.logo-img {
  height: 52px;
  width: auto;
  object-fit: contain;
  border-radius: 10px;
  display: block;
}
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  box-shadow: var(--shadow);
  height: 72px;
  display: flex;
  align-items: center;
}
.header-inner {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.header-logo { display: flex; align-items: center; gap: 12px; }
.logo-circle {
  width: 44px; height: 44px;
  background: var(--blue);
  color: var(--white);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .9rem; flex-shrink: 0;
}
.logo-circle.small  { width: 36px; height: 36px; font-size: .8rem; }
.logo-circle.large  { width: 72px; height: 72px; font-size: 1.4rem; }
.logo-text          { display: flex; flex-direction: column; }
.logo-title         { font-weight: 700; font-size: 1rem; color: var(--blue); line-height: 1.2; }
.logo-subtitle      { font-size: .72rem; color: var(--text-muted); }

/* ── 5. NAV ───────────────────────────────────────────────── */
.nav { display: flex; align-items: center; gap: 8px; }
.nav-link {
  padding: 8px 14px; border-radius: 8px;
  font-size: .9rem; font-weight: 500; color: var(--text);
  transition: var(--transition);
}
.nav-link:hover, .nav-link.active { background: var(--blue-light); color: var(--blue); }
.nav-btn {
  margin-left: 8px; padding: 10px 22px;
  background: var(--blue); color: var(--white);
  border-radius: var(--radius); font-size: .9rem; font-weight: 600;
  transition: var(--transition);
}
.nav-btn:hover { background: var(--blue-dark); transform: translateY(-1px); }
.nav-toggle {
  display: none; background: none; border: none;
  font-size: 1.4rem; color: var(--blue); cursor: pointer;
}


/* ── HERO ── */
.logo-img {
  height: 52px;
  width: auto;
  object-fit: contain;
  border-radius: 10px;
  display: block;
}

.actu-hero {
  background: linear-gradient(135deg, #003189 0%, #0a4fd4 60%, #1a6aff 100%);
  color: #fff;
  padding: 100px 24px 60px;
  text-align: center;
}
.actu-hero-content { max-width: 700px; margin: 0 auto; }
.actu-hero-content h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  margin: 12px 0 16px;
}
.actu-hero-content p {
  font-size: 1.05rem;
  opacity: .85;
}

/* ── FILTRES ── */
.actu-filtres-section {
  background: #fff;
  border-bottom: 1px solid #e8edf5;
  padding: 20px 24px;
  position: sticky;
  top: 70px;
  z-index: 90;
}
.actu-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.actu-filtres {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.filtre-btn {
  padding: 8px 18px;
  border-radius: 50px;
  border: 2px solid #e8edf5;
  background: transparent;
  font-family: 'Poppins', sans-serif;
  font-size: .85rem;
  font-weight: 600;
  color: #555;
  cursor: pointer;
  transition: all .2s;
}
.filtre-btn:hover {
  border-color: #003189;
  color: #003189;
}
.filtre-btn.active {
  background: #003189;
  border-color: #003189;
  color: #fff;
}

/* ── BOUTON NOUVELLE PUBLICATION ── */
.btn-publi {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #003189, #0a4fd4);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 20px;
  font-family: 'Poppins', sans-serif;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  box-shadow: 0 4px 14px rgba(0,49,137,.25);
}
.btn-publi:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,49,137,.35);
}

/* ── GRILLE PRINCIPALE ── */
.actu-main {
  padding: 48px 24px 80px;
  background: #f6f8fc;
  min-height: 400px;
}
.actu-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 28px;
}
.actu-loading, .actu-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: #888;
  padding: 80px 24px;
  font-size: 1rem;
}
.actu-empty i {
  font-size: 3rem;
  color: #ccc;
  display: block;
  margin-bottom: 16px;
}

/* ── CARDS PUBLICATION ── */
.pub-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  transition: transform .25s, box-shadow .25s;
  display: flex;
  flex-direction: column;
  animation: fadeInUp .4s ease both;
}
.pub-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(0,0,0,.1);
}

/* Card featured (première) */
.pub-card--featured {
  grid-column: 1 / -1;
  flex-direction: row;
  max-height: 380px;
}
.pub-card--featured .pub-card-img {
  width: 45%;
  flex-shrink: 0;
}
.pub-card--featured .pub-card-img img {
  height: 100%;
  object-fit: cover;
}
.pub-card--featured .pub-titre {
  font-size: 1.5rem;
}

.pub-card-img {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: #e8edf5;
}
.pub-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s;
}
.pub-card:hover .pub-card-img img {
  transform: scale(1.04);
}

.pub-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.pub-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.pub-date {
  font-size: .78rem;
  color: #999;
  display: flex;
  align-items: center;
  gap: 5px;
}
.pub-titre {
  font-size: 1.1rem;
  font-weight: 700;
  color: #111;
  margin: 0 0 8px;
  line-height: 1.4;
}
.pub-soustitre {
  font-size: .9rem;
  color: #555;
  font-weight: 500;
  margin: 0 0 10px;
}
.pub-extrait {
  font-size: .88rem;
  color: #777;
  line-height: 1.6;
  flex: 1;
  margin-bottom: 20px;
}
.pub-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}
.btn-lire {
  background: none;
  border: none;
  color: #003189;
  font-family: 'Poppins', sans-serif;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  transition: gap .2s;
}
.btn-lire:hover { gap: 10px; }

.pub-admin-actions {
  display: flex;
  gap: 8px;
}
.btn-edit, .btn-delete {
  background: none;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  width: 34px;
  height: 34px;
  cursor: pointer;
  font-size: .85rem;
  transition: all .2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-edit { color: #0a4fd4; }
.btn-edit:hover { background: #e8edf8; border-color: #0a4fd4; }
.btn-delete { color: #ef4444; }
.btn-delete:hover { background: #fff0f0; border-color: #ef4444; }

/* ── TAGS ── */
.actu-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
}
.tag-actu    { background: #e8edf8; color: #003189; }
.tag-projet  { background: #eefaf3; color: #16a34a; }
.tag-form    { background: #fef9ee; color: #d97706; }
.tag-event   { background: #fdf2f8; color: #9333ea; }

/* ── MODALES ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-box {
  background: #fff;
  border-radius: 20px;
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 40px;
  position: relative;
  animation: slideUp .3s ease;
}
.modal-large { max-width: 820px; }

@keyframes slideUp {
  from { transform: translateY(30px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: #f0f0f0;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  font-size: 1rem;
  color: #555;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}
.modal-close:hover { background: #e0e0e0; }

/* Modal lecture */
.lecture-img {
  width: 100%;
  max-height: 380px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 24px;
}
.lecture-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.lecture-titre {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  color: #111;
  margin: 0 0 12px;
  line-height: 1.3;
}
.lecture-soustitre {
  font-size: 1.05rem;
  color: #555;
  font-weight: 500;
  margin: 0 0 24px;
  border-left: 3px solid #003189;
  padding-left: 14px;
}
.lecture-corps {
  font-size: .95rem;
  color: #333;
  line-height: 1.8;
  white-space: pre-wrap;
}
.btn-doc {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 28px;
  background: #fff0f0;
  color: #ef4444;
  border: 1px solid #fca5a5;
  border-radius: 10px;
  padding: 10px 20px;
  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
  transition: all .2s;
}
.btn-doc:hover { background: #ef4444; color: #fff; }

/* ── FORMULAIRE ── */
.modal-box h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #111;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}
.form-group input[type="text"],
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e8edf5;
  border-radius: 10px;
  font-family: 'Poppins', sans-serif;
  font-size: .9rem;
  color: #111;
  transition: border-color .2s;
  resize: vertical;
  box-sizing: border-box;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #003189;
}

/* Sélecteur catégorie */
.cat-selector {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.cat-opt {
  padding: 7px 16px;
  border-radius: 50px;
  border: 2px solid #e8edf5;
  background: transparent;
  font-family: 'Poppins', sans-serif;
  font-size: .82rem;
  font-weight: 600;
  color: #555;
  cursor: pointer;
  transition: all .2s;
}
.cat-opt.active[data-val="actualite"] { background: #e8edf8; border-color: #003189; color: #003189; }
.cat-opt.active[data-val="projet"]    { background: #eefaf3; border-color: #16a34a; color: #16a34a; }
.cat-opt.active[data-val="formation"] { background: #fef9ee; border-color: #d97706; color: #d97706; }
.cat-opt.active[data-val="evenement"] { background: #fdf2f8; border-color: #9333ea; color: #9333ea; }

/* Upload zones */
.upload-zone, .upload-zone-doc {
  border: 2px dashed #ccd6e8;
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
  color: #888;
}
.upload-zone:hover, .upload-zone-doc:hover,
.upload-zone.drag-over, .upload-zone-doc.drag-over {
  border-color: #003189;
  background: #f0f5ff;
  color: #003189;
}
.upload-zone i, .upload-zone-doc i {
  font-size: 2rem;
  margin-bottom: 8px;
  display: block;
}
.upload-zone span, .upload-zone-doc span {
  color: #003189;
  text-decoration: underline;
  font-weight: 600;
}

/* Préview image */
#image-preview {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
#image-preview img {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: 10px;
}
#doc-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: #fff8f8;
  border: 1px solid #fca5a5;
  border-radius: 10px;
  font-size: .9rem;
  color: #333;
}
.btn-suppr-img {
  background: #fff0f0;
  border: 1px solid #fca5a5;
  color: #ef4444;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: .8rem;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  transition: all .2s;
}
.btn-suppr-img:hover { background: #ef4444; color: #fff; }

.form-error {
  background: #fff0f0;
  border: 1px solid #fca5a5;
  border-radius: 10px;
  padding: 12px 16px;
  color: #ef4444;
  font-size: .88rem;
  margin-bottom: 16px;
}
.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 8px;
}
.btn-secondary {
  padding: 11px 24px;
  border-radius: 10px;
  border: 2px solid #e0e0e0;
  background: transparent;
  font-family: 'Poppins', sans-serif;
  font-size: .9rem;
  font-weight: 600;
  color: #555;
  cursor: pointer;
  transition: all .2s;
}
.btn-secondary:hover { border-color: #999; color: #333; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .pub-card--featured {
    flex-direction: column;
    max-height: none;
  }
  .pub-card--featured .pub-card-img { width: 100%; height: 200px; }
  .actu-grid { grid-template-columns: 1fr; }
  .modal-box { padding: 24px; }
  .actu-container { flex-direction: column; align-items: flex-start; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
