/* ============================================
   STYLES PAGE RÉALISATIONS - GNA-BLE
   Version améliorée avec vraies images et cartes enrichies
   ============================================ */

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

.realisations-hero {
  background: #000000;
  color: var(--color-white);
  padding: 100px 2rem 60px;
  text-align: center;
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: 1.3rem;
  opacity: 0.95;
}

.projects-section {
  padding: 5rem 2rem;
  background-color: var(--color-gray-bg);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2.5rem;
}

/* ============================================
   CARTE DE PROJET AMÉLIORÉE
   ============================================ */
.project-card {
  background: var(--color-white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  flex-direction: column;
  height: auto;
  min-height: 500px;
}

.project-card:hover {
  transform: translateY(-15px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* Image du projet */
.project-image {
  width: 100%;
  height: 280px;
  position: relative;
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
  transform: scale(1.1);
}

/* Badge de catégorie */
.project-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: rgba(255, 138, 0, 0.95);
  color: var(--color-white);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  backdrop-filter: blur(10px);
}

/* Badge de statut */
.project-status {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(0, 0, 0, 0.7);
  color: var(--color-white);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  backdrop-filter: blur(10px);
}

.project-status::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #25d366;
  margin-right: 6px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Contenu de la carte */
.project-content {
  padding: 2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--color-gray-bg);
}

.project-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-secondary-alt) 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  flex-shrink: 0;
}

.project-icon svg {
  width: 28px;
  height: 28px;
}

.project-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.project-location {
  font-size: 0.95rem;
  color: var(--color-gray);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Métadonnées du projet */
.project-info {
  flex: 1;
}

.project-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.project-year,
.project-type {
  background: var(--color-gray-bg);
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-primary);
}

.project-description {
  color: var(--color-gray);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

/* Statistiques du projet */
.project-stats {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--color-gray-bg);
  border-radius: 10px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-secondary);
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--color-gray);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Bouton voir détails */
.btn-view-details {
  width: 100%;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  color: var(--color-white);
  border: none;
  padding: 0.875rem 1.5rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: auto;
  box-shadow: 0 4px 15px rgba(26, 58, 95, 0.3);
}

.btn-view-details:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(26, 58, 95, 0.4);
  background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-primary) 100%);
}

.btn-view-details:active {
  transform: translateY(0);
}

/* ============================================
   FILTRES PAR CATÉGORIE
   ============================================ */
.filters-container {
  margin-bottom: 3rem;
  padding: 2rem;
  background: var(--color-white);
  border-radius: 16px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.filters-title {
  font-size: 1.5rem;
  color: var(--color-primary);
  margin-bottom: 1.5rem;
  font-weight: 700;
}

.filters-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.filter-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--color-gray-bg);
  border: 2px solid transparent;
  border-radius: 25px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-gray);
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-btn svg {
  width: 18px;
  height: 18px;
}

.filter-btn:hover {
  background: var(--color-primary);
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(26, 58, 95, 0.3);
}

.filter-btn.active {
  background: var(--color-secondary);
  color: var(--color-white);
  border-color: var(--color-secondary);
  box-shadow: 0 4px 15px rgba(255, 138, 0, 0.3);
}

.filter-results {
  color: var(--color-gray);
  font-size: 0.9rem;
  font-weight: 500;
}

/* Animation pour les cartes filtrées */
.project-card.hidden {
  display: none;
}

.project-card.fade-out {
  opacity: 0;
  transform: scale(0.9);
  transition: all 0.3s ease;
}

.project-card.fade-in-animation {
  animation: fadeInUp 0.5s ease forwards;
}

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

/* ============================================
   MODAL DE DÉTAILS DU PROJET
   ============================================ */
.project-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.project-modal.active {
  display: flex;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  position: relative;
  background: var(--color-white);
  border-radius: 20px;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 10001;
}

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

.modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 40px;
  height: 40px;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  border-radius: 50%;
  color: var(--color-white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10002;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.modal-close:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: rotate(90deg);
}

.modal-header {
  position: relative;
  width: 100%;
  height: 300px;
  overflow: hidden;
  border-radius: 20px 20px 0 0;
}

.modal-image-container {
  width: 100%;
  height: 100%;
  position: relative;
}

.modal-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-badge {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  background: rgba(255, 138, 0, 0.95);
  color: var(--color-white);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}

.modal-body {
  padding: 2.5rem;
}

.modal-title-section {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--color-gray-bg);
}

.modal-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.modal-location {
  font-size: 1.1rem;
  color: var(--color-gray);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-meta-section {
  display: flex;
  gap: 2rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.modal-meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-gray);
  font-size: 0.95rem;
  font-weight: 500;
}

.modal-meta-item svg {
  color: var(--color-secondary);
}

.modal-description {
  margin-bottom: 2rem;
}

.modal-description h3 {
  font-size: 1.3rem;
  color: var(--color-primary);
  margin-bottom: 1rem;
  font-weight: 700;
}

.modal-description p {
  color: var(--color-gray);
  line-height: 1.8;
  font-size: 1rem;
}

.modal-stats-section {
  margin-bottom: 2rem;
}

.modal-stats-section h3 {
  font-size: 1.3rem;
  color: var(--color-primary);
  margin-bottom: 1rem;
  font-weight: 700;
}

.modal-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}

.modal-stat-item {
  background: var(--color-gray-bg);
  padding: 1.5rem;
  border-radius: 12px;
  text-align: center;
}

.modal-stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-secondary);
  margin-bottom: 0.5rem;
  display: block;
}

.modal-stat-label {
  font-size: 0.85rem;
  color: var(--color-gray);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.modal-cta {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 2px solid var(--color-gray-bg);
}

.btn-modal-cta {
  display: block;
  width: 100%;
  background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-secondary-alt) 100%);
  color: var(--color-white);
  padding: 1rem 2rem;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 138, 0, 0.3);
}

.btn-modal-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(255, 138, 0, 0.4);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 968px) {
  .projects-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
  }
}

@media (max-width: 968px) {
  .filters-buttons {
    justify-content: center;
  }
  
  .modal-content {
    max-width: 95%;
    max-height: 95vh;
  }
  
  .modal-body {
    padding: 2rem;
  }
}

@media (max-width: 600px) {
  .realisations-hero {
    padding: 80px 1rem 40px;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .projects-section {
    padding: 3rem 1rem;
  }

  .filters-container {
    padding: 1.5rem;
  }

  .filters-title {
    font-size: 1.3rem;
  }

  .filters-buttons {
    gap: 0.75rem;
  }

  .filter-btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
  }

  .filter-btn span {
    display: none;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .project-image {
    height: 220px;
  }

  .project-content {
    padding: 1.5rem;
  }

  .project-title {
    font-size: 1.3rem;
  }

  .project-stats {
    flex-direction: column;
    gap: 1rem;
  }

  .stat-item {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .project-modal {
    padding: 1rem;
  }

  .modal-content {
    max-width: 100%;
    max-height: 100vh;
    border-radius: 0;
  }

  .modal-header {
    height: 200px;
  }

  .modal-body {
    padding: 1.5rem;
  }

  .modal-title {
    font-size: 1.5rem;
  }

  .modal-meta-section {
    flex-direction: column;
    gap: 1rem;
  }

  .modal-stats-grid {
    grid-template-columns: 1fr;
  }
}
