/* ═══════════════════════════════════════════════════════
   EV & Solar — Site Web 2026
   Design System Tokens + Composants partagés
   ═══════════════════════════════════════════════════════ */

/* ── TOKENS ── */
:root {
  /* Primaires */
  --ev-navy: #1B3A5C;
  --ev-navy-deep: #0F2640;
  --ev-navy-10: rgba(27,58,92,0.10);
  --ev-solar: #E8791D;
  --ev-solar-deep: #C25F0A;
  --ev-solar-wash: #FFF4EB;
  --ev-solar-15: rgba(232,121,29,0.15);

  /* Fonctionnelles */
  --ev-sky: #4A9FD9;
  --ev-sky-wash: #EBF5FC;
  --ev-green: #2EA66A;
  --ev-green-wash: #E8F7EF;
  --ev-red: #D64040;
  --ev-red-wash: #FDECEC;
  --ev-amber: #E5A31D;
  --ev-amber-wash: #FFF8E6;

  /* Neutres */
  --ink: #0D1B2A;
  --graphite: #3D4F5F;
  --stone: #7A8B9A;
  --silver: #B4C0CC;
  --mist: #E2E8EE;
  --cloud: #F1F4F7;
  --paper: #F8F9FB;
  --white: #FFFFFF;

  /* Typographie */
  --font-display: 'Plus Jakarta Sans', -apple-system, sans-serif;
  --font-body: 'DM Sans', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Rayons */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 24px;

  /* Ombres */
  --shadow-sm: 0 1px 3px rgba(13,27,42,0.06);
  --shadow-md: 0 4px 12px rgba(13,27,42,0.08);
  --shadow-lg: 0 8px 30px rgba(13,27,42,0.10);
}

