/* ============================================
   GLOD'ART PORTFOLIO — Styles personnalisés
   Dark theme élégant avec accents dorés
   ============================================ */

/* --- Variables globales pour la palette et les transitions --- */
:root {
  --gold: #d4a843;
  --gold-light: #e8c76a;
  --gold-dark: #b8922f;
  --dark-bg: #0a0a0a;
  --dark-card: #141414;
  --dark-card-hover: #1a1a1a;
  --dark-border: #2a2a2a;
  --text-primary: #f5f5f5;
  --text-secondary: #a0a0a0;
  --text-muted: #666666;
  --transition-smooth: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  --glass-bg: rgba(20, 20, 20, 0.7);
  --glass-border: rgba(212, 168, 67, 0.15);
}

/* --- Reset et base — on part d'une bonne fondation --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px; /* compenser la navbar fixe */
}

body {
  font-family: "Inter", sans-serif;
  background-color: var(--dark-bg);
  color: var(--text-primary);
  overflow-x: hidden;
  line-height: 1.7;
}

/* --- Scrollbar personalisée — petit détail qui fait la différence --- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--gold-dark);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gold);
}

/* --- Navbar — fixe en haut avec un effet glassmorphism --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  transition: var(--transition-smooth);
}

/* quand la navbar rétrécit au scroll */
.navbar.scrolled {
  background: rgba(10, 10, 10, 0.95);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

/* le logo texte avec un dégradé doré */
.logo-text {
  font-family: "Outfit", sans-serif;
  font-weight: 700;
  font-size: 1.75rem;
  background: linear-gradient(
    135deg,
    var(--gold-light),
    var(--gold),
    var(--gold-dark)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 1px;
}

/* liens de navigation avec un soulignement animé */
.nav-link {
  position: relative;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.3s ease;
  padding: 0.5rem 0;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width 0.3s ease;
}

.nav-link:hover {
  color: var(--gold);
}

.nav-link:hover::after {
  width: 100%;
}

/* --- Bouton hamburger pour mobile --- */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 5px;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 25px;
  height: 2px;
  background: var(--text-primary);
  transition: var(--transition-smooth);
  border-radius: 2px;
}

/* animation du hamburger quand le menu est ouvert */
.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Hero Section — la première impression compte énormément --- */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

/* un subtil dégradé en arrière-plan */
.hero-section::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 800px;
  height: 800px;
  background: radial-gradient(
    circle,
    rgba(212, 168, 67, 0.08) 0%,
    transparent 70%
  );
  border-radius: 50%;
  pointer-events: none;
}

/* la photo de profil avec un cerclage doré */
.hero-image {
  position: relative;
  width: 350px;
  height: 420px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
}

.hero-image::before {
  content: "";
  position: absolute;
  inset: -3px;
  background: linear-gradient(
    135deg,
    var(--gold),
    transparent 50%,
    var(--gold-dark)
  );
  border-radius: 22px;
  z-index: -1;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20px;
}

/* le badge "disponible" avec un point vert clignotant */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 50px;
  background: rgba(212, 168, 67, 0.1);
  border: 1px solid var(--glass-border);
  font-size: 0.85rem;
  color: var(--gold);
  margin-bottom: 1rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: #4ade80;
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.3);
  }
}

/* titre principal du hero */
.hero-title {
  font-family: "Outfit", sans-serif;
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

/* le mot doré dans le titre */
.text-gold {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 500px;
  margin-bottom: 2rem;
}

/* --- Boutons CTA — dorés et élégants --- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--dark-bg);
  font-weight: 600;
  border-radius: 12px;
  text-decoration: none;
  font-size: 0.95rem;
  transition: var(--transition-smooth);
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(212, 168, 67, 0.3);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: transparent;
  color: var(--gold);
  font-weight: 600;
  border-radius: 12px;
  text-decoration: none;
  font-size: 0.95rem;
  border: 1.5px solid var(--gold);
  transition: var(--transition-smooth);
  cursor: pointer;
}

.btn-outline:hover {
  background: rgba(212, 168, 67, 0.1);
  transform: translateY(-2px);
}

/* --- Titres de section — avec une barre dorée en dessous --- */
.section-title {
  font-family: "Outfit", sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background: var(--gold);
  margin-top: 12px;
  border-radius: 2px;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 600px;
}

/* --- À propos — deux colonnes avec une image --- */
.about-image-container {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
}

.about-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20px;
}

/* le petit encadré de stats/compteur */
.stat-card {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  transition: var(--transition-smooth);
}

.stat-card:hover {
  transform: translateY(-3px);
  border-color: var(--gold);
}

