/* ─── Graphit Theme — Global Styles ──────────────────────────────────────── */

@import url("tokens.css");
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

/* ─── Lenis ──────────────────────────────────────────────────────────────── */
html.lenis,
html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

/* ─── Reset ──────────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-base);
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-base);
  color: var(--color-dark);
  background-color: var(--color-light);
  -webkit-font-smoothing: antialiased;
}

img,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

/* ─── Layout ─────────────────────────────────────────────────────────────── */
.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.site-main {
  /* 1. On active le mode Flexbox */
  display: flex;

  /* 2. On dit aux éléments de s'empiler de haut en bas (et non de gauche à droite) */
  flex-direction: column;

  /* 3. Maintenant, le gap fonctionne ! */
  gap: 70px;
  padding-bottom: 70px;
}

section {
  padding-block: var(--spacing-section);
}

/* ─── Typographie ────────────────────────────────────────────────────────── */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  font-family: var(--font-display);
  font-weight: var(--fw-black);
  text-transform: uppercase;
  text-align: center;
}

h1 {
  font-size: var(--font-size-6xl);
}
h2 {
  font-size: clamp(28px, 3.5vw, 44px);
  color: var(--color-grey);
  margin-bottom: var(--sp-4);
}
h3 {
  font-size: var(--font-size-xl);
}
h2::after {
  content: ""; /* Obligatoire pour qu'un pseudo-élément s'affiche */
  display: block; /* Place le trait sur une nouvelle ligne en dessous du texte */
  width: 100px; /* La largeur max que tu as demandée */
  height: 2px; /* L'épaisseur que tu as demandée */
  background-color: var(
    --color-grey
  ); /* La couleur du trait (utilise tes tokens !) */
  margin-top: 12px; /* L'espace entre le texte du h2 et le trait */
  border-radius: 2px; /* Petit bonus : arrondit très légèrement les bouts du trait */
  justify-self: center;
}
/* ─── Header ─────────────────────────────────────────────────────────────── */

/* ── Header layout ─────────────────────────────────────────────────────────── */
#site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: transparent;
  transition:
    background var(--tr-base),
    box-shadow var(--tr-base),
    height var(--tr-base);
  height: 90px;
  display: flex;
  align-items: center;
}

#site-header.scrolled {
  background: var(--color-dark);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.35);
  height: 70px;
}

#site-header.scrolled .site-logo svg { height: 36px; }
#site-header.scrolled .nav-list { gap: 24px; }
#site-header.scrolled .nav-list .nav-cta a,
#site-header.scrolled .nav-list li:last-child a { padding: 7px 14px; }

.header-inner {
  width: 100%;
  margin-inline: auto;
  padding-inline: 50px;
  display: flex;
  align-items: center;
  gap: 48px;
}

/* ── Logo ──────────────────────────────────────────────────────────────────── */
.site-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
  transition: opacity 0.25s ease;
}

.site-logo:hover {
  opacity: 0.8;
}

.site-logo svg {
  height: 48px;
  width: auto;
  display: block;
  transition: height var(--tr-base);
}

/* ── Nav desktop ───────────────────────────────────────────────────────────── */
.nav-main {
  margin-left: auto;
}

.nav-list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 32px;
  margin: 0;
  padding: 0;
  transition: gap var(--tr-base);
}

.nav-list a {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-white);
  text-decoration: none;
  position: relative;
  transition: color 0.3s ease;
}

/* Trait turquoise glissant de gauche à droite */
.nav-list a::after {
  content: "";
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 100%;
  height: 2px;
  background: #2fb6bc;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-list a:hover {
  color: var(--color-turquoise);
}

.nav-list a:hover::after {
  transform: scaleX(1);
}

/* Pas d'underline sur le CTA pill button */
.nav-list .nav-cta a::after,
.nav-list li:last-child a::after {
  display: none;
}

/* Trait permanent sur la page courante (WP ajoute .current-menu-item sur le <li>) */
.nav-list .current-menu-item > a::after {
  transform: scaleX(1);
  opacity: 0.5;
}

.nav-list a:focus-visible {
  outline: 2px solid #2fb6bc;
  outline-offset: 3px;
}

.nav-list .nav-cta a:focus-visible,
.nav-list li:last-child a:focus-visible {
  outline: 2px solid #2fb6bc;
  outline-offset: 3px;
}

/* CTA — dernier item ou item avec classe .nav-cta */
.nav-list .nav-cta a,
.nav-list li:last-child a {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: var(--fw-black); /* Pas de token --fw-bold, on garde 700 */
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #ffffff;
  background: var(--color-turquoise);
  border: none;
  border-radius: var(--r-full);
  border-top-left-radius: 0;
  padding: 10px 20px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition:
    color 0.3s ease,
    box-shadow 0.3s ease,
    padding var(--tr-base);
}
.nav-list .nav-cta a::before,
.nav-list li:last-child a::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.18);
  transform: translateX(-101%);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: -1;
}

.nav-list .nav-cta a:hover,
.nav-list li:last-child a:hover {
  box-shadow: 0 6px 28px rgba(47, 182, 188, 0.3);
}

.nav-list .nav-cta a:hover::before,
.nav-list li:last-child a:hover::before {
  transform: translateX(0);
}

/* ── Burger ────────────────────────────────────────────────────────────────── */
.burger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
  margin-left: auto;
}

.burger-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-white);
  border-radius: 2px;
  transition: var(--tr-base);
}

/* ── Menu mobile overlay ───────────────────────────────────────────────────── */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(12, 14, 16, 0.97);
  z-index: 200;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.mobile-menu.is-open {
  display: flex;
}

.mobile-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.mobile-nav-list a {
  font-family: var(--font-display);
  font-weight: var(--fw-black);
  font-size: clamp(24px, 5vw, 36px);
  color: var(--color-white);
  text-decoration: none;
  transition: color var(--tr-fast);
}

.mobile-nav-list a:hover {
  color: var(--color-turquoise);
}

