/* ==========================================================================
   1. Variables & Thèmes
   ========================================================================== */
html {
  scroll-padding-top: 80px; /* fallback — JS overrides with actual navbar height */
}

:root {
  /* Couleurs principales - Palette Engineering Premium */
  --primary-orange: #ff9d5c;      /* Orange plus chaud et vibrant */
  --primary-orange-dark: #e87a2e; /* Orange plus profond */
  --primary-brown: #4d2600;       /* Marron terre d'ombre brûlée */
  --primary-gray: #4a5568;        /* Gris acier */

  /* Thème Light - Plus aérien et spacieux */
  --bg-primary: #fdfdfd;
  --bg-secondary: #f0f2f5;
  --bg-card: rgba(255, 255, 255, 0.9);
  --bg-card-solid: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.4);
  --text-primary: #111827;    /* Presque noir pour plus de contraste */
  --text-secondary: #4b5563;  /* Gris neutre pour la lecture */
  --text-muted: #9ca3af;
  --border-color: #e5e7eb;
  --shadow-color: rgba(0, 0, 0, 0.05);
  --accent-color: var(--primary-orange);

  /* Glassmorphism Raffiné */
  --glass-bg: rgba(255, 255, 255, 0.2);
  --glass-bg-solid: rgba(253, 253, 253, 0.9);
  --glass-border: rgba(45, 52, 54, 0.08);
  --glass-shadow: 0 10px 40px rgba(0, 0, 0, 0.04);
  --glass-backdrop: blur(12px);

  /* Bento Layout Variables */
  --bento-gap: 1.5rem;
  --bento-radius: 24px;
  
  /* Section Fade */
  --section-fade-color: #fdfdfd;
  
  --page-background:
    radial-gradient(circle at 14% 18%, rgba(255, 157, 92, 0.24), transparent 40%),
    radial-gradient(circle at 84% 8%, rgba(101, 137, 255, 0.16), transparent 34%),
    radial-gradient(circle at 72% 76%, rgba(255, 191, 71, 0.12), transparent 38%),
    linear-gradient(135deg, #fdfdfd 0%, #f3f6fb 52%, #eef2f8 100%);
}

[data-theme="dark"] {
  /* Thème Dark - Ultra Premium (Deep Sea / Charcoal) */
  --bg-primary: #0a0c10;
  --bg-secondary: #111319;
  --bg-card: rgba(17, 19, 25, 0.8);
  --bg-card-solid: #111319;
  --bg-glass: rgba(10, 12, 16, 0.6);
  --text-primary: #f9fafb;
  --text-secondary: #d1d5db;
  --text-muted: #6b7280;
  --border-color: #1f2937;
  --shadow-color: rgba(0, 0, 0, 0.5);

  /* Glassmorphism Dark */
  --glass-bg: rgba(0, 0, 0, 0.4);
  --glass-bg-solid: rgba(10, 12, 16, 0.92);
  --glass-border: rgba(255, 255, 255, 0.06);
  --glass-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  
  --section-fade-color: #0a0c10;
  --page-background:
    radial-gradient(circle at 18% 16%, rgba(255, 157, 92, 0.16), transparent 36%),
    radial-gradient(circle at 82% 12%, rgba(96, 137, 255, 0.12), transparent 30%),
    radial-gradient(circle at 68% 82%, rgba(255, 125, 31, 0.08), transparent 34%),
    linear-gradient(140deg, #0a0c10 0%, #0d121a 52%, #101827 100%);
}

[data-theme="dark"] .logo-nebula {
  border-color: transparent;
}

/* ==========================================================================
   2. Reset & Styles de base
   ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: var(--glass-bg);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, var(--primary-orange), var(--primary-orange-dark));
  border-radius: 10px;
  border: 2px solid var(--glass-bg);
  transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, var(--primary-orange-dark), var(--primary-brown));
  box-shadow: 0 0 10px rgba(255, 145, 77, 0.5);
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--primary-orange) var(--glass-bg);
}

[data-theme="dark"] ::-webkit-scrollbar-track {
  background: rgba(10, 12, 25, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] {
  scrollbar-color: var(--primary-orange) rgba(15, 15, 35, 0.6);
}

html {
  scroll-behavior: smooth;
  height: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--page-background);
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.6;
  letter-spacing: -0.01em;
  overflow-x: hidden;
  overflow-y: auto;
  min-height: 100vh;
  transition: background-color 0.4s ease, color 0.4s ease;
  height: 100%;
}

h1, h2, h3, h4, h5, h6, .hero-title, .section-title {
  font-family: 'Outfit', 'Inter', sans-serif;
}

.container {
  width: min(88vw, 1720px);
  max-width: 1720px;
  margin: 0 auto;
  padding: 0 clamp(12px, 1.2vw, 22px);
}

@media (max-width: 1024px) {
  .container {
    width: min(94vw, 1200px);
    padding: 0 16px;
  }
}

@media (max-width: 768px) {
  .container {
    width: 96vw;
    padding: 0 12px;
  }
}

/* Classe pour masquer visuellement mais garder accessible pour les lecteurs d'écran */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ==========================================================================
   3. Classes Utilitaires
   ========================================================================== */
.gradient-text {
  background: linear-gradient(135deg, var(--primary-orange), var(--primary-orange-dark));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% 200%;
  animation: gradientShift 3s ease-in-out infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* ==========================================================================
   4. Barre de Navigation
   ========================================================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 5000;
  padding: 0;
  padding-top: env(safe-area-inset-top, 0px);
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.56));
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid rgba(17, 24, 39, 0.1);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
  transition: top 0.35s ease, background 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease, backdrop-filter 0.35s ease;
}

.nav-container {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: 0.62rem clamp(14px, 2.6vw, 40px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 0;
  border: 0;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: padding 0.35s ease, background 0.35s ease, box-shadow 0.35s ease;
}

[data-theme="dark"] .navbar {
  background: linear-gradient(180deg, rgba(10, 12, 16, 0.76), rgba(10, 12, 16, 0.62));
  border-bottom-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.44);
}

[data-theme="dark"] .nav-container {
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

@media (max-width: 1024px) {
  .nav-container {
    width: 100%;
    padding: 0.56rem 16px;
  }
}

@media (max-width: 768px) {
  .nav-container {
    width: 100%;
    padding: 0.52rem 12px;
  }
}

.nav-logo a .logo {
  height: 48px;
  width: auto;
  object-fit: contain;
  padding-top: 3px;
  image-rendering: -webkit-optimize-contrast;
  -webkit-backface-visibility: hidden;
  transition: transform 0.22s ease, filter 0.22s ease, height 0.35s ease, padding-top 0.35s ease;
}

.nav-logo {
  margin-left: 1vw;
}

.nav-logo a:hover .logo {
  transform: translateY(-1px) scale(1.03);
}

.nav-menu {
  display: flex;
  list-style: none;
  align-items: center;
  gap: 0.45rem;
}

.nav-item {
  display: flex;
  align-items: center;
}

.nav-link {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease, padding 0.35s ease;
  position: relative;
  padding: 0.56rem 0.92rem;
  border-radius: 999px;
}

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

.nav-link:hover {
  color: var(--primary-orange-dark);
  background: rgba(255, 157, 92, 0.16);
  transform: translateY(-1px);
}

.nav-link.active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary-orange), var(--primary-orange-dark));
  box-shadow: 0 8px 18px rgba(232, 122, 46, 0.35);
}

.nav-link:focus-visible {
  outline: 2px solid var(--primary-orange);
  outline-offset: 2px;
}

/* ── Dropdown "Notre entreprise" ─────────────────────────────────────────── */
.nav-item--dropdown {
  position: relative;
}

/* Pont invisible qui comble le gap entre le bouton et le panel */
.nav-item--dropdown::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 14px;
}

/* Le bouton hérite de .nav-link — on ajoute juste ce qui est spécifique */
.nav-link--dropdown {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  line-height: inherit;
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  white-space: nowrap;
}

.nav-link--dropdown.active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary-orange), var(--primary-orange-dark));
  box-shadow: 0 8px 18px rgba(232, 122, 46, 0.35);
}

.nav-chevron {
  font-size: 0.62rem;
  transition: transform 0.25s ease;
}

.nav-item--dropdown:hover .nav-chevron,
.nav-item--dropdown.open .nav-chevron {
  transform: rotate(180deg);
}

.nav-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  min-width: 210px;
  list-style: none;
  margin: 0;
  padding: 0.5rem;
  background: var(--glass-bg-solid);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.13);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: 200;
}

.nav-item--dropdown:hover .nav-dropdown,
.nav-item--dropdown.open .nav-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown-link {
  display: flex;
  align-items: center;
  padding: 0.65rem 1rem;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  border-radius: 10px;
  transition: background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

.nav-dropdown-link:hover {
  background: rgba(255, 157, 92, 0.14);
  color: var(--primary-orange-dark);
}

[data-theme="dark"] .nav-dropdown {
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.theme-toggle {
  background: rgba(255, 157, 92, 0.12);
  border: 1px solid rgba(255, 157, 92, 0.35);
  border-radius: 50%;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-orange-dark);
  cursor: pointer;
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease, width 0.35s ease, height 0.35s ease;
  backdrop-filter: blur(10px);
}

.theme-toggle.animating {
  animation: toggle-pop 0.3s ease-out;
}
@keyframes toggle-pop {
  50% { transform: scale(0.8); }
  100% { transform: scale(1); }
}
.theme-toggle:hover {
  background: var(--primary-orange);
  border-color: var(--primary-orange-dark);
  color: #fff;
  transform: translateY(-1px);
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 4px;
  background: transparent;
  border: none;
}

.bar {
  width: 23px;
  height: 2px;
  background: var(--text-primary);
  transition: 0.3s;
  border-radius: 8px;
}

[data-theme="dark"] .bar {
  background: #f9fafb;
}

/* État héro (en haut de page) */
.navbar--hero {
  top: 0;
}

.navbar--hero .nav-container {
  background: rgba(255, 255, 255, 0.14);
  border-color: transparent;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.48);
}

[data-theme="dark"] .navbar--hero .nav-container {
  background: rgba(255, 255, 255, 0.06);
  border-color: transparent;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

/* Styles pour l'animation du menu hamburger */
.hamburger.active .bar:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

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

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

/* ==========================================================================
   5. Section Hero (Accueil)
   ========================================================================== */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: stretch;
  padding: 0 0 clamp(8px, 1.6vh, 20px);
  position: relative;
  overflow: hidden;
}

.hero-container {
  width: 100vw;
  max-width: none;
  margin: 0 auto;
  padding: 0 0 0 clamp(14px, 4.4vw, 92px);
  display: grid;
  grid-template-columns: minmax(320px, 34vw) minmax(0, 1fr);
  gap: clamp(14px, 2vw, 30px);
  align-items: stretch;
  min-height: 100svh;
}

.hero-content {
  padding: 0;
  width: 100%;
  margin-left: 2vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-title {
  font-size: clamp(2.2rem, 4vw, 4.1rem);
  font-weight: 800;
  line-height: 1.08;
  margin-bottom: 1.35rem;
  animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1);
  letter-spacing: -0.03em;
  max-width: 13ch;
}

.hero-description {
  font-size: clamp(1rem, 1.45vw, 1.18rem);
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 56ch;
  line-height: 1.7;
  animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.hero-buttons {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
  animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both;
}

.hero-trust {
  margin-top: 1.35rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.52s both;
}

.hero-trust-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.72rem;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--bg-card-solid);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
}

.hero-trust-chip i {
  color: var(--primary-orange-dark);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 2.5rem;
  border-radius: 100px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.ripple {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  animation: ripple-anim 0.6s linear;
  background: rgba(255, 255, 255, 0.25);
  pointer-events: none;
}

@keyframes ripple-anim {
  to { transform: scale(4); opacity: 0; }
}

.btn-primary {
  background: var(--primary-orange);
  color: #2d1000;
  box-shadow: 0 10px 30px rgba(255, 157, 92, 0.2);
}

.btn-primary:hover {
  background: var(--primary-orange-dark);
  color: #fff;
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 15px 40px rgba(255, 157, 92, 0.3);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  backdrop-filter: var(--glass-backdrop);
}

.btn-secondary:hover {
  background: var(--bg-secondary);
  border-color: var(--primary-orange);
  transform: translateY(-4px);
}

.hero-visual {
  position: relative;
  width: 100%;
  min-height: clamp(520px, 78vh, 920px);
  display: flex;
  align-items: stretch;
}

/* Photo hero en forme de slash */
.hero-photo {
  position: relative;
  width: 100%;
  height: 100%;
  clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 7% 100%);
  border-radius: 0;
  overflow: hidden;
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.16);
  animation: fadeInRight 1s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
}

.hero-photo .hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left center;
  transform-origin: left center;
  transition: transform 7s ease, opacity 0.45s ease;
  display: block;
  opacity: 1;
}

.hero-photo .hero-image--dark {
  opacity: 0;
}

[data-theme="dark"] .hero-photo .hero-image--light {
  opacity: 0;
}

[data-theme="dark"] .hero-photo .hero-image--dark {
  opacity: 1;
}

.hero-photo:hover .hero-image {
  transform: scale(1.04);
}

/* Léger dégradé sur le bord gauche pour la jonction avec le texte */
.hero-photo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(248, 250, 252, 0.26) 0%,
    rgba(248, 250, 252, 0.08) 26%,
    transparent 45%
  );
  pointer-events: none;
}

[data-theme="dark"] .hero-photo-overlay {
  background: linear-gradient(
    to right,
    rgba(10, 12, 16, 0.4) 0%,
    rgba(10, 12, 16, 0.12) 30%,
    transparent 46%
  );
}

@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(36px); clip-path: polygon(2% 0%, 100% 0%, 100% 100%, 12% 100%); }
  to   { opacity: 1; transform: translateX(0); clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 7% 100%); }
}

.floating-card {
  position: absolute;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-backdrop);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  box-shadow: var(--glass-shadow);
  transition: all 0.3s ease;
  animation: float 6s ease-in-out infinite;
  width: 140px;
  height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  text-align: center;
}

.floating-card:nth-child(1) {
  top: 20px;
  left: 20px;
  animation-delay: 0s;
}

.floating-card:nth-child(2) {
  top: 40px;
  right: 20px;
  animation-delay: 2s;
}

.floating-card:nth-child(3) {
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  animation-name: float-center;
  animation-delay: 4s;
}

.floating-card i {
  font-size: 1.8rem;
  color: var(--accent-color);
  margin-bottom: 0.5rem;
  display: block;
  pointer-events: none; /* Pour que le JS capture bien l'event sur la carte */
}

.floating-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

@keyframes float-center {
  0%, 100% { transform: translateX(-50%) translateY(0px); }
  50% { transform: translateX(-50%) translateY(-20px); }
}

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