/* ── RESET & BASE ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  font-family: var(--font-body);
  background: var(--white);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }

/* ── GAUSSIAN LOGO COMPONENT ── */
.gauss { display: flex; flex-direction: column; align-items: center; gap: 0; flex-shrink: 0; }
.g-sky { display: flex; align-items: flex-end; }
.g-sea { display: flex; align-items: flex-start; }
.g-hz { display: flex; width: 72px; }
.g-hz-l { flex: 1; height: 1.5px; background: var(--ev-navy); border-radius: 1px 0 0 1px; }
.g-hz-r { flex: 1; height: 1.5px; background: var(--ev-solar); border-radius: 0 1px 1px 0; }
.gu { width: 3px; border-radius: 2px 2px 0 0; margin: 0 1px; }
.gu:nth-child(1)  { height: 6px;  background: var(--ev-navy); opacity: 0.08; }
.gu:nth-child(2)  { height: 12px; background: var(--ev-navy); opacity: 0.16; }
.gu:nth-child(3)  { height: 20px; background: var(--ev-navy); opacity: 0.3; }
.gu:nth-child(4)  { height: 28px; background: var(--ev-navy); opacity: 0.5; }
.gu:nth-child(5)  { height: 34px; background: var(--ev-navy); opacity: 0.7; }
.gu:nth-child(6)  { height: 37px; background: #6B5A48;       opacity: 0.88; }
.gu:nth-child(7)  { height: 38px; background: var(--ev-solar); }
.gu:nth-child(8)  { height: 37px; background: var(--ev-solar); opacity: 0.88; }
.gu:nth-child(9)  { height: 34px; background: var(--ev-solar); opacity: 0.7; }
.gu:nth-child(10) { height: 28px; background: var(--ev-solar); opacity: 0.5; }
.gu:nth-child(11) { height: 20px; background: var(--ev-solar); opacity: 0.3; }
.gu:nth-child(12) { height: 12px; background: var(--ev-solar); opacity: 0.16; }
.gu:nth-child(13) { height: 6px;  background: var(--ev-solar); opacity: 0.08; }
.gd { width: 3px; border-radius: 0 0 2px 2px; background: var(--ev-navy); margin: 0 1px; }
.gd:nth-child(1)  { height: 2px;  opacity: 0.02; }
.gd:nth-child(2)  { height: 4px;  opacity: 0.04; }
.gd:nth-child(3)  { height: 7px;  opacity: 0.07; }
.gd:nth-child(4)  { height: 10px; opacity: 0.1; }
.gd:nth-child(5)  { height: 13px; opacity: 0.14; }
.gd:nth-child(6)  { height: 15px; opacity: 0.18; }
.gd:nth-child(7)  { height: 16px; opacity: 0.2; }
.gd:nth-child(8)  { height: 15px; opacity: 0.18; }
.gd:nth-child(9)  { height: 13px; opacity: 0.14; }
.gd:nth-child(10) { height: 10px; opacity: 0.1; }
.gd:nth-child(11) { height: 7px;  opacity: 0.07; }
.gd:nth-child(12) { height: 4px;  opacity: 0.04; }
.gd:nth-child(13) { height: 2px;  opacity: 0.02; }

/* Gaussian dark variant — boosted for photo backgrounds */
.gauss-dk .gd { background: rgba(255,255,255,0.6); }
.gauss-dk .g-hz-l { background: rgba(255,255,255,0.35); }
.gauss-dk .gu:nth-child(1) { background: rgba(255,255,255,0.9); opacity: 0.25; }
.gauss-dk .gu:nth-child(2) { background: rgba(255,255,255,0.9); opacity: 0.4; }
.gauss-dk .gu:nth-child(3) { background: rgba(255,255,255,0.9); opacity: 0.55; }
.gauss-dk .gu:nth-child(4) { background: rgba(255,255,255,0.9); opacity: 0.7; }
.gauss-dk .gu:nth-child(5) { background: rgba(255,255,255,0.9); opacity: 0.85; }
.gauss-dk .gu:nth-child(6) { background: rgba(255,255,255,0.7); opacity: 0.9; }
/* Reflection bars — stronger on dark */
.gauss-dk .gd:nth-child(1)  { opacity: 0.06; }
.gauss-dk .gd:nth-child(2)  { opacity: 0.10; }
.gauss-dk .gd:nth-child(3)  { opacity: 0.16; }
.gauss-dk .gd:nth-child(4)  { opacity: 0.22; }
.gauss-dk .gd:nth-child(5)  { opacity: 0.30; }
.gauss-dk .gd:nth-child(6)  { opacity: 0.38; }
.gauss-dk .gd:nth-child(7)  { opacity: 0.42; }
.gauss-dk .gd:nth-child(8)  { opacity: 0.38; }
.gauss-dk .gd:nth-child(9)  { opacity: 0.30; }
.gauss-dk .gd:nth-child(10) { opacity: 0.22; }
.gauss-dk .gd:nth-child(11) { opacity: 0.16; }
.gauss-dk .gd:nth-child(12) { opacity: 0.10; }
.gauss-dk .gd:nth-child(13) { opacity: 0.06; }

/* Gaussian scales */
.gauss-xs { transform: scale(0.35); transform-origin: left center; }
.gauss-sm { transform: scale(0.55); transform-origin: center; }
.gauss-md { transform: scale(0.7); transform-origin: center; }
.gauss-nav { transform: scale(0.55); transform-origin: left center; }

/* ── WORDMARK ── */
.wm {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -2.5px;
  line-height: 1;
  white-space: nowrap;
}
.wm .ev { color: var(--ev-navy); }
.wm .amp { font-family: 'Outfit', sans-serif; font-weight: 300; color: var(--ev-solar); font-size: 0.88em; }
.wm .sol { color: var(--ev-solar); }

/* Logo inline */
.logo-inline { display: flex; align-items: center; white-space: nowrap; }
.logo-inline .sep { width: 1.5px; align-self: stretch; background: var(--mist); margin: 0 18px; }
.logo-inline.dk .sep { background: rgba(255,255,255,0.1); }

/* ── NAVIGATION ── */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 48px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--mist);
  transition: all 0.3s ease;
}
.site-nav.scrolled {
  padding: 10px 48px;
  box-shadow: var(--shadow-sm);
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}
.nav-links a {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  color: var(--stone);
  text-decoration: none;
  transition: color 0.2s;
  position: relative;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--ev-navy);
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0; right: 0;
  height: 2px;
  background: var(--ev-solar);
  border-radius: 1px;
  transform: scaleX(0);
  transition: transform 0.2s;
}
.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
}
.nav-pill {
  padding: 8px 20px;
  border-radius: 8px;
  background: var(--ev-navy);
  color: var(--white) !important;
  font-weight: 600 !important;
  transition: all 0.2s;
}
.nav-pill:hover {
  background: var(--ev-navy-deep);
  transform: translateY(-1px);
}
.nav-pill::after { display: none !important; }

