/*
 * Fichier    : visitor.css
 * Rôle       : Styles de la page visiteur  flash banner, nav top & side,
 *              hero, carrousel, publications pingles, services, ralisations,
 *              contact, footer, lightbox
 * Emplacement: assets/css/visitor.css
 * Auteur     : RCBG
 * Projet     : Franck Emery v1.0.0
 */


/* ============================================================
   FLASH BANNER
============================================================ */

.flash-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: calc(var(--z-nav) + 10);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: 10px var(--space-8);
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent2) 100%);
  color: #fff;
  min-height: 44px;
  box-shadow: 0 2px 20px var(--accent-glow);
}

.flash-banner__inner {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex: 1;
  min-width: 0;
}

.flash-banner__badge {
  flex-shrink: 0;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.20);
  border: 1px solid rgba(255, 255, 255, 0.30);
  padding: 2px 9px;
  border-radius: var(--radius-full);
}

.flash-banner__text {
  font-size: var(--text-sm);
  font-weight: 400;
  color: rgba(255, 255, 255, 0.95);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}

.flash-banner__close {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.80);
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background var(--transition-fast);
}

.flash-banner__close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
}

/* Dcalage du contenu quand le banner est affich */
body.has-flash .nav-top,
body.has-flash .nav-side {
  top: 44px;
}

body.has-flash #home {
  padding-top: calc(100dvh + 44px);
  margin-top: -44px;
}

@media (max-width: 480px) {
  .flash-banner {
    padding: 8px var(--space-4);
  }

  .flash-banner__badge {
    display: none;
  }
}


/* ============================================================
   NAVIGATION BUTTONS (partags top & side)
============================================================ */

.nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--text2);
  border-radius: var(--radius-md);
  transition:
    color var(--transition-fast),
    background var(--transition-fast);
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.nav-btn:hover {
  color: var(--text);
  background: var(--bg3);
}

.nav-btn--lang {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text2);
}

.nav-btn--admin {
  opacity: 0.45;
  transition: opacity var(--transition-base), background var(--transition-fast);
}

.nav-btn--admin:hover {
  opacity: 1;
  background: var(--bg3);
}

/* Logo nav */
.nav-logo-initials {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  /* background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%); */
  background: var(--accent-gradient);
  color: #fff;
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
  border-radius: var(--radius-md);
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.nav-logo-img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  border-radius: var(--radius-md);
}


/* ============================================================
   NAVIGATION TOP
============================================================ */

.nav-top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-nav);
  height: var(--nav-height-top);
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  backdrop-filter: blur(24px) saturate(1.3);
  -webkit-backdrop-filter: blur(24px) saturate(1.3);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
  transition:
    height var(--transition-slow),
    box-shadow var(--transition-slow),
    background var(--transition-slow),
    border-color var(--transition-slow);
}

.nav-top.scrolled {
  height: var(--nav-height-sm);
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.18);
  background: color-mix(in srgb, var(--bg2) 85%, transparent);
  border-bottom-color: var(--border);
}

.nav-top__inner {
  max-width: var(--max-width);
  height: 100%;
  margin: 0 auto;
  padding: 0 var(--content-padding);
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.nav-top__logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--text);
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 600;
}

.nav-top__links {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  flex: 1;
  justify-content: center;
}

.nav-top__links li {
  list-style: none;
}

.nav-link {
  position: relative;
  display: inline-block;
  padding: 6px 12px;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text2);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition:
    color var(--transition-fast),
    background var(--transition-fast);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 12px;
  right: 12px;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-base);
}

.nav-link:hover {
  color: var(--text);
  background: var(--bg3);
}

.nav-link.active {
  color: var(--accent);
}

.nav-link.active::after {
  transform: scaleX(1);
}

.nav-top__actions {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  flex-shrink: 0;
}

/* Hamburger  cach par défaut sur desktop */
.nav-btn--hamburger {
  display: none;
}

/* Menu mobile */
.nav-mobile-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: var(--space-3) var(--space-4) var(--space-4);
  transform: translateY(-10px);
  opacity: 0;
  pointer-events: none;
  transition:
    transform var(--transition-base),
    opacity var(--transition-base);
  box-shadow: var(--shadow-lg);
}

