/* ===== PORTFOLIO SPECIFIC STYLES - VERSION CORRIGÉE ===== */

/* Force les couleurs principales */
:root {
  --primary-color: #d20a11 !important;
  --primary-light: #e74c3c !important;
  --primary-dark: #a3060c !important;
  --accent-color: #85878d !important;
  --accent-light: #a6a8ad !important;
  --accent-dark: #5e6066 !important;
}

/* ===== PAGE HEADER ===== */
.page-header {
  height: 60vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  overflow: hidden;
  margin-top: 80px;
}

.header-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    var(--primary-dark) 0%,
    var(--primary-color) 50%,
    var(--accent-dark) 100%
  );
  background-size: 400% 400%;
  animation: gradientShift 20s ease infinite;
}

.header-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
}

.header-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 0 var(--spacing-md);
}

.page-title {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 6vw, 4.5rem);
  font-weight: 700;
  margin-bottom: var(--spacing-sm);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.page-subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  margin-bottom: var(--spacing-lg);
  opacity: 0.9;
}

.breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-xs);
  font-size: 0.9rem;
  opacity: 0.8;
}

.breadcrumb a {
  color: white;
  transition: var(--transition-fast);
}

.breadcrumb a:hover {
  color: var(--accent-color);
}

.breadcrumb span {
  opacity: 0.6;
}

/* ===== PORTFOLIO STATS ===== */
/* ===== PORTFOLIO STATS AVANCÉES ===== */
.portfolio-stats {
  padding: var(--spacing-xl) 0;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.portfolio-stats::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    transparent 0%,
    rgba(210, 10, 17, 0.02) 50%,
    transparent 100%
  );
  pointer-events: none;
}

.stats-grid {
  display: grid;
  gap: var(--spacing-lg);
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.stat-item {
  background: white;
  border-radius: var(--border-radius-lg);
  padding: var(--spacing-lg);
  box-shadow: 0 4px 20px var(--shadow);
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
  text-align: center;
  border: 2px solid transparent;
}

.stat-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--stat-color, var(--primary-color));
  transform: scaleX(0);
  transition: var(--transition-smooth);
}

.stat-item:hover::before {
  transform: scaleX(1);
}

.stat-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px var(--shadow-dark);
  border-color: var(--stat-color, var(--primary-color));
}

.stat-highlighted {
  background: linear-gradient(135deg, white 0%, rgba(210, 10, 17, 0.02) 100%);
  border-color: var(--stat-color, var(--primary-color));
  box-shadow: 0 6px 30px var(--shadow-dark);
}

.stat-highlighted::after {
  content: "★";
  position: absolute;
  top: var(--spacing-sm);
  right: var(--spacing-sm);
  color: var(--stat-color, var(--primary-color));
  font-size: 1.2rem;
  opacity: 0.6;
}

/* ===== ICÔNES DES STATS ===== */
.stat-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto var(--spacing-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(210, 10, 17, 0.1);
  border-radius: 50%;
  transition: var(--transition-smooth);
  position: relative;
}

.stat-icon::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  background: var(--stat-color, var(--primary-color));
  border-radius: 50%;
  opacity: 0;
  transform: scale(0.8);
  transition: var(--transition-smooth);
}

.stat-item:hover .stat-icon::before {
  opacity: 0.1;
  transform: scale(1);
}

.stat-icon img {
  width: 28px;
  height: 28px;
  filter: none;
  transition: var(--transition-smooth);
  position: relative;
  z-index: 1;
}

.stat-item:hover .stat-icon img {
  filter: brightness(0) saturate(100%) invert(8%) sepia(96%) saturate(7471%)
    hue-rotate(357deg) brightness(91%) contrast(118%);
}

/* ===== CONTENU DES STATS ===== */
.stat-content {
  position: relative;
}