.mobile-menu-close {
  position: absolute;
  top: 20px;
  right: 24px;
  font-size: 24px;
  color: var(--color-white);
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
}

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  #site-header {
    height: 56px;
  }
  .nav-main {
    display: none;
  }
  .burger-btn {
    display: flex;
  }
  .site-logo svg {
    height: 38px;
  }
}
/* ─── Mobile Menu ────────────────────────────────────────────────────────── */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--color-primary);
  z-index: calc(var(--z-header) + 1);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-8);
}

.mobile-menu.is-open {
  display: flex;
}

.mobile-menu a {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-light);
}

.mobile-menu-close {
  position: absolute;
  top: var(--space-6);
  right: var(--space-6);
  font-size: var(--font-size-xl);
  color: var(--color-light);
}

/* ─── Footer ─────────────────────────────────────────────────────────────── */
#site-footer {
  background: #0c0e10;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-block: 50px 40px;
}

.footer-inner {
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}

/* ── Logo footer ───────────────────────────────────────────────────────────── */
.footer-logo a {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  line-height: 1;
}

/* .logo-graphit et .logo-pub déjà définis dans le header */

/* ── Centre ────────────────────────────────────────────────────────────────── */
.footer-center {
  display: flex;
  align-items: center;
  gap: 28px;
}

.footer-adresse,
.footer-services {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 13px;
  color: var(--color-white);
  line-height: 1.8;
}

.footer-adresse a {
  color: inherit;
  text-decoration: none;
  transition: color var(--tr-fast);
}

.footer-adresse a:hover {
  color: var(--color-turquoise);
}

.footer-divider {
  width: 1px;
  height: 50px;
  background: rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
  align-self: center;
}

/* ── Réseaux sociaux ───────────────────────────────────────────────────────── */
.footer-social {
  display: flex;
  gap: 10px;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  transition:
    border-color var(--tr-fast),
    background var(--tr-fast);
  flex-shrink: 0;
}

.social-icon:hover {
  border-color: var(--color-turquoise);
  background: var(--color-turquoise-10);
}

.social-icon:focus-visible {
  outline: 2px solid #2fb6bc;
  outline-offset: 3px;
}

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }
  .footer-center {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .footer-divider {
    width: 40px;
    height: 1px;
  }
}
/* ─── Boutons ────────────────────────────────────────────────────────────── */
.btn-primary {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: var(--fw-black); /* Pas de token --fw-bold, on garde 700 */
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #ffffff;
  background: var(--color-turquoise);
  border: none;
  border-radius: var(--r-full);
  border-top-left-radius: 0;
  padding: 14px 36px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition:
    color 0.3s ease,
    box-shadow 0.3s ease;
}

.btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.18);
  transform: translateX(-101%);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: -1;
}

.btn-primary:hover {
  box-shadow: 0 6px 28px rgba(47, 182, 188, 0.3);
}

.btn-primary:hover::before {
  transform: translateX(0);
}

.btn-primary:active {
  scale: 0.97;
  transition: scale 0.1s ease;
}

.btn-primary:focus-visible {
  outline: 2px solid #2fb6bc;
  outline-offset: 3px;
}

.btn-outline {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: var(--fw-light-); /* Pas de token --fw-bold, on garde 700 */
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #ffffff;
  background: transparent;
  border: 1px solid var(--color-white);
  border-radius: var(--r-full);
  border-top-left-radius: 0;
  padding: 14px 36px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition:
    color 0.35s ease,
    border-color 0.35s ease;
}

.btn-outline::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(47, 182, 188, 0.12);
  transform: translateX(101%);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: -1;
}

.btn-outline:hover {
  color: #2fb6bc;
  border-color: #2fb6bc;
}

.btn-outline:hover::before {
  transform: translateX(0);
}

.btn-outline:active {
  scale: 0.97;
  transition: scale 0.1s ease;
}

.btn-outline:focus-visible {
  outline: 2px solid #2fb6bc;
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .btn-primary::before,
  .btn-outline::before,
  .btn-atelier::before,
  .btn-contact::before,
  .nav-list .nav-cta a::before,
  .nav-list li:last-child a::before,
  .nav-list a::after {
    transition: none;
  }
}

/* ─── Sections ───────────────────────────────────────────────────────────── */
.page-header {
  margin-bottom: var(--space-12);
}

/* ── Hero ──────────────────────────────────────────────────────────────────── */
.section-hero {
  position: relative;
  min-height: 100vh;
  background-image: var(--hero-bg, none);
  background-size: cover;
  background-position: center;
  background-color: var(--color-dark-2);
  padding: 0;
  display: flex;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.section-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(12, 14, 16, 0.9) 0%,
    rgba(12, 14, 16, 0.65) 55%,
    rgba(12, 14, 16, 0.25) 100%
  );
  z-index: 0;
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  margin-inline: auto;
  padding: 120px 60px 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
}

.hero-body {
  max-width: 760px;
}

.hero-title {
  font-weight: 800;
  font-size: clamp(36px, 5.5vw, 84px);
  line-height: 1.04;
  color: var(--color-white);
  text-transform: uppercase;
  text-align: left;
  margin-bottom: 24px;
}

.hero-accent {
  color: var(--color-turquoise);
}

.hero-sub {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.65;
  color: var(--color-white);
  margin-bottom: 40px;
  max-width: 540px;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-desc {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-8);
  opacity: 0.8;
}

@media (max-width: 900px) {
  .hero-inner {
    padding: 90px 24px 48px;
  }
  .hero-title {
    font-size: clamp(30px, 8vw, 52px);
  }
}
/* ── Atelier ───────────────────────────────────────────────────────────────── */
.section-atelier {
  padding-block: clamp(48px, 8vw, 100px);
  padding-inline: 20px;
}

.atelier-inner {
  display: grid;
  grid-template-columns: 1fr 1fr; /* Moitié image, moitié texte */
  gap: 60px; /* Espace entre l'image et le texte */
  align-items: center; /* Centre le texte verticalement par rapport à l'image */
  max-width: 1200px; /* Largeur max pour que ça ne s'étire pas trop sur grand écran */
  margin: 0 auto;
}

