:root {
  /* Primitive Color Tokens */
  --color-white: rgba(255, 255, 255, 1);
  --color-black: rgba(0, 0, 0, 1);
  --color-cream-50: rgba(252, 252, 249, 1);
  --color-cream-100: rgba(255, 255, 253, 1);
  --color-gray-200: rgba(245, 245, 245, 1);
  --color-gray-300: rgba(167, 169, 169, 1);
  --color-gray-400: rgba(119, 124, 124, 1);
  --color-slate-500: rgba(98, 108, 113, 1);
  --color-brown-600: rgba(94, 82, 64, 1);
  --color-charcoal-700: rgba(31, 33, 33, 1);
  --color-charcoal-800: rgba(38, 40, 40, 1);
  --color-slate-900: rgba(19, 52, 59, 1);
  --color-teal-300: rgba(50, 184, 198, 1);
  --color-teal-400: rgba(45, 166, 178, 1);
  --color-teal-500: rgba(33, 128, 141, 1);
  --color-teal-600: rgba(29, 116, 128, 1);
  --color-teal-700: rgba(26, 104, 115, 1);
  --color-teal-800: rgba(41, 150, 161, 1);
  --color-red-400: rgba(255, 84, 89, 1);
  --color-red-500: rgba(192, 21, 47, 1);
  --color-orange-400: rgba(230, 129, 97, 1);
  --color-orange-500: rgba(168, 75, 47, 1);

  /* RGB versions for opacity control */
  --color-brown-600-rgb: 94, 82, 64;
  --color-teal-500-rgb: 33, 128, 141;
  --color-slate-900-rgb: 19, 52, 59;
  --color-slate-500-rgb: 98, 108, 113;
  --color-red-500-rgb: 192, 21, 47;
  --color-red-400-rgb: 255, 84, 89;
  --color-orange-500-rgb: 168, 75, 47;
  --color-orange-400-rgb: 230, 129, 97;

  /* Background color tokens (Light Mode) */
  --color-bg-1: rgba(59, 130, 246, 0.08); /* Light blue */
  --color-bg-2: rgba(245, 158, 11, 0.08); /* Light yellow */
  --color-bg-3: rgba(34, 197, 94, 0.08); /* Light green */
  --color-bg-4: rgba(239, 68, 68, 0.08); /* Light red */
  --color-bg-5: rgba(147, 51, 234, 0.08); /* Light purple */
  --color-bg-6: rgba(249, 115, 22, 0.08); /* Light orange */
  --color-bg-7: rgba(236, 72, 153, 0.08); /* Light pink */
  --color-bg-8: rgba(6, 182, 212, 0.08); /* Light cyan */

  /* Semantic Color Tokens (Light Mode) */
  --color-background: var(--color-cream-50);
  --color-surface: var(--color-cream-100);
  --color-text: var(--color-slate-900);
  --color-text-secondary: var(--color-slate-500);
  --color-primary: var(--color-teal-500);
  --color-primary-hover: var(--color-teal-600);
  --color-primary-active: var(--color-teal-700);
  --color-secondary: rgba(var(--color-brown-600-rgb), 0.12);
  --color-secondary-hover: rgba(var(--color-brown-600-rgb), 0.2);
  --color-secondary-active: rgba(var(--color-brown-600-rgb), 0.25);
  --color-border: rgba(var(--color-brown-600-rgb), 0.2);
  --color-btn-primary-text: var(--color-cream-50);
  --color-card-border: rgba(var(--color-brown-600-rgb), 0.12);
  --color-card-border-inner: rgba(var(--color-brown-600-rgb), 0.12);
  --color-error: var(--color-red-500);
  --color-success: var(--color-teal-500);
  --color-warning: var(--color-orange-500);
  --color-info: var(--color-slate-500);
  --color-focus-ring: rgba(var(--color-teal-500-rgb), 0.4);
  --color-select-caret: rgba(var(--color-slate-900-rgb), 0.8);

  /* Common style patterns */
  --focus-ring: 0 0 0 3px var(--color-focus-ring);
  --focus-outline: 2px solid var(--color-primary);
  --status-bg-opacity: 0.15;
  --status-border-opacity: 0.25;
  --select-caret-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23134252' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  --select-caret-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23f5f5f5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");

  /* RGB versions for opacity control */
  --color-success-rgb: 33, 128, 141;
  --color-error-rgb: 192, 21, 47;
  --color-warning-rgb: 168, 75, 47;
  --color-info-rgb: 98, 108, 113;

  /* Typography */
  --font-family-base: "FKGroteskNeue", "Geist", "Inter", -apple-system,
    BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-family-mono: "Berkeley Mono", ui-monospace, SFMono-Regular, Menlo,
    Monaco, Consolas, monospace;
  --font-size-xs: 0.6875rem;
  --font-size-sm: 0.75rem;
  --font-size-base: 0.875rem;
  --font-size-md: 0.875rem;
  --font-size-lg: 1rem;
  --font-size-xl: 1.125rem;
  --font-size-2xl: 1.25rem;
  --font-size-3xl: 1.5rem;
  --font-size-4xl: 1.875rem;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 550;
  --font-weight-bold: 600;
  --line-height-tight: 1.2;
  --line-height-normal: 1.5;
  --letter-spacing-tight: -0.01em;

  /* Spacing */
  --space-0: 0;
  --space-1: 1px;
  --space-2: 2px;
  --space-4: 4px;
  --space-6: 6px;
  --space-8: 8px;
  --space-10: 10px;
  --space-12: 12px;
  --space-16: 16px;
  --space-20: 20px;
  --space-24: 24px;
  --space-32: 32px;

  /* Border Radius */
  --radius-sm: 6px;
  --radius-base: 8px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.02);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.04),
    0 2px 4px -1px rgba(0, 0, 0, 0.02);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.04),
    0 4px 6px -2px rgba(0, 0, 0, 0.02);
  --shadow-inset-sm: inset 0 1px 0 rgba(255, 255, 255, 0.15),
    inset 0 -1px 0 rgba(0, 0, 0, 0.03);

  /* Animation */
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --ease-standard: cubic-bezier(0.16, 1, 0.3, 1);

  /* Layout */
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1280px;

  /* Custom gradients for Karuk IA */
  --karuk-primary: #2B7CEE;
  --karuk-secondary: #926CE0;
  --gradient-primary: linear-gradient(135deg, #2B7CEE 0%, #926CE0 100%);
  --gradient-secondary: linear-gradient(135deg, #2B7CEE 0%, #926CE0 50%, #2B7CEE 100%);
  --gradient-accent: linear-gradient(135deg, #2B7CEE 0%, #926CE0 100%);
  --gradient-ai: linear-gradient(45deg, #2B7CEE 0%, #926CE0 30%, #2B7CEE 60%, #926CE0 100%);
  --shadow-ai: 0 8px 32px rgba(43, 124, 238, 0.3);
  --glow-primary: 0 0 20px rgba(43, 124, 238, 0.4);
  --glow-secondary: 0 0 20px rgba(146, 108, 224, 0.4);
}

/* Dark mode colors */
@media (prefers-color-scheme: dark) {
  :root {
    /* RGB versions for opacity control (Dark Mode) */
    --color-gray-400-rgb: 119, 124, 124;
    --color-teal-300-rgb: 50, 184, 198;
    --color-gray-300-rgb: 167, 169, 169;
    --color-gray-200-rgb: 245, 245, 245;

    /* Background color tokens (Dark Mode) */
    --color-bg-1: rgba(29, 78, 216, 0.15); /* Dark blue */
    --color-bg-2: rgba(180, 83, 9, 0.15); /* Dark yellow */
    --color-bg-3: rgba(21, 128, 61, 0.15); /* Dark green */
    --color-bg-4: rgba(185, 28, 28, 0.15); /* Dark red */
    --color-bg-5: rgba(107, 33, 168, 0.15); /* Dark purple */
    --color-bg-6: rgba(194, 65, 12, 0.15); /* Dark orange */
    --color-bg-7: rgba(190, 24, 93, 0.15); /* Dark pink */
    --color-bg-8: rgba(8, 145, 178, 0.15); /* Dark cyan */

    /* Semantic Color Tokens (Dark Mode) */
    --color-background: var(--color-charcoal-700);
    --color-surface: var(--color-charcoal-800);
    --color-text: var(--color-gray-200);
    --color-text-secondary: rgba(var(--color-gray-300-rgb), 0.7);
    --color-primary: var(--color-teal-300);
    --color-primary-hover: var(--color-teal-400);
    --color-primary-active: var(--color-teal-800);
    --color-secondary: rgba(var(--color-gray-400-rgb), 0.15);
    --color-secondary-hover: rgba(var(--color-gray-400-rgb), 0.25);
    --color-secondary-active: rgba(var(--color-gray-400-rgb), 0.3);
    --color-border: rgba(var(--color-gray-400-rgb), 0.3);
    --color-error: var(--color-red-400);
    --color-success: var(--color-teal-300);
    --color-warning: var(--color-orange-400);
    --color-info: var(--color-gray-300);
    --color-focus-ring: rgba(var(--color-teal-300-rgb), 0.4);
    --color-btn-primary-text: var(--color-slate-900);
    --color-card-border: rgba(var(--color-gray-400-rgb), 0.2);
    --color-card-border-inner: rgba(var(--color-gray-400-rgb), 0.15);
    --shadow-inset-sm: inset 0 1px 0 rgba(255, 255, 255, 0.1),
      inset 0 -1px 0 rgba(0, 0, 0, 0.15);
    --button-border-secondary: rgba(var(--color-gray-400-rgb), 0.2);
    --color-border-secondary: rgba(var(--color-gray-400-rgb), 0.2);
    --color-select-caret: rgba(var(--color-gray-200-rgb), 0.8);

    /* Common style patterns - updated for dark mode */
    --focus-ring: 0 0 0 3px var(--color-focus-ring);
    --focus-outline: 2px solid var(--color-primary);
    --status-bg-opacity: 0.15;
    --status-border-opacity: 0.25;
    --select-caret-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23134252' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    --select-caret-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23f5f5f5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");

    /* RGB versions for dark mode */
    --color-success-rgb: var(--color-teal-300-rgb);
    --color-error-rgb: var(--color-red-400-rgb);
    --color-warning-rgb: var(--color-orange-400-rgb);
    --color-info-rgb: var(--color-gray-300-rgb);
  }

  /* Dark mode select options */
  .ai-form .form-control option {
    background: rgba(15, 23, 42, 0.95);
    color: var(--color-gray-200);
  }
}

/* Base styles */
html {
  font-size: var(--font-size-base);
  font-family: var(--font-family-base);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  background-color: var(--color-background);
  -webkit-font-smoothing: antialiased;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-tight);
  color: var(--color-text);
  letter-spacing: var(--letter-spacing-tight);
}

h1 {
  font-size: var(--font-size-4xl);
}
h2 {
  font-size: var(--font-size-3xl);
}
h3 {
  font-size: var(--font-size-2xl);
}
h4 {
  font-size: var(--font-size-xl);
}
h5 {
  font-size: var(--font-size-lg);
}
h6 {
  font-size: var(--font-size-md);
}

p {
  margin: 0 0 var(--space-16) 0;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-standard);
}

a:hover {
  color: var(--color-primary-hover);
}

/* Custom styles for Karuk IA */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  background: var(--color-bg-1);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(43, 124, 238, 0.2);
  z-index: 1000;
  padding: var(--space-4) 0;
  box-shadow: 0 4px 20px rgba(43, 124, 238, 0.1), 0 2px 8px rgba(19, 52, 59, 0.3);
}