.nav-mobile-menu.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}

.nav-mobile-menu ul {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-mobile-menu .nav-link {
  display: block;
  padding: 10px 12px;
  font-size: var(--text-base);
  border-radius: var(--radius-md);
  width: 100%;
}

.nav-mobile-menu .nav-link::after {
  display: none;
}

/*  CORRECTIONS MOBILE NAV  */
@media (max-width: 768px) {
  .nav-top__links {
    display: none;
  }

  .nav-btn--hamburger {
    display: flex !important;
    order: 99;
  }

  .nav-top__actions {
    margin-left: auto;
  }

  .nav-top__inner {
    justify-content: space-between;
  }
}


/* ============================================================
   NAVIGATION SIDE (desktop un024px)
============================================================ */

.nav-side {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  z-index: var(--z-nav);
  background: var(--bg-glass);
  backdrop-filter: blur(18px) saturate(1.6);
  -webkit-backdrop-filter: blur(18px) saturate(1.6);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-6) var(--space-4) var(--space-4);
  gap: var(--space-4);
  transition: background var(--transition-slow);
}

.nav-side__logo {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-bottom: var(--space-2);
}

.nav-side__logo .nav-logo-initials {
  width: 44px;
  height: 44px;
  font-size: var(--text-md);
}

.nav-side__logo .nav-logo-img {
  width: 44px;
  height: 44px;
}

.nav-side__links {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  flex: 1;
}

.nav-side__link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 10px 6px;
  color: var(--text2);
  border-radius: var(--radius-md);
  text-decoration: none;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-align: center;
  transition:
    color var(--transition-fast),
    background var(--transition-fast);
}

.nav-side__link svg {
  flex-shrink: 0;
}

.nav-side__link:hover {
  color: var(--text);
  background: var(--bg3);
}

.nav-side__link.active {
  color: var(--accent);
  background: var(--accent-dim);
}

.nav-side__footer {
  width: 100%;
  display: flex;
  justify-content: center;
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
}

/* Quand la nav side est active, pousser le contenu */
body.nav-side-active #main-content,
body.nav-side-active .footer {
  margin-left: var(--sidebar-width);
}

/* Sur mobile, forcer le masquage du nav-side mme si activ */
@media (max-width: 1024px) {
  .nav-side {
    display: none !important;
  }

  body.nav-side-active #main-content,
  body.nav-side-active .footer {
    margin-left: 0;
  }
}


/* ============================================================
   HERO SECTION
============================================================ */

/* .hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: var(--nav-height-top);
  overflow: hidden;
} */
 .hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 0;
  overflow: hidden;
}

/* Arrire-plan */
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  will-change: transform;
}

.hero__orb--1 {
  width: 600px;
  height: 600px;
  background: color-mix(in srgb, var(--accent) 100%, transparent);
  opacity: 0.12;
  top: -200px;
  left: -200px;
  animation: heroOrb1 18s ease-in-out infinite;
}

.hero__orb--2 {
  width: 450px;
  height: 450px;
  background: color-mix(in srgb, var(--accent2) 100%, transparent);
  opacity: 0.10;
  bottom: -100px;
  right: -100px;
  animation: heroOrb2 22s ease-in-out infinite;
}

.hero__orb--3 {
  width: 300px;
  height: 300px;
  background: color-mix(in srgb, var(--accent) 100%, var(--accent2) 50%);
  opacity: 0.07;
  top: 40%;
  right: 20%;
  animation: heroOrb3 16s ease-in-out infinite;
}

.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(ellipse 75% 75% at 50% 50%, black 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 75% 75% at 50% 50%, black 30%, transparent 100%);
  transform: perspective(800px) rotateX(10deg);
  transform-origin: center bottom;
}

@keyframes heroOrb1 {
  0%,  100% { transform: translate(0, 0) scale(1); }
  30%       { transform: translate(60px, 80px) scale(1.08); }
  70%       { transform: translate(-40px, 40px) scale(0.95); }
}