/* --- Bloc Image (avec le fond gris intégré) --- */
.atelier-media {
  position: relative;
  display: flex;
  align-items: center;
  padding: 40px 0; /* Permet au camion de déborder un peu du fond gris */
}

/* La forme grise en arrière-plan */
.atelier-media::before {
  content: "";
  position: absolute;
  top: 0%;
  bottom: 20%;
  left: 20%; /* Fait démarrer le fond gris plus loin que l'avant du camion */
  right: 0;
  background: #dcdcdc; /* Couleur grise (à ajuster si besoin) */
  border-radius: 40px; /* Coins arrondis du fond */
  z-index: 1;
}

.atelier-media img {
  position: relative;
  z-index: 2; /* Place le camion au-dessus du fond gris */
  width: 100%;
  height: auto;
  object-fit: contain; /* Empêche le recadrage du camion */
  display: block;
}

/* --- Contenu (Texte et Bouton) --- */
.atelier-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.atelier-title {
  font-weight: 800;
  font-size: clamp(28px, 3vw, 42px);
  color: var(--color-dark, #333);
  text-transform: uppercase;
  margin-bottom: 30px;
  width: fit-content; /* Permet à la bordure du bas de s'arrêter avec le texte */
}

/* La ligne noire sous le titre */

.atelier-texte {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-grey, #666);
  margin-bottom: 40px;
}

.atelier-texte p {
  margin-bottom: 20px;
}

.atelier-texte p:last-child {
  margin-bottom: 0;
}

/* --- Bouton --- */
.btn-atelier {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 18px;
  text-transform: uppercase;
  color: #ffffff;
  background: var(--color-turquoise, #2ab1be);
  border-radius: var(--r-full);
  border-top-left-radius: 0;
  padding: 12px 28px;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition:
    color 0.3s ease,
    box-shadow 0.3s ease;
}

.btn-atelier::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.18);
  transform: translateX(-101%);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: -1;
}

.btn-atelier:hover {
  box-shadow: 0 6px 28px rgba(47, 182, 188, 0.3);
}

.btn-atelier:hover::before {
  transform: translateX(0);
}

.btn-atelier:active {
  scale: 0.97;
  transition: scale 0.1s ease;
}

.btn-atelier:focus-visible {
  outline: 2px solid #2fb6bc;
  outline-offset: 3px;
}

.btn-atelier svg {
  width: 20px;
  height: 20px;
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .atelier-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .atelier-media::before {
    left: 10%; /* Ajuste le fond gris sur mobile */
  }
}
/* ── Services (cards statiques) ────────────────────────────────────────────── */
.section-services {
  padding-block: clamp(48px, 8vw, 100px) 50px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  background-image: var(--hero-bg);
  filter: grayscale(100%);
  background-color: var(--color-dark-2);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative; /* Ajouté par sécurité pour le calque ::before */
}
.section-services::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(12, 14, 16, 0.9) 0%,
    rgba(12, 14, 16, 0.65) 55%,
    rgba(12, 14, 16, 0.25) 100%
  );
  z-index: 0;
}
.section-services > .container {
  position: relative; /* Essentiel pour que le contenu soit au-dessus du calque ::before */
  z-index: 1;
}
.services-heading {
  color: var(--color-white);
}

.services-heading::after {
  background-color: var(--color-white);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.service-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* Mieux pour que les textes s'alignent tous en haut */
  align-items: center;
  gap: 20px;
  padding: 0 32px; /* Ajout de 50px en bas pour que le texte ne touche pas le bouton */
  border-right: 1px solid rgba(255, 255, 255, 0.3); /* Un peu de transparence rend la ligne plus subtile */
  transition:
    border-color var(--tr-base),
    background var(--tr-base);
  position: relative; /* ESSENTIEL : Sert de repère pour le bouton */
}

.service-card:last-child {
  border-right: none;
}

.service-card .btn-atelier {
  position: absolute;
  bottom: -50px;
  left: 50%;
  transform: translate(
    -50%,
    50%
  ); /* Centre horizontalement (-50%) et décale vers le bas de la moitié de sa hauteur (50%) */
  z-index: 10; /* S'assure qu'il passe au-dessus de la section suivante */
  white-space: nowrap; /* Empêche le texte du bouton de se couper sur deux lignes */

  /* On s'assure qu'il garde sa forme de pilule même avec tes autres règles CSS */
  align-self: center;
}
.service-icon {
  width: 200px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-md);
  flex-shrink: 0;
  color: var(--color-white);
}

.service-card-title {
  font-weight: 800;
  font-size: clamp(16px, 1.8vw, 20px);
  color: var(--color-white);
  text-transform: uppercase;
  text-align: center; /* Modifié ici */
  line-height: 1.2;
}

.service-card-text {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.75;
  color: rgba(
    255,
    255,
    255,
    0.8
  ); /* Un blanc légèrement atténué est plus lisible */
  text-align: center; /* Modifié ici */
  flex: 1;
}

.service-card-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-turquoise);
  text-decoration: none;
  transition: gap var(--tr-fast);
}

.service-card-link::after {
  content: "→";
}

.service-card-link:hover {
  gap: 14px;
}

@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
  .section-services {
    padding-block: 64px;
  }
}
.section-projet {
    max-width: 1400px;

}
.section-projets .btn-primary {
  margin-top: 20px;
  margin-inline: auto;
}

/* Grille projets — 3×2 uniforme */
.grille-projets {
  display: grid;
  grid-template-columns: repeat(3, minmax(280px, 1fr));
  gap: 2px;
}

.grille-projets .card-projet {
  aspect-ratio: 5 / 3;
}