.header-content {
  max-width: var(--container-xl);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-24);
  position: relative;
}

/* Mobile menu button - Burger moderne */
.menu-toggle {
  display: none;
  background: rgba(43, 124, 238, 0.1);
  border: 1px solid rgba(43, 124, 238, 0.2);
  border-radius: var(--radius-base);
  cursor: pointer;
  padding: var(--space-10);
  width: 44px;
  height: 44px;
  position: relative;
  z-index: 1001;
  transition: all var(--duration-fast) var(--ease-standard);
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}

.menu-toggle:hover {
  background: var(--gradient-primary);
  border-color: transparent;
  box-shadow: var(--glow-primary);
}

.menu-toggle:active {
  transform: scale(0.95);
}

.burger-icon {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 24px;
  height: 18px;
  position: relative;
}

.burger-icon span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: all var(--duration-normal) var(--ease-standard);
  transform-origin: center;
}

.menu-toggle:hover .burger-icon span {
  background: white;
}

/* Animation burger vers X */
.menu-toggle.active .burger-icon span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.menu-toggle.active .burger-icon span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.menu-toggle.active .burger-icon span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Styles pour la compatibilité touch iOS */
.menu-toggle, .mobile-menu-btn {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
  cursor: pointer;
}
.mobile-menu {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.mobile-menu .nav a {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* Mobile menu overlay */
/* Menu mobile - Mode CLAIR par défaut */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  width: min(320px, 85vw);
  height: 100vh;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  z-index: 1000;
  padding: var(--space-24);
  padding-top: calc(var(--space-24) + 60px);
  box-shadow: -10px 0 40px rgba(43, 124, 238, 0.15);
  border-left: 1px solid rgba(43, 124, 238, 0.25);
  transform: translateX(100%);
  transition: transform var(--duration-normal) var(--ease-standard);
  overflow-y: auto;
}

/* Dark mode pour le menu mobile */
@media (prefers-color-scheme: dark) {
  .mobile-menu {
    background: rgba(31, 33, 33, 0.98);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
    border-left-color: rgba(43, 124, 238, 0.3);
  }
  
  .mobile-menu .nav a {
    background: rgba(43, 124, 238, 0.15);
    border-color: rgba(43, 124, 238, 0.3);
    color: var(--color-gray-200);
  }
  
  .mobile-menu .nav a:hover {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
  }
  
  .mobile-menu .close-btn {
    background: rgba(43, 124, 238, 0.15);
    border-color: rgba(43, 124, 238, 0.3);
    color: var(--color-gray-200);
  }
  
  .mobile-menu .close-btn:hover {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
  }
}

.mobile-menu.active {
  display: block;
  transform: translateX(0);
}

.mobile-menu .nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
  margin-top: var(--space-32);
}