@keyframes heroOrb2 {
  0%,  100% { transform: translate(0, 0) scale(1); }
  40%       { transform: translate(-70px, -50px) scale(1.12); }
  75%       { transform: translate(30px, -80px) scale(0.92); }
}

@keyframes heroOrb3 {
  0%,  100% { transform: translate(0, 0) scale(1) rotate(0deg); }
  50%       { transform: translate(40px, -60px) scale(1.15) rotate(15deg); }
}


/* ============================================================
   CARROUSEL
   (remplace les rgles originales  correctifs appliqus)
============================================================ */

/*  Wrapper principal  */
.carousel-wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 860px;
  margin: 0 auto var(--space-10);
  padding: 0 var(--content-padding);
  /* PAS de overflow:hidden ici  les dots sont en dehors du clip */
}

/*  Conteneur du track (c'est lui qui clipe)  */
.carousel {
  position: relative;
  width: 100%;
  overflow: hidden;               /*  CRITIQUE : clipe les slides hors-champ */
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl);
}

/*  Track : flex-row sans retour  la ligne  */
.carousel__track {
  display: flex;
  flex-wrap: nowrap;              /*  CRITIQUE : empche le retour  la ligne */
  width: 100%;
  will-change: transform;
  /* La transition est applique inline par JS */
}

/*  Chaque slide  */
.carousel__slide {
  min-width: 100%;               /*  CRITIQUE : chaque slide = 100% du .carousel */
  width: 100%;
  flex-shrink: 0;                /*  CRITIQUE : empche le rtrcissement */
  aspect-ratio: 21 / 9;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: var(--space-8) var(--space-10);
  overflow: hidden;
  user-select: none;
}

/* Dégradé sombre en bas de chaque slide */
.carousel__slide::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.75) 0%,
    rgba(0, 0, 0, 0.20) 50%,
    rgba(0, 0, 0, 0) 100%
  );
  z-index: 1;
}

/*  Contenu du slide  */
.carousel__slide-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.carousel__slide-tag {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.70);
  margin-bottom: 2px;
}

.carousel__slide-title {
  font-family: var(--font-display);
  font-size: clamp(20px, 4vw, 36px);
  font-weight: 700;
  color: #fff;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.carousel__slide-subtitle {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.5;
}

.carousel__slide-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 8px 18px;
  background: rgba(255, 255, 255, 0.20);
  color: #fff;
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.30);
  text-decoration: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  align-self: flex-start;
  transition:
    background var(--transition-fast),
    border-color var(--transition-fast);
}

.carousel__slide-btn:hover {
  background: rgba(255, 255, 255, 0.32);
  border-color: rgba(255, 255, 255, 0.55);
}

/*  Dots de navigation  */
.carousel__dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: var(--space-4);
  padding: 0 var(--content-padding);
}

.carousel__dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--border2);
  border: none;
  cursor: pointer;
  transition:
    width var(--transition-base),
    background var(--transition-base);
  -webkit-tap-highlight-color: transparent;
}

.carousel__dot.active {
  width: 22px;
  background: var(--accent);
}

/*  Responsive carrousel  */
@media (max-width: 600px) {
  .carousel__slide {
    aspect-ratio: 4 / 3;
    padding: var(--space-5);
    align-items: flex-end;
  }
}

@media (max-width: 480px) {
  .carousel-wrapper {
    padding: 0;
    margin-bottom: var(--space-8);
  }

  .carousel {
    border-radius: 0;
  }
}


/* ============================================================
   CONTENU HERO PRINCIPAL
============================================================ */

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 720px;
  width: 100%;
  padding: var(--space-4) var(--content-padding) var(--space-8); ;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-4);
}