@media (max-width: 1024px) {
  .grille-projets {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .grille-projets {
    grid-template-columns: 1fr;
  }
}

/* Conteneur principal */
.grille-projets-real {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* Base 3 colonnes */
  grid-auto-rows: 280px; /* Hauteur fixe de base des cellules */
  grid-auto-flow: dense; /* Comble les espaces vides automatiquement */
  gap: 16px; /* Ajuster avec votre variable, ex: var(--gap-md) */
}

/* Base de la carte projet (à appliquer sur la classe racine de template-parts/card-projet) */
.grille-projets-real > * {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* Gestion stricte de l'image dans la carte */
.grille-projets-real > * img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Critique : empêche la distorsion de l'image */
  display: block;
}

/* Motif d'assemblage Mosaïque (Répétition tous les 6 éléments) */
/* Élément 1 : Grand bloc (2 colonnes, 2 lignes) */
.grille-projets-real > *:nth-child(6n + 1) {
  grid-column: span 2;
  grid-row: span 2;
}

/* Élément 4 : Bloc panoramique horizontal (2 colonnes) */
.grille-projets-real > *:nth-child(6n + 4) {
  grid-column: span 2;
}

/* Responsivité : Écrasement du motif sur petits écrans */
@media (max-width: 1024px) {
  .grille-projets-real {
    grid-template-columns: repeat(2, 1fr);
  }
  .grille-projets-real > *:nth-child(n) {
    grid-column: span 1;
    grid-row: span 1;
  }
  /* Nouveau motif pour tablette */
  .grille-projets-real > *:nth-child(3n + 1) {
    grid-column: span 2;
  }
}

@media (max-width: 600px) {
  .grille-projets-real {
    grid-template-columns: 1fr;
    grid-auto-rows: minmax(250px, auto);
  }
  .grille-projets-real > *:nth-child(n) {
    grid-column: 1 / -1;
    grid-row: auto;
  }
}
/* Filtres */
.filtres-projets {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-10);
}

.filtre-btn {
  padding: var(--space-2) var(--space-6);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  transition: all var(--transition-fast);
}

.filtre-btn:hover,
.filtre-btn.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-dark);
}

/* ── Ton composant Card (Aligné sur la maquette) ─────────────── */

.card-projet {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.card-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-color: var(--color-dark-3);
  transition: transform var(--tr-slow);
}

.card-projet:hover .card-img {
  transform: scale(1.04);
}

.card-projet:focus-visible {
  outline: 2px solid #2fb6bc;
  outline-offset: 3px;
}

/* Overlay HD */
.card-overlay {
  position: absolute;
  inset: 0;
  background: var(--overlay-normal-dyn, var(--overlay-normal));
  transition: background var(--tr-base);
}

.card-projet:hover .card-overlay {
  background: var(--overlay-hover-dyn, var(--overlay-hover));
}

/* Contenu */
.card-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--sp-2) var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: 6px; /* Espace entre le gros Titre et les infos en dessous */
  z-index: 1;
}

/* ── État normal ───────────────────────────────────────────────────────────── */

.card-titre {
  font-family: var(--font-display);
  font-size: clamp(16px, 2vw, 22px);
  font-weight: 900;
  line-height: 1.1;
  color: var(--color-white);
  margin: 0;
  text-transform: uppercase;
  transition: transform var(--tr-base);
  text-align: left;
}

.card-meta {
  display: flex;
  flex-direction: column;
  gap: 4px; /* Espace entre la ligne "Année Client" et "Service" */

  /* Masqué par défaut, révélé au survol */
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(10px);
  transition: all var(--tr-base);
}

.card-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-1); /* L'espace entre "2026" et "JEANNEAU" (8px) */
  font-style: italic;
}

.card-annee {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-white);
}

.card-client {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-white); /* En gris clair pour différencier de l'année */
  text-transform: uppercase;
}

.card-service {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: var(--fw-light);
  color: var(--color-white);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-style: italic;
}

/* ── État hover ────────────────────────────────────────────────────────────── */

.card-projet:hover .card-meta {
  max-height: 50px; /* Dévoile la boîte meta */
  opacity: 1;
  transform: translateY(0);
}

/* ── Mobile — état hover permanent ────────────────────────────────────────── */
@media (max-width: 768px) {
  .card-meta {
    max-height: 50px;
    opacity: 1;
    transform: translateY(0);
  }
}
/* Cards sous-service */
.card-sous-service {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-6);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-base);
}

.card-sous-service:hover {
  border-color: var(--color-primary);
}

/* Avant-Après */
.avant-apres {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  user-select: none;
}

.avant-apres-apres,
.avant-apres-avant {
  position: absolute;
  inset: 0;
  object-fit: cover;
  width: 100%;
  height: 100%;
}

.avant-apres-apres {
  clip-path: inset(0 50% 0 0);
}

.avant-apres-range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: ew-resize;
  z-index: 2;
}

.avant-apres-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  background: var(--color-light);
  transform: translateX(-50%);
  pointer-events: none;
}

.avant-apres-handle::before,
.avant-apres-handle::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 40px;
  height: 40px;
  background: var(--color-light);
  border-radius: 50%;
  transform: translateY(-50%);
  box-shadow: var(--shadow-md);
}

.avant-apres-handle::before {
  left: -20px;
}
.avant-apres-handle::after {
  right: -20px;
  display: none;
}

/* ── Modale — overlay ──────────────────────────────────────────────────────── */
.modal-projet {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal, 200);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  /* État initial — piloté par JS */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-projet.is-open {
  opacity: 1;
  pointer-events: all;
}

.modal-projet[hidden] {
  display: none;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 12, 14, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* ── Panneau ───────────────────────────────────────────────────────────────── */
.modal-panneau {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--color-white);
  border-radius: var(--r-lg);
  overscroll-behavior: contain;
  /* Animation entrée */
  transform: translateY(20px);
  transition: transform 0.3s ease;

}

.modal-projet.is-open .modal-panneau {
  transform: translateY(0);
}

/* Scrollbar discrète */
.modal-panneau::-webkit-scrollbar {
  width: 4px;
}
.modal-panneau::-webkit-scrollbar-track {
  background: transparent;
}
.modal-panneau::-webkit-scrollbar-thumb {
  background: var(--color-dark-4);
  border-radius: 2px;
}

/* ── Header ────────────────────────────────────────────────────────────────── */
.modal-header {
  display: flex;
  flex-direction: column;
  padding: 52px 28px 20px; /* top = bouton (36px) + offset (12px) + marge (4px) */
  margin-bottom: 28px;
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  overflow: hidden;
  background: var(--color-dark); /* fallback sans image */
}