.mobile-menu .nav a {
  font-size: var(--font-size-lg);
  padding: var(--space-12) var(--space-16);
  border-radius: var(--radius-base);
  background: rgba(43, 124, 238, 0.08);
  border: 1px solid rgba(43, 124, 238, 0.2);
  color: var(--color-text);
  text-decoration: none;
  transition: all var(--duration-fast) var(--ease-standard);
  font-weight: var(--font-weight-medium);
}

.mobile-menu .nav a:hover {
  background: var(--gradient-primary);
  color: white;
  transform: translateX(-4px);
  box-shadow: var(--glow-primary);
  border-color: transparent;
}

.mobile-menu .close-btn {
  position: absolute;
  top: var(--space-16);
  right: var(--space-16);
  background: rgba(43, 124, 238, 0.1);
  border: 1px solid rgba(43, 124, 238, 0.2);
  color: var(--color-text);
  font-size: 1.5rem;
  font-weight: 300;
  cursor: pointer;
  padding: 0;
  border-radius: var(--radius-base);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--duration-fast) var(--ease-standard);
  line-height: 1;
}

.mobile-menu .close-btn:hover {
  background: var(--gradient-primary);
  color: white;
  border-color: transparent;
  transform: scale(1.05);
  box-shadow: var(--glow-primary);
}

.logo-section {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.logo-placeholder {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-base);
  object-fit: contain;
}

.company-logo {
  display: none;
}

.company-name {
  font-size: var(--font-size-xl);
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav {
  display: flex;
  gap: var(--space-32);
}

.nav a {
  color: var(--color-text);
  font-weight: var(--font-weight-medium);
  transition: all var(--duration-fast) var(--ease-standard);
  padding: var(--space-8) var(--space-16);
  position: relative;
  border-radius: var(--radius-base);
  backdrop-filter: blur(10px);
}

.nav a:hover {
  color: white;
  background: var(--gradient-primary);
  box-shadow: var(--glow-primary);
  transform: translateY(-2px);
}

.nav a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: width var(--duration-normal) var(--ease-standard);
}

.nav a:hover::after {
  width: 80%;
}

.hero {
  padding: 0;
  margin-top: 60px; /* Commence sous le header fixe (header plus compact) */
  min-height: calc(100vh - 60px); /* Hauteur minimale pour couvrir l'écran moins le header */
  background: var(--color-bg-1); /* Même fond que la section "Nos Réalisations" */
  text-align: center;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: min-height 1.5s var(--ease-standard);
}

/* Réduire la hauteur du hero après la disparition de la vidéo */
.hero.video-ended {
  min-height: calc(50vh - 30px); /* 2 fois moins de hauteur */
}

/* Visuel technologique abstrait en arrière-plan (derrière la vidéo) */
.hero-visual {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.8;
}

/* Circuits électroniques modernes - Lignes fines */
.code-lines {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0.4;
  background-image: 
    /* Pistes horizontales fines */
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 60px,
      rgba(43, 124, 238, 0.4) 60px,
      rgba(43, 124, 238, 0.4) 61px,
      transparent 61px,
      transparent 120px
    ),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 90px,
      rgba(146, 108, 224, 0.35) 90px,
      rgba(146, 108, 224, 0.35) 91px,
      transparent 91px,
      transparent 180px
    ),
    /* Pistes verticales fines */
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 80px,
      rgba(43, 124, 238, 0.4) 80px,
      rgba(43, 124, 238, 0.4) 81px,
      transparent 81px,
      transparent 160px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 110px,
      rgba(146, 108, 224, 0.35) 110px,
      rgba(146, 108, 224, 0.35) 111px,
      transparent 111px,
      transparent 220px
    );
  background-size: 100% 100%;
  animation: circuitFlow 20s linear infinite;
}

@keyframes circuitFlow {
  0% { 
    background-position: 0 0, 0 0, 0 0, 0 0;
    opacity: 0.3;
  }
  50% { 
    background-position: 0 20px, 0 30px, 20px 0, 30px 0;
    opacity: 0.5;
  }
  100% { 
    background-position: 0 40px, 0 60px, 40px 0, 60px 0;
    opacity: 0.3;
  }
}