/* ==========================================================================
   6. Styles Communs aux Sections
   ========================================================================== */
section {
  padding: 40px 0;
  position: relative;
}

/* Sections en flux classique (hauteur selon contenu) */
section[id] {
  min-height: auto;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  margin: 1rem auto 0;
  width: 80px;
  height: 6px;
  background: var(--primary-orange);
  border-radius: 10px;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 720px;
  width: fit-content;
  margin: 0 auto;
  font-weight: 450;
}

/* ==========================================================================
   Bento Grid Layout System
   ========================================================================== */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--bento-gap);
  margin-top: 3rem;
}

.bento-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-backdrop);
  border: 1px solid var(--border-color);
  border-radius: var(--bento-radius);
  padding: 2.5rem;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.bento-card:hover {
  transform: translateY(-8px);
  border-color: var(--primary-orange);
  box-shadow: 0 20px 40px var(--shadow-color);
}

.bento-card.span-6 { grid-column: span 6; }
.bento-card.span-4 { grid-column: span 4; }
.bento-card.span-8 { grid-column: span 8; }
.bento-card.span-12 { grid-column: span 12; }

@media (max-width: 1024px) {
  .bento-card.span-6, .bento-card.span-4, .bento-card.span-8 { grid-column: span 12; }

  .hero {
    min-height: 100svh;
    padding: 0 0 14px;
  }

  .hero-container {
    width: 100vw;
    padding: 0 0 0 20px;
    grid-template-columns: 1fr 1.35fr;
    gap: 1.25rem;
    min-height: clamp(620px, 86svh, 900px);
  }

  .hero-content {
    padding: 0;
  }

  .hero-photo {
    height: clamp(460px, 62vh, 680px);
    clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 5% 100%);
    border-radius: 0;
  }

  .hero-trust {
    gap: 0.5rem;
  }
}

/* ==========================================================================
   7. Section Services
   ========================================================================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.service-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-backdrop);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 2.5rem;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: var(--glass-shadow);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(135deg, var(--primary-orange), var(--primary-orange-dark));
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

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

.bento-icon {
  font-size: 2.5rem;
  color: var(--primary-orange);
  margin-bottom: 1.5rem;
  opacity: 0.8;
}

.bento-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.bento-card p {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.tag {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  padding: 0.4rem 1rem;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.bento-card:hover .tag {
  border-color: var(--primary-orange);
  color: var(--primary-orange);
}

.clean-list {
  list-style: none;
  padding: 0;
}

.clean-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.clean-list li i {
  color: var(--primary-orange);
  font-size: 1.1rem;
}

/* ==========================================================================
   Domaines Refactor
   ========================================================================== */
.domains-refined-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: auto auto;
  gap: 1rem;
  align-items: stretch;
  margin-top: 1.2rem;
}

.domain-card,
.domain-services-card {
  border-radius: 20px;
  border: 1px solid var(--glass-border);
  background: var(--bg-card);
  backdrop-filter: var(--glass-backdrop);
  padding: clamp(1rem, 1.6vw, 1.5rem);
  box-shadow: var(--glass-shadow);
}

.domain-card {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

.domain-card--strong {
  background:
    linear-gradient(180deg, rgba(255, 157, 92, 0.11), rgba(255, 255, 255, 0.82)),
    var(--bg-card);
}

.domain-card--soft {
  background:
    linear-gradient(180deg, rgba(96, 137, 255, 0.09), rgba(255, 255, 255, 0.82)),
    var(--bg-card);
}

[data-theme="dark"] .domain-card--strong {
  background:
    linear-gradient(180deg, rgba(255, 157, 92, 0.16), rgba(17, 19, 25, 0.86)),
    var(--bg-card);
}

[data-theme="dark"] .domain-card--soft {
  background:
    linear-gradient(180deg, rgba(96, 137, 255, 0.14), rgba(17, 19, 25, 0.86)),
    var(--bg-card);
}

.domain-card-head {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.domain-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 157, 92, 0.16);
  border: 1px solid rgba(255, 157, 92, 0.36);
  color: var(--primary-orange-dark);
  font-size: 1.2rem;
}

.domain-card h3,
.domain-services-card h3 {
  margin: 0;
  font-size: clamp(1.2rem, 1.7vw, 1.45rem);
  color: var(--text-primary);
}

.domain-card p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.62;
}

.domain-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.52rem;
  margin-top: auto;
  padding-top: 0.45rem;
}

.domain-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--bg-card-solid);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
}

.domain-card--strong {
  grid-column: 1;
  grid-row: 1;
}

.domain-card--soft {
  grid-column: 1;
  grid-row: 2;
}

.domain-services-card {
  grid-column: 2;
  grid-row: 1 / 3;
  display: flex;
  flex-direction: column;
}

.domain-services-intro {
  margin: 0.55rem 0 0;
  color: var(--text-secondary);
  line-height: 1.55;
  max-width: 760px;
}

.domain-services-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
  flex: 1;
}

.domain-services-list li {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 56px;
  padding: 0.75rem 0.9rem;
  border-radius: 14px;
  border: 1px solid var(--border-color);
  background: var(--bg-card-solid);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.94rem;
}

.domain-service-icon {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(255, 159, 67, 0.16);
}

.domain-services-list i {
  color: var(--primary-orange);
  font-size: 0.9rem;
}

.domain-service-label {
  line-height: 1.35;
}

@media (max-width: 1024px) {
  .domains-refined-grid {
    grid-template-columns: 1fr;
  }

  .domain-card--strong,
  .domain-card--soft,
  .domain-services-card {
    grid-column: auto;
    grid-row: auto;
  }
}

/* Tech Pattern Animation */
.tech-pattern {
  width: 100%;
  height: auto;
  max-width: 500px;
  opacity: 0.6;
}

[data-theme="dark"] .tech-pattern {
  opacity: 0.4;
}

.tech-pattern circle {
  transform-origin: center;
  animation: pulse-ring 8s ease-in-out infinite;
}

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

/* ==========================================================================
   7b. Section Missions - Timeline
   ========================================================================== */
.missions {
  padding: 80px 0;
}

.timeline {
  max-width: 780px;
  margin: 0 auto;
  position: relative;
  padding: 1rem 0 1rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 31px;
  height: 100%;
  width: 2px;
  background: linear-gradient(to bottom, transparent, var(--primary-orange), transparent);
  opacity: 0.4;
}

.timeline-item {
  position: relative;
  margin-bottom: 2.5rem;
  padding-left: 90px;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-icon {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 62px;
  height: 62px;
  background: var(--bg-card-solid);
  border: 2px solid var(--border-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--primary-orange);
  z-index: 2;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.timeline-item:hover .timeline-icon {
  border-color: var(--primary-orange);
  background: var(--primary-orange);
  color: white;
  transform: translateY(-50%) scale(1.1);
}

.timeline-content {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--bento-radius);
  padding: 2rem 2.5rem;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.timeline-item:hover .timeline-content {
  border-color: var(--primary-orange);
  transform: translateX(8px);
  box-shadow: 0 12px 40px var(--shadow-color);
}

.timeline-content h3 {
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.timeline-content p {
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0;
}

@media (max-width: 768px) {
  .timeline::before { left: 23px; }
  .timeline-item { padding-left: 64px; }
  .timeline-icon { width: 46px; height: 46px; font-size: 1rem; }
}

/* ==========================================================================
   8. Section Équipe
   ========================================================================== */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

@media (max-width: 1024px) {
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .team-grid {
    grid-template-columns: 1fr;
  }
}

.team-member {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  transition: none;
  box-shadow: none;
}

.team-member:hover {
  transform: none;
}

.member-photo-shell {
  position: relative;
  width: min(100%, 340px);
  margin: 0 auto 0.55rem;
}

.member-shape {
  position: absolute;
  z-index: 0;
  width: 70%;
  height: 68%;
  right: -7%;
  top: 7%;
  background: linear-gradient(145deg, rgba(255, 145, 77, 0.9), rgba(232, 122, 46, 0.45));
  border-radius: 58% 42% 49% 51% / 43% 59% 41% 57%;
  filter: blur(0.2px);
  transform: rotate(-12deg);
}

.member-photo {
  width: 100%;
  aspect-ratio: auto;
  margin: 0;
  position: relative;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
  z-index: 2;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 80%, rgba(0, 0, 0, 0) 100%);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 80%, rgba(0, 0, 0, 0) 100%);
}

.member-photo-img,
.member-photo img {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 0;
  transition: transform 0.3s ease;
  object-fit: contain;
  object-position: center center;
  border: 0;
  display: block;
  margin: 0 auto;
}

.member-photo::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 36%;
  background: linear-gradient(to top, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0));
  pointer-events: none;
  z-index: 2;
}

[data-theme="dark"] .member-photo::before {
  background: linear-gradient(to top, rgba(10, 12, 16, 0.16), rgba(10, 12, 16, 0));
}

.photo-placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  border-radius: 0;
  border: 0;
  z-index: 1;
}

.photo-placeholder {
  background: linear-gradient(135deg, var(--primary-orange), var(--primary-orange-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  overflow: hidden;
}

.photo-placeholder::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(255, 255, 255, 0.2) 50%,
    transparent 70%
  );
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
  100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.photo-placeholder i {
  font-size: 3rem;
  color: white;
  z-index: 1;
}

.team-member:hover .member-photo img,
.team-member:hover .member-photo-img {
  transform: none;
}

.team-member h3 {
  display: none;
}

.member-text-overlay {
  position: absolute;
  z-index: 4;
  left: 0;
  right: 0;
  bottom: clamp(1rem, 2vw, 1.35rem);
  padding: 0 1rem;
  text-align: center;
  filter: drop-shadow(0 16px 28px rgba(0, 0, 0, 0.52));
}

.member-text-overlay::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -0.35rem;
  width: min(92%, 24rem);
  height: 6.8rem;
  z-index: -1;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.42) 0%, rgba(0, 0, 0, 0) 72%);
  filter: blur(6px);
  pointer-events: none;
}

[data-theme="dark"] .member-text-overlay {
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.72));
}

[data-theme="dark"] .member-text-overlay::before {
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.58) 0%, rgba(0, 0, 0, 0) 72%);
}

.member-name-overlay {
  color: #fff;
  font-size: clamp(1.45rem, 2.6vw, 1.95rem);
  font-weight: 700;
  font-family: 'Outfit', 'Inter', sans-serif;
  letter-spacing: 0.005em;
  line-height: 1.18;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.82);
}

[data-theme="dark"] .member-name-overlay {
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.9);
}

.member-firstname,
.member-lastname {
  display: block;
}