/* Couche image désaturée */
.modal-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--modal-hero-img, none);
  background-size: cover;
  background-position: center;
  filter: grayscale(1);
  z-index: 0;
}

/* Couche overlay sombre */
.modal-header::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(10,12,14,.65), rgba(10,12,14,.88));
  z-index: 0;
}

/* Contenu au-dessus des pseudo-éléments */
.modal-header > * {
  position: relative;
  z-index: 1;
}

/* ── Bouton fermer (dans le header) ────────────────────────────────────────── */
.modal-fermer {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.15);
  border: none;
  border-radius: 50%;
  color: var(--color-white);
  cursor: pointer;
  z-index: 2;
  transition: background var(--tr-fast);
}

.modal-fermer:hover {
  background: var(--color-turquoise);
  color: var(--color-dark);
}

.modal-titre {
  text-align: start;
  color: var(--color-white);
  margin: 0 0 -15px;
}

.modal-titre::after {
  width: 0;
  
}

.modal-meta {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--color-white);
  font-size: 16px;
  font-family: var(--font-body);
  font-weight: 500;
  letter-spacing: 1px;
}

.modal-sep {
  opacity: 0.4;
}
.modal-client, .modal-annee {
  font-weight: 400;
  text-transform: uppercase;
    font-size: 18px;
}
.modal-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
  margin-top: 4px;
  
}

.modal-badge {
  display: inline-block;  
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 6px 14px;
  font-family: var(--font-body);
  font-size: 11px;
  font-style: italic;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ── Galerie 2 colonnes ────────────────────────────────────────────────────── */
.modal-galerie {
  padding: 0 28px 28px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.modal-galerie img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--r-sm);
  display: block;
}

/* Première photo pleine largeur */
.modal-galerie img:first-child {
  grid-column: 1 / -1;
  aspect-ratio: 16 / 9;
}

/* ── Skeleton chargement ───────────────────────────────────────────────────── */
.modal-skeleton {
  grid-column: 1 / -1;
  height: 200px;
  background: var(--color-dark-3);
  border-radius: var(--r-sm);
  animation: skeleton-pulse 1.4s ease infinite;
}

@keyframes skeleton-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .modal-galerie {
    grid-template-columns: 1fr;
  }
  .modal-galerie img:first-child {
    grid-column: 1;
  }
  .modal-titre {
    font-size: 20px;
  }
}
/* ── Carrousel Clients (Marquee) ───────────────────────────────────────────── */

.carrousel-clients {
  overflow: hidden;
  margin-inline: auto;
  width: 90%;
  background-color: #ffffff;
  border: 1px solid var(--color-white);
  border-radius: var(--r-xl);
  box-shadow: 4px 4px 14.9px 0px rgba(0, 0, 0, 0.1);
}

.carrousel-track {
  display: flex;
  align-items: center;
  width: max-content; /* Obligatoire : permet à la piste de faire la taille de TOUS les logos alignés */
  animation: marqueeScroll 35s linear infinite; /* 35s, vitesse constante (linear), boucle infinie */
  /* Effet de fondu sur les bords */
  mask-image: linear-gradient(
    to right,
    transparent,
    black 10%,
    black 90%,
    transparent
  );
  -webkit-mask-image: linear-gradient(
    to right,
    transparent,
    black 10%,
    black 90%,
    transparent
  );
}

/* Pause de la piste entière au survol */
.carrousel-track:hover {
  animation-play-state: paused;
}

.client-logo {
  /* 1. On crée la fameuse "boîte" stricte (à ajuster selon tes goûts) */
  width: 180px; /* Limite pour les logos très larges (rectangles) */
  height: 140px; /* Limite pour les logos très hauts (carrés) */

  /* 2. On demande à l'image de tenir dans cette boîte sans se déformer */
  object-fit: contain;

  /* (On a supprimé max-height, width: auto et min-width qui cassaient tout) */

  margin-inline: var(--sp-3);
  flex-shrink: 0;

  /* Tes effets géniaux restent inchangés */
  filter: grayscale(100%);
  opacity: 0.6;
  transition:
    filter var(--tr-base),
    opacity var(--tr-base),
    transform var(--tr-base);
  padding-block: var(--sp-2);
}
/* Couleur et opacité à 100% au survol du logo + petit effet de zoom */
.client-logo:hover {
  filter: grayscale(0%);
  opacity: 1;
  transform: scale(1.05);
}

.client-logo:focus-visible {
  outline: 2px solid #2fb6bc;
  outline-offset: 3px;
}

/* ── L'animation clé ── */
@keyframes marqueeScroll {
  0% {
    transform: translateX(0);
  }
  100% {
    /* TranslateX -50% marche parfaitement ici car ton array_merge a créé 2 moitiés strictement identiques ! */
    transform: translateX(-50%);
  }
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .client-logo {
    height: 40px; /* Logos plus petits sur mobile */
    margin-inline: var(--sp-3); /* Moins d'espace entre les logos */
  }
}

/* ─── Utilitaires ────────────────────────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.text-center {
  text-align: center;
}
.mt-auto {
  margin-top: auto;
}
/* ── Section Contact ───────────────────────────────────────────────────────────── */
.section-contact {
  position: relative;
  padding: 120px var(--sp-12) 0; /* 96px = --sp-12 */
  margin: 90px 0 -15px;
}

/* Watermark */
.contact-watermark {
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(80px, 15vw, 90vw);
  color: var(--color-white); /* Utilisation de ton blanc cassé #EEF0F2 */
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  line-height: 1;
  z-index: 0;
}

.contact-inner {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: var(--sp-4); /* 32px = --sp-4 */
}

/* Titre */
.contact-heading {
  text-align: center;
  margin-bottom: var(--sp-6); /* 48px = --sp-6 */
}

.contact-title {
  font-family: var(--font-display);
  font-weight: var(--fw-black);

  color: var(--color-grey); /* #141618 = --color-dark */
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px; /* Gardé en dur car 12px n'est pas dans l'échelle */
}