/* Optimisation GPU pour animations */
.code-lines {
  will-change: background-position, opacity;
  transform: translateZ(0); /* Force GPU acceleration */
}

.tech-grid {
  will-change: contents;
  transform: translateZ(0); /* Force GPU acceleration */
}

/* Nœuds de connexion aux intersections - DÉSACTIVÉS (remplacés par le canvas) */
.cloud-architecture {
  display: none; /* Désactivé car remplacé par le système de points dynamiques */
}

/* Canvas pour les points qui se connectent dynamiquement */
.tech-grid {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 1;
}

#circuitCanvas {
  width: 100%;
  height: 100%;
  display: block;
  will-change: contents; /* Optimisation GPU */
  transform: translateZ(0); /* Force GPU acceleration */
}

/* Intro video overlay for hero */
.hero-video-overlay {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  z-index: 3; /* Au-dessus du visuel technologique ET du contenu */
  opacity: 1;
  transition: opacity 1.5s var(--ease-standard);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(107, 114, 128, 0.1) 0%, rgba(75, 85, 99, 0.05) 100%);
  overflow: hidden;
}

.hero-video-overlay.fade-out {
  opacity: 0;
  visibility: hidden;
}

.hero-video-overlay .hero-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

.hero-video-overlay img.hero-media {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 400ms var(--ease-standard);
}

.hero-video-overlay::after {
  content: none !important;
  background: none !important;
}

/* Override for Dark Mode */
@media (prefers-color-scheme: dark) {
  .hero {
    background: var(--color-bg-1); /* Même fond que la section "Nos Réalisations" en dark mode */
  }
  
  .hero-video-overlay {
    background-color: #232428;
  }
  
  .hero-video-overlay::after { 
    content: none !important; 
    background: none !important; 
  }
  
  .hero-visual {
    opacity: 0.7;
  }

  .code-lines {
    background-image: 
      /* Pistes fines en dark mode avec teal */
      repeating-linear-gradient(
        0deg,
        transparent,
        transparent 60px,
        rgba(50, 184, 198, 0.45) 60px,
        rgba(50, 184, 198, 0.45) 61px,
        transparent 61px,
        transparent 120px
      ),
      repeating-linear-gradient(
        0deg,
        transparent,
        transparent 90px,
        rgba(146, 108, 224, 0.4) 90px,
        rgba(146, 108, 224, 0.4) 91px,
        transparent 91px,
        transparent 180px
      ),
      repeating-linear-gradient(
        90deg,
        transparent,
        transparent 80px,
        rgba(50, 184, 198, 0.45) 80px,
        rgba(50, 184, 198, 0.45) 81px,
        transparent 81px,
        transparent 160px
      ),
      repeating-linear-gradient(
        90deg,
        transparent,
        transparent 110px,
        rgba(146, 108, 224, 0.4) 110px,
        rgba(146, 108, 224, 0.4) 111px,
        transparent 111px,
        transparent 220px
      );
    opacity: 0.35;
  }

  .cloud-architecture {
    background-image: 
      radial-gradient(circle at 20% 30%, rgba(50, 184, 198, 0.7) 0%, rgba(50, 184, 198, 0.35) 2px, transparent 4px),
      radial-gradient(circle at 80% 70%, rgba(146, 108, 224, 0.7) 0%, rgba(146, 108, 224, 0.35) 2px, transparent 4px),
      radial-gradient(circle at 50% 50%, rgba(50, 184, 198, 0.6) 0%, rgba(50, 184, 198, 0.3) 2.5px, transparent 5px),
      radial-gradient(circle at 15% 75%, rgba(146, 108, 224, 0.6) 0%, rgba(146, 108, 224, 0.3) 2px, transparent 4px),
      radial-gradient(circle at 85% 25%, rgba(50, 184, 198, 0.6) 0%, rgba(50, 184, 198, 0.3) 2px, transparent 4px),
      radial-gradient(circle at 35% 60%, rgba(146, 108, 224, 0.5) 0%, rgba(146, 108, 224, 0.25) 2px, transparent 4px),
      radial-gradient(circle at 65% 40%, rgba(50, 184, 198, 0.5) 0%, rgba(50, 184, 198, 0.25) 2px, transparent 4px);
  }

  .tech-grid {
    opacity: 0.8;
  }
}

.hero-content {
  max-width: var(--container-lg);
  margin: 0 auto;
  padding: 0 var(--space-24);
}

.hero-content {
  max-width: var(--container-lg);
  margin: 0 auto;
  padding: var(--space-32) var(--space-24);
  position: relative;
  z-index: 2; /* En dessous de la vidéo, au-dessus du visuel technologique */
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: var(--space-24);
  background: var(--gradient-ai);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 300% 300%;
  animation: gradientShift 4s ease-in-out infinite;
  letter-spacing: -0.02em;
  font-weight: 700;
  line-height: 1.2;
}

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

.hero h2 {
  font-size: var(--font-size-xl);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-32);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  font-weight: var(--font-weight-normal);
  line-height: 1.6;
}

.btn-gradient {
  background: var(--gradient-primary);
  color: white;
  padding: var(--space-20) var(--space-32);
  border: none;
  border-radius: var(--radius-lg);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-standard);
  text-decoration: none;
  display: inline-block;
  box-shadow: var(--shadow-ai);
  position: relative;
  overflow: hidden;
}

.btn-gradient::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn-gradient:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(43, 124, 238, 0.4);
}

.btn-gradient:hover::before {
  left: 100%;
}

/* Rappel highlight (encadré orange + glow) */
.rappel-highlight {
  border: 2px solid var(--color-warning) !important;
  border-radius: var(--radius-base);
  padding: 6px 10px;
  display: inline-block;
  background: rgba(168, 75, 47, 0.08);
  position: relative;
  transition: all 0.3s ease;
}
.rappel-highlight:hover {
  box-shadow: 0 0 12px rgba(168, 75, 47, 0.4);
  background: rgba(168, 75, 47, 0.15);
}
/* Combinaison avec le style bouton existant */
.btn-gradient.rappel-highlight {
  background: rgba(168, 75, 47, 0.08) !important;
  color: white;
}
.btn-gradient.rappel-highlight:hover {
  background: rgba(168, 75, 47, 0.15) !important;
}