.member-role {
  color: var(--accent-color);
  font-weight: 600;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  margin: 0.24rem auto 0;
  width: 100%;
  text-align: center;
  font-size: clamp(1.3rem, 1.75vw, 1.48rem);
  text-transform: none;
  letter-spacing: 0.01em;
  text-shadow: 0 3px 14px rgba(0, 0, 0, 0.42);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.member-description-overlay {
  margin: 0 auto 0;
  width: 100%;
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: clamp(0.8rem, 0.98vw, 0.9rem);
  line-height: 1.55;
  letter-spacing: 0.012em;
  text-shadow: none;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transform: translateY(8px);
  transition: opacity 0.32s ease, transform 0.32s ease, max-height 0.38s ease;
  background: rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 1.25rem;
  box-shadow: inset 0 1.5px 0 rgba(255, 157, 92, 0.6);
  padding: 1.15rem 1.2rem 0.75rem;
  box-sizing: border-box;
}

[data-theme="dark"] .member-description-overlay {
  color: #f0f0f2;
  background: rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 1.5px 0 rgba(255, 157, 92, 0.5);
}

.member-photo-shell:hover .member-description-overlay,
.member-photo-shell:focus-within .member-description-overlay {
  opacity: 1;
  max-height: 9rem;
  transform: translateY(0);
}

/* Logique de fallback pour les images de membres */
.member-photo .photo-placeholder {
  display: none; /* Caché par défaut */
}
/* Affiche le placeholder si l'image a une erreur de chargement */
.member-photo img.img-error + .photo-placeholder,
.member-photo .member-photo-img.img-error + .photo-placeholder {
  display: flex;
}

.member-description {
  display: none;
}

.team-anim-photo,
.team-anim-shape,
.team-anim-name,
.team-anim-role {
  opacity: 0;
}

.team-anim-photo.is-visible,
.team-anim-shape.is-visible,
.team-anim-name.is-visible,
.team-anim-role.is-visible {
  opacity: 1;
}

.team-anim-photo,
.team-anim-shape {
  --animate-duration: 720ms;
}

.team-anim-name {
  --animate-duration: 1000ms;
}

.team-anim-role {
  --animate-duration: 1100ms;
}

/* Neutralise les effets génériques appliqués aux cartes */
.team-member,
.team-member::after {
  overflow: visible;
}

.team-member::after {
  content: none;
}

/* ==========================================================================
   9. Section Expertise
   ========================================================================== */
.expertise {
  padding: 40px 0;
  background: transparent;
}

.expertise-content {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 4rem;
  align-items: start;
}

.expertise-text h3 {
  color: var(--text-primary);
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
}

.expertise-text p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.expertise-highlights {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.highlight-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.highlight-item i {
  color: var(--accent-color);
  font-size: 1.5rem;
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.highlight-item h4 {
  color: var(--text-primary);
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.highlight-item p {
  color: var(--text-secondary);
  margin: 0;
}

.expertise-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
  gap: 1rem;
}

.stat-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-backdrop);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 1.6rem;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: var(--glass-shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

/* Grande carte hero — pleine largeur */
.stat-card--hero {
  grid-column: 1 / -1;
  padding: 2.4rem 2rem;
  background:
    linear-gradient(135deg, rgba(255, 157, 92, 0.14) 0%, rgba(255, 125, 31, 0.06) 100%),
    var(--bg-card);
  border-color: rgba(255, 157, 92, 0.28);
  align-items: flex-start;
  text-align: left;
}

.stat-card--hero .stat-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

/* Petites cartes */
.stat-card--existence {
  background:
    linear-gradient(135deg, rgba(96, 137, 255, 0.1) 0%, transparent 100%),
    var(--bg-card);
  border-color: rgba(96, 137, 255, 0.2);
}

.stat-card--existence .stat-number,
.stat-card--existence .stat-icon-wrap {
  color: #6089ff;
}

.stat-card--projets {
  background:
    linear-gradient(135deg, rgba(52, 199, 89, 0.1) 0%, transparent 100%),
    var(--bg-card);
  border-color: rgba(52, 199, 89, 0.2);
}

.stat-card--projets .stat-number,
.stat-card--projets .stat-icon-wrap {
  color: #22a84a;
}

.stat-card--equipe {
  background:
    linear-gradient(135deg, rgba(255, 191, 71, 0.1) 0%, transparent 100%),
    var(--bg-card);
  border-color: rgba(255, 191, 71, 0.2);
}

.stat-card--equipe .stat-number,
.stat-card--equipe .stat-icon-wrap {
  color: #e0940a;
}

[data-theme="dark"] .stat-card--existence .stat-number,
[data-theme="dark"] .stat-card--existence .stat-icon-wrap { color: #7fa3ff; }
[data-theme="dark"] .stat-card--projets  .stat-number,
[data-theme="dark"] .stat-card--projets  .stat-icon-wrap { color: #4cd870; }
[data-theme="dark"] .stat-card--equipe   .stat-number,
[data-theme="dark"] .stat-card--equipe   .stat-icon-wrap { color: #ffc840; }

.stat-number {
  font-size: 2.8rem;
  font-weight: 800;
  margin-bottom: 0;
  font-family: 'Outfit', 'Inter', sans-serif;
  line-height: 1;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 500;
}

.stat-sub {
  display: block;
}

/* Narrative hero card — inline animated numbers */
.stat-narrative {
  font-size: clamp(1rem, 1.6vw, 1.18rem);
  line-height: 1.85;
  color: var(--text-secondary);
  margin: 0 0 0.6rem;
  text-align: left;
}

.stat-num-inline {
  font-weight: 800;
  font-size: 1.15em;
  background: linear-gradient(135deg, var(--primary-orange), var(--primary-orange-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-variant-numeric: tabular-nums;
  font-family: 'Outfit', 'Inter', sans-serif;
}

.stat-icon-wrap {
  font-size: 1.5rem;
  opacity: 0.8;
  margin-bottom: 0.2rem;
  line-height: 1;
}

/* ==========================================================================
   10. Section Certifications & Partenaires
   ========================================================================== */
/* Section supprimée */

/* ==========================================================================
   11. Section Clients & Statistiques
   ========================================================================== */
.clients {
  position: relative;
}

.trust-marquee {
  margin-top: 0.35rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}

.trust-marquee-track {
  display: flex;
  gap: 0.5rem;
  width: max-content;
  will-change: transform;
}

.trust-marquee-track--fwd {
  animation: trustMarqueeLeft 40s linear infinite;
}

.trust-marquee-track--rev {
  animation: trustMarqueeRight 46s linear infinite;
}

.trust-marquee-track--mid {
  animation: trustMarqueeLeft 52s linear infinite;
}

.trust-marquee:hover .trust-marquee-track {
  animation-play-state: paused;
}

@keyframes trustMarqueeLeft {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes trustMarqueeRight {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}

.trust-logo-card {
  width: 152px;
  height: 72px;
  flex-shrink: 0;
  background: var(--bg-card-solid);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 0.55rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

[data-theme="dark"] .trust-logo-card {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(255, 255, 255, 0.92);
}

.trust-logo-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 157, 92, 0.46);
  box-shadow: 0 10px 22px rgba(255, 145, 77, 0.18);
}

.trust-logo-card--disabled {
  cursor: default;
}

.trust-logo-card--disabled:hover {
  transform: none;
  border-color: var(--border-color);
  box-shadow: none;
}

.trust-logo-card--disabled:hover img {
  filter: grayscale(16%) contrast(1.02) opacity(0.9);
}

.trust-tooltip {
  position: absolute;
  z-index: 1000;
  pointer-events: none;
  white-space: nowrap;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #fff;
  background: rgba(15, 15, 15, 0.85);
  border: 1px solid rgba(255, 145, 77, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transform: translate(-50%, calc(-100% - 10px));
  opacity: 0;
  transition: opacity 0.2s ease;
}

.trust-tooltip--visible {
  opacity: 1;
}

.trust-tooltip::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 100%;
  width: 9px;
  height: 9px;
  transform: translateX(-50%) rotate(45deg) translateY(-50%);
  background: rgba(15, 15, 15, 0.85);
  border-right: 1px solid rgba(255, 145, 77, 0.4);
  border-bottom: 1px solid rgba(255, 145, 77, 0.4);
}

.trust-logo-card img {
  max-width: 100%;
  max-height: 44px;
  object-fit: contain;
  filter: grayscale(16%) contrast(1.02) opacity(0.9);
  transition: filter 0.2s ease;
}

.trust-logo-card:hover img {
  filter: grayscale(0%) contrast(1.05) opacity(1);
}

@media (max-width: 1024px) {
  .trust-logo-card {
    width: 136px;
    height: 66px;
  }
}

@media (max-width: 768px) {
  .trust-marquee {
    gap: 0.4rem;
  }

  .trust-logo-card {
    width: 116px;
    height: 60px;
    padding: 0.42rem;
  }

  .trust-logo-card img {
    max-height: 36px;
  }
}

.stats-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.stat-item {
  text-align: center;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-backdrop);
  border: 1px solid var(--glass-border);
  border-radius: 15px;
  padding: 2rem;
  transition: all 0.3s ease;
}

.stat-item:hover {
  transform: translateY(-5px);
}

.stat-number {
  display: block;
  font-size: 3rem;
  font-weight: 700;
  color: var(--accent-color);
  margin-bottom: 0.5rem;
}

.stat-label {
  color: var(--text-secondary);
  font-weight: 500;
}

/* ==========================================================================
   10. Section Projets
   ========================================================================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.project-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-backdrop);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: var(--glass-shadow);
}

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

.project-image {
  height: 200px;
  transition: all 0.3s ease;
  overflow: hidden; /* Assure que l'image ne dépasse pas */
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Redimensionne l'image pour couvrir l'espace sans la déformer */
  transition: transform 0.4s ease;
}
.project-card:hover .project-image img {
  transform: scale(1.05);
}

/* Logique de fallback pour les images de projets */
.project-image {
  position: relative;
  background-color: var(--bg-glass); /* Fond pour le placeholder */
}
.project-image .project-placeholder {
  display: none; /* Caché par défaut */
  position: absolute;
  inset: 0; /* Raccourci pour top/right/bottom/left = 0 */
  justify-content: center;
  align-items: center;
  font-size: 3rem;
  color: var(--accent-color);
  background: linear-gradient(135deg, rgba(255, 145, 77, 0.1), rgba(255, 117, 31, 0.1));
  flex-direction: column;
  gap: 1rem;
}

.project-image .project-placeholder::after {
  content: 'Image à venir';
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.project-image .project-placeholder i {
  animation: float 3s ease-in-out infinite;
}
/* Affiche le placeholder si l'image a une erreur de chargement */
.project-image img.img-error + .project-placeholder {
  display: flex;
}

.project-card:hover .project-image img,
.project-card:hover .project-image .project-placeholder {
  transform: scale(1.05);
}

.project-card:hover .project-placeholder {
  transform: scale(1.05);
}

.project-content {
  padding: 2rem;
}

.project-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.project-content p {
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  line-height: 1.7;
  font-weight: 400;
}

.project-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tag {
  background: var(--bg-glass);
  color: var(--accent-color);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid var(--glass-border);
}

/* ==========================================================================
   11. Section Contact
   ========================================================================== */
.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: stretch;
}

.contact-info {
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: space-between;
  gap: 1.25rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  padding: 1.5rem;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-backdrop);
  border: 1px solid var(--glass-border);
  border-radius: 15px;
  transition: all 0.3s ease;
}

.contact-item:hover {
  transform: translateY(-5px);
}

.contact-item i {
  font-size: 1.5rem;
  color: var(--accent-color);
  margin-top: 0.2rem;
}

.contact-item h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.contact-item p {
  color: var(--text-primary);
  font-weight: 500;
}

.contact-item--link {
  text-decoration: none;
  color: inherit;
}

.phone-link {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.phone-link:hover {
  color: var(--primary-orange-dark);
  text-decoration: underline;
}

.footer-link {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: var(--accent-color);
}

.contact-form {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-backdrop);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--glass-shadow);
  height: 100%;
}

.contact-form .btn {
  margin-top: auto;
  align-self: flex-start;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.82rem;
  background: var(--bg-glass);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: inherit;
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(255, 145, 77, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  /* Utilise une couleur grise pour le placeholder en mode clair */
  color: var(--text-secondary);
}

/* En mode sombre, le placeholder est plus clair pour un meilleur contraste */
[data-theme="dark"] .form-group input::placeholder,
[data-theme="dark"] .form-group textarea::placeholder {
  color: var(--text-muted);
}

/* Style pour les champs de formulaire en erreur */
.form-group.has-error input,
.form-group.has-error textarea {
  border-color: #ff4757;
}

/* ==========================================================================
   12. Footer
   ========================================================================== */
.footer {
  background: var(--bg-glass);
  backdrop-filter: var(--glass-backdrop);
  border-top: 1px solid var(--glass-border);
  padding: 3rem 0 1rem;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
  align-items: start;
}

.footer-section--center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}


.footer-section h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--accent-color);
}

.footer-logo {
  height: 60px;
  width: auto;
  object-fit: contain;
  margin-bottom: 1rem;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section ul li a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-section ul li a:hover {
  color: var(--text-primary);
}

.footer-section ul li i {
  color: var(--accent-color);
  margin-right: 0.5rem;
  width: 20px;
}

.footer-opqibi {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 1rem;
}

.footer-opqibi-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer-opqibi-logo {
  width: 130px;
  border-radius: 10px;
  padding: 8px 10px;
  background: #fff;
  display: block;
}


.footer-certif-num {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
  letter-spacing: 0.03em;
}

.footer-qualif-codes {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.footer-qualif-codes li {
  font-size: 0.79rem;
  color: var(--text-secondary);
}

.footer-qualif-code {
  font-weight: 700;
  color: var(--text-primary);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--glass-border);
  color: var(--text-secondary);
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.footer-nav-link {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

@media (max-width: 768px) {
  .footer-content {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }
  .footer-content > div:nth-child(1) { order: 2; }
  .footer-content > div:nth-child(2) { order: 1; }
  .footer-content > div:nth-child(3) { order: 3; }
  .footer-section {
    text-align: center;
  }
  .footer-section h3 {
    text-align: center;
  }
  .footer-section--center {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .footer-section ul {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .footer-opqibi {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
  }
  .footer-certif-num {
    text-align: center;
  }
}

/* ==========================================================================
   13. Composants (Messages, Boutons, etc.)
   ========================================================================== */
.success-message {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #00b894, #00a085);
  color: white;
  padding: 1rem;
  border-radius: 10px;
  text-align: center;
  z-index: 10;
  box-shadow: 0 4px 20px rgba(0, 184, 148, 0.4);
  animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.success-message i {
  margin-right: 0.5rem;
}

.error-message {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #ff4757, #ee5a6f);
  color: white;
  padding: 1rem;
  border-radius: 10px;
  text-align: center;
  z-index: 10;
  box-shadow: 0 4px 20px rgba(255, 71, 87, 0.4);
  animation: slideDown 0.5s ease-out;
}

.error-message i {
  margin-right: 0.5rem;
}

.field-error {
  color: #ff4757;
  font-size: 0.8rem;
  margin-top: 0.5rem;
}

/* Confettis */
.confetti {
  position: fixed;
  top: -20px;
  width: 10px;
  height: 10px;
  pointer-events: none;
  z-index: 9999;
  animation: confetti-fall var(--duration) ease-in forwards;
}

@keyframes confetti-fall {
  0% {
    transform: translateY(0) translateX(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) translateX(var(--end-x)) rotate(var(--rotation));
    opacity: 0;
  }
}

/* Bouton d'appel flottant */
.floating-call-btn {
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00b894, #00a085);
  color: white;
  border: none;
  cursor: pointer;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0, 184, 148, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: all 0.3s ease;
  animation: phone-ring 2s ease-in-out infinite;
  display: none;
}

@keyframes phone-ring {
  0%, 100% { transform: scale(1) rotate(0deg); }
  10%, 20% { transform: scale(1.1) rotate(-10deg); }
  15%, 25% { transform: scale(1.1) rotate(10deg); }
  30% { transform: scale(1) rotate(0deg); }
}

.floating-call-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 30px rgba(0, 184, 148, 0.6);
  animation: none;
}

.floating-call-btn::after {
  content: 'Appelez-nous !';
  position: absolute;
  right: 70px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  white-space: nowrap;
  font-size: 0.9rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.floating-call-btn:hover::after {
  opacity: 1;
}

@media (max-width: 1024px) {
  .floating-call-btn {
    display: flex;
  }
}

.scroll-top-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-orange), var(--primary-orange-dark));
  color: white;
  border: none;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
  box-shadow: 0 4px 15px rgba(255, 145, 77, 0.3);
}

.scroll-top-btn:hover {
  transform: scale(1.1);
}

.scroll-top-btn.visible {
  opacity: 1;
  visibility: visible;
}

/* ==========================================================================
   14. Responsive Design (Media Queries)
   ========================================================================== */
@media (max-width: 768px) {
  .navbar {
    top: 0;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: 0.2rem;
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
  }

  .nav-container {
    border-radius: 16px;
    padding: 0.5rem 0.7rem;
  }

  .nav-logo a .logo {
    height: 42px;
  }

  .hero {
    padding-top: calc(env(safe-area-inset-top, 0px) + 88px);
  }

  .hamburger {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    top: 78px;
    flex-direction: column;
    width: min(94vw, 480px);
    background: var(--glass-bg-solid);
    backdrop-filter: blur(14px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.2);
    border-radius: 16px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    text-align: center;
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
    padding: 0.85rem;
    z-index: 999;
    gap: 0.35rem;
    align-items: stretch;
  }

  .nav-menu.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
  }

  .nav-item {
    width: 100%;
  }

  .nav-link {
    display: block;
    width: 100%;
    padding: 0.75rem 0.95rem;
    border-radius: 12px;
    text-align: left;
    font-size: 0.95rem;
  }

  .nav-item--dropdown {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav-link--dropdown {
    width: 100%;
    padding: 0.75rem 0.95rem;
    border-radius: 12px;
    justify-content: space-between;
    font-size: 0.95rem;
  }

  .nav-dropdown {
    position: static;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0.2rem 0 0.2rem 0.75rem;
    display: none;
  }

  .nav-item--dropdown.open .nav-dropdown {
    display: block;
  }

  .nav-dropdown-link {
    padding: 0.55rem 0.95rem;
    border-left: 2px solid rgba(255, 157, 92, 0.35);
    border-radius: 0 10px 10px 0;
    font-size: 0.88rem;
  }

  .theme-toggle {
    width: 40px;
    height: 40px;
  }

  .hero-container {
    grid-template-columns: 1fr;
    min-height: auto;
    width: 100vw;
    padding: 0 12px;
    gap: 1.15rem;
  }

  .hero-content {
    padding: 0;
    max-width: 100%;
    margin-left: 0;
    text-align: left;
    align-items: flex-start;
  }

  .hero-title {
    font-size: clamp(1.9rem, 8vw, 2.4rem);
    max-width: 100%;
  }

  .hero-description {
    max-width: 100%;
  }

  .hero-visual {
    height: auto;
    min-height: 300px;
    width: 100vw;
    margin-left: -12px;
    margin-right: -12px;
  }

  .hero-buttons {
    width: 100%;
    gap: 0.7rem;
  }

  .hero-buttons .btn {
    width: 100%;
    justify-content: center;
  }

  .hero-trust {
    width: 100%;
  }

  .hero-trust-chip {
    font-size: 0.76rem;
    padding: 0.38rem 0.64rem;
  }

  .hero-photo {
    height: clamp(280px, 44vh, 400px);
    width: 100%;
    clip-path: polygon(0% 0%, 100% 0%, 100% 92%, 0% 100%);
    border-radius: 0;
    animation: none;
  }

  .hero-photo .hero-image {
    object-position: center top;
  }

  .hero-photo-overlay {
    background: linear-gradient(
      to bottom,
      transparent 50%,
      rgba(248, 250, 252, 0.18) 85%,
      rgba(248, 250, 252, 0.35) 100%
    );
  }

  [data-theme="dark"] .hero-photo-overlay {
    background: linear-gradient(
      to bottom,
      transparent 50%,
      rgba(10, 12, 16, 0.25) 85%,
      rgba(10, 12, 16, 0.45) 100%
    );
  }

  .floating-card {
    position: relative;
    margin: 0;
    animation: none;
  }

  .floating-card:nth-child(1),
  .floating-card:nth-child(2),
  .floating-card:nth-child(3) {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
    transform: none;
  }

  .contact-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .contact-info {
    height: auto;
    justify-content: flex-start;
    gap: 2rem;
  }

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

  .hero-buttons {
    justify-content: flex-start;
  }

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

@media (max-width: 640px) {
  .hero-title {
    font-size: 2rem;
  }

  .hero-description {
    font-size: 1rem;
  }

  .btn {
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
  }

  .service-card,
  .contact-form {
    padding: 1.5rem;
  }

  /* Expertise section responsive */
  .expertise-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .expertise-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.6rem;
  }

  .expertise-stats .stat-card {
    padding: 0.9rem 0.5rem;
  }

  .expertise-stats .stat-card--hero {
    padding: 1.2rem 1rem;
  }

  .expertise-stats .stat-number {
    font-size: 1.6rem;
  }

  .expertise-stats .stat-label {
    font-size: 0.72rem;
  }

  .stat-card--hero {
    grid-column: 1 / -1;
  }

  /* Certifications section responsive */
  .certifications-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .cert-item, .partner-item {
    flex-direction: column;
    text-align: center;
  }

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

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

/* ==========================================================================
   16. Galerie Modale (Lightbox)
   ========================================================================== */
.gallery-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.gallery-content {
  position: relative;
  max-width: min(86vw, 1200px);
  max-height: 84vh;
  padding: 0.8rem 3.4rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gallery-modal img {
  max-width: min(80vw, 1080px);
  max-height: 72vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.35);
  animation: zoomIn 0.3s ease;
}

.gallery-modal.gallery-modal--portrait img {
  max-width: min(54vw, 620px);
  max-height: 72vh;
}

@keyframes zoomIn {
  from { transform: scale(0.8); }
  to { transform: scale(1); }
}

.gallery-close, .gallery-prev, .gallery-next {
  position: absolute;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  cursor: pointer;
  font-size: 2rem;
  transition: background 0.3s ease;
  z-index: 2001;
}

.gallery-close:hover, .gallery-prev:hover, .gallery-next:hover {
  background: rgba(0, 0, 0, 0.8);
}

.gallery-close {
  top: calc(82px + 16px);
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.6rem;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
}

.gallery-prev, .gallery-next {
  top: 50%;
  transform: translateY(-50%);
  padding: 1rem;
}

.gallery-prev { left: 15px; }
.gallery-next { right: 15px; }

.gallery-caption {
  text-align: center;
  color: #ccc;
  padding-top: 1rem;
  font-size: 1rem;
}

@media (max-width: 768px) {
  .gallery-content {
    max-width: 92vw;
    max-height: 84vh;
    padding: 0.6rem 2.4rem 1.1rem;
  }

  .gallery-modal img {
    max-width: 86vw;
    max-height: 66vh;
  }

  .gallery-modal.gallery-modal--portrait img {
    max-width: 76vw;
    max-height: 66vh;
  }
}

/* Loader de la galerie */
.gallery-loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3rem;
  color: var(--accent-color);
  display: none;
  z-index: 2002;
}

/* Toast d'erreur galerie */
.gallery-error-toast {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(255, 71, 87, 0.95);
  color: white;
  padding: 1rem 2rem;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 10;
}

.gallery-error-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   15. Animations
   ========================================================================== */
@keyframes slideInFromLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInFromRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.animate {
  opacity: 1;
  transform: translateY(0);
}

/* Effets de survol améliorés */
.service-card,
.team-member,
.project-card,
.contact-item,
.stat-item {
  position: relative;
  overflow: hidden;
}

.service-card::after,
.team-member::after,
.project-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 145, 77, 0.1), transparent);
  transition: left 0.6s;
}

.service-card:hover::after,
.team-member:hover::after,
.project-card:hover::after {
  left: 100%;
}

/* Team section keeps a frameless visual; cancel global card sheen there */
.team-member {
  overflow: visible;
}

.team-member::after {
  content: none;
}

/* Animation pour les icônes de service */
@keyframes icon-wiggle {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-10deg); }
  75% { transform: rotate(10deg); }
}