/* Badge statut */
.hero__status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  color: var(--text2);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.hero__status-dot {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.5);
  animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
  0%   { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.50); }
  50%  { box-shadow: 0 0 0 6px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

.hero__status-text {
  font-weight: 500;
}

/* Nom */
.hero__name {
  font-family: var(--font-display);
  font-size: clamp(var(--text-4xl), 8vw, var(--text-6xl));
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.04em;
  line-height: 1.05;
}

/* Titre / expertise */
.hero__title {
  font-family: var(--font-display);
  font-size: clamp(var(--text-lg), 3vw, var(--text-2xl));
  font-style: italic;
  font-weight: 400;
  /* background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%); */
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.3;
}

/* Bio */
.hero__bio {
  font-size: var(--text-base);
  color: var(--text2);
  line-height: 1.75;
  max-width: 480px;
}

/* CTA */
.hero__cta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  justify-content: center;
  margin-top: var(--space-2);
}

/* Stats */
.hero__stats {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  margin-top: var(--space-4);
  flex-wrap: wrap;
  justify-content: center;
}

.hero__stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.hero__stat-value {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1;
}

.hero__stat-label {
  font-size: var(--text-xs);
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Dividers entre stats */
.hero__stat + .hero__stat {
  position: relative;
}

.hero__stat + .hero__stat::before {
  content: '';
  position: absolute;
  left: calc(-1 * var(--space-4));
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 28px;
  background: var(--border);
}

/* Indicateur de scroll */
.hero__scroll-indicator {
  position: absolute;
  bottom: var(--space-8);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 40px;
}

.hero__scroll-line {
  width: 1.5px;
  height: 100%;
  background: linear-gradient(to bottom, transparent 0%, var(--accent) 50%, transparent 100%);
  border-radius: 1px;
  animation: scrollAnim 2s ease-in-out infinite;
}

@keyframes scrollAnim {
  0%   { transform: scaleY(0) translateY(-50%); opacity: 0; }
  20%  { opacity: 1; }
  80%  { opacity: 1; }
  100% { transform: scaleY(1) translateY(50%);  opacity: 0; }
}


/* ============================================================
   SECTIONS COMMUNES
============================================================ */

.section {
  padding: var(--space-24) 0;
}

.section__container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--content-padding);
}

.section__header {
  text-align: center;
  margin-bottom: var(--space-16);
}

.section__title {
  font-family: var(--font-display);
  font-size: clamp(var(--text-3xl), 5vw, var(--text-4xl));
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.03em;
  margin-bottom: var(--space-4);
  position: relative;
  display: inline-block;
}

/* Ligne dcorative sous le titre */
.section__title::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 2px;
  margin: var(--space-4) auto 0;
}

.section__subtitle {
  font-size: var(--text-base);
  color: var(--text2);
  line-height: 1.65;
  max-width: 520px;
  margin: 0 auto;
}


/* ============================================================
   PUBLICATIONS PINGLES
============================================================ */

.pinned-section {
  padding-top: var(--space-16);
  padding-bottom: var(--space-8);
}

.pinned-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-6);
}


/* ============================================================
   SERVICES
============================================================ */

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-6);
}

.service-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  position: relative;
  overflow: hidden;
  transition:
    transform var(--transition-base),
    box-shadow var(--transition-base),
    border-color var(--transition-base);
}

/* Ligne dégradée du haut qui se droule au hover */
.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-slow);
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-accent);
}

.service-card__icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-dim);
  border-radius: var(--radius-lg);
  color: var(--accent);
  flex-shrink: 0;
}

.service-card__icon svg {
  width: 24px;
  height: 24px;
}

.service-card__name {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
}

.service-card__desc {
  font-size: var(--text-sm);
  color: var(--text2);
  line-height: 1.7;
  flex: 1;
}

.service-card__price {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--accent);
  margin-top: auto;
}


/* ============================================================
   RALISATIONS (WORKS)
============================================================ */

/* Filtres */
.works-filters {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: var(--space-10);
}

.filter-btn {
  padding: 7px 18px;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text2);
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition:
    color var(--transition-fast),
    background var(--transition-fast),
    border-color var(--transition-fast),
    box-shadow var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}

.filter-btn:hover {
  color: var(--text);
  border-color: var(--border2);
  background: var(--bg3);
}

.filter-btn--active {
  color: var(--accent);
  background: var(--accent-dim);
  border-color: var(--border-accent);
}

/* Grille asymtrique */
.works-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-5);
}