/* Light mode: assurer la même teinte orange (bord + diffusion) qu'en dark */
@media (prefers-color-scheme: light) {
  .rappel-highlight {
    border-color: rgba(168, 75, 47, 1) !important; /* cercle */
  }
  .rappel-highlight:hover {
    box-shadow: 0 0 12px rgba(168, 75, 47, 0.4); /* diffusion */
  }
}

.section {
  padding: 80px 0;
}

.section:nth-child(even) {
  background: var(--color-bg-1);
}

/* About section with gray background */
.about-section {
  background: linear-gradient(135deg, rgba(107, 114, 128, 0.1) 0%, rgba(75, 85, 99, 0.05) 100%);
}

@media (prefers-color-scheme: dark) {
  .about-section {
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.15) 0%, rgba(75, 85, 99, 0.1) 100%);
  }
}

/* Light mode - Apply gradient to cards/boxes */
.project-card,
.about-card,
.team-card,
.pricing-card,
.performance-section,
.upload-area,
.support-card,
.contact-item,
.workflow-step,
.video-card,
.stat-card,
[class*="card"] {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(245, 158, 11, 0.08)) !important;
}

/* Dark mode - keep existing solid backgrounds */
@media (prefers-color-scheme: dark) {
  .project-card,
  .about-card,
  .team-card,
  .pricing-card,
  .performance-section,
  .upload-area,
  .support-card,
  .contact-item,
  .workflow-step,
  .video-card,
  .stat-card,
  [class*="card"] {
    background: var(--color-surface) !important;
  }
}

/* Restore specific dark mode styles (cards, about, form) */
@media (prefers-color-scheme: dark) {
  /* Cards backgrounds in dark mode */
  .project-card,
  .about-card,
  .team-card,
  .innovation-card,
  .contact-card {
    background: rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(15px);
    border: 1px solid var(--color-card-border);
  }

  /* About section in dark mode */
  .about-section {
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.15) 0%, rgba(75, 85, 99, 0.1) 100%);
  }

  /* Form container in dark mode */
  .ai-form {
    background: rgba(255, 255, 255, 0.06);
  }

  /* Select in dark mode */
  .ai-form .form-control,
  .ai-form select.form-control {
    background: rgba(255, 255, 255, 0.06);
    color: var(--color-gray-200);
    border-color: rgba(var(--color-gray-400-rgb), 0.2);
  }

  /* Select options in dark mode */
  .ai-form .form-control option,
  .ai-form select.form-control option {
    background: rgba(15, 23, 42, 0.95);
    color: var(--color-gray-200);
  }

  /* Placeholder in dark mode */
  .ai-form .form-control::placeholder {
    color: var(--color-gray-400);
  }
}

.container {
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: 0 var(--space-24);
}

.section-title {
  text-align: center;
  font-size: 2.25rem;
  margin-bottom: 60px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.about-content {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-32);
  text-align: left;
}

.about-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(43, 124, 238, 0.2);
  border-radius: var(--radius-lg);
  padding: var(--space-24);
  transition: all var(--duration-normal) var(--ease-standard);
  position: relative;
  overflow: hidden;
}

.about-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
}

.about-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-ai);
  border-color: rgba(43, 124, 238, 0.4);
}

.about-card h3 {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-16);
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.about-card p {
  font-size: var(--font-size-base);
  line-height: 1.6;
  color: var(--color-text-secondary);
  margin: 0;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: var(--space-32);
  margin-top: var(--space-32);
}

.project-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(15px);
  border-radius: var(--radius-lg);
  padding: var(--space-32);
  border: 1px solid rgba(43, 124, 238, 0.2);
  box-shadow: var(--shadow-md);
  transition: all var(--duration-normal) var(--ease-standard);
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
}

.project-card::after {
  content: '';
  position: absolute;
  top: var(--space-16);
  right: var(--space-16);
  width: 40px;
  height: 40px;
  background: var(--gradient-primary);
  border-radius: 50%;
  opacity: 0.1;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-ai);
  border-color: rgba(43, 124, 238, 0.4);
}

.project-card:hover::after {
  opacity: 0.2;
  transform: scale(1.1);
}

.project-card h3 {
  font-size: var(--font-size-2xl);
  margin-bottom: var(--space-8);
}

.project-card .subtitle {
  color: var(--color-primary);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-medium);
  margin-bottom: var(--space-16);
}

.project-card p {
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.current-project {
  background: var(--gradient-secondary);
  color: white;
  text-align: center;
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}

.current-project::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="20" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="60" r="1.5" fill="rgba(255,255,255,0.1)"/><circle cx="90" cy="80" r="1" fill="rgba(255,255,255,0.1)"/></svg>');
  z-index: -1;
}

.current-project h2 {
  font-size: 2.25rem;
  margin-bottom: var(--space-16);
  color: white;
}

.current-project h3 {
  font-size: 2.25rem;
  margin-bottom: var(--space-16);
  color: white;
}

.current-project p {
  font-size: var(--font-size-lg);
  color: white;
  line-height: 1.6;
}

.current-project .subtitle {
  font-size: var(--font-size-2xl);
  margin-bottom: var(--space-24);
  opacity: 0.9;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-32);
  margin-top: var(--space-32);
}

/* Card Innovation - Format rectangulaire centré (paysage) */
.innovation-card {
  grid-column: 1 / -1; /* Prend toute la largeur de la grille */
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(15px);
  border-radius: var(--radius-lg);
  padding: var(--space-32) var(--space-32);
  border: 1px solid rgba(43, 124, 238, 0.2);
  box-shadow: var(--shadow-md);
  transition: all var(--duration-normal) var(--ease-standard);
  position: relative;
  overflow: hidden;
  text-align: left; /* Même alignement que les autres cards */
  max-width: 900px; /* Format paysage : plus large que haute mais pas toute la largeur */
  margin: 0 auto;
  margin-top: var(--space-32);
}