.service-card:hover .service-icon i {
  animation: icon-wiggle 0.4s ease-in-out;
}

/* ==========================================================================
   17. Easter Eggs
   ========================================================================== */

/* Toast Easter Egg */
.easter-egg-toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: linear-gradient(135deg, var(--primary-orange), var(--primary-orange-dark));
  color: white;
  padding: 1rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  box-shadow: 0 10px 40px rgba(255, 145, 77, 0.5);
  z-index: 10000;
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.easter-egg-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Matrix Rain */
.matrix-drop {
  position: fixed;
  top: -50px;
  color: #00ff00;
  font-family: 'Courier New', monospace;
  font-size: 1.5rem;
  font-weight: bold;
  text-shadow: 0 0 10px #00ff00;
  animation: matrix-fall linear forwards;
  z-index: 9998;
  pointer-events: none;
}

@keyframes matrix-fall {
  to {
    top: 100vh;
    opacity: 0;
  }
}

/* Electric Sparks */
.electric-spark {
  position: fixed;
  width: 6px;
  height: 60px;
  background: linear-gradient(to bottom, transparent, #ffff00, #ffaa00, transparent);
  box-shadow: 0 0 30px #ffff00, 0 0 50px #ffaa00;
  animation: electric-spark 0.5s ease-out forwards;
  z-index: 9998;
  pointer-events: none;
}

@keyframes electric-spark {
  0% {
    transform: scale(1.5) rotate(0deg);
    opacity: 1;
  }
  50% {
    transform: scale(1) rotate(180deg);
    opacity: 0.8;
  }
  100% {
    transform: scale(0) rotate(360deg);
    opacity: 0;
  }
}

/* Lightning Flash */
.lightning-flash {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0);
  z-index: 9999;
  pointer-events: none;
  transition: background 0.1s ease;
}

.lightning-flash.active {
  background: rgba(255, 255, 255, 0.8);
}

/* Long Press Ring */
.long-press-ring {
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 3px solid var(--accent-color);
  opacity: 0;
  transform: scale(0.8);
  transition: all 2s linear;
  pointer-events: none;
}

.long-press-ring.active {
  opacity: 1;
  transform: scale(1.2);
  border-color: #00ff00;
  box-shadow: 0 0 20px var(--accent-color), 0 0 40px #00ff00;
}

/* Spin Crazy Animation */
@keyframes spin-crazy {
  0% { transform: rotate(0deg) scale(1); }
  25% { transform: rotate(180deg) scale(1.5); }
  50% { transform: rotate(360deg) scale(1); }
  75% { transform: rotate(540deg) scale(1.5); }
  100% { transform: rotate(720deg) scale(1); }
}

/* ==========================================================================
   18. Badge System
   ========================================================================== */

/* Badge Toggle Button */
.badge-toggle {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  right: 20px;
  margin-top: 5px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffd700, #ffed4e);
  color: #333;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(255, 215, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  z-index: 1001;
  transition: all 0.3s ease;
  animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {
  0%, 100% { transform: translateY(-50%) scale(1); }
  50% { transform: translateY(-50%) scale(1.05); box-shadow: 0 4px 30px rgba(255, 215, 0, 0.7); }
}

.badge-toggle:hover {
  transform: translateY(-50%) scale(1.1);
  animation: none;
}

.badge-count {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #ff4757;
  color: white;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: bold;
  border: 2px solid white;
}

/* Badge Modal */
.badge-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.badge-modal.open {
  opacity: 1;
  visibility: visible;
}

.badge-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
}

.badge-modal-content {
  position: relative;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-backdrop);
  border: 1px solid var(--glass-border);
  border-radius: 25px;
  width: 90%;
  max-width: 700px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  transform: scale(0.9);
  transition: all 0.3s ease;
}

.badge-modal.open .badge-modal-content {
  transform: scale(1);
}

.badge-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--glass-border);
}