.work-card {
  grid-column: span 4;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  transition:
    transform var(--transition-base),
    box-shadow var(--transition-base),
    border-color var(--transition-base);
}

/* Variation de taille pour créer un rythème */
.work-card:nth-child(4n+1) { grid-column: span 5; }
.work-card:nth-child(4n+2) { grid-column: span 7; }
.work-card:nth-child(4n+3) { grid-column: span 7; }
.work-card:nth-child(4n+4) { grid-column: span 5; }

.work-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-accent);
}

.work-card__media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg3);
  position: relative;
}

.work-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.50s cubic-bezier(0.4, 0, 0.2, 1);
}

.work-card:hover .work-card__media img {
  transform: scale(1.04);
}

/* Overlay au hover */
.work-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top,
    rgba(0, 0, 0, 0.85) 0%,
    rgba(0, 0, 0, 0.40) 45%,
    rgba(0, 0, 0, 0) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--space-5);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.work-card:hover .work-card__overlay {
  opacity: 1;
}

.work-card__overlay-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: #fff;
  line-height: 1.25;
  margin-bottom: 6px;
}

.work-card__overlay-desc {
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.70);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.work-card__overlay-tags {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.work-card__tag {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.85);
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.20);
}

/* Infos sous l'image */
.work-card__body {
  padding: var(--space-4) var(--space-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.work-card__category {
  font-size: var(--text-xs);
  color: var(--accent);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.work-card__pin {
  color: #fbbf24;
  flex-shrink: 0;
}

/* Responsive works */
@media (max-width: 1024px) {
  .work-card,
  .work-card:nth-child(4n+1),
  .work-card:nth-child(4n+2),
  .work-card:nth-child(4n+3),
  .work-card:nth-child(4n+4) {
    grid-column: span 6;
  }
}

@media (max-width: 640px) {
  .works-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .work-card,
  .work-card:nth-child(4n+1),
  .work-card:nth-child(4n+2),
  .work-card:nth-child(4n+3),
  .work-card:nth-child(4n+4) {
    grid-column: span 1;
  }
}


/* ============================================================
   CONTACT
============================================================ */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-5);
}

.contact-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-6) var(--space-4);
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  text-decoration: none;
  overflow: hidden;
  transition:
    transform var(--transition-base),
    box-shadow var(--transition-base),
    border-color var(--transition-base);
}

.contact-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--contact-color, var(--accent));
  opacity: 0;
  transition: opacity var(--transition-base);
}

.contact-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-accent);
}

.contact-card:hover::before {
  opacity: 0.06;
}

.contact-card__icon {
  position: relative;
  z-index: 1;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  background: var(--contact-bg, var(--accent-dim));
  flex-shrink: 0;
  transition: transform var(--transition-spring);
}

.contact-card:hover .contact-card__icon {
  transform: scale(1.08);
}

.contact-card__icon svg {
  width: 26px;
  height: 26px;
}

.contact-card__label {
  position: relative;
  z-index: 1;
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text3);
}

.contact-card__value {
  position: relative;
  z-index: 1;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text);
  text-align: center;
  word-break: break-word;
  line-height: 1.4;
}


/* ============================================================
   FOOTER
============================================================ */

.footer {
  padding: var(--space-8) var(--content-padding);
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer__copy {
  font-size: var(--text-sm);
  color: var(--text3);
  line-height: 1.5;
}


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

.lightbox {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
}

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 10, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
}

.lightbox__panel {
  position: relative;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 900px;
  max-height: calc(100dvh - var(--space-12));
  overflow: hidden;
  animation: modalIn 0.30s cubic-bezier(0.34, 1.40, 0.64, 1) both;
}

.lightbox__close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  z-index: 10;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.50);
  color: #fff;
  border-radius: var(--radius-md);
  transition: background var(--transition-fast);
}

.lightbox__close:hover {
  background: rgba(0, 0, 0, 0.80);
}

.lightbox__body {
  display: flex;
  height: 100%;
  max-height: calc(100dvh - var(--space-12));
}

.lightbox__media {
  flex: 1.2;
  min-width: 0;
  overflow: hidden;
  background: var(--bg3);
  max-height: calc(100dvh - var(--space-12));
}