.stat-number {
  display: block;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--stat-color, var(--primary-color)) !important;
  margin-bottom: var(--spacing-xs);
  font-family: var(--font-heading);
  line-height: 1.1;
  transition: var(--transition-smooth);
  background: linear-gradient(
    135deg,
    var(--stat-color, var(--primary-color)),
    var(--primary-dark)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-item:hover .stat-number {
  transform: scale(1.05);
}

.stat-label {
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.9rem;
  line-height: 1.3;
  margin-bottom: var(--spacing-sm);
}

.stat-description {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.4;
  margin-top: var(--spacing-sm);
  padding-top: var(--spacing-sm);
  border-top: 1px solid var(--border-color);
}

/* ===== TOOLTIP STATS ===== */
.stat-tooltip {
  position: absolute;
  top: var(--spacing-sm);
  right: var(--spacing-sm);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: help;
  transition: var(--transition-fast);
  opacity: 0.6;
}

.stat-tooltip:hover {
  opacity: 1;
  transform: scale(1.1);
  background: var(--stat-color, var(--primary-color));
}

.stat-tooltip svg {
  width: 12px;
  height: 12px;
}

.custom-tooltip {
  position: absolute;
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--border-radius);
  font-size: 0.8rem;
  max-width: 200px;
  z-index: 10000;
  pointer-events: none;
  opacity: 0;
  animation: tooltipFadeIn 0.2s ease forwards;
}

.custom-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: rgba(0, 0, 0, 0.9);
}

@keyframes tooltipFadeIn {
  to {
    opacity: 1;
  }
}

/* ===== BARRES DE PROGRESSION ===== */
.stat-progress {
  width: 100%;
  height: 6px;
  background: var(--border-color);
  border-radius: 3px;
  margin-top: var(--spacing-sm);
  overflow: hidden;
  position: relative;
}

.stat-progress-bar {
  height: 100%;
  background: linear-gradient(
    90deg,
    var(--progress-color, var(--primary-color)),
    var(--primary-light)
  );
  border-radius: 3px;
  width: 0%;
  position: relative;
  overflow: hidden;
}

.stat-progress-bar::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  animation: progressShimmer 2s infinite;
}

@keyframes progressShimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

/* ===== ANIMATIONS AVANCÉES ===== */
.stat-item[data-animation="counter"] .stat-number {
  animation: counterPulse 0.6s ease;
}

.stat-item[data-animation="progress"] {
  animation: progressSlide 0.8s ease;
}

.stat-item[data-animation="fade"] {
  animation: fadeInUp 1s ease;
}

@keyframes counterPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

@keyframes progressSlide {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 480px) {
  .stat-item {
    padding: var(--spacing-md);
  }

  .stat-number {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
  }

  .stat-icon {
    width: 50px;
    height: 50px;
    margin-bottom: var(--spacing-sm);
  }

  .stat-icon img {
    width: 24px;
    height: 24px;
  }

  .stat-label {
    font-size: 0.8rem;
  }

  .stat-description {
    font-size: 0.8rem;
  }
}

@media (max-width: 768px) {
  .portfolio-stats {
    padding: var(--spacing-lg) 0;
  }

  .stats-grid {
    gap: var(--spacing-md);
  }
}

/* ===== THÈMES SOMBRES (OPTIONNEL) ===== */
@media (prefers-color-scheme: dark) {
  .stat-item {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
  }

  .stat-highlighted {
    background: rgba(210, 10, 17, 0.1);
  }

  .custom-tooltip {
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-primary);
  }

  .custom-tooltip::after {
    border-top-color: rgba(255, 255, 255, 0.9);
  }
}

/* ===== ACCESSIBILITÉ ===== */
@media (prefers-reduced-motion: reduce) {
  .stat-item,
  .stat-number,
  .stat-progress-bar,
  .stat-icon {
    animation: none !important;
    transition: none !important;
  }

  .stat-progress-bar::after {
    animation: none !important;
  }
}

/* ===== PRINT STYLES ===== */
@media print {
  .portfolio-stats {
    background: white !important;
    border: none !important;
  }

  .stat-item {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
    break-inside: avoid;
  }

  .stat-tooltip,
  .custom-tooltip {
    display: none !important;
  }
}

/* ===== PORTFOLIO FILTERS ===== */
.portfolio-filters {
  padding: var(--spacing-xl) 0;
  background: white;
  border-bottom: 1px solid var(--border-color);
}

.filters-header {
  text-align: center;
  margin-bottom: var(--spacing-xl);
}

.filters-header h2 {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  color: var(--primary-color) !important;
  margin-bottom: var(--spacing-sm);
}

.filters-header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.filters-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--spacing-md);
}

.category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
}

