/* ── Variables locales (reprend le thème or) ── */
:root {
  --gold: #B8860B;
  --gold-dark: #7A5500;
  --gold-accent: #D4AF37;
  --gold-light: #F5E6A3;
}

.projects-section {
  padding: 3rem 1.5rem 5rem;
  background: #fafaf8;
}

/* ══════════════════════════════
   BOUTONS FILTRE
══════════════════════════════ */
.filter-buttons {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.filter-buttons button {
  position: relative;
  padding: 0.6rem 1.4rem;
  border: 2px solid #e5e7eb;
  border-radius: 50px;
  background: #fff;
  color: #4b5563;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.25s ease;
}

.filter-buttons button:hover {
  border-color: var(--gold);
  color: var(--gold-dark);
  transform: translateY(-2px);
}

.filter-buttons button.active {
  background: linear-gradient(135deg, var(--gold-accent), var(--gold));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 12px rgba(184, 134, 11, 0.35);
  transform: translateY(-2px);
}

.filter-buttons button .button-count {
  position: absolute;
  top: -8px;
  right: -8px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--gold-dark);
  color: #fff;
  border-radius: 10px;
  font-size: 0.68rem;
  font-weight: 700;
  border: 2px solid #fafaf8;
}

.filter-buttons button.active .button-count {
  background: #3C2A10;
}

/* ══════════════════════════════
   GRILLE — responsive, pas de scroll horizontal
══════════════════════════════ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.projects-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: #9ca3af;
  font-size: 1rem;
  padding: 3rem 0;
}

/* ══════════════════════════════
   CARTE PROJET
══════════════════════════════ */
.project-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(184, 134, 11, 0.12);
  box-shadow: 0 3px 12px rgba(184, 134, 11, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 32px rgba(184, 134, 11, 0.18);
  border-color: rgba(184, 134, 11, 0.3);
}

/* Image */
.project-image {
  position: relative;
  height: 220px;
  background-size: cover;
  background-position: center;
  background-color: #e8dcc8;
}

.project-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(30,20,5,0.55) 0%, transparent 60%);
}

/* Badge statut — toujours visible, coin supérieur droit */
.project-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
}

.project-badge.en-cours {
  background: linear-gradient(135deg, #FDEAAA, #F5D060);
  color: #7A5500;
}

.project-badge.terminé {
  background: linear-gradient(135deg, #3C2A10, #5A4020);
  color: #F5E6C8;
}

.project-badge.planifié {
  background: linear-gradient(135deg, var(--gold-accent), var(--gold));
  color: #fff;
  box-shadow: 0 2px 6px rgba(184, 134, 11, 0.3);
}

/* Corps de la carte */
.project-body {
  padding: 1.4rem 1.6rem 1.8rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.project-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0;
  line-height: 1.35;
}

.project-description {
  font-size: 0.92rem;
  color: #6b7280;
  line-height: 1.65;
  margin: 0;
  flex: 1;
  text-align: justify;
}

/* ══════════════════════════════
   MODALE DÉTAIL PROJET
══════════════════════════════ */
.projet-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(20, 15, 5, 0.6);
  backdrop-filter: blur(3px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.projet-modal-overlay.open {
  display: flex;
}

.projet-modal {
  background: #fff;
  border-radius: 20px;
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  position: relative;
  animation: modalIn 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.88) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.projet-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: #f3f4f6;
  color: #6b7280;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
  z-index: 1;
}

.projet-modal-close:hover {
  background: #fee2e2;
  color: #dc2626;
}

.projet-modal-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 2rem 2rem 1rem;
  border-bottom: 1px solid #f3f4f6;
}

.projet-modal-icon {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--gold-accent), var(--gold));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(184, 134, 11, 0.3);
}

.projet-modal-icon i {
  font-size: 1.5rem;
  color: #fff;
}

.projet-modal-header .project-badge {
  position: static;
  display: inline-block;
  margin-bottom: 0.5rem;
}

.projet-modal-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0;
  line-height: 1.3;
}

.projet-modal-body {
  padding: 1.5rem 2rem 2rem;
  color: #4b5563;
  font-size: 0.97rem;
  line-height: 1.75;
  white-space: pre-line;
  text-align: justify;
}

.projet-modal-body:empty::before {
  content: 'Aucune description disponible.';
  color: #9ca3af;
  font-style: italic;
}

/* Image dans la modale */
.projet-modal-img-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 20px 20px 0 0;
  cursor: zoom-in;
}

.projet-modal-img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.4s ease;
}

.projet-modal-img-wrap:hover .projet-modal-img {
  transform: scale(1.04);
}

.modal-img-hint {
  position: absolute;
  bottom: 10px;
  right: 12px;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 20px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s;
}

.projet-modal-img-wrap:hover .modal-img-hint {
  opacity: 1;
}

/* Lightbox plein écran */
.projet-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 99999;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}

.projet-lightbox.open {
  display: flex;
}

.projet-lightbox img {
  max-width: 92vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 0 60px rgba(0,0,0,0.6);
  animation: modalIn 0.25s ease;
}

/* Lien "Voir les détails" sur la carte */
.project-details-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold);
  margin-top: auto;
  transition: gap 0.2s;
}

.project-card:hover .project-details-link {
  gap: 0.6rem;
}

/* Curseur pointer sur les cartes */
.project-card { cursor: pointer; }

/* ══════════════════════════════
   PAGINATION
══════════════════════════════ */
.projects-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}

.pag-btn {
  min-width: 38px;
  height: 38px;
  padding: 0 0.75rem;
  border-radius: 8px;
  border: 2px solid #e5e7eb;
  background: #fff;
  color: #4b5563;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pag-btn:hover:not(:disabled) {
  border-color: var(--gold);
  color: var(--gold-dark);
}