.contact-underline {
  display: block;
  width: 40px;
  height: 3px;
  background: var(--color-turquoise);
  margin-inline: auto;
  border-radius: 2px;
}

/* Formulaire */
.contact-form {
  max-width: 620px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2); /* 16px = --sp-2 */
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-2); /* 16px = --sp-2 */
}

.form-field input,
.form-field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-weight: 400; /* Pas de token --fw-regular, on garde 400 */
  font-size: 14px;
  color: var(--color-dark);
  background: #ffffff;
  border: 1px solid var(--color-white); /* Utilise #EEF0F2 au lieu de #dddddd */
  border-radius: var(--r-lg); /* 14px = --r-md */
  border-top-left-radius: 0; /* Seule la première ligne du formulaire a les coins arrondis en haut */
  padding: 16px var(--sp-2);
  outline: none;
  transition: border-color var(--tr-fast);
  resize: vertical;
  box-shadow: 4px 4px 14.9px 0px rgba(0, 0, 0, 0.1);
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: var(--color-grey-light); /* #A8B0BA au lieu de #9aa0a8 */
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--color-turquoise);
}
.form-field textarea::-webkit-resizer {
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 10L10 6M2 10L10 2' stroke='%23A8B0BA' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: top left;
}
/* RGPD */
.contact-rgpd {
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--color-grey-light);
  line-height: 1.5;
  margin-top: -4px;
}

/* Bouton */
.contact-submit {
  text-align: center;
  margin-top: var(--sp-1); /* 8px = --sp-1 */
}

.btn-contact {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: var(--fw-black); /* Pas de token --fw-bold, on garde 700 */
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #ffffff;
  background: var(--color-turquoise);
  border: none;
  border-radius: var(--r-full);
  border-top-left-radius: 0;
  padding: 14px 36px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition:
    color 0.3s ease,
    box-shadow 0.3s ease;
}

.btn-contact::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.18);
  transform: translateX(-101%);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: -1;
}

.btn-contact:hover {
  box-shadow: 0 6px 28px rgba(47, 182, 188, 0.3);
}

.btn-contact:hover::before {
  transform: translateX(0);
}

.btn-contact:active {
  scale: 0.97;
  transition: scale 0.1s ease;
}

.btn-contact:focus-visible {
  outline: 2px solid #2fb6bc;
  outline-offset: 3px;
}

/* Responsive */
@media (max-width: 600px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

/* ─── Section Avant / Après (scroll-driven sticky) ──────────────────────── */

.section-avantapres {
  height: 300vh;
  position: relative;
  overflow: visible;
}
.section-avantapres::before {
  content: "";
  position: absolute;
  inset: 0; /* Le calque prend toute la taille de la section */
  z-index: -1; /* On le place en arrière-plan */
  pointer-events: none; /* Pour qu'il ne bloque pas les clics de souris */

  /* 3. On applique ton image et on la tourne ! */
  background-image: url("../img/3fleche.png");
  background-repeat: no-repeat;
  background-position: center 400px;
  transform: rotate(
    180deg
  ); /* 👈 La rotation s'applique UNIQUEMENT à l'image */
}

.aap-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.aap-eyebrow {
  font-family: "Open Sans", sans-serif;
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #2fb6bc;
  margin-bottom: 24px;
}

.aap-scene {
  position: relative;
  width: 75vw;
  aspect-ratio: 16/7;
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
  background: transparent;
}

.aap-avant,
.aap-apres {
  position: absolute;
  inset: 0;
}

.aap-avant img,
.aap-apres img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.aap-apres {
  clip-path: inset(0 0 100% 0);
}

.aap-handle {
  display: none;
}

.aap-handle-line {
  width: 2px;
  height: 100%;
  background: #2fb6bc;
  box-shadow: 0 0 12px rgba(47, 182, 188, 0.6);
}

.aap-handle-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #2fb6bc;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(47, 182, 188, 0.4);
}

.aap-progress {
  width: 60vw;
  max-width: 1400px;
  height: 2px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 2px;
  margin-top: 20px;
  overflow: hidden;
  display: none;
}

.aap-progress-fill {
  height: 100%;
  width: 0%;
  background: #2fb6bc;
  border-radius: 2px;
  transition: width 0.05s linear;
}

@media (max-width: 768px) {
  .aap-scene {
    width: 95vw;
    aspect-ratio: 4/3;
  }
  .aap-progress {
    width: 95vw;
  }
}

/* ─── Page Réalisations — Hero ─────────────────────────────────────────────── */
.real-hero {
  position: relative;
  min-height: 50vh;
  display: flex;
  align-items: center;
  background:
    linear-gradient(to bottom, rgba(12, 14, 16, 0.45), rgba(12, 14, 16, 0.85)),
    var(--real-hero-bg, var(--color-dark)) center/cover no-repeat;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.real-hero-inner {
  width: 100%;
  max-width: 1100px;
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 80px);
  padding-block: 80px 60px;
}

.real-hero-title {
  font-weight: 800;
  font-size: clamp(32px, 5vw, 64px);
  color: var(--color-white);
  line-height: 1.1;
  margin-bottom: 16px;
  text-transform: uppercase;
}

.real-hero-sub {
  font-size: clamp(15px, 1.5vw, 18px);
  color: var(--color-grey-light);
  max-width: 560px;
}