.stat-number {
  font-family: "Outfit", sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* --- Grille de projets — effet hover avec overlay --- */
.project-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4/3;
  transition: var(--transition-smooth);
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* l'overlay qui apparaît au survol */
.project-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(10, 10, 10, 0.9) 0%,
    rgba(10, 10, 10, 0.3) 50%,
    transparent 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity 0.4s ease;
}

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

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

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

.project-overlay h3 {
  font-family: "Outfit", sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
}

.project-overlay p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* --- Cartes de compétences — glassmorphism avec icône --- */
.skill-card {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: 16px;
  padding: 2rem;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

/* un subtil reflet doré en haut à droite */
.skill-card::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100px;
  height: 100px;
  background: radial-gradient(
    circle,
    rgba(212, 168, 67, 0.1) 0%,
    transparent 70%
  );
  border-radius: 50%;
  transition: var(--transition-smooth);
}

.skill-card:hover {
  border-color: var(--gold);
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(212, 168, 67, 0.1);
}

.skill-card:hover::before {
  top: -30%;
  right: -30%;
  width: 200px;
  height: 200px;
}

.skill-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(212, 168, 67, 0.1);
  border-radius: 12px;
  color: var(--gold);
  margin-bottom: 1rem;
}

.skill-card h3 {
  font-family: "Outfit", sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.skill-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* --- Barres de progression pour les outils --- */
.tool-bar {
  background: var(--dark-card);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  border: 1px solid var(--dark-border);
}

.tool-bar-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 0.9rem;
  font-weight: 500;
}

.tool-bar-track {
  height: 6px;
  background: var(--dark-border);
  border-radius: 3px;
  overflow: hidden;
}

.tool-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  border-radius: 3px;
  transition: width 1.5s cubic-bezier(0.25, 0.8, 0.25, 1);
  width: 0;
}

/* l'animation se joue quand l'élément est visible */
.tool-bar-fill.animate {
  width: var(--target-width);
}

/* --- Timeline d'expérience — verticale avec points dorés --- */
.timeline {
  position: relative;
  padding-left: 2rem;
}

/* la ligne verticale */
.timeline::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--gold), var(--dark-border));
}

.timeline-item {
  position: relative;
  padding-bottom: 2.5rem;
  padding-left: 1.5rem;
}

/* le point doré sur la ligne */
.timeline-item::before {
  content: "";
  position: absolute;
  left: -2rem;
  top: 6px;
  width: 14px;
  height: 14px;
  background: var(--gold);
  border-radius: 50%;
  border: 3px solid var(--dark-bg);
  transform: translateX(-50%);
  left: -7px;
}

.timeline-item h3 {
  font-family: "Outfit", sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.timeline-item p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* --- Section contact — formulaire et infos --- */
.contact-card {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: 20px;
  padding: 2.5rem;
  transition: var(--transition-smooth);
}

.contact-card:hover {
  border-color: rgba(212, 168, 67, 0.3);
}

/* les champs de formulaire — sombres avec un focus doré */
.form-input {
  width: 100%;
  padding: 14px 18px;
  background: var(--dark-bg);
  border: 1px solid var(--dark-border);
  border-radius: 12px;
  color: var(--text-primary);
  font-family: "Inter", sans-serif;
  font-size: 0.95rem;
  transition:
    border-color 0.3s ease,
    box-shadow 0.3s ease;
  outline: none;
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212, 168, 67, 0.1);
}

textarea.form-input {
  resize: vertical;
  min-height: 140px;
}

/* les petites icônes de contact */
.contact-info-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  color: var(--text-secondary);
  transition: color 0.3s ease;
}

.contact-info-item:hover {
  color: var(--gold);
}

.contact-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(212, 168, 67, 0.1);
  border-radius: 12px;
  color: var(--gold);
  flex-shrink: 0;
}

/* boutons sociaux ronds */
.social-link {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  color: var(--text-secondary);
  transition: var(--transition-smooth);
  text-decoration: none;
}

.social-link:hover {
  background: rgba(212, 168, 67, 0.1);
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-3px);
}

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--dark-border);
}

.footer a {
  color: var(--gold);
  text-decoration: none;
}

/* --- Animations d'entrée pour le hero --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.8s ease forwards;
}

.animate-delay-1 {
  animation-delay: 0.2s;
  opacity: 0;
}
.animate-delay-2 {
  animation-delay: 0.4s;
  opacity: 0;
}
.animate-delay-3 {
  animation-delay: 0.6s;
  opacity: 0;
}
.animate-delay-4 {
  animation-delay: 0.8s;
  opacity: 0;
}

/* --- Menu mobile — slide-in depuis la droite --- */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 75%;
    max-width: 320px;
    height: 100vh;
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 100px 2rem 2rem;
    gap: 0;
    transition: right 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    border-left: 1px solid var(--glass-border);
  }

  .nav-menu.active {
    right: 0;
  }

  .nav-menu .nav-link {
    font-size: 1.1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--dark-border);
    display: block;
  }

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

  .hero-image {
    width: 260px;
    height: 320px;
  }

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