/* Mobile nav */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}
.nav-hamburger span {
  width: 22px;
  height: 2px;
  background: var(--ev-navy);
  border-radius: 1px;
  transition: all 0.3s;
}
.nav-mobile {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,0.98);
  backdrop-filter: blur(24px);
  z-index: 99;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--ev-navy);
  letter-spacing: -0.5px;
}
.nav-mobile a:hover { color: var(--ev-solar); }
.nav-close {
  position: absolute;
  top: 20px; right: 24px;
  font-size: 28px;
  color: var(--stone);
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--font-display);
}

/* ── BUTTONS ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--r-md);
  background: var(--ev-navy);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}
.btn-primary:hover {
  background: var(--ev-navy-deep);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-primary.solar {
  background: var(--ev-solar);
}
.btn-primary.solar:hover {
  background: var(--ev-solar-deep);
}
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--r-md);
  background: transparent;
  color: var(--ev-navy);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  border: 1px solid var(--mist);
}
.btn-secondary:hover {
  background: var(--cloud);
  transform: translateY(-1px);
}
.btn-secondary.on-dark {
  color: var(--white);
  border-color: rgba(255,255,255,0.2);
}
.btn-secondary.on-dark:hover {
  background: rgba(255,255,255,0.08);
}

/* ── HERO ── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 120px 48px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
/* Photo background with subtle parallax */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-bg img {
  width: 100%;
  height: 120%;
  object-fit: cover;
  object-position: center 30%;
  will-change: transform;
  transform: translateY(0);
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(15, 38, 64, 0.75) 0%,
    rgba(15, 38, 64, 0.60) 40%,
    rgba(15, 38, 64, 0.80) 100%
  );
  z-index: 1;
}
/* Subtle vignette */
.hero-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(15, 38, 64, 0.3) 100%);
}
/* When hero has photo, adjust text colors */
.hero.has-photo .hero-tag {
  background: rgba(232,121,29,0.2);
  color: var(--white);
  backdrop-filter: blur(8px);
}
.hero.has-photo h1 .ev,
.hero.has-photo h1 .amp { color: var(--white); }
.hero.has-photo .hero-tagline { color: rgba(255,255,255,0.85); }
.hero.has-photo .hero-sub { color: rgba(255,255,255,0.6); }
.hero.has-photo .btn-secondary {
  color: var(--white);
  border-color: rgba(255,255,255,0.25);
}
.hero.has-photo .btn-secondary:hover {
  background: rgba(255,255,255,0.08);
}
.hero.has-photo .logo-inline .sep {
  background: rgba(255,255,255,0.15);
}
/* Dark gaussian for hero */
.hero.has-photo .gauss .gu:nth-child(1) { background: rgba(255,255,255,0.7); }
.hero.has-photo .gauss .gu:nth-child(2) { background: rgba(255,255,255,0.7); }
.hero.has-photo .gauss .gu:nth-child(3) { background: rgba(255,255,255,0.7); }
.hero.has-photo .gauss .gu:nth-child(4) { background: rgba(255,255,255,0.7); }
.hero.has-photo .gauss .gu:nth-child(5) { background: rgba(255,255,255,0.7); }
.hero.has-photo .gauss .gu:nth-child(6) { background: rgba(255,255,255,0.5); }
.hero.has-photo .gauss .gd { background: rgba(255,255,255,0.4); }
.hero.has-photo .gauss .g-hz-l { background: rgba(255,255,255,0.2); }