.pag-btn.pag-active {
  background: linear-gradient(135deg, var(--gold-accent), var(--gold));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 3px 10px rgba(184, 134, 11, 0.3);
}

.pag-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* ══════════════════════════════
   RESPONSIVE MOBILE
══════════════════════════════ */
@media (max-width: 640px) {
  .projects-section {
    padding: 2rem 1rem 5rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .filter-buttons {
    gap: 0.5rem;
  }

  .filter-buttons button {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }

  .project-image {
    height: 200px;
  }

  .project-body {
    padding: 1.2rem 1.2rem 1.5rem;
  }
}

@media (min-width: 641px) and (max-width: 1024px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ══════════════════════════════
   FOOTER SOUTENIR — MODALE
══════════════════════════════ */
.projet-modal-footer {
  border-top: 1px solid #f3f4f6;
  padding: 1.4rem 2rem 1.8rem;
  background: linear-gradient(to bottom, #fffdf5, #fff9e8);
  border-radius: 0 0 20px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.modal-footer-label {
  font-size: .88rem;
  font-weight: 600;
  color: var(--gold-dark);
  display: flex;
  align-items: center;
  gap: .45rem;
  margin: 0;
}

.modal-footer-label i { color: var(--gold); }

.modal-footer-btns {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
}

.modal-footer-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem 1.15rem;
  border-radius: 50px;
  font-size: .84rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform .2s, box-shadow .2s;
}

.modal-footer-btn:hover { transform: translateY(-2px); }

.modal-footer-btn--primary {
  background: linear-gradient(135deg, var(--gold-accent), var(--gold));
  color: #fff;
  box-shadow: 0 3px 10px rgba(184,134,11,.3);
}
.modal-footer-btn--primary:hover { box-shadow: 0 6px 16px rgba(184,134,11,.4); }

.modal-footer-btn--outline {
  border: 2px solid var(--gold);
  color: var(--gold-dark);
  background: transparent;
}
.modal-footer-btn--outline:hover { background: #fffbe6; }

/* ══════════════════════════════
   SECTION SOUTENIR NOS PROJETS
══════════════════════════════ */
.projets-soutenir {
  background: linear-gradient(135deg, #1a1200 0%, #3c2a10 50%, #1a1200 100%);
  padding: 5rem 1.5rem;
  position: relative;
  overflow: hidden;
}

.projets-soutenir::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(212,175,55,.12) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 50%, rgba(212,175,55,.08) 0%, transparent 60%);
  pointer-events: none;
}

.ps-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  max-width: 1000px;
  margin: 0 auto;
}

/* Côté gauche — texte */
.ps-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--gold-accent), var(--gold));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: #fff;
  margin-bottom: 1.2rem;
  box-shadow: 0 6px 20px rgba(212,175,55,.35);
}

.ps-text h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2rem;
  font-weight: 700;
  color: #f5e6a3;
  margin: 0 0 1rem;
  line-height: 1.25;
}

.ps-text p {
  color: rgba(245,230,163,.7);
  font-size: .97rem;
  line-height: 1.75;
  margin: 0 0 1.8rem;
}

.ps-buttons {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
}

.ps-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1.6rem;
  border-radius: 50px;
  font-size: .95rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform .2s, box-shadow .2s;
}
.ps-btn:hover { transform: translateY(-3px); }

.ps-btn-primary {
  background: linear-gradient(135deg, var(--gold-accent), var(--gold));
  color: #1a1200;
  box-shadow: 0 4px 16px rgba(212,175,55,.4);
}
.ps-btn-primary:hover { box-shadow: 0 8px 24px rgba(212,175,55,.55); }

.ps-btn-outline {
  border: 2px solid rgba(245,230,163,.4);
  color: #f5e6a3;
  background: transparent;
}
.ps-btn-outline:hover { background: rgba(245,230,163,.08); border-color: rgba(245,230,163,.7); }

/* Côté droit — méthodes */
.ps-methods {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(212,175,55,.2);
  border-radius: 20px;
  padding: 2rem;
  backdrop-filter: blur(6px);
}

.ps-methods-title {
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: rgba(212,175,55,.6);
  margin: 0 0 1.4rem;
}

.ps-methods-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .9rem;
  margin-bottom: 1.6rem;
}

.ps-method {
  display: flex;
  align-items: center;
  gap: .7rem;
  color: rgba(245,230,163,.85);
  font-size: .88rem;
  font-weight: 500;
}

.ps-method-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(212,175,55,.15);
  border: 1px solid rgba(212,175,55,.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .95rem;
  color: var(--gold-accent);
  flex-shrink: 0;
}
.ps-method-icon--mtn  { background: rgba(255,204,0,.12); border-color: rgba(255,204,0,.2); color: #ffcc00; }
.ps-method-icon--paypal{ background: rgba(0,100,200,.12); border-color: rgba(0,100,200,.2); color: #1a7fd4; }
.ps-method-icon--orange{ background: rgba(255,102,0,.12); border-color: rgba(255,102,0,.2); color: #ff6600; }

.ps-see-all {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: var(--gold-accent);
  font-size: .85rem;
  font-weight: 600;
  text-decoration: none;
  transition: gap .2s;
}
.ps-see-all:hover { gap: .7rem; color: #f5e6a3; }

/* ── Responsive ─────────────────────────────────── */
@media (max-width: 768px) {
  .ps-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .ps-text h2 { font-size: 1.6rem; }
  .projet-modal-footer { flex-direction: column; align-items: flex-start; }
}