/* ─── Page Réalisations — Filtres ──────────────────────────────────────────── */
.real-filtres {
  width: 95vw;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 0;
  position: sticky;
  top: var(--header-h, 80px);
  z-index: 10;
  background-color: #ffffff;
  border: 1px solid var(--color-white);
  border-radius: var(--r-xl);
  box-shadow: 4px 4px 14.9px 0px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.filtres-row-1 {
  padding: 16px 20px;
}

.filtres-row-1 .filtre-search {
  margin-left: auto;
}

/* Champ de recherche : Rétablit le contraste sur fond blanc */
.filtre-search {
  background: #f8f9fa;
  border: 1px solid #e2e8f0;
  color: #141618;
  font-family: var(--font-body);
  font-size: 13px;
  padding: 8px 18px;
  border-radius: var(--r-full);
  width: 220px;
  max-width: 100%;
  outline: none;
  transition:
    border-color 0.3s ease,
    box-shadow 0.3s ease,
    background 0.3s ease;
}

.filtre-search::placeholder {
  color: #94a3b8;
}

.filtre-search:hover {
  border-color: #cbd5e1;
}

/* Remplacement de l'outline rigide par un halo de focus fluide */
.filtre-search:focus,
.filtre-search:focus-visible {
  background: #ffffff;
  border-color: var(--color-turquoise, #2fb6bc);
  box-shadow: 0 0 0 3px rgba(47, 182, 188, 0.15);
  outline: none;
}

/* Réorganisation structurelle sur petits écrans */
@media (max-width: 600px) {
  .real-filtres {
    flex-direction: column;
    align-items: stretch;
  }

  .filtre-search {
    width: 100%;
    order: -1; /* Priorité de la barre de recherche en haut */
  }

  .filtres-btns {
    justify-content: center;
  }
}
/* Base des boutons : Suppression des fonds physiques */
.filtres-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1;
  position: relative; /* Origine du contexte de calque */
  z-index: 1;
}

.filtre-btn {
  padding: 7px 18px;
  background: transparent !important; /* Force la transparence pour révéler le tracker */
  color: var(--color-grey);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: none;
  border-radius: var(--r-full);
  cursor: pointer;
  transition: color 0.3s ease;
}

/* ── ANCHOR POSITIONING (Chrome 125+) ── */
@supports (position-anchor: --test) {
  /* Définition des ancres */
  /* Définition des ancres stricte */
  .filtre-btn.active {
    anchor-name: --filter-active;
    color: var(--color-dark);
    font-weight: 600;
  }

  /* Exclusion formelle de la classe .active pour l'ancre de survol */
  .filtre-btn:not(.active):is(:hover, :focus-visible) {
    anchor-name: --filter-hover;
    color: var(--color-dark);
  }

  /* Génération des indicateurs matériels */
  .filtres-btns::before,
  .filtres-btns::after {
    content: "";
    position: absolute;
    z-index: -1;
    border-radius: var(--r-full);
    pointer-events: none;

    /* Propriétés géométriques variables */
    top: anchor(top);
    left: anchor(left);
    width: anchor-size(width);
    height: anchor-size(height);
  }

  /* Trackeur de survol (Fantôme) */
  .filtres-btns::before {
    background: rgba(47, 182, 188, 0.15); /* Turquoise translucide */
    opacity: 0;
    position-anchor: --filter-active; /* Repos sur l'élément actif */
    transition:
      top 0.3s cubic-bezier(0.4, 0, 0.2, 1),
      left 0.3s cubic-bezier(0.4, 0, 0.2, 1),
      width 0.3s cubic-bezier(0.4, 0, 0.2, 1),
      height 0.3s cubic-bezier(0.4, 0, 0.2, 1),
      opacity 0.2s ease;
  }

  /* Trackeur Actif (Solide) */
  .filtres-btns::after {
    background: var(--color-turquoise);
    opacity: 1;
    position-anchor: --filter-active;
    transition:
      top 0.3s cubic-bezier(0.4, 0, 0.2, 1),
      left 0.3s cubic-bezier(0.4, 0, 0.2, 1),
      width 0.3s cubic-bezier(0.4, 0, 0.2, 1),
      height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  /* Déclencheur d'interaction */
  .filtres-btns:has(
      .filtre-btn:not(.active):is(:hover, :focus-visible)
    )::before {
    opacity: 1;
    position-anchor: --filter-hover; /* Transfert des coordonnées vers la cible survolée */
  }

  /* ── Pill tracker — Boutons sous-services ── */
  .sous-services-row {
    position: relative;
    z-index: 1;
  }

  .btn-sous-service {
    background: transparent !important;
    border-color: transparent;
  }

  .btn-sous-service.is-active {
    anchor-name: --ss-active;
    color: #0c0e10;
    font-weight: 600;
    opacity: 1;
    border-color: transparent;
  }

  .btn-sous-service.is-active:is(:hover, :focus-visible) {
    color: #0c0e10;
    border-color: transparent;
  }

  .btn-sous-service:not(.is-active):is(:hover, :focus-visible) {
    anchor-name: --ss-hover;
    color: #0c0e10;
    opacity: 1;
    border-color: transparent;
  }

  .sous-services-row::before,
  .sous-services-row::after {
    content: "";
    position: absolute;
    z-index: -1;
    border-radius: var(--r-full);
    pointer-events: none;
    top: anchor(top);
    left: anchor(left);
    width: anchor-size(width);
    height: anchor-size(height);
  }

  /* Ghost survol */
  .sous-services-row::before {
    background: rgba(47, 182, 188, 0.15);
    opacity: 0;
    position-anchor: --ss-active;
    transition:
      top    0.3s cubic-bezier(0.4, 0, 0.2, 1),
      left   0.3s cubic-bezier(0.4, 0, 0.2, 1),
      width  0.3s cubic-bezier(0.4, 0, 0.2, 1),
      height 0.3s cubic-bezier(0.4, 0, 0.2, 1),
      opacity 0.2s ease;
  }

  /* Pill actif solide */
  .sous-services-row::after {
    background: var(--color-turquoise);
    opacity: 0;
    position-anchor: --ss-active;
    transition:
      top    0.3s cubic-bezier(0.4, 0, 0.2, 1),
      left   0.3s cubic-bezier(0.4, 0, 0.2, 1),
      width  0.3s cubic-bezier(0.4, 0, 0.2, 1),
      height 0.3s cubic-bezier(0.4, 0, 0.2, 1),
      opacity 0.2s ease;
  }

  .sous-services-row:has(.btn-sous-service.is-active)::after {
    opacity: 1;
  }

  .sous-services-row:has(
      .btn-sous-service:not(.is-active):is(:hover, :focus-visible)
    )::before {
    opacity: 1;
    position-anchor: --ss-hover;
  }
}

/* Fallback statique pour navigateurs non compatibles */
@supports not (position-anchor: --test) {
  .filtre-btn:hover {
    background-color: rgba(47, 182, 188, 0.15);
  }
  .filtre-btn.active {
    background-color: var(--color-turquoise) !important;
    color: var(--color-dark);
    font-weight: 600;
  }
}
/* ─── Sous-services cascade ─────────────────────────────────────────────────── */
.sous-services-row {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 20px;
  background: rgba(0, 0, 0, 0.03);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  overflow: hidden;
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
  transition:
    max-height 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    opacity    0.25s ease,
    padding    0.35s ease;
}
.sous-services-row.is-open {
  max-height: 200px;
  padding: 12px 20px;
  opacity: 1;
}

.btn-sous-service {
  padding: 5px 14px;
  border-radius: 100px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  background: transparent;
  color: var(--color-dark);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition:
    background 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.3s ease,
    color 0.3s ease;
  opacity: 0.6;
}
.btn-sous-service:hover {
  border-color: var(--color-turquoise);
  color: var(--color-turquoise);
  opacity: 1;
}
.btn-sous-service.is-active {
  background: var(--color-turquoise);
  border-color: var(--color-turquoise);
  color: #0c0e10;
  opacity: 1;
}

/* ─── Page Réalisations — Grille & Load more ───────────────────────────────── */

.load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 48px;
}

.no-results {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--color-grey-light);
  padding-block: 40px;
  font-size: 15px;
}