/* Legacy halos (only when no photo) */
.hero:not(.has-photo)::before {
  content: '';
  position: absolute;
  width: 700px; height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232,121,29,0.06) 0%, transparent 70%);
  top: 40%; left: 55%;
  transform: translate(-50%,-50%);
  pointer-events: none;
}
.hero:not(.has-photo)::after {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(27,58,92,0.04) 0%, transparent 70%);
  top: 35%; left: 30%;
  transform: translate(-50%,-50%);
  pointer-events: none;
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: 20px;
  background: var(--ev-solar-wash);
  color: var(--ev-solar-deep);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 28px;
  position: relative;
  z-index: 1;
}
.hero-logo {
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 800;
  letter-spacing: -2.5px;
  line-height: 1.05;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}
.hero-tagline {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  color: var(--graphite);
  letter-spacing: -0.3px;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}
.hero-sub {
  font-size: 16px;
  color: var(--stone);
  line-height: 1.7;
  max-width: 520px;
  margin: 0 auto 36px;
  position: relative;
  z-index: 1;
}
.hero-ctas {
  display: flex;
  gap: 12px;
  position: relative;
  z-index: 1;
}

/* ── SECTIONS ── */
.section {
  padding: 100px 48px;
  position: relative;
}
.section-inner {
  max-width: 1100px;
  margin: 0 auto;
}
.section-tag {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--ev-solar);
  margin-bottom: 12px;
}
.section h2 {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.15;
  margin-bottom: 16px;
}
.section h2 .accent { color: var(--ev-solar); }
.section-lead {
  font-size: 16px;
  color: var(--graphite);
  line-height: 1.7;
  max-width: 560px;
  margin-bottom: 48px;
}
.section-divider {
  height: 1px;
  background: var(--mist);
  max-width: 1100px;
  margin: 0 auto;
}

/* ── PHOTO BREAK ── */
.photo-break {
  width: 100%;
  height: 400px;
  position: relative;
  overflow: hidden;
}
.photo-break img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.photo-break-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(15, 38, 64, 0.15) 0%,
    rgba(15, 38, 64, 0.10) 50%,
    rgba(15, 38, 64, 0.25) 100%
  );
}
.photo-break-caption {
  position: absolute;
  bottom: 16px;
  right: 24px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: rgba(255,255,255,0.5);
  background: rgba(15, 38, 64, 0.5);
  backdrop-filter: blur(8px);
  padding: 4px 10px;
  border-radius: 4px;
}

/* ── SPLIT SECTION (text + photo side by side) ── */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-items: stretch;
  min-height: 500px;
}
.split-content {
  padding: 80px 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.split-photo {
  position: relative;
  overflow: hidden;
}
.split-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.split.reverse { direction: rtl; }
.split.reverse > * { direction: ltr; }

@media (max-width: 768px) {
  .split { grid-template-columns: 1fr; min-height: auto; }
  .split-content { padding: 48px 24px; }
  .split-photo { height: 300px; }
  .split.reverse { direction: ltr; }
  .photo-break { height: 250px; }
}

/* ── DARK SECTIONS ── */
.section-dark {
  background: linear-gradient(135deg, var(--ev-navy-deep) 0%, #15344e 100%);
  color: var(--white);
}
.section-dark .section-tag { color: var(--ev-solar); }
.section-dark h2 { color: var(--white); }
.section-dark .section-lead { color: rgba(255,255,255,0.6); }

/* ── CLOUD SECTIONS ── */
.section-cloud {
  background: var(--cloud);
}

/* ── PROCESS / TIMELINE ── */
.process-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  margin-top: 48px;
}
.process-step {
  text-align: center;
  position: relative;
}
.process-num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--ev-solar);
  margin-bottom: 12px;
}
.process-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  background: var(--ev-solar-wash);
  color: var(--ev-solar);
}
.process-step:nth-child(even) .process-icon {
  background: var(--ev-navy-10);
  color: var(--ev-navy);
}
.process-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}
.process-desc {
  font-size: 12px;
  color: var(--stone);
  line-height: 1.5;
}