.badge-modal-header h3 {
  color: var(--text-primary);
  font-size: 1.5rem;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.badge-modal-header h3 i {
  color: #ffd700;
}

.badge-modal-actions {
  display: flex;
  gap: 0.5rem;
}

.badge-reset-btn,
.badge-modal-close {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.2rem;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.badge-reset-btn:hover {
  background: rgba(255, 145, 77, 0.2);
  color: var(--accent-color);
  transform: rotate(-180deg);
}

.badge-modal-close:hover {
  background: var(--glass-border);
  transform: rotate(90deg);
}

.badge-list {
  padding: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.badge-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
  padding: 1rem;
  background: var(--bg-glass);
  border-radius: 15px;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.badge-item.earned {
  border-color: var(--accent-color);
  box-shadow: 0 4px 20px rgba(255, 145, 77, 0.2);
}

.badge-item.locked {
  opacity: 0.5;
  filter: grayscale(100%);
}

.badge-item:hover {
  transform: translateY(-5px);
}

.badge-icon-big {
  font-size: 2.5rem;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--glass-bg);
  border-radius: 50%;
  border: 2px solid var(--glass-border);
}

.badge-item .badge-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.badge-item .badge-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.3;
}

/* Badge Notification */
.badge-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: linear-gradient(135deg, #ffd700, #ffed4e);
  color: #333;
  padding: 1rem 1.5rem;
  border-radius: 15px;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 10px 40px rgba(255, 215, 0, 0.5);
  z-index: 10001;
  transform: translateX(400px);
  transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.badge-notification.show {
  transform: translateX(0);
}

.badge-notification .badge-icon {
  font-size: 2rem;
}

.badge-notification .badge-name {
  font-weight: 700;
  font-size: 0.9rem;
}

.badge-notification .badge-desc {
  font-size: 0.85rem;
  opacity: 0.8;
}

/* ==========================================================================
   Schéma Électrique Interactif
   ========================================================================== */

.interactive-schema {
  padding: 6rem 0;
  background: var(--bg-secondary);
  overflow: hidden;
}

.schema-container {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  margin-top: 3rem;
}

/* Info Panel */
.schema-info {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.info-panel {
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  padding: 2rem;
  border-radius: 20px;
  border: 1px solid var(--glass-border);
}

.info-panel h3 {
  color: var(--text-primary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.info-panel h3 i {
  color: var(--primary-orange);
}

.schema-stats {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 1.5rem 0;
}

.stat-item-small {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background: var(--glass-bg);
  border-radius: 10px;
  border: 1px solid var(--glass-border);
}

.stat-label-small {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.stat-value-small {
  color: var(--primary-orange);
  font-weight: 600;
  font-size: 1rem;
}

.info-panel .btn {
  width: 100%;
  margin-top: 0.5rem;
}

/* Component Info Panel */
.component-info {
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  padding: 2rem;
  border-radius: 20px;
  border: 1px solid var(--glass-border);
  min-height: 200px;
  transition: all 0.3s ease;
}

.component-info h4 {
  color: var(--primary-orange);
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.component-info p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.component-info.active {
  border-color: var(--primary-orange);
  box-shadow: 0 0 30px rgba(255, 145, 77, 0.3);
}

/* Schema Diagram */
.schema-diagram {
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  padding: 3rem;
  border-radius: 20px;
  border: 1px solid var(--glass-border);
  position: relative;
  min-height: 600px;
  display: grid;
  grid-template-columns: auto auto auto auto auto auto auto;
  grid-template-rows: repeat(3, 1fr);
  align-items: center;
  justify-items: center;
  gap: 0;
}

/* Electricity Flow SVG */
.electricity-flow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* Components */
.component {
  position: relative;
  background: var(--glass-bg);
  border: 2px solid var(--glass-border);
  border-radius: 15px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 2;
  min-width: 150px;
}

.component:hover {
  transform: translateY(-5px) scale(1.05);
  border-color: var(--primary-orange);
  box-shadow: 0 10px 30px rgba(255, 145, 77, 0.3);
}

.component.active {
  border-color: var(--primary-orange);
  background: linear-gradient(135deg, rgba(255, 145, 77, 0.1), rgba(255, 117, 31, 0.1));
  box-shadow: 0 0 30px rgba(255, 145, 77, 0.5);
  animation: pulse-component 2s ease-in-out infinite;
}

@keyframes pulse-component {
  0%, 100% {
    box-shadow: 0 0 20px rgba(255, 145, 77, 0.3);
  }
  50% {
    box-shadow: 0 0 40px rgba(255, 145, 77, 0.6);
  }
}

.component-icon {
  font-size: 2.5rem;
  color: var(--primary-orange);
  transition: all 0.3s ease;
}

.component:hover .component-icon {
  transform: scale(1.2);
  filter: drop-shadow(0 0 10px var(--primary-orange));
}

.component.powered .component-icon {
  animation: glow-icon 2s ease-in-out infinite;
}

@keyframes glow-icon {
  0%, 100% {
    color: var(--primary-orange);
    filter: drop-shadow(0 0 5px var(--primary-orange));
  }
  50% {
    color: #ffed4e;
    filter: drop-shadow(0 0 20px #ffed4e);
  }
}

.component-label {
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
}

/* Connection Points */
.connection-point {
  position: absolute;
  width: 12px;
  height: 12px;
  background: var(--primary-orange);
  border-radius: 50%;
  border: 2px solid var(--bg-primary);
  transition: all 0.3s ease;
}

.point-out {
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
}

.point-in {
  left: -6px;
  top: 50%;
  transform: translateY(-50%);
}

.component.powered .connection-point {
  animation: pulse-connection 1s ease-in-out infinite;
}

@keyframes pulse-connection {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(255, 145, 77, 0.7);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(255, 145, 77, 0);
  }
}

/* Wires */
.wire {
  height: 4px;
  background: var(--glass-border);
  border-radius: 2px;
  position: relative;
  transition: all 0.3s ease;
  z-index: 1;
}

.wire.active {
  background: var(--primary-orange);
  box-shadow: 0 0 10px var(--primary-orange), 0 0 20px var(--primary-orange);
  animation: wire-glow 1.5s ease-in-out infinite;
}

@keyframes wire-glow {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.wire-1, .wire-2 {
  width: 100px;
  margin: 2rem 0;
}

.wire-branch {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin: 2rem 0;
}

.wire-3a, .wire-3b, .wire-3c {
  width: 80px;
}

/* Layout des composants avec CSS Grid */
.transformer {
  grid-column: 1;
  grid-row: 2;
}

.wire-1 {
  grid-column: 2;
  grid-row: 2;
}

.switchgear {
  grid-column: 3;
  grid-row: 2;
}

.wire-2 {
  grid-column: 4;
  grid-row: 2;
}

.distribution {
  grid-column: 5;
  grid-row: 2;
}

.wire-branch {
  grid-column: 6;
  grid-row: 1 / 4;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  height: 100%;
  width: 100%;
}

.wire-3a {
  align-self: center;
}

.wire-3b {
  align-self: center;
}

.wire-3c {
  align-self: center;
}

.end-components {
  grid-column: 7;
  grid-row: 1 / 4;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: flex-start;
  height: 100%;
  padding: 2rem 0;
}

.endpoint {
  min-width: 120px;
  width: 100%;
}

/* Animation de particules électriques */
.electric-particle {
  position: absolute;
  width: 8px;
  height: 8px;
  background: var(--primary-orange);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--primary-orange), 0 0 20px var(--primary-orange);
  pointer-events: none;
  z-index: 3;
  animation: particle-move 2s linear infinite;
}

@keyframes particle-move {
  0% {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateX(100px) scale(0.5);
    opacity: 0;
  }
}

/* Responsive */
@media (max-width: 1024px) {
  .schema-container {
    grid-template-columns: 1fr;
  }

  .schema-diagram {
    min-height: 500px;
  }
}

@media (max-width: 768px) {
  .schema-diagram {
    padding: 2rem 1rem;
    min-height: auto;
  }

  .component {
    min-width: 100px;
    padding: 1rem;
  }

  .component-icon {
    font-size: 1.8rem;
  }

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

  .wire-1, .wire-2 {
    width: 60px;
  }

  .wire-3a, .wire-3b, .wire-3c {
    width: 50px;
  }

  .end-components {
    gap: 1rem;
  }
}
/* ==========================================================================
   Nouvelles Sections (Présentation, Domaines, Missions, Moyens, Références)
   ========================================================================== */

/* Section Présentation */
.presentation-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: justify;
}

.lead-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.presentation-content p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

/* Section Domaines d'Activité */
.domaines-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.domaine-block h3 {
    color: var(--primary-orange);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sous-domaines-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.sous-domaine h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    border-bottom: 2px solid var(--glass-border);
    padding-bottom: 0.5rem;
}

.sous-domaine ul, .cfa-list {
    list-style: none;
    padding: 0;
}

.sous-domaine ul li, .cfa-list li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.sous-domaine ul li::before, .cfa-list li::before {
    content: '•';
    color: var(--primary-orange);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.cfa-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.image-placeholder-large {
    width: 100%;
    height: 400px;
    background: var(--glass-bg);
    border: 2px dashed var(--glass-border);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.image-placeholder-large i {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.competences-diverses .info-box {
    background: var(--glass-bg);
    padding: 2rem;
    border-radius: 15px;
    border-left: 5px solid var(--primary-orange);
    text-align: center;
    font-style: italic;
}

/* Section Missions */
.missions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
}

/* Centre le dernier élément s'il est seul sur sa ligne */
.mission-item:nth-child(9):last-child {
    grid-column: 2;
}

.mission-item {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--glass-border);
}

.mission-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--glass-shadow);
    border-color: var(--primary-orange);
}

.mission-item i {
    font-size: 2rem;
    color: var(--primary-orange);
    margin-bottom: 1rem;
    display: block;
}

.mission-item span {
    font-weight: 600;
    color: var(--text-primary);
}

/* Section Moyens Techniques */
.moyens-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.moyens-col h3 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.moyens-col h3 i {
    color: var(--primary-orange);
}

.materiel-list, .logiciels-list {
    list-style: none;
}

.materiel-list li, .logiciels-list li {
    background: var(--bg-card);
    margin-bottom: 0.8rem;
    padding: 1rem;
    border-radius: 10px;
    border-left: 3px solid var(--primary-orange);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.materiel-list li i {
    color: var(--primary-orange);
    font-size: 1.3rem;
    flex-shrink: 0;
}

/* Software logos styling */
.software-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.logiciels-list li:hover .software-logo {
    transform: scale(1.1);
}

.software-info {
    flex: 1;
}

/* Fallback icon pour les logiciels sans logo */
.software-icon-fallback {
    color: var(--primary-orange);
    font-size: 2rem;
    flex-shrink: 0;
    width: 40px;
    text-align: center;
}

/* Hardware logos styling */
.hardware-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    flex-shrink: 0;
    transition: all 0.3s ease;
    filter: brightness(0) saturate(100%) invert(65%) sepia(91%) saturate(2577%) hue-rotate(340deg) brightness(101%) contrast(102%);
}

.materiel-list li:hover .hardware-logo {
    transform: scale(1.1);
    filter: brightness(0) saturate(100%) invert(50%) sepia(91%) saturate(2577%) hue-rotate(340deg) brightness(110%) contrast(102%);
}

/* Section Références */
.references .section-header {
    text-align: center;
}

.references .section-header .section-subtitle {
    margin: 0 auto;
    white-space: nowrap;
    max-width: none;
}

@media (max-width: 900px) {
    .references .section-header .section-subtitle {
        white-space: normal;
        max-width: 720px;
    }
}

.references-categories {
    display: flex;
    flex-direction: column;
    gap: 4rem;
    align-items: center;
}

.references-map-panel {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 5rem;
}

.references-map {
    width: 100%;
    height: 874px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: var(--glass-shadow);
    overflow: hidden;
}

/* Empêche les contrôles Leaflet de passer au-dessus de la navbar */
.references-map .leaflet-top,
.references-map .leaflet-bottom,
.references-map .leaflet-control {
    z-index: 300 !important;
}

#map-inset {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 190px;
    height: 140px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid rgba(255, 145, 77, 0.7);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    z-index: 400;
    transition: width 0.3s ease, height 0.3s ease, box-shadow 0.3s ease;
}

#map-inset:hover {
    width: 380px;
    height: 280px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

#map-inset-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 145, 77, 0.9);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 8px;
    text-align: center;
    z-index: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    pointer-events: none;
}

.references-map-hint {
    margin-top: 0.75rem;
    color: var(--text-secondary);
    text-align: center;
    font-size: 0.95rem;
}

.references-page-link {
    margin-top: 1.2rem;
}

.cea-map-marker {
    display: flex;
    align-items: center;
    justify-content: center;
}

.cea-map-marker i {
    color: var(--primary-orange);
    font-size: 1.75rem;
    line-height: 1;
    text-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s ease, color 0.2s ease;
}

.cea-map-marker i:hover {
    transform: translateY(-1px) scale(1.05);
    color: var(--primary-orange-dark);
}

/* Pin siège CEA Ingénierie */
.cea-office-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.4));
    cursor: pointer;
    transition: transform 0.2s ease;
}

.cea-office-marker:hover {
    transform: translateY(-3px) scale(1.06);
}

.cea-office-marker__pin {
    width: 48px;
    height: 48px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    background: linear-gradient(135deg, #ff9d5c, #e87a2e);
    border: 3px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.cea-office-marker__pin img {
    transform: rotate(45deg);
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.map-popup {
    min-width: 280px;
    max-width: 340px;
    padding: 0.2rem 0.1rem 0.1rem;
}

.map-popup h4 {
    margin: 0 0 0.45rem;
    color: var(--text-primary);
    font-size: 1.02rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.map-popup p {
    margin: 0 0 0.5rem;
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.5;
}

.map-popup p:last-of-type {
    margin-bottom: 0.35rem;
}

.map-popup p i {
    color: var(--primary-orange);
    margin-right: 0.35rem;
}

.map-popup-gallery {
    margin-top: 0.7rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.map-popup-gallery img {
    width: 100%;
    height: 72px;
    object-fit: cover;
    border-radius: 10px;
    display: block;
    border: 1px solid var(--border-color);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.map-popup-gallery img:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.18);
}

.leaflet-popup-content-wrapper {
    border-radius: 16px;
    background: var(--bg-card-solid);
    border: 1px solid var(--border-color);
    box-shadow: 0 16px 38px rgba(17, 24, 39, 0.2);
}

.leaflet-popup-content {
    margin: 12px 14px;
}

.leaflet-popup-tip {
    background: var(--bg-card-solid);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .leaflet-popup-content-wrapper {
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.55);
}

.ref-category {
    width: 100%;
    max-width: 1400px;
}

.ref-category h3 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--glass-border);
    color: var(--text-primary);
    text-align: center;
}

/* Carousel outer wrapper — position relative pour les boutons overlay */
.ref-carousel-outer {
    position: relative;
    width: 100%;
    overflow: visible;
}

/* Carousel Container - Swiper */
.ref-carousel {
    position: relative;
    width: 100%;
    height: 560px;
    overflow: hidden;
}

.ref-track {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
}

/* Centrage des carousels avec peu de slides */
@media (min-width: 640px) {
    .ref-carousel--count-1 .swiper-wrapper {
        justify-content: center;
    }
}
@media (min-width: 1024px) {
    .ref-carousel--count-1 .swiper-wrapper,
    .ref-carousel--count-2 .swiper-wrapper {
        justify-content: center;
    }
}

/* Grid statique pour certaines catégories */
.ref-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    justify-content: center;
    justify-items: center;
}

/* Cards */
.ref-card {
    background: var(--bg-card-solid);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 16px var(--shadow-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    aspect-ratio: 4 / 5;
    display: flex;
    flex-direction: column;
}

.ref-card[data-gallery] .ref-image {
    cursor: zoom-in;
}

.ref-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 36px rgba(255, 117, 31, 0.22);
}

.ref-image {
    height: 34%;
    min-height: 190px;
    background: var(--glass-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    clip-path: inset(0px 0px 0px 0px round 15px 15px 0px 0px);
}

.photo-count-badge {
    position: absolute;
    right: 10px;
    bottom: 10px;
    padding: 0.28rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #ffffff;
    background: rgba(17, 24, 39, 0.82);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.project-status-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 3;
    padding: 0.32rem 0.68rem;
    min-height: 28px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.01em;
    border: 1px solid rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(4px);
}

.project-status-badge--ongoing {
    background: rgba(245, 158, 11, 0.9);
    color: #fff;
}

.project-status-badge--delivered {
    background: rgba(22, 163, 74, 0.9);
    color: #fff;
}

.image-placeholder {
    color: var(--text-muted);
    font-size: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    inset: 0;
    background: var(--glass-bg);
}

/* Hide placeholder when a valid image is loaded */
.ref-image:has(img:not(.img-error)) .image-placeholder {
    display: none;
}

.ref-image .ref-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: refImgFadeIn 0.25s ease 0.12s both;
}

@keyframes refImgFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.ref-image .ref-img.img-error + .image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.ref-content {
    padding: 1.2rem 1.25rem 1.35rem;
    text-align: center;
    min-height: 235px;
}

.references .ref-content {
    text-align: left;
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 66%;
    padding-top: 5rem;
    position: relative;
    z-index: 2;
}

.references .ref-content[data-project-url] {
    cursor: pointer;
}

.ref-content h4 {
    margin-top: 0.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    min-height: 2.6em;
    text-align: center;
}

.ref-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.reference-date {
    margin-top: 0.7rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.reference-category-chip--bridge {
    position: absolute;
    top: 12px;
    right: 12px;
    left: auto;
    transform: none;
    margin: 0;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
    z-index: 40;
    background: var(--bg-card-solid) !important;
    border: 1px solid var(--border-color);
    opacity: 1 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    white-space: nowrap;
}

.ref-card-meta {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 0;
    z-index: 35;
}

.ref-card-partner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
    margin-bottom: 0;
}

.ref-card-partner-logo {
    width: 120px;
    height: 60px;
    border-radius: 14px;
    border: 1px solid var(--border-color);
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 8px 10px;
    transform: translateY(-50%) translateZ(0);
    margin-bottom: -22px;
    position: relative;
    z-index: 1;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
}

.ref-card-partner-logo > .ac-badge-tooltip-wrap {
    position: absolute;
    top: 0;
    right: 0;
    transform: translate(50%, -50%);
    z-index: 36;
}

.ref-card-partner-logo > .ac-badge-tooltip-wrap > .ref-card-certified-badge {
    --badge-size: 54px;
    display: block;
}

.ac-iridescent-badge {
    --badge-size: 63px;
    width: var(--badge-size);
    height: var(--badge-size);
    min-width: var(--badge-size);
    min-height: var(--badge-size);
    aspect-ratio: 1 / 1;
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    clip-path: polygon(50% 0%, 60% 15%, 75% 7%, 80% 23%, 96% 24%, 87% 38%, 100% 50%, 87% 62%, 96% 76%, 80% 77%, 75% 93%, 60% 85%, 50% 100%, 40% 85%, 25% 93%, 20% 77%, 4% 76%, 13% 62%, 0% 50%, 13% 38%, 4% 24%, 20% 23%, 25% 7%, 40% 15%);
    background:
        radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.92) 0 12%, transparent 46%),
        conic-gradient(from 15deg, #76d9ff 0deg, #7cf4e3 55deg, #b5ff8f 110deg, #ffe17f 165deg, #ff8fc4 220deg, #bda4ff 280deg, #76d9ff 360deg);
    border: 1px solid rgba(255, 255, 255, 0.55);
    box-shadow:
        0 8px 18px rgba(82, 54, 173, 0.32),
        inset 0 0 0 1px rgba(255, 255, 255, 0.42),
        inset 0 -4px 8px rgba(34, 10, 96, 0.36);
    transform-style: preserve-3d;
    transition: transform 0.28s ease, box-shadow 0.28s ease, filter 0.28s ease;
}