/* tablettes */
@media (max-width: 1024px) and (min-width: 769px) {
  .hero-title {
    font-size: 2.75rem;
  }

  .hero-image {
    width: 300px;
    height: 370px;
  }
}

/* --- Overlay sombre quand le menu mobile est ouvert --- */
.menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

.menu-overlay.active {
  display: block;
}

/* --- Cartes de catégorie — cliquables, avec effet hover premium --- */
.category-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: 16px;
  overflow: hidden;
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  transition: var(--transition-smooth);
  cursor: pointer;
  position: relative;
}

.category-card:hover {
  transform: translateY(-6px);
  border-color: var(--gold);
  box-shadow: 0 20px 50px rgba(212, 168, 67, 0.15);
}

/* le label en bas de la carte catégorie */
.category-label {
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.category-label h3 {
  font-family: "Outfit", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.category-count {
  font-size: 0.8rem;
  color: var(--gold);
  background: rgba(212, 168, 67, 0.1);
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 500;
  white-space: nowrap;
}

/* overlay "Voir les visuels" sur les cartes catégorie */
.category-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(10, 10, 10, 0.85) 0%,
    rgba(10, 10, 10, 0.3) 40%,
    transparent 100%
  );
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  opacity: 0;
  transition: opacity 0.4s ease;
  color: white;
  z-index: 2;
}

.category-card-overlay span {
  font-family: "Inter", sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}

/* au survol la carte révèle l'overlay */
.category-card:hover .category-card-overlay {
  opacity: 1;
}

/* ============================================================
   MODAL GALERIE — le panneau plein écran avec navigation
   ============================================================ */

/* overlay sombre derrière le modal */
.gallery-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.gallery-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* le modal lui-même — prend presque toute la fenêtre */
.gallery-modal {
  width: 95%;
  max-width: 1200px;
  height: 90vh;
  background: var(--dark-bg);
  border: 1px solid var(--dark-border);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  transform: scale(0.9) translateY(30px);
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.gallery-modal-overlay.active .gallery-modal {
  transform: scale(1) translateY(0);
}

/* bouton fermer en haut à droite, style premium */
.gallery-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.gallery-modal-close:hover {
  background: rgba(212, 168, 67, 0.2);
  border-color: var(--gold);
  color: var(--gold);
  transform: rotate(90deg);
}

/* --- Bannière de navigation entre catégories --- */
.gallery-modal-nav {
  flex-shrink: 0;
  background: var(--dark-card);
  border-bottom: 1px solid var(--dark-border);
  padding: 0 1rem;
  position: relative;
}

/* conteneur scrollable horizontalement pour les onglets */
.gallery-nav-scroll {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 12px 0;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none;
}

.gallery-nav-scroll::-webkit-scrollbar {
  display: none; /* Chrome, Safari — on masque la scrollbar */
}

/* chaque onglet de catégorie dans la bannière */
.gallery-nav-tab {
  flex-shrink: 0;
  padding: 8px 18px;
  border-radius: 50px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-family: "Inter", sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.gallery-nav-tab:hover {
  background: rgba(212, 168, 67, 0.08);
  color: var(--text-primary);
}

/* onglet actif — doré et bien visible */
.gallery-nav-tab.active {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--dark-bg);
  font-weight: 600;
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(212, 168, 67, 0.3);
}

/* --- En-tête du modal — titre et compteur --- */
.gallery-modal-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--dark-border);
}

.gallery-modal-title {
  font-family: "Outfit", sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.gallery-modal-count {
  font-size: 0.85rem;
  color: var(--gold);
  background: rgba(212, 168, 67, 0.1);
  padding: 6px 14px;
  border-radius: 20px;
  font-weight: 500;
}

/* --- Grille d'images dans le modal --- */
.gallery-modal-grid {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  align-content: start;
  transition: opacity 0.3s ease;
}

/* scrollbar personnalisée pour la grille */
.gallery-modal-grid::-webkit-scrollbar {
  width: 6px;
}

.gallery-modal-grid::-webkit-scrollbar-track {
  background: transparent;
}

.gallery-modal-grid::-webkit-scrollbar-thumb {
  background: var(--dark-border);
  border-radius: 3px;
}

.gallery-modal-grid::-webkit-scrollbar-thumb:hover {
  background: var(--gold-dark);
}

/* chaque carte image dans la grille du modal */
.gallery-img-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4/3;
  background: var(--dark-card);
  animation: galleryFadeIn 0.5s ease forwards;
  opacity: 0;
}

@keyframes galleryFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.gallery-img-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.gallery-img-card:hover img {
  transform: scale(1.08);
}