/* ── SERVICE CARDS ── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.service-card {
  background: var(--white);
  border-radius: var(--r-xl);
  border: 1px solid var(--mist);
  padding: 36px;
  transition: all 0.3s ease;
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.service-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.service-card h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-bottom: 8px;
}
.service-card p {
  font-size: 14px;
  color: var(--graphite);
  line-height: 1.65;
  margin-bottom: 16px;
}
.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.service-tag {
  padding: 4px 10px;
  border-radius: 20px;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 600;
  background: var(--cloud);
  color: var(--stone);
}

/* ── STATS ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  text-align: center;
  padding: 20px 0;
}
.stat-value {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -2px;
  color: var(--white);
  line-height: 1;
  margin-bottom: 8px;
}
.stat-value .unit {
  font-size: 24px;
  font-weight: 600;
  opacity: 0.7;
}
.stat-label {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  font-weight: 500;
}

/* ── PARTNER BANNER ── */
.partner-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--paper);
  border: 1px solid var(--mist);
  border-radius: var(--r-xl);
  padding: 36px 44px;
  gap: 32px;
}
.partner-info h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}
.partner-info p {
  font-size: 14px;
  color: var(--graphite);
  line-height: 1.6;
  max-width: 500px;
}
.partner-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  background: var(--ev-navy-10);
  border-radius: var(--r-lg);
  flex-shrink: 0;
}
.partner-badge-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  color: var(--ev-navy);
  letter-spacing: -0.5px;
}
.partner-badge-role {
  font-size: 11px;
  color: var(--stone);
}

/* ── ETOI PARTNER CARD ── */
.etoi-partner-card {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 36px 48px;
  background: var(--white);
  border: 1px solid var(--mist);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s;
}
.etoi-partner-card:hover {
  box-shadow: var(--shadow-md);
}
.etoi-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}
.etoi-logo-wrap img {
  height: 220px;
  width: auto;
}
.etoi-partner-label {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--stone);
}

/* ── PROJECT PREVIEW CARDS ── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}
.project-card {
  border-radius: var(--r-xl);
  overflow: hidden;
  border: 1px solid var(--mist);
  transition: all 0.3s ease;
  background: var(--white);
}
.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.project-img {
  height: 200px;
  background: linear-gradient(135deg, var(--ev-navy) 0%, #2a5a8a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.project-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.project-card:hover .project-img img,
.ref-card:hover .ref-card-img img {
  transform: scale(1.05);
}
.project-img-placeholder {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.3);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.ref-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.project-img .project-type-badge,
.ref-card-img .project-type-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 12px;
  border-radius: 20px;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 600;
  background: rgba(255,255,255,0.15);
  color: var(--white);
  backdrop-filter: blur(8px);
  z-index: 2;
}
.project-body {
  padding: 24px;
}
.project-body h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-bottom: 8px;
}
.project-meta {
  display: flex;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--stone);
}
.project-meta strong {
  color: var(--ev-navy);
}

/* ── CTA SECTION ── */
.cta-section {
  text-align: center;
  padding: 80px 48px;
}
.cta-section h2 {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -1.5px;
  margin-bottom: 8px;
}
.cta-section .tagline {
  font-size: 18px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 32px;
}
.cta-section .hero-ctas {
  justify-content: center;
}

/* ── FOOTER ── */
.site-footer {
  border-top: 1px solid var(--mist);
  padding: 48px;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
}
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-tagline {
  font-size: 12px;
  color: var(--stone);
  max-width: 240px;
  line-height: 1.6;
}
.footer-col h4 {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 16px;
}
.footer-col a,
.footer-col p {
  display: block;
  font-size: 13px;
  color: var(--graphite);
  line-height: 1.8;
}
.footer-col a:hover { color: var(--ev-solar); }
.footer-bottom {
  max-width: 1100px;
  margin: 32px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--cloud);
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--silver);
}