.ac-iridescent-badge::before {
    content: '';
    position: absolute;
    inset: 16%;
    clip-path: inherit;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.08));
    mix-blend-mode: screen;
    pointer-events: none;
}

.ac-iridescent-badge__core {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56%;
    height: 56%;
    border-radius: 50%;
    font-size: 0.5rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
    background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.5), rgba(17, 17, 34, 0.86));
    box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.38), 0 1px 3px rgba(0, 0, 0, 0.35);
}

.ac-iridescent-badge--three {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
    overflow: visible;
}

.ac-badge-three-canvas {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    display: block;
    pointer-events: none;
    z-index: 0;
}

.ac-iridescent-badge--three .ac-iridescent-badge__core {
    z-index: 2;
    opacity: 0;
}

.ac-badge-tooltip-wrap {
    position: relative;
    display: inline-flex;
}

.ac-badge-tooltip-wrap[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    transform: translate(-50%, 8px);
    opacity: 0;
    pointer-events: none;
    white-space: nowrap;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #fff;
    background: rgba(15, 15, 15, 0.85);
    border: 1px solid rgba(255, 145, 77, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 50;
}

.ac-badge-tooltip-wrap[data-tooltip]::before {
    content: '';
    position: absolute;
    left: 50%;
    bottom: calc(100% + 3px);
    width: 9px;
    height: 9px;
    transform: translateX(-50%) rotate(45deg) translateY(8px);
    opacity: 0;
    pointer-events: none;
    background: rgba(15, 15, 15, 0.85);
    border-left: 1px solid rgba(255, 145, 77, 0.4);
    border-top: 1px solid rgba(255, 145, 77, 0.4);
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 49;
}

.ac-badge-tooltip-wrap[data-tooltip]:hover::after,
.ac-badge-tooltip-wrap[data-tooltip]:focus-visible::after {
    opacity: 1;
    transform: translate(-50%, 0);
}

.ac-badge-tooltip-wrap[data-tooltip]:hover::before,
.ac-badge-tooltip-wrap[data-tooltip]:focus-visible::before {
    opacity: 1;
    transform: translateX(-50%) rotate(45deg) translateY(0);
}

.ref-card-partner-logo:hover .ac-iridescent-badge,
.certified-partner-card:hover .ac-iridescent-badge {
    box-shadow:
        0 12px 24px rgba(76, 50, 164, 0.4),
        inset 0 0 0 1px rgba(255, 255, 255, 0.58),
        inset 0 -5px 9px rgba(34, 10, 96, 0.45);
    filter: saturate(1.15);
}

.ref-card-partner-link {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    text-decoration: none;
    color: inherit;
}

.ref-card-partner-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.ref-card-partner-logo i {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.references .reference-partner {
    margin-top: 0.5rem;
    margin-left: 0;
    margin-bottom: 0.6rem;
    font-size: 0.96rem;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
}

.ref-card-site {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.77rem;
    color: var(--text-muted);
    flex-shrink: 0;
    max-width: 48%;
    justify-content: flex-end;
    text-align: right;
}

.ref-card-site span {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ref-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0;
    gap: 0.5rem;
}

.ref-card-site-bottom {
    margin-top: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.ref-card-site-bottom span {
    display: inline;
    line-height: 1.25;
    padding-bottom: 1px;
}

.ref-card-dates {
    margin-top: 0;
    padding-top: 0.5rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    border-top: 1px solid var(--border-color);
    padding-bottom: 0.35rem;
}

.ref-card-bottom {
    margin-top: auto;
    min-height: 15%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.ref-card-dates .reference-date {
    margin-top: 0;
    white-space: nowrap;
    font-size: 0.79rem;
}

.ref-card-dates .reference-date:last-child:not(:first-child) {
    margin-left: auto;
    text-align: right;
}

.references-page-body {
    background: var(--page-background);
    background-attachment: fixed;
}

.references-page-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--glass-bg-solid);
    backdrop-filter: var(--glass-backdrop);
    border-bottom: 1px solid var(--glass-border);
}

.references-page-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 0.9rem;
    padding-bottom: 0.9rem;
}

.references-page-main {
    padding: calc(82px + 2rem) 0 4rem;
}

.references-page-hero {
    text-align: center;
    margin-bottom: 2rem;
}

.partner-page-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.2rem;
    width: 200px;
    height: 80px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 12px 16px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    position: relative;
    overflow: visible;
}

.partner-page-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.partner-page-certified-badge {
    position: absolute;
    top: 0;
    right: 0;
    transform: translate(42%, -42%);
    --badge-size: 54px;
    z-index: 4;
}

.site-card-address {
    font-size: 0.84rem;
    color: var(--text-muted);
}

.references-page-filters {
    margin-top: 1.4rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: center;
}

.references-filter-btn {
    border: 1px solid var(--border-color);
    background: var(--bg-card-solid);
    color: var(--text-secondary);
    border-radius: 999px;
    padding: 0.45rem 0.9rem;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.references-filter-btn.active {
    background: var(--primary-orange);
    color: #fff;
    border-color: var(--primary-orange);
}

.references-page-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

@media (max-width: 900px) {
    .references-page-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 560px) {
    .references-page-grid {
        grid-template-columns: 1fr;
    }
}

.project-gallery-thumb {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 12px;
    cursor: zoom-in;
    background: var(--glass-bg);
    box-shadow: 0 4px 16px var(--shadow-color);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.project-gallery-thumb:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(255, 117, 31, 0.2);
}

.project-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.project-gallery-thumb:hover img {
    transform: scale(1.04);
}

/* Layout 2 colonnes : card à gauche, bento galerie à droite */
.project-layout {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 2rem;
    align-items: start;
}

.project-layout-left {
    position: sticky;
    top: calc(82px + 1.5rem);
}

.project-layout-right {
    min-width: 0;
}

@media (max-width: 900px) {
    .project-layout {
        grid-template-columns: 1fr;
    }
    .project-layout-left {
        position: static;
    }
}

/* Card de détail projet */
#projectDetailCard .ref-card {
    width: 100%;
    max-width: 100%;
}

#projectDetailCard .ref-content {
    flex: 1;
    min-height: 0;
}

/* Bento galerie */
.project-bento {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.project-bento-item {
    overflow: hidden;
    border-radius: 12px;
    cursor: zoom-in;
    background: var(--glass-bg);
    box-shadow: 0 4px 16px var(--shadow-color);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.project-bento-item[data-orientation="landscape"] {
    grid-column: span 2;
    aspect-ratio: 16 / 9;
}

.project-bento-item[data-orientation="portrait"] {
    grid-column: span 1;
    aspect-ratio: 3 / 4;
}

.project-bento-item[data-orientation="square"] {
    grid-column: span 1;
    aspect-ratio: 1;
}

.project-bento-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.project-bento-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(255, 117, 31, 0.2);
}

.project-bento-item:hover img {
    transform: scale(1.04);
}

.reference-detail-card .ref-content {
    text-align: left;
    display: flex;
    flex-direction: column;
    flex: 1;
    padding-top: 5rem;
    position: relative;
}

.reference-detail-card .ref-content h4 {
    text-align: center;
    min-height: unset;
}

.reference-detail-card .ref-content[data-project-url] {
    cursor: pointer;
}

.reference-category-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: rgba(255, 157, 92, 0.18);
    color: #7d3200;
    margin-bottom: 0.8rem;
}

[data-theme="dark"] .reference-category-chip {
    color: #ffb870;
}

.budget-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    background: rgba(22, 163, 74, 0.12);
    color: #15803d;
    white-space: nowrap;
    flex-shrink: 0;
}

[data-theme="dark"] .budget-chip {
    background: rgba(22, 163, 74, 0.2);
    color: #4ade80;
}

.references-empty {
    text-align: center;
    color: var(--text-secondary);
    grid-column: 1 / -1;
    padding: 2rem 0.5rem;
}

/* Nav buttons — overlay absolu au centre vertical du carousel */
.ref-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 36px;
    height: 560px;
    border-radius: 14px;
    border: 1px solid rgba(255, 157, 92, 0.35);
    background: rgba(255, 157, 92, 0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--primary-orange-dark);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.10);
    mask-image: linear-gradient(to bottom, transparent 0%, black 33%, black 67%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 33%, black 67%, transparent 100%);
    transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease,
                opacity 0.2s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.ref-nav-btn.ref-nav-prev {
    left: -36px;
}

.ref-nav-btn.ref-nav-next {
    right: -36px;
}

.ref-nav-btn:hover {
    background: var(--primary-orange);
    border-color: var(--primary-orange-dark);
    color: #fff;
    transform: translateY(-50%) translateY(-1px);
    box-shadow: 0 6px 24px rgba(232, 122, 46, 0.35);
}

.ref-nav-disabled {
    opacity: 0;
    pointer-events: none;
}

/* Pagination */
.ref-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    min-height: 14px;
}

.ref-bullet {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border-color);
    cursor: pointer;
    transition: background 0.25s ease, width 0.25s ease, border-radius 0.25s ease;
}

.ref-bullet-active {
    width: 24px;
    border-radius: 4px;
    background: var(--primary-orange);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .domaines-layout, .moyens-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

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

    .references .ref-carousel {
        height: 500px;
    }

    .ref-nav-btn {
        width: 30px;
        height: 500px;
        border-radius: 10px;
        font-size: 0.8rem;
    }

    .ref-nav-btn.ref-nav-prev {
        left: -30px;
    }

    .ref-nav-btn.ref-nav-next {
        right: -30px;
    }

    .references-map {
        height: 595px;
    }
}

/* Styles pour les images generees */
.domaine-image-large {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: var(--glass-shadow);
}

.ref-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

/* ==========================================================================
   Domaines d'Activité Section
   ========================================================================== */
.domaines {
    padding: 40px 0;
    background: transparent;
}

.domaines-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-top: 3rem;
}

.domaine-col h3 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.domaine-col h3 i {
    color: var(--primary-orange);
    font-size: 1.5rem;
}

.sous-domaine {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 15px;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--primary-orange);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sous-domaine:hover {
    transform: translateX(5px);
    box-shadow: var(--glass-shadow);
}

.sous-domaine h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.sous-domaine ul {
    list-style: none;
    padding-left: 1.5rem;
}

.sous-domaine ul li {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    position: relative;
}

.sous-domaine ul li::before {
    content: '•';
    color: var(--primary-orange);
    position: absolute;
    left: -1.5rem;
    font-weight: bold;
    font-size: 1.2rem;
}

.domaine-section {
    margin-bottom: 3rem;
}

.domaine-section h3 {
    font-size: 1.5rem;
    color: var(--primary-orange);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.domaine-section h3 i {
    font-size: 1.8rem;
}

.cfo-list,
.cfa-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.cfo-item,
.cfa-item {
    background: var(--bg-card);
    padding: 1rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    border: 1px solid var(--glass-border);
}

.cfo-item:hover,
.cfa-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--glass-shadow);
    border-color: var(--primary-orange);
}

.cfo-item i,
.cfa-item i {
    color: var(--primary-orange);
    font-size: 1.5rem;
    flex-shrink: 0;
}

.cfo-item span,
.cfa-item span {
    color: var(--text-primary);
    font-weight: 500;
}

.competences-diverses {
    margin-top: 3rem;
}

.competences-diverses .info-box {
    background: var(--glass-bg);
    padding: 2rem;
    border-radius: 15px;
    border-left: 5px solid var(--primary-orange);
    text-align: center;
    font-style: italic;
}

.competences-diverses .info-box p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
}

.competences-diverses .info-box strong {
    color: var(--primary-orange);
}

/* ==========================================================================
   Missions Section
   ========================================================================== */
.missions {
    padding: 40px 0;
    background: transparent;
}

.missions-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3rem;
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.missions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.mission-item {
    background: var(--bg-card);
    padding: 2rem 1.5rem;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.mission-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--glass-shadow);
    border-color: var(--primary-orange);
}

.mission-item i {
    font-size: 2.5rem;
    color: var(--primary-orange);
    transition: transform 0.3s ease;
}

.mission-item:hover i {
    transform: scale(1.1);
}

.mission-item span {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
}

/* ==========================================================================
   Moyens Techniques Section
   ========================================================================== */
.moyens-techniques {
    padding: 40px 0;
    background: transparent;
}

.moyens-intro {
    text-align: center;
    max-width: 900px;
    margin: 0 auto 3rem;
}

.moyens-intro p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.moyens-intro strong {
    color: var(--primary-orange);
    font-weight: 600;
}

.moyens-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-top: 3rem;
}

.moyens-col h3 {
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.moyens-col h3 i {
    color: var(--primary-orange);
}

.materiel-list,
.logiciels-list {
    list-style: none;
}

.materiel-list li,
.logiciels-list li {
    background: var(--bg-card);
    margin-bottom: 1rem;
    padding: 1.25rem;
    border-radius: 12px;
    border-left: 3px solid var(--primary-orange);
    transition: all 0.3s ease;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.materiel-list li:hover,
.logiciels-list li:hover {
    transform: translateX(5px);
    box-shadow: var(--glass-shadow);
}

.materiel-list li i {
    color: var(--primary-orange);
    font-size: 1.3rem;
}

.materiel-list li strong,
.logiciels-list li strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* ==========================================================================
   Success Message Styling
   ========================================================================== */
.success-message {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3);
    animation: slideDown 0.5s ease;
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.success-message i {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.success-content strong {
    font-size: 1.3rem;
    display: block;
    margin-bottom: 0.5rem;
}

.success-content p {
    margin: 0.3rem 0;
    line-height: 1.6;
}

.success-content em {
    font-style: italic;
    opacity: 0.9;
}

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

/* ==========================================================================
   Responsive Design pour nouvelles sections
   ========================================================================== */
@media (max-width: 768px) {
    .domaines-layout,
    .moyens-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

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

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

    .success-message {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .success-content strong {
        font-size: 1.1rem;
    }
}

/* ==========================================================================
   Section Spacing Tuning
   ========================================================================== */
section[id]:not(#accueil):not(#domaines) {
    padding-top: 40px;
    padding-bottom: 40px;
}

#domaines {
    padding-top: 72px;
    padding-bottom: 20px;
}

.section-header {
    margin-bottom: 2.2rem;
}

#clients {
    min-height: auto;
    padding-top: 8px;
    padding-bottom: 4px;
}

#clients .section-header {
    margin-bottom: 1.1rem;
}

/* ── Témoignages ─────────────────────────────────────────────────────────── */
.temoignages { padding: 80px 0; }

.temoignages-grid {
    columns: 3;
    column-gap: 1.4rem;
}

.temoignage-card {
    break-inside: avoid;
    background: var(--bg-card-solid);
    border-radius: 18px;
    padding: 2rem 1.6rem 1.4rem;
    margin-bottom: 1.4rem;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.temoignage-card:nth-child(4n+1) { transform: rotate(-1.2deg); }
.temoignage-card:nth-child(4n+2) { transform: rotate(0.7deg); }
.temoignage-card:nth-child(4n+3) { transform: rotate(-0.5deg); }
.temoignage-card:nth-child(4n+4) { transform: rotate(1deg); }

.temoignage-card:hover {
    transform: rotate(0deg) translateY(-4px);
    box-shadow: 0 16px 36px rgba(255, 117, 31, 0.15);
    border-color: rgba(255, 157, 92, 0.4);
    z-index: 1;
}

.temoignage-quote-icon {
    font-size: 3rem;
    color: var(--primary-orange);
    opacity: 0.12;
    position: absolute;
    top: 0.6rem;
    left: 1rem;
    line-height: 1;
    pointer-events: none;
}

.temoignage-text {
    font-size: 0.92rem;
    line-height: 1.75;
    color: var(--text-primary);
    margin: 0 0 1rem;
    position: relative;
    z-index: 1;
}

.temoignage-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.temoignage-role {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--primary-orange);
    background: rgba(255, 117, 31, 0.1);
    padding: 3px 10px;
    border-radius: 20px;
}

.temoignage-sector {
    font-size: 0.76rem;
    color: var(--text-secondary);
    background: var(--glass-bg);
    padding: 3px 10px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

@media (max-width: 1024px) {
    .temoignages-grid { columns: 2; }
}

@media (max-width: 640px) {
    .temoignages-grid { columns: 1; }
    .temoignage-card:nth-child(n) { transform: none; }
}

/* ── Partenaires certifiés ───────────────────────────────────────────────── */
.certified-partners-block {
    margin-bottom: 2rem;
}

.certified-partners-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.certified-partners-header .fas {
    color: #f59e0b;
    font-size: 0.9rem;
}

.certified-partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 220px));
    gap: 0.9rem;
    justify-content: center;
}