.lightbox__media img {
  width: 100%;
  height: 100%;
  max-height: calc(100dvh - var(--space-12));
  object-fit: cover;
}

.lightbox__info {
  width: 320px;
  flex-shrink: 0;
  overflow-y: auto;
  padding: var(--space-10) var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.lightbox__category {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.lightbox__title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.lightbox__desc {
  font-size: var(--text-sm);
  color: var(--text2);
  line-height: 1.75;
}

.lightbox__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.lightbox__tag {
  font-size: var(--text-xs);
  font-weight: 500;
  padding: 4px 10px;
  background: var(--accent-dim);
  color: var(--accent2);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-full);
}

@media (max-width: 768px) {
  .lightbox {
    padding: var(--space-3);
    align-items: flex-end;
  }

  .lightbox__panel {
    border-radius: var(--radius-2xl) var(--radius-2xl) var(--radius-lg) var(--radius-lg);
    max-height: 92dvh;
  }

  .lightbox__body {
    flex-direction: column;
    overflow-y: auto;
    max-height: 92dvh;
  }

  .lightbox__media {
    flex: none;
    max-height: 50dvh;
    width: 100%;
  }

  .lightbox__info {
    width: 100%;
    padding: var(--space-6);
    overflow-y: visible;
    max-height: none;
  }
}


/* ============================================================
   SCROLL REVEAL CLASSES
   (appliques par animations.js via IntersectionObserver)
============================================================ */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.50s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.50s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger automatique pour les enfants de grilles */
.stagger-children > *:nth-child(1) { transition-delay: 0ms; }
.stagger-children > *:nth-child(2) { transition-delay: 60ms; }
.stagger-children > *:nth-child(3) { transition-delay: 120ms; }
.stagger-children > *:nth-child(4) { transition-delay: 180ms; }
.stagger-children > *:nth-child(5) { transition-delay: 240ms; }
.stagger-children > *:nth-child(6) { transition-delay: 300ms; }
.stagger-children > *:nth-child(7) { transition-delay: 360ms; }
.stagger-children > *:nth-child(8) { transition-delay: 420ms; }
.stagger-children > *:nth-child(n+9) { transition-delay: 480ms; }




/*
 * services_image_patch.css
 *  ajouter  la fin de visitor.css (ou charger aprs).
 *
 * Ajoute le support visuel pour :
 *   1. .service-card--has-image    card service avec image de couverture
 *   2. .item-card__thumb           miniature image dans la liste admin
 *   3. .item-card__thumb-img       <img> dans la miniature
 */

/* PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP
   CARD SERVICE AVEC IMAGE (visiteur)
   Quand svc.image est dfini, l'image remplace
   l'icne en haut de la card.
PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP */

/* Image de couverture en haut de la card */
.service-card__cover {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  /* Retirer le border-radius bas  gr par la card parente */
  margin: calc(-1 * var(--space-8)) calc(-1 * var(--space-8)) 0;
  /* Dborder du padding de la card pour aller bord  bord */
  width: calc(100% + var(--space-8) * 2);
  margin-bottom: var(--space-5);
}

.service-card__cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card--has-image:hover .service-card__cover-img {
  transform: scale(1.04);
}

/* Quand image prsente : ajuster le padding top de la card */
.service-card--has-image {
  padding-top: 0;
  overflow: hidden; /* pour que l'image couvre bien les coins */
}

/* Corps de la card (nom + desc + prix) reste padded */
.service-card--has-image .service-card__body {
  padding: 0 var(--space-2);
}

/* L'icne n'est pas affiche en mode image (gr par JS,
   mais au cas o le CSS masque un doublon ventuel) */
.service-card--has-image .service-card__icon {
  display: none;
}


/* PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP
   MINIATURE DANS LA LISTE ADMIN
   Remplace le swatch couleur quand une image
   est uploade (carousel ou service).
PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP */

.item-card__thumb {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg3);
}

.item-card__thumb--color {
  /* Fallback couleur (carousel sans image) */
  display: flex;
  align-items: center;
  justify-content: center;
}

.item-card__thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}