/* ── SCROLL ANIMATIONS ── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ── HERO ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-tag       { animation: fadeUp 0.7s ease both; }
.hero-logo      { animation: fadeUp 0.7s ease 0.05s both; }
.hero h1        { animation: fadeUp 0.7s ease 0.1s both; }
.hero-tagline   { animation: fadeUp 0.7s ease 0.15s both; }
.hero-sub       { animation: fadeUp 0.7s ease 0.2s both; }
.hero-ctas      { animation: fadeUp 0.7s ease 0.3s both; }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .process-grid { grid-template-columns: repeat(3, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
}

@media (max-width: 768px) {
  .site-nav { padding: 12px 24px; }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }

  .hero { padding: 100px 24px 60px; min-height: 90vh; }
  .hero h1 { font-size: 36px; letter-spacing: -1.5px; }
  .hero-tagline { font-size: 18px; }
  .hero-sub { font-size: 14px; }
  .hero-ctas { flex-direction: column; align-items: center; }

  .section { padding: 60px 24px; }
  .section h2 { font-size: 28px; }

  .process-grid { grid-template-columns: repeat(2, 1fr); }
  .services-grid { grid-template-columns: 1fr; }
  .projects-grid, .refs-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }

  .partner-banner { flex-direction: column; text-align: center; padding: 28px; }
  .partner-info p { max-width: 100%; }

  .footer-inner { flex-direction: column; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 28px; }
  .process-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat-value { font-size: 36px; }
}

/* ══ REFERENCES PAGE ══ */
.page-header {
  padding: 140px 48px 60px;
  text-align: center;
  background: var(--cloud);
}
.page-header h1 {
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -2px;
  margin-bottom: 12px;
}
.page-header p {
  font-size: 16px;
  color: var(--graphite);
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.7;
}
.refs-filter {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.filter-btn {
  padding: 8px 18px;
  border-radius: 20px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--mist);
  background: var(--white);
  color: var(--stone);
  cursor: pointer;
  transition: all 0.2s;
}
.filter-btn:hover,
.filter-btn.active {
  background: var(--ev-navy);
  color: var(--white);
  border-color: var(--ev-navy);
}

.refs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
@media (max-width: 768px) {
  .refs-grid { grid-template-columns: 1fr; }
}

/* Reference detail card */
.ref-card {
  border-radius: var(--r-xl);
  overflow: hidden;
  border: 1px solid var(--mist);
  background: var(--white);
  transition: all 0.3s;
}
.ref-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.ref-card-img {
  height: 220px;
  background: linear-gradient(135deg, var(--ev-navy) 0%, #2a5a8a 100%);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ref-card-body {
  padding: 28px;
}
.ref-card-body h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 12px;
}
.ref-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}
.ref-spec {
  font-size: 12px;
  color: var(--stone);
}
.ref-spec strong {
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 13px;
}
.ref-role {
  padding: 8px 14px;
  background: var(--ev-solar-wash);
  border-radius: var(--r-sm);
  font-size: 12px;
  color: var(--ev-solar-deep);
  font-weight: 600;
  font-family: var(--font-display);
}