.certified-partner-card {
    position: relative;
    background: var(--bg-card-solid);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.4rem 1rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.certified-partner-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(255, 145, 77, 0.15);
    border-color: rgba(245, 158, 11, 0.4);
}

.certified-partner-card > .ac-badge-tooltip-wrap {
    position: absolute;
    top: 0;
    right: 0;
    transform: translate(50%, -50%);
    z-index: 2;
}

.certified-badge {
    --badge-size: 68px;
    display: block;
}

.reference-detail-card {
    position: relative;
    overflow: visible;
}

.certified-partner-logo {
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.certified-partner-logo img {
    max-width: 130px;
    max-height: 56px;
    object-fit: contain;
    filter: grayscale(10%) contrast(1.02) opacity(0.92);
    transition: filter 0.2s ease;
}

.certified-partner-card:hover .certified-partner-logo img {
    filter: grayscale(0%) contrast(1.05) opacity(1);
}

.certified-partner-name {
    font-weight: 600;
    font-size: 0.82rem;
    text-align: center;
    color: var(--text-primary);
    line-height: 1.3;
}

.certified-partner-desc {
    font-size: 0.76rem;
    text-align: center;
    color: var(--text-secondary);
    line-height: 1.45;
    margin: 0;
}

.certified-partners-divider {
    height: 1px;
    background: var(--border-color);
    margin-top: 1.75rem;
    margin-bottom: 0.25rem;
    opacity: 0.6;
}

[data-theme="dark"] .certified-partner-card {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(255, 255, 255, 0.92);
}

@media (max-width: 768px) {
    .certified-partners-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 160px));
        justify-content: center;
        gap: 0.7rem;
    }
    .certified-partner-card {
        padding: 1.2rem 0.75rem 0.85rem;
    }
}

#expertise {
    padding-top: 8px;
}

@media (max-width: 768px) {
    section[id]:not(#accueil):not(#domaines) {
        padding-top: 28px;
        padding-bottom: 28px;
    }

    #domaines {
        padding-top: 52px;
        padding-bottom: 16px;
    }

    .section-header {
        margin-bottom: 1.7rem;
    }

    #clients {
        padding-top: 6px;
        padding-bottom: 3px;
    }

    #clients .section-header {
        margin-bottom: 0.9rem;
    }

    #expertise {
        padding-top: 6px;
    }
}

/* ==========================================================================
   Desktop Density Tuning (ex: 1920x1080)
   ========================================================================== */
@media (min-width: 1400px) and (max-height: 1300px) {
    html {
        font-size: 13px;
    }

    .navbar {
        box-shadow: 0 6px 18px rgba(15, 23, 42, 0.1);
    }

    .nav-container {
        padding: 0.42rem clamp(12px, 1.8vw, 28px);
    }

    .nav-logo a .logo {
        height: 40px;
    }

    .nav-link {
        font-size: 0.88rem;
        padding: 0.44rem 0.75rem;
    }

    .theme-toggle {
        width: 38px;
        height: 38px;
    }

    .hero {
        min-height: 82svh;
        padding-bottom: 8px;
    }

    .hero-container {
        min-height: 82svh;
        grid-template-columns: minmax(280px, 30vw) minmax(0, 1fr);
        gap: 0.7rem;
        padding-left: clamp(10px, 2.1vw, 42px);
    }

    .hero-title {
        font-size: clamp(1.6rem, 2.2vw, 2.5rem);
        line-height: 1.06;
        max-width: 11ch;
        margin-bottom: 0.9rem;
    }

    .hero-description {
        font-size: 0.88rem;
        max-width: 42ch;
        margin-bottom: 1.1rem;
    }

    .hero-photo {
        height: clamp(340px, 54vh, 520px);
    }

    .hero-trust {
        margin-top: 0.85rem;
        gap: 0.4rem;
    }

    .hero-trust-chip {
        font-size: 0.72rem;
        padding: 0.28rem 0.52rem;
    }

    .btn {
        padding: 0.72rem 1.2rem;
        font-size: 0.85rem;
    }

    section[id]:not(#accueil):not(#domaines) {
        padding-top: 28px;
        padding-bottom: 28px;
    }

    .section-title {
        font-size: clamp(1.55rem, 1.9vw, 2rem);
    }

    .section-header {
        margin-bottom: 1.25rem;
    }

    .timeline-content,
    .domain-card,
    .domain-services-card,
    .moyens-col,
    .contact-form,
    .contact-info {
        padding: 1rem;
    }

    .references .ref-carousel {
        height: 500px;
    }

    .references-map {
        height: 700px;
    }

    .trust-logo-card {
        width: 124px;
        height: 56px;
        padding: 0.38rem;
    }

    .trust-logo-card img {
        max-height: 30px;
    }
}

/* ==========================================================================
   Forced Compact Desktop
   ========================================================================== */
@media (min-width: 1200px) {
    html {
        font-size: 12px !important;
    }

    .container {
        width: min(84vw, 1500px) !important;
        max-width: 1500px !important;
    }

    .navbar {
        box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08) !important;
    }

    .nav-container {
        padding: 0.36rem clamp(10px, 1.3vw, 20px) !important;
    }

    .nav-logo a .logo {
        height: 34px !important;
    }

    .nav-link {
        font-size: 0.82rem !important;
        padding: 0.36rem 0.62rem !important;
    }

    .theme-toggle {
        width: 34px !important;
        height: 34px !important;
    }

    .hero {
        min-height: 74svh !important;
        padding-bottom: 4px !important;
    }

    .hero-container {
        min-height: 74svh !important;
        grid-template-columns: minmax(240px, 29vw) minmax(0, 1fr) !important;
        gap: 0.45rem !important;
        padding-left: clamp(8px, 1.4vw, 24px) !important;
    }

    .hero-title {
        font-size: clamp(1.35rem, 1.75vw, 2rem) !important;
        line-height: 1.05 !important;
        margin-bottom: 0.7rem !important;
    }

    .hero-description {
        font-size: 0.78rem !important;
        line-height: 1.45 !important;
        margin-bottom: 0.85rem !important;
        max-width: 40ch !important;
    }

    .hero-buttons {
        gap: 0.45rem !important;
    }

    .hero-photo {
        height: clamp(290px, 46vh, 430px) !important;
    }

    .hero-trust {
        margin-top: 0.6rem !important;
        gap: 0.34rem !important;
    }

    .hero-trust-chip {
        font-size: 0.66rem !important;
        padding: 0.22rem 0.46rem !important;
    }

    .btn {
        padding: 0.6rem 1rem !important;
        font-size: 0.78rem !important;
    }

    section[id]:not(#accueil):not(#domaines) {
        padding-top: 24px !important;
        padding-bottom: 24px !important;
    }

    .section-title {
        font-size: clamp(1.35rem, 1.5vw, 1.8rem) !important;
        margin-bottom: 0.7rem !important;
    }

    .section-header {
        margin-bottom: 0.95rem !important;
    }

    .references .ref-carousel {
        height: 560px !important;
    }

    .references .ref-content {
        min-height: 320px !important;
        padding: 5rem 1.15rem 1.1rem !important;
    }

    .references-map {
        height: 604px !important;
    }

    .references-map-panel {
        margin-bottom: 2rem !important;
    }

    .trust-logo-card {
        width: 108px !important;
        height: 48px !important;
        padding: 0.3rem !important;
    }

    .trust-logo-card img {
        max-height: 24px !important;
    }
}

/* ==========================================================================
   Balanced Desktop Override (visible immediately)
   ========================================================================== */
@media (min-width: 1200px) {
    html {
        font-size: 14px !important;
    }

    .container {
        width: min(88vw, 1640px) !important;
        max-width: 1640px !important;
    }

    .nav-logo a .logo {
        height: 42px !important;
    }

    .nav-link {
        font-size: 0.92rem !important;
        padding: 0.44rem 0.8rem !important;
    }

    .theme-toggle {
        width: 38px !important;
        height: 38px !important;
    }

    .hero {
        min-height: auto !important;
        align-items: flex-start !important;
        padding: 0 0 10px !important;
    }

    .hero-container {
        min-height: auto !important;
        grid-template-columns: minmax(380px, 42vw) minmax(0, 1fr) !important;
        gap: 1rem !important;
        padding-left: clamp(12px, 2.5vw, 48px) !important;
    }

    .hero-content {
        justify-content: center !important;
        padding-top: 0 !important;
    }

    .hero-title {
        font-size: clamp(1.9rem, 2.6vw, 3rem) !important;
        line-height: 1.08 !important;
        margin-bottom: 0.9rem !important;
        max-width: 12ch !important;
    }

    .hero-description {
        font-size: 0.96rem !important;
        line-height: 1.58 !important;
        margin-bottom: 1.15rem !important;
        max-width: 46ch !important;
    }

    .hero-visual {
        min-height: 100vh !important;
    }

    .hero-photo {
        height: 100vh !important;
    }

    .btn {
        padding: 0.78rem 1.35rem !important;
        font-size: 0.9rem !important;
    }

    .hero-trust {
        margin-top: 0.85rem !important;
        gap: 0.45rem !important;
    }

    .hero-trust-chip {
        font-size: 0.74rem !important;
        padding: 0.3rem 0.56rem !important;
    }

    section[id]:not(#accueil):not(#domaines) {
        padding-top: 32px !important;
        padding-bottom: 32px !important;
    }

    .section-title {
        font-size: clamp(1.7rem, 2.1vw, 2.45rem) !important;
    }

    .section-header {
        margin-bottom: 1.3rem !important;
    }
}

/* ==========================================================================
   Moyens Techniques - Visual Compact (text size unchanged)
   ========================================================================== */
.moyens-techniques .moyens-intro {
    margin: 0 auto 1.8rem !important;
}

.moyens-techniques .moyens-grid {
    gap: 2rem !important;
    margin-top: 1.6rem !important;
}

.moyens-techniques .moyens-col h3 {
    margin-bottom: 0.95rem !important;
    gap: 0.5rem !important;
}

.moyens-techniques .materiel-list li,
.moyens-techniques .logiciels-list li {
    margin-bottom: 0.6rem !important;
    padding: 0.82rem !important;
    border-radius: 10px !important;
    gap: 0.6rem !important;
}

.moyens-techniques .software-logo,
.moyens-techniques .hardware-logo {
    width: 30px !important;
    height: 30px !important;
}

.moyens-techniques .software-icon-fallback {
    width: 30px !important;
    font-size: 1.5rem !important;
}

.moyens-techniques .materiel-list li i {
    font-size: 1rem !important;
}

/* ==========================================================================
   Non-Hero Sections Width -15%
   ========================================================================== */
section[id]:not(#accueil) > .container {
    width: min(74.8vw, 1462px) !important;
    max-width: 1462px !important;
}

@media (max-width: 1024px) {
    section[id]:not(#accueil) > .container {
        width: min(79vw, 980px) !important;
        max-width: 980px !important;
    }
}

.footer > .container {
    width: min(74.8vw, 1462px) !important;
    max-width: 1462px !important;
}

@media (max-width: 1024px) {
    .footer > .container {
        width: min(79vw, 980px) !important;
        max-width: 980px !important;
    }
}

/* ==========================================================================
   Ultra-Wide 4K (21:9) - Hero text boost
   ========================================================================== */
@media (min-width: 3000px) and (min-aspect-ratio: 21/9) {
    .hero-title {
        font-size: clamp(3rem, 3.4vw, 5rem) !important;
        line-height: 1.04 !important;
        max-width: none !important;
    }

    .hero-description {
        font-size: clamp(1.35rem, 1.2vw, 1.9rem) !important;
        line-height: 1.6 !important;
        max-width: 52ch !important;
    }
}

/* ==========================================================================
   Hero Typography - Truly Adaptive
   ========================================================================== */
@media (min-width: 1200px) {
    .hero-title {
        /* Adapte la taille sur largeur ET hauteur d'ecran */
        font-size: clamp(2rem, min(4.2vw, 6.1vh), 4.6rem) !important;
        line-height: 1.06 !important;
        max-width: none !important;
    }

    .hero-description {
        font-size: clamp(1rem, min(1.45vw, 2.3vh), 1.65rem) !important;
        line-height: 1.58 !important;
        max-width: 50ch !important;
    }
}

/* ==========================================================================
   Ultra-Large Screens Final Tuning
   ========================================================================== */