.innovation-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
}

.innovation-card::after {
  content: '';
  position: absolute;
  top: var(--space-16);
  right: var(--space-16);
  width: 40px;
  height: 40px;
  background: var(--gradient-primary);
  border-radius: 50%;
  opacity: 0.1;
}

.innovation-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-ai);
  border-color: rgba(43, 124, 238, 0.4);
}

.innovation-card:hover::after {
  opacity: 0.2;
  transform: scale(1.1);
}

.innovation-card h3 {
  font-size: var(--font-size-2xl);
  margin-bottom: var(--space-8);
}

.innovation-card .role {
  color: var(--color-primary);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-medium);
  margin-bottom: var(--space-16);
}

.innovation-card p {
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin: 0 0 var(--space-16) 0; /* Même espacement que les autres cards */
}

.innovation-card p:last-child {
  margin-bottom: 0;
}

.team-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(15px);
  border-radius: var(--radius-lg);
  padding: var(--space-32);
  border: 1px solid rgba(43, 124, 238, 0.2);
  box-shadow: var(--shadow-md);
  transition: all var(--duration-normal) var(--ease-standard);
  position: relative;
  overflow: hidden;
  text-align: left;
}

.team-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
}

.team-card::after {
  content: '';
  position: absolute;
  top: var(--space-16);
  right: var(--space-16);
  width: 40px;
  height: 40px;
  background: var(--gradient-primary);
  border-radius: 50%;
  opacity: 0.1;
}

/* Badge "IA" pour les cartes avec classe is-ai */
.team-card.is-ai::after {
  content: 'IA';
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: var(--font-weight-bold);
  color: var(--color-btn-primary-text);
  background: var(--gradient-primary);
  opacity: 1;
  box-shadow: 0 2px 8px rgba(43, 124, 238, 0.3);
}

.team-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-ai);
  border-color: rgba(43, 124, 238, 0.4);
}

.team-card:hover::after {
  opacity: 0.2;
  transform: scale(1.1);
}

.team-card.is-ai:hover::after {
  opacity: 1;
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(43, 124, 238, 0.4);
}

.photo-placeholder {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: var(--space-24);
  float: left;
  margin-right: var(--space-16);
}

.team-card h3 {
  font-size: var(--font-size-2xl);
  margin-bottom: var(--space-8);
}

.team-card .role {
  color: var(--color-primary);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-medium);
  margin-bottom: var(--space-16);
  /* Permet le retour à la ligne si nécessaire */
  word-wrap: break-word;
  overflow-wrap: break-word;
}

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

.contact-section {
  background: var(--color-bg-1);
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-32);
  max-width: 1200px;
  margin: 0 auto;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-24);
}

.contact-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(43, 124, 238, 0.2);
  border-radius: var(--radius-lg);
  padding: var(--space-24);
  transition: all var(--duration-normal) var(--ease-standard);
}

.contact-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-ai);
}

.contact-card h3 {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-16);
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.contact-card p {
  margin: var(--space-8) 0;
  line-height: 1.6;
}

.contact-card a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-standard);
}

.contact-card a:hover {
  color: var(--color-primary-hover);
  text-decoration: underline;
}

.ai-form {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(43, 124, 238, 0.25);
  border-radius: var(--radius-lg);
  padding: var(--space-32);
  box-shadow: var(--shadow-md);
}

/* Modern form grid */
.ai-form .form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-20) var(--space-24);
}

.ai-form .form-row-span-2 {
  grid-column: 1 / -1;
}

.ai-form .form-label {
  display: block;
  margin-bottom: var(--space-6);
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
}

.ai-form .form-control {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(43, 124, 238, 0.3);
  border-radius: var(--radius-base); /* Bords arrondis ajoutés */
  backdrop-filter: blur(10px);
  transition: all var(--duration-fast) var(--ease-standard);
  color: var(--color-text-secondary);
  padding: calc(var(--space-12) + 2px) var(--space-16); /* Hauteur augmentée de 1mm (4px) */
  min-height: calc(48px + 4px); /* Hauteur totale augmentée */
}

.ai-form .form-control:focus {
  border-color: var(--karuk-primary);
  box-shadow: var(--glow-primary);
  background: rgba(255, 255, 255, 0.15);
}

/* Select options styling - Light mode: blanc, Dark mode: override below */
.ai-form .form-control option {
  background: #ffffff;
  color: var(--color-text-secondary);
  padding: calc(var(--space-8) + 2px); /* Même hauteur que les autres champs */
}

/* Checkbox group styling */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
  padding: var(--space-16);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(43, 124, 238, 0.2);
  border-radius: var(--radius-base);
}

.checkbox-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-12);
}

.checkbox-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--karuk-primary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  flex-shrink: 0;
}

.checkbox-item label {
  color: var(--color-text);
  font-size: var(--font-size-base);
  line-height: 1.6;
  cursor: pointer;
  flex: 1;
  transition: color var(--duration-fast) var(--ease-standard);
}

.checkbox-item:hover label {
  color: var(--color-primary);
}

.checkbox-item input[type="checkbox"]:checked + label {
  color: var(--color-primary);
  font-weight: var(--font-weight-medium);
}

/* Consent checkbox styling */
.ai-form .consent-group {
  display: flex;
  align-items: flex-start;
  gap: var(--space-12);
  color: var(--color-text-secondary);
}
.ai-form .consent-checkbox {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--karuk-primary);
  border-radius: var(--radius-sm);
}
.ai-form .consent-text {
  font-size: var(--font-size-sm);
  line-height: 1.6;
}

/* Textarea styling */
.ai-form textarea.form-control {
  resize: vertical;
  min-height: 160px; /* Hauteur réduite pour être plus rectangulaire */
  max-height: 400px; /* Hauteur max augmentée aussi */
  line-height: 1.6; /* Interligne légèrement augmenté */
  font-family: var(--font-family-base);
  padding: calc(var(--space-16) + 2px); /* Hauteur augmentée de 1mm */
  width: 100%; /* Largeur complète pour être plus rectangulaire */
}

/* Character counter styling */
.char-counter {
  text-align: right;
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  margin-top: var(--space-4);
  transition: color var(--duration-fast) var(--ease-standard);
}