/* ══ CONTACT PAGE ══ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.form-group label {
  display: block;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  color: var(--graphite);
  margin-bottom: 6px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--mist);
  border-radius: var(--r-md);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink);
  transition: border-color 0.2s;
  background: var(--white);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--ev-solar);
  box-shadow: 0 0 0 3px var(--ev-solar-15);
}
.form-group textarea {
  min-height: 120px;
  resize: vertical;
}
.contact-info-card {
  background: var(--cloud);
  border-radius: var(--r-xl);
  padding: 36px;
}
.contact-info-card h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 24px;
}
.contact-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 20px;
}
.contact-item-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
  background: var(--ev-solar-wash);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--ev-solar);
}
.contact-item-text strong {
  display: block;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 2px;
}
.contact-item-text span {
  font-size: 13px;
  color: var(--graphite);
}
.contact-item-text a {
  color: var(--ev-navy);
  font-weight: 500;
}
.contact-item-text a:hover { color: var(--ev-solar); }

@media (max-width: 768px) {
  .contact-grid { grid-template-columns: 1fr; }
  .page-header { padding: 120px 24px 40px; }
  .page-header h1 { font-size: 32px; }
}

/* ══ DARK MODE ══ */
[data-theme="dark"] {
  /* Surfaces — lighter for better contrast */
  --white: #0F1D2E;
  --paper: #142435;
  --cloud: #1A2D42;
  --mist: #243A52;

  /* Textes — brighter for readability */
  --ink: #EDF0F4;
  --graphite: #C5CED8;
  --stone: #8D9DAD;
  --silver: #4A5E70;

  /* Primaires — brighter navy, bolder solar */
  --ev-navy: #7EC4F0;
  --ev-navy-deep: #1B3A5C;
  --ev-navy-10: rgba(126,196,240,0.15);

  /* Solar — boosted for dark backgrounds */
  --ev-solar: #F9962E;
  --ev-solar-deep: #F08A2E;
  --ev-solar-wash: rgba(232,121,29,0.12);
  --ev-solar-15: rgba(232,121,29,0.15);

  /* Functional */
  --ev-sky: #6BB3E0;
  --ev-sky-wash: rgba(74,159,217,0.12);
  --ev-green: #4BC882;
  --ev-green-wash: rgba(46,166,106,0.12);

  /* Ombres */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.25);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.30);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.35);
}