@media (min-width: 2200px) {
    .nav-container {
        padding: 0.9rem clamp(18px, 2.4vw, 56px) !important;
    }

    .nav-logo a .logo {
        height: 64px !important;
        padding-top: 3px !important;
    }

    .nav-link {
        font-size: 1.05rem !important;
        padding: 0.62rem 1.08rem !important;
    }

    .theme-toggle {
        width: 50px !important;
        height: 50px !important;
    }

    .hero-container {
        grid-template-columns: minmax(560px, 41vw) minmax(0, 1fr) !important;
        gap: 1.5rem !important;
        padding-left: clamp(10px, 1.2vw, 28px) !important;
    }

    .hero-title {
        font-size: clamp(3.4rem, min(5vw, 8vh), 6.2rem) !important;
        line-height: 1.04 !important;
        margin-bottom: 1.25rem !important;
    }

    .hero-description {
        font-size: clamp(1.5rem, min(2.1vw, 3.1vh), 2.2rem) !important;
        line-height: 1.55 !important;
        margin-bottom: 1.5rem !important;
        max-width: 42ch !important;
    }

    .btn {
        padding: 1.08rem 1.9rem !important;
        font-size: 1.12rem !important;
    }

    .hero-trust-chip {
        font-size: 0.96rem !important;
        padding: 0.45rem 0.82rem !important;
    }
}

/* ==========================================================================
   Hero Content Boost (text + UI only, photo unchanged)
   ========================================================================== */
@media (min-width: 1200px) {
    .hero-content {
        gap: 0.35rem !important;
    }

    .hero-title {
        font-size: clamp(2.35rem, min(4.9vw, 7vh), 5.2rem) !important;
        margin-bottom: 1.1rem !important;
    }

    .hero-description {
        font-size: clamp(1.15rem, min(1.8vw, 2.9vh), 1.95rem) !important;
        line-height: 1.62 !important;
        margin-bottom: 1.35rem !important;
        max-width: 54ch !important;
    }

    .hero-buttons {
        gap: 0.75rem !important;
    }

    .btn {
        padding: 0.95rem 1.6rem !important;
        font-size: 1rem !important;
    }

    .hero-trust {
        margin-top: 1.05rem !important;
        gap: 0.58rem !important;
    }

    .hero-trust-chip {
        font-size: 0.84rem !important;
        padding: 0.36rem 0.68rem !important;
    }
}


/* ==========================================================================
   Navbar Expanded At Top (auto collapse on scroll)
   ========================================================================== */
.navbar--hero .nav-container {
  padding-top: 0.95rem !important;
  padding-bottom: 0.95rem !important;
}

.navbar--hero .nav-logo a .logo {
  height: 60px !important;
}

.navbar--hero .nav-link {
  padding: 0.6rem 1rem !important;
}

.navbar--hero .theme-toggle {
  width: 48px !important;
  height: 48px !important;
}

/* Site/Partner/References v2 */
.refs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.reference-partner {
  margin-top: 0.35rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.references-page-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.cselect {
  position: relative;
  min-width: 220px;
}

.cselect--sm { min-width: 160px; }
.cselect--lg { min-width: 280px; }

.cselect__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  width: 100%;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  border: 1.5px solid var(--border-color);
  background: var(--bg-card-solid);
  color: var(--text-primary);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.18s, box-shadow 0.18s;
  text-align: left;
  white-space: nowrap;
}

.cselect__trigger:hover,
.cselect--open .cselect__trigger {
  border-color: var(--primary-orange);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.12);
}

.cselect__arrow {
  width: 12px;
  height: 8px;
  color: var(--primary-orange);
  flex-shrink: 0;
  transition: transform 0.2s;
}

.cselect--open .cselect__arrow {
  transform: rotate(180deg);
}

.cselect__list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 100%;
  background: var(--bg-card-solid);
  border: 1.5px solid var(--border-color);
  border-radius: 12px;
  padding: 0.4rem;
  margin: 0;
  list-style: none;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  z-index: 200;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.15s, transform 0.15s;
  max-height: 280px;
  overflow-y: auto;
}

.cselect--open .cselect__list {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.cselect__option {
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  font-size: 0.87rem;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  color: var(--text-primary);
}

.cselect__option:hover {
  background: rgba(249, 115, 22, 0.08);
  color: var(--primary-orange);
}

.cselect__option--active {
  background: rgba(249, 115, 22, 0.12);
  color: var(--primary-orange);
  font-weight: 600;
}

@media (min-width: 2200px) {
  .navbar--hero .nav-container {
    padding-top: 1.15rem !important;
    padding-bottom: 1.15rem !important;
  }

  .navbar--hero .nav-logo a .logo {
    height: 74px !important;
  }

  .navbar--hero .nav-link {
    padding: 0.72rem 1.18rem !important;
  }

  .navbar--hero .theme-toggle {
    width: 56px !important;
    height: 56px !important;
  }
}

@media (max-width: 1024px) {
  .navbar--hero .nav-container {
    padding-top: 0.62rem !important;
    padding-bottom: 0.62rem !important;
  }

  .navbar--hero .nav-logo a .logo {
    height: 46px !important;
  }
}

@media (min-width: 1200px) {
    #clients .trust-logo-card {
        width: 192px !important;
        height: 86px !important;
        padding: 0.55rem !important;
    }

    #clients .trust-logo-card img {
        max-height: 46px !important;
    }
}

/* ==========================================================================
   Hero + Navbar Consistency (Large & Ultra-Wide Screens)
   ========================================================================== */
@media (min-width: 1200px) and (max-width: 2199px) {
    .nav-container {
        padding: 0.68rem clamp(14px, 1.8vw, 36px) !important;
    }

    .nav-logo a .logo {
        height: 52px !important;
    }

    .nav-link {
        font-size: 0.95rem !important;
        padding: 0.52rem 0.9rem !important;
    }

    .theme-toggle {
        width: 44px !important;
        height: 44px !important;
    }

    .hero-container {
        grid-template-columns: minmax(480px, 40vw) minmax(0, 1fr) !important;
        gap: 1.2rem !important;
        padding-left: clamp(14px, 2.2vw, 56px) !important;
    }

    .hero-title {
        font-size: clamp(3.38rem, min(4.38vw, 7vh), 5.25rem) !important;
        line-height: 1.05 !important;
    }

    .hero-description {
        font-size: clamp(1.5rem, min(1.82vw, 2.75vh), 1.94rem) !important;
        line-height: 1.56 !important;
        max-width: 44ch !important;
    }

    .btn {
        font-size: 1.22rem !important;
        padding: 1.08rem 1.82rem !important;
    }

    .hero-trust-chip {
        font-size: 1rem !important;
        padding: 0.42rem 0.78rem !important;
    }
}

@media (min-width: 2200px) {
    .nav-container {
        padding: 0.88rem clamp(18px, 2.4vw, 58px) !important;
    }

    .nav-logo a .logo {
        height: 62px !important;
    }

    .nav-link {
        font-size: 1.04rem !important;
        padding: 0.62rem 1.1rem !important;
    }

    .theme-toggle {
        width: 50px !important;
        height: 50px !important;
    }

    .hero-container {
        grid-template-columns: minmax(620px, 44vw) minmax(0, 1fr) !important;
        gap: 1.55rem !important;
        padding-left: clamp(16px, 1.8vw, 42px) !important;
    }

    .hero-title {
        font-size: clamp(4.12rem, min(5.75vw, 8.9vh), 6.75rem) !important;
        line-height: 1.04 !important;
    }

    .hero-description {
        font-size: clamp(1.82rem, min(2.38vw, 3.5vh), 2.5rem) !important;
        line-height: 1.55 !important;
        max-width: 42ch !important;
    }

    .btn {
        font-size: 1.38rem !important;
        padding: 1.28rem 2.25rem !important;
    }

    .hero-trust-chip {
        font-size: 1.18rem !important;
        padding: 0.55rem 1rem !important;
    }
}

/* ==========================================================================
   Cursor Glow (dark mode)
   ========================================================================== */
#cursor-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(255, 145, 77, 0.13) 0%, rgba(255, 145, 77, 0.04) 40%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    will-change: transform;
}

[data-theme="dark"] #cursor-glow {
    opacity: 1;
}

/* ==========================================================================
   Domaines Hotspot
   ========================================================================== */
.section-domaines { padding: var(--section-padding, 80px 0); }

.hotspot-scene {
  position: relative;
  display: inline-block;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
}

.hotspot-image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  transition: opacity 0.45s ease;
}

.hotspot-image--dark {
  position: absolute;
  inset: 0;
  height: 100%;
  opacity: 0;
}

[data-theme="dark"] .hotspot-image--light {
  opacity: 0;
}

[data-theme="dark"] .hotspot-image--dark {
  opacity: 1;
}

.hotspot-point {
  position: absolute;
  transform: translate(-50%, -50%);
  cursor: pointer;
  z-index: 10;
}

.hotspot-point::before {
  content: '';
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  background: rgba(255, 145, 77, 0.5);
  animation: hotspot-pulse 2.4s ease-out infinite;
}

.hotspot-point::after {
  content: '';
  position: absolute;
  inset: -24px;
  border-radius: 50%;
  background: rgba(255, 145, 77, 0.25);
  animation: hotspot-pulse 2.4s ease-out infinite 0.8s;
}

.hotspot-dot {
  width: 24px;
  height: 24px;
  background: var(--primary, #ff914d);
  border: 3px solid #fff;
  border-radius: 50%;
  position: relative;
  z-index: 1;
  box-shadow: 0 2px 10px rgba(255, 145, 77, 0.5);
  transition: transform 0.2s ease;
}

.hotspot-point:hover .hotspot-dot {
  transform: scale(1.25);
}

.hotspot-badge {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: rgba(15, 15, 15, 0.85);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  border: 1px solid rgba(255, 145, 77, 0.4);
}

.hotspot-point:hover .hotspot-badge {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@keyframes hotspot-pulse {
  0%   { transform: scale(0.7); opacity: 1; }
  100% { transform: scale(2.8); opacity: 0; }
}

/* ==========================================================================
   View Transitions API — transitions fluides entre pages
   ========================================================================== */
@view-transition {
  navigation: auto;
}

@keyframes vt-fade-out {
  to { opacity: 0; transform: translateY(-8px); }
}

@keyframes vt-fade-in {
  from { opacity: 0; transform: translateY(8px); }
}

::view-transition-old(root) {
  animation: 0.22s ease-in vt-fade-out;
}

::view-transition-new(root) {
  animation: 0.32s ease-out vt-fade-in;
}

/* ==========================================================================
   Mobile carousel ref-cards (section #references on index.html)
   ========================================================================== */
@media (max-width: 768px) {
    /* Remove min-height so the 34% percentage drives image height.
       aspect-ratio: 4/5 on the card guarantees sufficient size. */
    .references .ref-image {
        min-height: unset;
    }

    /* Smaller partner logo — less vertical real-estate used */
    .references .ref-card-partner-logo {
        width: 100px;
        height: 48px;
        margin-bottom: -18px;
    }

    /* Reduce padding-top to match the smaller logo */
    .references .ref-content {
        padding-top: 4rem !important;
        padding-bottom: 0.65rem;
    }

    /* Tighter gap: logo → partner name */
    .references .reference-partner {
        margin-top: 0.35rem;
        margin-bottom: 0.25rem;
        font-size: 0.84rem;
    }

    /* Tighter gap: partner name → project title */
    .references .ref-content h4 {
        margin-top: 0;
        margin-bottom: 0.15rem;
        min-height: unset;
        font-size: 0.86rem;
        line-height: 1.3;
    }

    /* Slightly shorter description so footer never overlaps */
    .references .ref-content p {
        -webkit-line-clamp: 3;
        font-size: 0.82rem;
    }

    /* Footer stays inside card */
    .references .ref-card-bottom {
        padding-bottom: 0.25rem;
    }
}

/* ==========================================================================
   Project detail page (project.html) — redesigned layout
   ========================================================================== */
.proj-page {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 2rem;
    align-items: start;
}

.proj-page-left {
    position: sticky;
    top: calc(82px + 1.5rem);
    min-width: 0;
}

.proj-page-right {
    min-width: 0;
}

/* Hero block */
.proj-hero {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    background: var(--bg-secondary);
    margin-bottom: 1.25rem;
    cursor: zoom-in;
}

.proj-hero-bg {
    height: 240px;
    overflow: hidden;
    position: relative;
}

.proj-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.proj-hero:hover .proj-hero-img {
    transform: scale(1.03);
}

.proj-hero-empty {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 3rem;
    background: var(--bg-secondary);
}

.proj-hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 3rem 1.25rem 1.25rem;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.72) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
}

/* Partner logo card inside the hero overlay */
.proj-logo-card {
    position: relative;
    background: #fff;
    border-radius: 12px;
    padding: 7px 12px;
    width: 110px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
    flex-shrink: 0;
}

.proj-logo-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.proj-logo-card img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.proj-logo-badge {
    position: absolute;
    top: 0;
    right: 0;
    transform: translate(50%, -50%);
    z-index: 10;
}

.proj-logo-badge .ref-card-certified-badge {
    --badge-size: 50px;
    display: block;
}

.proj-title {
    color: #fff;
    font-size: clamp(0.95rem, 3vw, 1.25rem);
    font-weight: 700;
    text-align: center;
    text-shadow:
        0 1px 3px  rgba(0, 0, 0, 0.95),
        0 2px 12px rgba(0, 0, 0, 0.80),
        0 6px 28px rgba(0, 0, 0, 0.55);
    margin: 0;
    line-height: 1.3;
}

/* Body */
.proj-body {
    padding: 0;
}

.proj-sub {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin: 0 0 0.9rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem;
}

.proj-sub-dot {
    color: var(--text-muted);
}

.proj-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

.proj-meta-dates {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.proj-date {
    font-size: 0.78rem;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
}

.proj-date i {
    color: var(--primary-orange-dark);
}

.proj-meta-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.45rem;
    flex-shrink: 0;
}

.proj-desc {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin: 0;
}

/* Responsive — single column on mobile */
@media (max-width: 900px) {
    .proj-page {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .proj-page-left {
        position: static;
    }
    .proj-hero-bg {
        height: 200px;
    }
}

/* ── Pages légales ─────────────────────────────────────────── */
.legal-page-main {
    padding: 7rem 0 4rem;
    min-height: 70vh;
}

.legal-content {
    max-width: 800px;
    margin: 0 auto;
    color: var(--text-secondary);
    line-height: 1.75;
}

.legal-content h1 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.legal-content .legal-updated {
    font-size: 0.85rem;
    color: var(--text-muted, var(--text-secondary));
    margin-bottom: 3rem;
    opacity: 0.7;
}

.legal-content h2 {
    color: var(--text-primary);
    font-size: 1.15rem;
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--glass-border);
}

.legal-content p,
.legal-content ul {
    margin-bottom: 1rem;
}

.legal-content ul {
    padding-left: 1.5rem;
}

.legal-content a {
    color: var(--accent-color);
    text-decoration: none;
}

.legal-content a:hover {
    text-decoration: underline;
}

.legal-footer-simple {
    border-top: 1px solid var(--glass-border);
    padding: 2rem 0;
    margin-top: 3rem;
    text-align: center;
}