.filter-btn {
  padding: var(--spacing-sm) var(--spacing-lg);
  border: 2px solid var(--border-color);
  background: white;
  color: var(--text-secondary);
  border-radius: var(--border-radius);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  min-height: 44px;
}

.filter-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--primary-color);
  transition: var(--transition-smooth);
  z-index: 0;
}

.filter-btn span,
.filter-btn small {
  position: relative;
  z-index: 1;
}

.filter-btn img {
  width: 16px;
  height: 16px;
  position: relative;
  z-index: 1;
  transition: var(--transition-fast);
}

.filter-btn small {
  opacity: 0.7;
  font-size: 0.8rem;
  margin-left: var(--spacing-xs);
}

.filter-btn:hover::before,
.filter-btn.active::before {
  left: 0;
}

.filter-btn:hover,
.filter-btn.active {
  color: white !important;
  border-color: var(--primary-color);
}

.filter-btn:hover img,
.filter-btn.active img {
  filter: brightness(0) invert(1);
}

.filter-btn:hover small,
.filter-btn.active small {
  opacity: 1;
}

.view-controls {
  display: flex;
  gap: var(--spacing-xs);
}

.view-btn {
  width: 44px;
  height: 44px;
  border: 2px solid var(--border-color);
  background: white;
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

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

.view-btn:hover,
.view-btn.active {
  border-color: var(--primary-color);
  color: var(--primary-color) !important;
}

/* ===== PORTFOLIO GRID - SANS CLIGNOTEMENT ===== */
.portfolio-section {
  padding: var(--spacing-xxl) 0;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-xxl);
  min-height: 600px; /* Évite le jump lors du chargement */
}

.portfolio-grid.loading {
  opacity: 0.7;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.portfolio-grid.list-view {
  grid-template-columns: 1fr;
}

.portfolio-grid.list-view .portfolio-card {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: var(--spacing-lg);
  align-items: stretch;
}

.portfolio-card {
  background: white;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: 0 4px 20px var(--shadow);
  transition: var(--transition-smooth);
  position: relative;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  /* Suppression de l'animation qui cause le clignotement */
  opacity: 1;
  transform: translateY(0);
}

.portfolio-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px var(--shadow-dark);
}

.portfolio-card:focus {
  outline: 3px solid var(--primary-color);
  outline-offset: 2px;
}

/* ===== IMAGES AMÉLIORÉES ===== */
.portfolio-image {
  position: relative;
  height: 250px;
  overflow: hidden;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--accent-color)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.portfolio-image .placeholder-icon {
  width: 60px;
  height: 60px;
  z-index: 1;
}

.portfolio-image .placeholder-icon img {
  width: 100%;
  height: 100%;
  filter: brightness(0) invert(1);
}

.portfolio-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: var(--transition-smooth);
}

.portfolio-card:hover .portfolio-image img {
  transform: scale(1.05);
}

.image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition-smooth);
  z-index: 2;
}

.portfolio-card:hover .image-overlay {
  opacity: 1;
}

.overlay-content {
  text-align: center;
  color: white;
}

.overlay-icon {
  width: 60px;
  height: 60px;
  border: 2px solid white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--spacing-sm);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.overlay-icon svg {
  width: 24px;
  height: 24px;
  fill: white;
}

.overlay-text {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.9rem;
}

.image-count {
  position: absolute;
  bottom: var(--spacing-sm);
  right: var(--spacing-sm);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--border-radius);
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  z-index: 3;
}

.image-count svg {
  width: 16px;
  height: 16px;
  fill: white;
}

/* ===== CONTENU DES CARTES AMÉLIORÉ ===== */
.portfolio-content {
  padding: var(--spacing-lg);
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.portfolio-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-sm);
  flex-wrap: wrap;
  gap: var(--spacing-xs);
}

.portfolio-category {
  background: var(--accent-color);
  color: white;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--border-radius);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.portfolio-date {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.portfolio-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--primary-color) !important;
  margin-bottom: var(--spacing-xs);
  line-height: 1.3;
}

.portfolio-subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: var(--spacing-sm);
  font-style: italic;
  line-height: 1.4;
}

.portfolio-excerpt {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--spacing-md);
  flex-grow: 1;
}