/* Dark mode specific overrides */
[data-theme="dark"] body { background: #0D1B2A; }

[data-theme="dark"] .site-nav {
  background: rgba(13,27,42,0.85);
  border-bottom-color: var(--mist);
}

[data-theme="dark"] .section-dark {
  background: linear-gradient(135deg, #091420 0%, #0D1E30 100%);
}
[data-theme="dark"] .section-dark h2 { color: #EDF0F4; }
[data-theme="dark"] .section-dark .section-lead { color: rgba(237,240,244,0.65); }
[data-theme="dark"] .section-dark .section-tag { color: #F9962E; }

/* Stats in dark mode — high contrast */
[data-theme="dark"] .stat-value { color: #EDF0F4; }
[data-theme="dark"] .stat-value .unit { color: rgba(237,240,244,0.6); }
[data-theme="dark"] .stat-label { color: rgba(237,240,244,0.55); }

/* Section headings, process, general text */
[data-theme="dark"] h2 { color: #EDF0F4; }
[data-theme="dark"] .section-tag { color: var(--ev-solar); }
[data-theme="dark"] .process-title { color: #C5CED8; }
[data-theme="dark"] .process-desc { color: #8D9DAD; }
[data-theme="dark"] .accent { color: var(--ev-solar); }

/* Footer */
[data-theme="dark"] .site-footer { background: #080F19; border-top: 1px solid #1A2D42; }
[data-theme="dark"] .footer-tagline { color: #8D9DAD; }
[data-theme="dark"] .footer-col a { color: #8D9DAD; }
[data-theme="dark"] .footer-col a:hover { color: #F9962E; }
[data-theme="dark"] .footer-bottom { border-top-color: #1A2D42; color: #4A5E70; }

/* CTA section */
[data-theme="dark"] .cta-section h2 { color: #EDF0F4; }
[data-theme="dark"] .cta-section .tagline { color: rgba(237,240,244,0.65); }

/* Buttons on dark sections in dark mode */
[data-theme="dark"] .btn-secondary.on-dark {
  color: #EDF0F4;
  border-color: rgba(237,240,244,0.35);
}
[data-theme="dark"] .btn-secondary.on-dark:hover {
  background: rgba(237,240,244,0.1);
  border-color: rgba(237,240,244,0.5);
}
[data-theme="dark"] .section-dark .btn-primary.solar {
  color: #0F1D2E;
}

/* Hero buttons in dark mode */
[data-theme="dark"] .hero.has-photo .btn-secondary {
  color: #EDF0F4;
  border-color: rgba(237,240,244,0.35);
}
[data-theme="dark"] .hero.has-photo .btn-secondary:hover {
  background: rgba(237,240,244,0.1);
}

[data-theme="dark"] .hero-overlay {
  background: linear-gradient(180deg, rgba(13,27,42,0.5) 0%, rgba(13,27,42,0.7) 100%);
}

[data-theme="dark"] .photo-break-overlay {
  background: linear-gradient(180deg, rgba(13,27,42,0.3) 0%, rgba(13,27,42,0.2) 50%, rgba(13,27,42,0.4) 100%);
}

[data-theme="dark"] .ref-card,
[data-theme="dark"] .project-card {
  border-color: var(--mist);
}

[data-theme="dark"] .filter-btn {
  border-color: var(--mist);
  background: var(--paper);
  color: var(--stone);
}

[data-theme="dark"] .filter-btn:hover,
[data-theme="dark"] .filter-btn.active {
  background: var(--ev-navy);
  color: #0D1B2A;
  border-color: var(--ev-navy);
}

[data-theme="dark"] .nav-mobile {
  background: #0D1B2A;
}

[data-theme="dark"] .cookie-banner {
  background: #060E18;
  border-top: 1px solid var(--mist);
}

[data-theme="dark"] .etoi-partner-card {
  background: var(--paper);
  border-color: var(--mist);
}

/* Dark mode EV wordmark colors */
[data-theme="dark"] .wm .ev { color: #7EC4F0; }
[data-theme="dark"] .wm .sol { color: #F9962E; }

/* Inputs in dark mode */
[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
  background: var(--paper);
  border-color: var(--mist);
  color: var(--ink);
}

/* Theme toggle button */
.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: var(--stone);
  display: flex;
  align-items: center;
  transition: color 0.2s;
}
.theme-toggle:hover { color: var(--ev-solar); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-moon { display: block; }
.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }

/* ── LANGUAGE TOGGLE ── */
.nav-lang {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--stone);
  text-decoration: none;
  padding: 4px 10px;
  border: 1px solid var(--mist);
  border-radius: 14px;
  transition: all 0.2s;
}
.nav-lang:hover {
  color: var(--ev-navy);
  border-color: var(--ev-navy);
}

/* ══ COOKIE BANNER ══ */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: var(--ev-navy-deep);
  color: var(--silver);
  padding: 20px 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.6;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
  transform: translateY(100%);
  transition: transform 0.4s ease;
}
.cookie-banner.visible { transform: translateY(0); }
.cookie-banner.hidden { display: none; }
.cookie-text { max-width: 600px; }
.cookie-text a { color: var(--ev-solar); text-decoration: underline; }
.cookie-btns { display: flex; gap: 10px; flex-shrink: 0; }
.cookie-accept {
  padding: 8px 20px;
  border: none;
  border-radius: 20px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  background: var(--ev-solar);
  color: var(--white);
  transition: background 0.2s;
}
.cookie-accept:hover { background: var(--ev-solar-deep); }
.cookie-refuse {
  padding: 8px 20px;
  border: 1px solid var(--stone);
  border-radius: 20px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  color: var(--silver);
  transition: all 0.2s;
}
.cookie-refuse:hover { border-color: var(--white); color: var(--white); }

@media (max-width: 768px) {
  .cookie-banner {
    flex-direction: column;
    text-align: center;
    padding: 16px 20px;
    gap: 12px;
  }
}

/* ══ ACCESSIBILITY ══ */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--ev-navy);
  color: var(--white);
  padding: 8px 16px;
  border-radius: var(--r-md);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  z-index: 10000;
  transition: top 0.2s;
}
.skip-link:focus { top: 16px; }

*:focus-visible {
  outline: 2px solid var(--ev-solar);
  outline-offset: 2px;
}

/* ══ PREFERS REDUCED MOTION ══ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .hero-bg { transform: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
