/* ========================================
   MISTRAL PRO RENO - PORTFOLIO STYLES
   ======================================== */

/* VARIABLES */
:root {
  --primary-bronze: #c8956d;
  --primary-bronze-hover: #b8845a;
  --text-dark: #2c2c2c;
  --text-gray: #6b7280;
  --text-light: #9ca3af;
  --bg-white: #ffffff;
  --bg-light: #f9fafb;
  --border-light: #e5e7eb;
  --shadow-soft: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-medium: 0 8px 25px rgba(0,0,0,0.12);
  --transition: all 0.3s ease;
}

/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text-dark);
  background: var(--bg-white);
  line-height: 1.6;
}

/* ========================================
   PORTFOLIO HERO
   ======================================== */

.portfolio-hero {
  position: relative;
  height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-bronze) 0%, #a67c52 100%);
  color: white;
  text-align: center;
  overflow: hidden;
}

.portfolio-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="20" fill="rgba(255,255,255,0.05)"/><circle cx="80" cy="80" r="30" fill="rgba(255,255,255,0.03)"/></svg>');
  opacity: 0.5;
}

.portfolio-hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

.portfolio-hero h1 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.2;
}

.portfolio-hero p {
  font-size: 1.25rem;
  margin-bottom: 0;
  opacity: 0.95;
}

/* ========================================
   PORTFOLIO FILTERS
   ======================================== */

.portfolio-filters {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 40px 20px;
  background: var(--bg-white);
  flex-wrap: wrap;
  position: relative;
  z-index: 100;
}

.portfolio-filters.stuck {
  box-shadow: var(--shadow-soft);
  position: sticky;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
}

.filter-btn {
  padding: 10px 24px;
  border: 1.5px solid var(--border-light);
  background: var(--bg-white);
  color: var(--text-dark);
  border-radius: 24px;
  cursor: pointer;
  font-weight: 500;
  font-size: 14px;
  transition: var(--transition);
}

.filter-btn:hover {
  border-color: var(--primary-bronze);
  color: var(--primary-bronze);
}

.filter-btn.active {
  background: var(--primary-bronze);
  color: white;
  border-color: var(--primary-bronze);
}

/* ========================================
   PORTFOLIO GRID
   ======================================== */

.portfolio-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 20px;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
}

.portfolio-card {
  background: var(--bg-white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: var(--transition);
  cursor: pointer;
}

.portfolio-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-medium);
}

.portfolio-card.hidden {
  display: none;
}

.portfolio-images {
  position: relative;
  height: 280px;
  overflow: hidden;
  background: var(--bg-light);
}

.portfolio-images img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

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

.portfolio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
}

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

.btn-voir-details {
  background: var(--primary-bronze);
  color: white;
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: var(--transition);
}

.btn-voir-details:hover {
  background: var(--primary-bronze-hover);
  transform: scale(1.05);
}

.portfolio-info {
  padding: 25px;
}

.portfolio-category {
  font-size: 12px;
  color: var(--primary-bronze);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.portfolio-card h3 {
  font-size: 20px;
  color: var(--text-dark);
  margin-bottom: 10px;
  font-weight: 600;
}

.portfolio-card p {
  font-size: 14px;
  color: var(--text-gray);
  line-height: 1.5;
  margin-bottom: 15px;
}

/* ========================================
   LIGHTBOX
   ======================================== */

#lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

#lightbox.active {
  display: flex;
}

.lightbox-content {
  position: relative;
  max-width: 900px;
  width: 100%;
  background: var(--bg-white);
  border-radius: 12px;
  overflow: hidden;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.lightbox-image-container {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-light);
  min-height: 400px;
  overflow: hidden;
}

#lightbox-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 40px;
  height: 40px;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  z-index: 1001;
}

.lightbox-close:hover {
  background: rgba(0, 0, 0, 0.8);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  width: 50px;
  height: 50px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: var(--transition);
}

.lightbox-nav:hover {
  background: rgba(0, 0, 0, 0.8);
}

.lightbox-prev {
  left: 15px;
}

.lightbox-next {
  right: 15px;
}

.lightbox-info {
  padding: 25px;
  background: var(--bg-white);
  border-top: 1px solid var(--border-light);
}

#lightbox-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 8px;
}

#lightbox-description {
  font-size: 14px;
  color: var(--text-gray);
}

.lightbox-thumbnails {
  display: flex;
  gap: 10px;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid var(--border-light);
  overflow-x: auto;
}

.lightbox-thumbnail {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border: 2px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
}

.lightbox-thumbnail:hover {
  border-color: var(--primary-bronze);
}

.lightbox-thumbnail.active {
  border-color: var(--primary-bronze);
  box-shadow: 0 0 0 3px rgba(200, 149, 109, 0.2);
}

/* ========================================
   STATS SECTION
   ======================================== */

.portfolio-stats {
  background: linear-gradient(135deg, var(--primary-bronze) 0%, #a67c52 100%);
  color: white;
  padding: 60px 20px;
  text-align: center;
}

.stats-grid {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
}

.portfolio-stat h3 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
  opacity: 0.9;
}

.stat-number {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 1024px) {
  .portfolio-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }

  .portfolio-hero h1 {
    font-size: 2.5rem;
  }
}

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

  .portfolio-hero h1 {
    font-size: 2rem;
  }

  .portfolio-hero p {
    font-size: 1rem;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .portfolio-filters {
    padding: 25px 15px;
  }

  .lightbox-content {
    max-height: 90vh;
  }

  .lightbox-image-container {
    min-height: 300px;
  }

  .lightbox-nav {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }

  .lightbox-info {
    padding: 20px;
  }

  #lightbox-title {
    font-size: 18px;
  }

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

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

@media (max-width: 480px) {
  .portfolio-hero h1 {
    font-size: 1.5rem;
  }

  .portfolio-filters {
    gap: 8px;
    padding: 20px 10px;
  }

  .filter-btn {
    padding: 8px 16px;
    font-size: 13px;
  }

  .portfolio-container {
    padding: 20px 15px;
  }

  .portfolio-images {
    height: 220px;
  }

  .portfolio-info {
    padding: 20px;
  }

  .portfolio-card h3 {
    font-size: 18px;
  }

  .lightbox-thumbnails {
    gap: 8px;
  }

  .lightbox-thumbnail {
    width: 60px;
    height: 60px;
  }

  .btn-voir-details {
    padding: 10px 20px;
    font-size: 13px;
  }

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

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

/* ========================================
   ANIMATIONS
   ======================================== */

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

.portfolio-card {
  animation: fadeIn 0.6s ease-out;
}