/* ===== SERVICES DU PROJET ===== */
.portfolio-services {
  background: var(--bg-secondary);
  border-radius: var(--border-radius);
  padding: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
}

.services-label {
  font-weight: 600;
  color: var(--primary-color);
  font-size: 0.9rem;
  margin-bottom: var(--spacing-xs);
  display: block;
}

.services-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-xs);
}

.service-item {
  background: white;
  color: var(--text-secondary);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid var(--border-color);
}

.services-more {
  background: var(--accent-color);
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* ===== DÉTAILS FLEXIBLES ===== */
.portfolio-details {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--spacing-sm);
  border-top: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: var(--spacing-sm);
  margin-top: auto;
}

.portfolio-client {
  font-weight: 600;
  color: var(--primary-color) !important;
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.portfolio-participants,
.portfolio-location {
  color: var(--text-muted);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.portfolio-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-xs);
  margin-top: var(--spacing-sm);
}

.portfolio-tag {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
}

/* ===== LIGHTBOX AMÉLIORÉE ===== */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: none;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
}

.lightbox.active {
  display: block;
}

.lightbox-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.lightbox-content {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  max-width: 1400px;
  margin: 0 auto;
}

.lightbox-header {
  padding: var(--spacing-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
}

.lightbox-controls {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.image-counter {
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
  opacity: 0.8;
}

.lightbox-close {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
}

.lightbox-close svg {
  width: 20px;
  height: 20px;
  fill: white;
}

.lightbox-body {
  flex: 1;
  display: flex;
  align-items: center;
  min-height: 0;
}

.lightbox-slider {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  cursor: pointer;
  z-index: 10001;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-prev {
  left: var(--spacing-lg);
}

.lightbox-next {
  right: var(--spacing-lg);
}

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(0, 0, 0, 0.9);
  border-color: rgba(255, 255, 255, 0.4);
}

.lightbox-prev svg,
.lightbox-next svg {
  width: 24px;
  height: 24px;
  fill: white;
}

.lightbox-image-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-xl);
}

.lightbox-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  border-radius: var(--border-radius);
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.lightbox-info {
  background: rgba(0, 0, 0, 0.9);
  color: white;
  backdrop-filter: blur(10px);
  max-height: 40vh;
  overflow-y: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.lightbox-caption {
  padding: var(--spacing-xl);
  max-width: 800px;
  margin: 0 auto;
}

.project-header {
  margin-bottom: var(--spacing-lg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: var(--spacing-lg);
}

.project-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: white !important;
  margin-bottom: var(--spacing-sm);
}

.project-subtitle {
  color: rgba(255, 255, 255, 0.8);
  font-style: italic;
  font-size: 1.1rem;
}

.project-description {
  margin-bottom: var(--spacing-lg);
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.9);
}

.project-info {
  margin-bottom: var(--spacing-lg);
}

.project-info h3 {
  color: var(--accent-color) !important;
  margin-bottom: var(--spacing-md);
  font-size: 1.2rem;
  font-weight: 600;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-sm);
}

.info-item {
  background: rgba(255, 255, 255, 0.1);
  padding: var(--spacing-sm);
  border-radius: var(--border-radius);
  font-size: 0.9rem;
}

.info-item strong {
  color: var(--accent-color);
  display: block;
  margin-bottom: var(--spacing-xs);
}

.project-services {
  margin-bottom: var(--spacing-lg);
}

.project-services h3 {
  color: var(--accent-color) !important;
  margin-bottom: var(--spacing-md);
  font-size: 1.2rem;
  font-weight: 600;
}

.project-services ul {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-xs);
}

.project-services li {
  background: rgba(255, 255, 255, 0.1);
  padding: var(--spacing-sm);
  border-radius: var(--border-radius);
  position: relative;
  padding-left: var(--spacing-lg);
}

.project-services li::before {
  content: "✓";
  position: absolute;
  left: var(--spacing-sm);
  top: var(--spacing-sm);
  color: var(--accent-color);
  font-weight: bold;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-xs);
  margin-bottom: var(--spacing-lg);
}

.project-tags .tag {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--border-radius);
  font-size: 0.8rem;
  font-weight: 500;
}