/* Full-width action row */
.ai-form .actions {
  grid-column: 1 / -1;
  margin-top: var(--space-10);
}

.btn--full-width {
  width: 100%;
}

@media (max-width: 768px) {
  .ai-form .form-grid {
    grid-template-columns: 1fr;
  }
}

.footer {
  background: linear-gradient(135deg, var(--color-charcoal-800) 0%, var(--color-slate-900) 100%);
  color: var(--color-gray-200);
  padding: 40px 0;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-24);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--space-16);
}

.footer-brand h3 {
  color: var(--color-gray-200);
  margin-bottom: var(--space-4);
}

.footer-brand p,
.footer-links p {
  color: rgba(245, 245, 245, 0.8);
  margin: 0;
  font-size: var(--font-size-sm);
}

/* Legal modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1200;
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-standard);
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
}

.modal-dialog {
  width: min(820px, calc(100% - 32px));
  max-height: calc(100vh - 120px);
  overflow: auto;
  background: var(--color-surface);
  border: 1px solid var(--color-card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  transform: translateY(10px);
  transition: transform var(--duration-normal) var(--ease-standard);
}

.modal-overlay.active .modal-dialog {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-card-border);
  position: sticky;
  top: 0;
  background: inherit;
  z-index: 1;
}

.modal-title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-semibold);
  margin: 0;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.modal-close {
  background: transparent;
  border: 1px solid var(--color-card-border);
  border-radius: var(--radius-base);
  color: var(--color-text);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.modal-close:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.modal-content {
  padding: 16px 20px 20px;
  text-align: left;
  color: var(--color-text);
}

.modal-content h3 {
  margin: 12px 0 8px;
  font-size: var(--font-size-lg);
}

.modal-content p {
  margin: 8px 0 12px;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

.footer-links a.legal-link {
  color: rgba(245,245,245,0.9);
  text-decoration: underline;
  cursor: pointer;
}

/* Header actions - complètement supprimés */

/* Mobile responsiveness */
@media (max-width: 1024px) and (min-width: 769px) {
  .header-content {
    flex-wrap: wrap;
    gap: var(--space-12);
  }

  .logo-section {
    order: 1;
    flex: 1;
  }

  .logo-placeholder {
    width: 120px;
    height: 120px;
  }

  .menu-toggle {
    order: 2;
    display: flex;
    margin-left: auto;
  }

  .nav {
    order: 4;
    width: 100%;
    display: none;
  }
}

@media (max-width: 768px) {
  .header-content {
    padding: var(--space-8) var(--space-16);
    flex-wrap: nowrap;
    gap: var(--space-12);
    min-height: auto;
  }

  .logo-section {
    order: 1;
    width: auto;
    justify-content: flex-start;
    margin-bottom: 0;
    margin-top: 0;
    flex: 1;
  }

  .logo-placeholder {
    width: 50px;
    height: 50px;
  }

  .company-name {
    font-size: var(--font-size-lg);
    margin-top: 0;
  }

  .menu-toggle {
    order: 2;
    position: relative;
    top: auto;
    right: auto;
    z-index: 1001;
    display: flex;
    margin-left: auto;
  }

  .nav {
    display: none;
  }

  .contact-content {
    grid-template-columns: 1fr;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero h2 {
    font-size: var(--font-size-lg);
  }

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

  .projects-grid,
  .team-grid {
    grid-template-columns: 1fr;
  }

  /* Correction du layout des team-cards sur mobile */
  .team-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .team-card .photo-placeholder {
    float: none;
    margin-right: 0;
    margin-bottom: var(--space-16);
  }

  .team-card .role {
    white-space: normal; /* Permet le retour à la ligne si vraiment nécessaire */
    word-break: keep-all; /* Évite de couper les mots */
  }

  .innovation-card {
    grid-column: 1;
    padding: var(--space-24) var(--space-16);
    margin-top: var(--space-24);
    max-width: 100%;
  }

  .container {
    padding: 0 var(--space-16);
  }
}

/* Skip to content link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 10000;
  background: var(--color-primary);
  color: var(--color-white);
  padding: var(--space-12) var(--space-24);
  border-radius: var(--radius-base);
  text-decoration: none;
  font-weight: var(--font-weight-semibold);
}
.skip-link:focus {
  position: fixed;
  top: var(--space-12);
  left: 50%;
  transform: translateX(-50%);
  width: auto;
  height: auto;
  overflow: visible;
}

/* Anti-spam honeypot */
.honeypot {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  height: 0 !important;
  width: 0 !important;
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: var(--space-16) var(--space-20);
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  display: none;
  max-width: var(--container-lg);
  margin: 0 auto;
}

.cookie-banner.active {
  display: block;
}

.cookie-content {
  max-width: 100%;
  text-align: left;
}

.cookie-content h3 {
  margin-bottom: var(--space-8);
  color: var(--color-text);
  font-size: var(--font-size-lg);
}

.cookie-content p {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-16);
  font-size: var(--font-size-sm);
  line-height: 1.5;
}

.cookie-buttons {
  display: flex;
  gap: var(--space-12);
  margin-bottom: var(--space-12);
  flex-wrap: wrap;
}

.cookie-link {
  background: none;
  border: none;
  color: var(--color-primary);
  text-decoration: underline;
  cursor: pointer;
  font-size: var(--font-size-sm);
}

@media (max-width: 768px) {
  .cookie-buttons {
    flex-direction: column;
  }
  .cookie-banner {
    padding: var(--space-12);
  }
}

/* Accessibilité : réduire les animations pour les utilisateurs sensibles */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  #circuitCanvas {
    display: none !important;
  }
  .code-lines, .cloud-architecture {
    animation: none !important;
  }
}

/* Utility classes - Chantier #20: inline style replacement */
.pharma-cta-text {
  margin-top: var(--space-16);
  font-size: var(--font-size-lg);
}

.pharma-cta-btn {
  margin-top: var(--space-16);
  display: inline-block;
}

.team-intro {
  text-align: center;
  max-width: 800px;
  margin: -30px auto 60px auto;
  color: var(--color-text-secondary);
  font-size: 1.1em;
  line-height: 1.6;
}