/* ── PAGINATION ─────────────────────────────────────────────────────────────── */
.pagination {
  --size: 38px;
  --inset: 2px;
  --pagination-radius: 8;
  position: relative;
  margin: 48px auto;
  display: flex;
  justify-content: center;
}

.pagination__list {
  display: flex;
  list-style: none;
  align-items: center;
  padding: 0;
  margin: 0;
  gap: 4px;
  position: relative;
}

.pagination__list li {
  width: var(--size);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

.pagination__list a {
  display: grid;
  place-items: center;
  color: var(--color-black);
  text-decoration: none;
  width: 100%;
  height: 100%;
  font-family: "Open Sans", sans-serif;
  font-size: 13px;
  font-weight: 600;
  user-select: none;
  position: relative;
  border-radius: calc(var(--pagination-radius) * 1px);
  outline-color: var(--color-turquoise);
}

@media (prefers-reduced-motion: no-preference) {
  .pagination__list a {
    transition: color 0.2s ease-out;
  }
}

/* Flèches désactivées */
.pagination__link--arrow[aria-disabled="true"] {
  opacity: 0.25;
  cursor: not-allowed;
  pointer-events: none;
}

/* Flèches couleur */
.pagination__link--arrow {
  color: var(--color-grey-light);
}

/* Hover sur tous les liens sauf flèches */
.pagination__link:not(.pagination__link--arrow):hover {
  color: var(--color-black);
}

/* Dots */
.pagination__link--gap {
  color: var(--color-grey);
  font-size: 13px;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}

/* ── FALLBACK Safari / Firefox ── */
@supports not (anchor-name: --active-page) {
  .pagination a.pagination__link:not(.pagination__link--arrow) {
    &::before {
      content: "";
      position: absolute;
      inset: var(--inset);
      border-radius: calc(var(--pagination-radius) * 1px);
      background: var(--color-turquoise-25);
      z-index: -1;
      opacity: 0;
    }

    &[aria-current="page"]::before {
      background: #2fb6bc;
      opacity: 1;
    }

    &:hover:not([aria-current="page"])::before {
      opacity: 1;
    }

    @media (prefers-reduced-motion: no-preference) {
      &::before {
        transition:
          background 0.2s ease-out,
          opacity 0.2s ease-out;
      }
    }
  }

  /* Texte sombre sur fond turquoise */
  .pagination__link[aria-current="page"] {
    color: var(--color-white);
  }
}

/* ── ANCHOR POSITIONING Chrome 125+ ── */
@supports (position-anchor: --test) {
  .pagination__list {
    position: relative; /* Définition obligatoire du bloc conteneur */

    &::before,
    &::after {
      content: "";
      z-index: -1;
      position: absolute;
      width: calc(var(--size) - (2 * var(--inset)));
      aspect-ratio: 1;
      pointer-events: none;
      border-radius: calc(var(--pagination-radius) * 1px);
    }

    /* Indicateur de survol (Tracker) */
    &::before {
      background: var(--color-turquoise-10);
      opacity: 0;
      /* Base géométrique obligatoire pour calculer la transition */
      position-anchor: --pagination-active;
      left: calc(anchor(left) + var(--inset));
      top: anchor(top);
    }

    /* Indicateur actif (Fixe) */
    &::after {
      background: #2fb6bc;
      opacity: 1;
      position-anchor: --pagination-active;
      left: calc(anchor(left) + var(--inset));
      top: anchor(top);
    }

    /* Déclencheur : Bascule de l'ancre et affichage */
    &:is(
        :has(.pagination__link:not(.pagination__link--arrow):hover),
        :has(.pagination__link:not(.pagination__link--arrow):focus-visible)
      )::before {
      opacity: 1;
      position-anchor: --pagination-hover;
    }

    @media (hover: none) and (pointer: coarse) {
      &::before {
        content: unset;
      }
    }

    @media (prefers-reduced-motion: no-preference) {
      &::before,
      &::after {
        /* Transition sur les coordonnées ancrées */
        transition:
          left 0.2s ease-out,
          top 0.2s ease-out,
          opacity 0.2s ease-out;
      }
    }
  }

  .pagination__list [aria-current="page"] {
    anchor-name: --pagination-active;
    color: #141618;
  }

  .pagination__list
    li:has([href]:not(.pagination__link--arrow):is(:hover, :focus-visible)) {
    anchor-name: --pagination-hover;
  }
}

.pagination:not([data-ready]) .pagination__list::before,
.pagination:not([data-ready]) .pagination__list::after {
  transition: none !important;
}