/* overlay avec icône + texte "agrandir" au survol */
.gallery-img-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.3s ease;
  color: white;
}

/* le texte "Agrandir" sous l'icône */
.gallery-img-hint {
  font-family: "Inter", sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  opacity: 0.9;
}

.gallery-img-card:hover .gallery-img-overlay {
  opacity: 1;
}

/* --- Bouton "Explorer les visuels" — en bas du modal --- */
.gallery-scroll-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  margin: 0 1.5rem 1.5rem;
  background: linear-gradient(135deg, rgba(212, 168, 67, 0.15), rgba(212, 168, 67, 0.05));
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  color: var(--gold);
  font-family: "Inter", sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.gallery-scroll-btn:hover {
  background: linear-gradient(135deg, rgba(212, 168, 67, 0.25), rgba(212, 168, 67, 0.1));
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(212, 168, 67, 0.15);
}

/* ============================================================
   LIGHTBOX — vue plein écran d'une seule image
   ============================================================ */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* l'image dans la lightbox — centrée et responsive */
.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.8);
  transition: transform 0.3s ease;
}

/* bouton fermer la lightbox */
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: white;
  cursor: pointer;
  transition: var(--transition-smooth);
  z-index: 10;
}

.lightbox-close:hover {
  background: rgba(212, 168, 67, 0.3);
  border-color: var(--gold);
  color: var(--gold);
  transform: rotate(90deg);
}

/* boutons navigation précédent/suivant */
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: white;
  cursor: pointer;
  transition: var(--transition-smooth);
  z-index: 10;
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

.lightbox-nav:hover {
  background: rgba(212, 168, 67, 0.3);
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-50%) scale(1.1);
}

/* compteur de position — "3 / 20" */
.lightbox-counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  padding: 8px 20px;
  border-radius: 50px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 10;
}

/* --- Responsive du modal et de la lightbox --- */
@media (max-width: 768px) {
  /* le modal prend tout l'écran sur mobile */
  .gallery-modal {
    width: 100%;
    height: 100vh;
    height: 100dvh; /* hauteur dynamique pour mobiles modernes */
    border-radius: 0;
  }

  .gallery-modal-title {
    font-size: 1.1rem;
  }

  .gallery-modal-count {
    font-size: 0.75rem;
    padding: 4px 10px;
  }

  /* la grille passe en 2 colonnes sur mobile */
  .gallery-modal-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 0.75rem;
  }

  /* onglets plus compacts */
  .gallery-nav-tab {
    padding: 6px 14px;
    font-size: 0.75rem;
  }

  .gallery-modal-header {
    padding: 0.75rem 1rem;
  }

  .gallery-scroll-btn {
    margin: 0 0.75rem 0.75rem;
    padding: 10px 14px;
    font-size: 0.82rem;
  }

  /* Sur mobile, pas de hover — on affiche l'overlay en permanence
     avec une opacité légère pour indiquer que c'est cliquable */
  .category-card-overlay {
    opacity: 1;
    background: linear-gradient(
      to top,
      rgba(10, 10, 10, 0.7) 0%,
      rgba(10, 10, 10, 0.1) 50%,
      transparent 100%
    );
  }

  /* les images de la galerie montrent toujours un léger overlay */
  .gallery-img-overlay {
    opacity: 1;
    background: linear-gradient(
      to top,
      rgba(10, 10, 10, 0.6) 0%,
      transparent 60%
    );
    justify-content: flex-end;
    padding-bottom: 10px;
  }

  .gallery-img-hint {
    font-size: 0.65rem;
  }

  .gallery-img-overlay svg {
    width: 18px;
    height: 18px;
  }

  /* lightbox — boutons plus proches sur mobile */
  .lightbox-prev {
    left: 8px;
  }

  .lightbox-next {
    right: 8px;
  }

  .lightbox-nav {
    width: 38px;
    height: 38px;
  }

  .lightbox-close {
    top: 10px;
    right: 10px;
    width: 38px;
    height: 38px;
  }

  .lightbox-img {
    max-width: 95vw;
    max-height: 80vh;
  }

  .lightbox-counter {
    bottom: 16px;
    font-size: 0.78rem;
    padding: 6px 16px;
  }

  /* les cartes catégorie en grille 2 colonnes sur mobile */
  .category-label h3 {
    font-size: 0.85rem;
  }

  .category-count {
    font-size: 0.7rem;
    padding: 3px 8px;
  }
}

/* très petits écrans — téléphones compacts */
@media (max-width: 380px) {
  .gallery-modal-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    padding: 0.5rem;
  }

  .gallery-nav-tab {
    padding: 5px 10px;
    font-size: 0.7rem;
  }

  .gallery-modal-title {
    font-size: 0.95rem;
  }
}