.team-intro-accent {
  color: var(--color-primary);
  font-weight: 500;
}

.form-required-notice {
  font-size: 0.85rem;
  color: var(--color-gray-400);
  margin-bottom: var(--space-8);
}

/* Honeypot field is already hidden by .honeypot class above */

.privacy-link {
  color: var(--color-teal-400);
  text-decoration: underline;
}

/* ============================================
 * Utility classes - NEO-CH20-001: classList replacements
 * Replaces inline element.style manipulations
 * ============================================ */

/* Card scroll animation states */
.card-visible {
  opacity: 1;
  transform: translateY(0);
}

.card-hidden {
  opacity: 0.8;
  transform: translateY(20px);
}

/* Hero video poster hidden */
.poster-hidden {
  opacity: 0;
}

/* Body scroll lock (modal/menu open) */
.body-no-scroll {
  overflow: hidden;
}

/* Mobile menu display toggle */
.mobile-menu-visible {
  display: block;
}

/* Touch highlight suppression (iOS/Android) */
.tap-transparent {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* Character counter states */
.char-count-danger {
  color: var(--color-red-500);
}

.char-count-warning {
  color: var(--color-orange-500);
}

.char-count-normal {
  color: var(--color-text-secondary);
}

/* Form field error state */
.field-error {
  border-color: var(--color-red-400);
}

/* Consent label error state */
.consent-error {
  color: var(--color-red-400);
}

/* Submit button states */
.btn-success {
  background-color: #4CAF50;
}

.btn-error {
  background-color: #f44336;
}

/* ============================================
 * Methodology Section - KARUKIA-DEV
 * ============================================ */

.methodology-section {
  background: linear-gradient(135deg, rgba(107, 114, 128, 0.1) 0%, rgba(75, 85, 99, 0.05) 100%);
}

@media (prefers-color-scheme: dark) {
  .methodology-section {
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.15) 0%, rgba(75, 85, 99, 0.1) 100%);
  }
}

.methodology-intro {
  text-align: center;
  max-width: 1000px;
  margin: -30px auto 50px auto;
  color: var(--color-text-secondary);
  font-size: 1.1em;
  line-height: 1.7;
}

.methodology-intro strong {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: var(--font-weight-bold);
}

.methodology-velocity-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 110px;
  height: 110px;
  margin: 0 auto 50px auto;
  border-radius: 50%;
  background: var(--gradient-primary);
  box-shadow: 0 0 30px rgba(43, 124, 238, 0.3), 0 0 60px rgba(146, 108, 224, 0.15);
  animation: velocityPulse 3s ease-in-out infinite;
}

.methodology-velocity-multiplier {
  font-size: 2rem;
  font-weight: var(--font-weight-bold);
  color: #fff;
  line-height: 1;
  letter-spacing: -1px;
}

.methodology-velocity-label {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.85);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

@keyframes velocityPulse {
  0%, 100% { box-shadow: 0 0 30px rgba(43, 124, 238, 0.3), 0 0 60px rgba(146, 108, 224, 0.15); }
  50% { box-shadow: 0 0 40px rgba(43, 124, 238, 0.5), 0 0 80px rgba(146, 108, 224, 0.25); }
}

.methodology-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-32);
  margin-bottom: 50px;
}

.methodology-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(15px);
  border-radius: var(--radius-lg);
  padding: var(--space-32);
  border: 1px solid rgba(43, 124, 238, 0.2);
  box-shadow: var(--shadow-md);
  transition: all var(--duration-normal) var(--ease-standard);
  position: relative;
  overflow: hidden;
}

.methodology-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
}

.methodology-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-ai);
  border-color: rgba(43, 124, 238, 0.4);
}

.methodology-card-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-20);
  color: white;
  box-shadow: 0 4px 16px rgba(43, 124, 238, 0.25);
}

.methodology-card h3 {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-12);
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.methodology-card p {
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin: 0;
  font-size: var(--font-size-base);
}

/* Light mode card background */
.methodology-card {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(245, 158, 11, 0.08)) !important;
}

@media (prefers-color-scheme: dark) {
  .methodology-card {
    background: rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(15px);
    border: 1px solid var(--color-card-border);
  }
}

/* Workflow visualization */
.methodology-workflow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-12);
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.methodology-workflow-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-8);
}

.methodology-workflow-badge {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-lg);
  box-shadow: 0 4px 12px rgba(43, 124, 238, 0.3);
}

.methodology-workflow-label {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  font-weight: var(--font-weight-medium);
  white-space: nowrap;
}

.methodology-workflow-arrow {
  width: 40px;
  height: 2px;
  background: var(--gradient-primary);
  position: relative;
  margin-bottom: 24px; /* align with badges, not labels */
}

.methodology-workflow-arrow::after {
  content: '';
  position: absolute;
  right: -1px;
  top: -4px;
  width: 0;
  height: 0;
  border-left: 8px solid var(--karuk-secondary);
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}

.methodology-footer {
  text-align: center;
  color: var(--color-text-secondary);
  font-size: 1.05em;
  line-height: 1.6;
  max-width: 700px;
  margin: 0 auto;
}

.methodology-footer strong {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Methodology responsive */
@media (max-width: 768px) {
  .methodology-grid {
    grid-template-columns: 1fr;
  }

  .methodology-intro {
    margin-top: -15px;
    margin-bottom: 30px;
  }

  .methodology-workflow {
    gap: var(--space-8);
  }

  .methodology-workflow-arrow {
    width: 24px;
  }

  .methodology-workflow-badge {
    width: 36px;
    height: 36px;
    font-size: var(--font-size-base);
  }

  .methodology-workflow-label {
    font-size: var(--font-size-xs);
  }
}

@media (max-width: 480px) {
  .methodology-workflow {
    flex-direction: column;
    gap: var(--space-4);
  }

  .methodology-workflow-arrow {
    width: 2px;
    height: 20px;
    margin-bottom: 0;
  }

  .methodology-workflow-arrow::after {
    right: auto;
    top: auto;
    bottom: -1px;
    left: -4px;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 8px solid var(--karuk-secondary);
    border-bottom: none;
  }
}