.image-caption {
  margin-top: var(--spacing-lg);
  padding-top: var(--spacing-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
  font-style: italic;
  text-align: center;
}

.lightbox-thumbnails {
  display: flex;
  justify-content: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-md);
  background: rgba(0, 0, 0, 0.9);
  overflow-x: auto;
  max-height: 120px;
}

.thumbnail {
  width: 80px;
  height: 60px;
  border-radius: var(--border-radius);
  cursor: pointer;
  opacity: 0.6;
  transition: var(--transition-fast);
  flex-shrink: 0;
  object-fit: cover;
  border: 2px solid transparent;
}

.thumbnail:hover,
.thumbnail.active {
  opacity: 1;
  border-color: var(--accent-color);
}

.thumbnail:focus {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

/* ===== LOAD MORE AMÉLIORÉ ===== */
.load-more-container {
  text-align: center;
  margin-top: var(--spacing-xl);
}

#load-more-btn {
  padding: var(--spacing-md) var(--spacing-xl);
  background: var(--primary-color) !important;
  position: relative;
  overflow: hidden;
}

#load-more-btn:hover {
  background: var(--primary-dark) !important;
}

#load-more-btn .remaining {
  opacity: 0.8;
  font-size: 0.9rem;
  font-weight: normal;
  margin-left: var(--spacing-xs);
}

#load-more-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.loading-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: var(--spacing-xs);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ===== NO RESULTS ===== */
.no-results {
  text-align: center;
  padding: var(--spacing-xxl);
  background: var(--bg-secondary);
  border-radius: var(--border-radius-lg);
  margin: var(--spacing-xl) 0;
}

.no-results-content {
  max-width: 400px;
  margin: 0 auto;
}

.no-results-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--spacing-lg);
  color: var(--accent-color);
}

.no-results-icon svg {
  width: 100%;
  height: 100%;
}

.no-results h3 {
  color: var(--primary-color) !important;
  margin-bottom: var(--spacing-sm);
  font-size: 1.5rem;
}

.no-results p {
  color: var(--text-secondary);
  margin-bottom: var(--spacing-lg);
  line-height: 1.6;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
  .portfolio-grid {
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: var(--spacing-lg);
  }

  .portfolio-grid.list-view .portfolio-card {
    grid-template-columns: 250px 1fr;
    gap: var(--spacing-md);
  }

  .lightbox-content {
    padding: var(--spacing-sm);
  }

  .lightbox-caption {
    padding: var(--spacing-lg);
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .project-services ul {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .page-header {
    height: 50vh;
  }

  .filters-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .category-filters {
    justify-content: center;
  }

  .view-controls {
    justify-content: center;
  }

  .portfolio-grid,
  .portfolio-grid.list-view {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }

  .portfolio-grid.list-view .portfolio-card {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .portfolio-details {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-xs);
  }

  .lightbox-header {
    padding: var(--spacing-sm);
  }

  .lightbox-caption {
    padding: var(--spacing-md);
  }

  .lightbox-prev,
  .lightbox-next {
    width: 44px;
    height: 44px;
  }

  .lightbox-prev {
    left: var(--spacing-sm);
  }

  .lightbox-next {
    right: var(--spacing-sm);
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-number {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }

  .portfolio-content {
    padding: var(--spacing-md);
  }

  .portfolio-image {
    height: 200px;
  }

  .lightbox-info {
    max-height: 50vh;
  }

  .lightbox-caption {
    padding: var(--spacing-sm);
  }

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

  .lightbox-thumbnails {
    padding: var(--spacing-sm);
  }

  .thumbnail {
    width: 60px;
    height: 45px;
  }

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

  .stat-item {
    padding: var(--spacing-md);
  }
}

/* ===== ANIMATIONS ===== */
@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* ===== ACCESSIBILITÉ ===== */
@media (prefers-reduced-motion: reduce) {
  .portfolio-card,
  .portfolio-image img,
  .lightbox-content,
  .stat-item,
  .filter-btn,
  .loading-spinner {
    animation: none !important;
    transition: none !important;
  }

  .portfolio-card:hover {
    transform: none;
  }
}

/* ===== PRINT STYLES ===== */
@media print {
  .lightbox,
  .filters-controls,
  .load-more-container,
  .portfolio-stats {
    display: none !important;
  }

  .portfolio-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
  }

  .portfolio-image {
    height: 200px;
  }
}
