/*
  NEXITE WEB - Site Vitrine Professionnel
  Auteur: Maxime Leboeuf
  Date: 19/10/2025
  Version: 2.0.0
*/

/* ============================================
   RESET & VARIABLES
   ============================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0
}

:root {
  /* Palette Updated */
  --bg: #F7F5EF;
  --primary: #0C243C;
  /* Plus profond */
  --primary-light: #163450;
  --primary-90: rgba(12, 36, 60, .92);
  --accent: #D4A373;
  --accent-light: #E5C199;
  --accent-glow: rgba(212, 163, 115, 0.4);
  --gray: #D9D9D9;
  --gray-light: #f9f8f6;
  --text: #0C243C;
  --text-muted: #5a6b7a;
  --white: #fff;
  --border: rgba(15, 43, 70, 0.1);

  /* Spacing & Layout */
  --container: 1240px;
  --container-narrow: 860px;
  --space-xs: clamp(8px, 1.2vw, 12px);
  --space-sm: clamp(16px, 2vw, 24px);
  --space-md: clamp(32px, 4vw, 48px);
  --space-lg: clamp(64px, 8vw, 100px);
  --space-xl: clamp(80px, 10vw, 140px);

  /* Design tokens Premium */
  --radius-sm: 8px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 2px 8px rgba(12, 36, 60, .04), 0 1px 2px rgba(0, 0, 0, 0.02);
  --shadow: 0 8px 24px rgba(12, 36, 60, .06), 0 2px 8px rgba(212, 163, 115, .05);
  --shadow-lg: 0 20px 48px rgba(12, 36, 60, .1), 0 8px 16px rgba(12, 36, 60, .03);
  --shadow-xl: 0 32px 64px rgba(12, 36, 60, .15), 0 12px 24px rgba(12, 36, 60, .05);
  --shadow-accent: 0 8px 32px rgba(212, 163, 115, .4), 0 4px 12px rgba(212, 163, 115, .2);
  --glass: blur(12px) saturate(180%);

  --transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-nav: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-bounce: all 0.5s cubic-bezier(0.68, -0.6, 0.32, 1.6);
}


[data-theme="dark"] {
  --bg: #06121e;
  --primary: #D4A373;
  --primary-light: #e5c199;
  --primary-90: rgba(212, 163, 115, 0.9);
  --accent: #F7F5EF;
  --accent-light: #fff;
  --accent-glow: rgba(255, 255, 255, 0.15);
  --gray: #1a2c3f;
  --gray-light: #0a1926;
  --text: #e8ecf1;
  /* Improved contrast */
  --text-muted: #a0aec0;
  /* Lighter for better readability */
  --white: #06121e;

  /* Enhanced Surface Colors for better contrast */
  --surface: rgba(26, 38, 56, 0.7);
  --border: rgba(255, 255, 255, 0.12);
}

/* Smooth transition when switching themes */
html {
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* ============================================
   DARK MODE - CORE STYLES
   ============================================ */

/* Typography - headings */
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6 {
  color: var(--primary);
}

/* Typography - paragraphs and text */
[data-theme="dark"] p,
[data-theme="dark"] .lead {
  color: var(--text);
}

[data-theme="dark"] .text-muted {
  color: #a0aec0 !important;
}

/* ============================================
   DARK MODE - COMPONENTS
   ============================================ */

/* Cards - universal styling */
[data-theme="dark"] .card,
[data-theme="dark"] article.card {
  background: var(--surface);
  border-color: var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  will-change: transform;
  /* Optimize 3D tilt */
  transform: translateZ(0);
  /* Force GPU layer */
}

[data-theme="dark"] .card:hover,
[data-theme="dark"] article.card:hover {
  background: rgba(30, 40, 56, 0.8);
}

[data-theme="dark"] .card h3,
[data-theme="dark"] article.card h3 {
  color: #D4A373 !important;
}

[data-theme="dark"] .card p,
[data-theme="dark"] article.card p {
  color: #a0aec0 !important;
}

[data-theme="dark"] .card .icon {
  background: linear-gradient(135deg, #D4A373 0%, #e5c199 100%) !important;
  color: #06121e !important;
}

[data-theme="dark"] .card .icon svg {
  stroke: #06121e !important;
  color: #06121e !important;
}

/* Forms */
[data-theme="dark"] .form {
  background: var(--surface);
  border-color: var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

[data-theme="dark"] input[type="text"],
[data-theme="dark"] input[type="email"],
[data-theme="dark"] textarea,
[data-theme="dark"] input[type="checkbox"] {
  border-color: var(--border);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
}

[data-theme="dark"] input:focus,
[data-theme="dark"] textarea:focus {
  background: rgba(0, 0, 0, 0.35);
  border-color: var(--primary);
}

[data-theme="dark"] .field label {
  color: var(--text-muted);
  background: transparent;
}

[data-theme="dark"] .field input:focus+label,
[data-theme="dark"] .field input:not(:placeholder-shown)+label,
[data-theme="dark"] .field textarea:focus+label,
[data-theme="dark"] .field textarea:not(:placeholder-shown)+label {
  color: var(--accent);
}

[data-theme="dark"] .checkbox-field label {
  color: var(--text);
}

[data-theme="dark"] .checkbox-field label a {
  color: var(--primary);
}

[data-theme="dark"] .checkbox-field label a:hover {
  color: var(--accent);
}

[data-theme="dark"] .error {
  color: #ff6b6b;
}

/* Buttons */
[data-theme="dark"] .btn-primary {
  color: #06121e !important;
  background: #D4A373 !important;
  background-color: #D4A373 !important;
}

[data-theme="dark"] .btn-primary span {
  color: #06121e !important;
}

[data-theme="dark"] .btn-secondary {
  color: var(--primary);
  border-color: var(--primary);
}

[data-theme="dark"] .btn-secondary:hover {
  color: var(--bg);
  background: var(--primary);
}

/* ============================================
   DARK MODE - NAVIGATION
   ============================================ */

[data-theme="dark"] .site-header,
[data-theme="dark"] .site-header.scrolled {
  background: var(--surface);
  border-color: var(--border);
  backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  will-change: transform;
  /* Optimize elevation change */
}

[data-theme="dark"] .nav-list a {
  color: #e0e6ed;
}

[data-theme="dark"] .nav-list a:hover,
[data-theme="dark"] .nav-list a.active {
  color: var(--accent);
}

/* ============================================
   DARK MODE - HERO SECTION
   ============================================ */

[data-theme="dark"] .hero-badge {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

[data-theme="dark"] .hero-badge span {
  color: var(--text);
}

[data-theme="dark"] .hero-text .animate-gradient {
  background: linear-gradient(90deg, #D4A373, #F7F5EF, #e5c199, #D4A373);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="dark"] .reassure li {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

[data-theme="dark"] .reassure li span {
  color: var(--text);
}

/* ============================================
   DARK MODE - SECTIONS
   ============================================ */

[data-theme="dark"] .section-title {
  /* No override needed, falls back to color or child gradient */
}

[data-theme="dark"] .section-title .word,
[data-theme="dark"] .section-title .letter,
[data-theme="dark"] .section-title span {
  /* Allow the main gradient rule to apply */
}

[data-theme="dark"] .section-subtitle {
  color: #a0aec0 !important;
}

[data-theme="dark"] #services,
[data-theme="dark"] #apropos {
  position: relative;
  z-index: 1;
  /* Establish stacking context */
  background: transparent;
  /* Remove direct background */
}

/* Pseudo-element for background to sit BEHIND path which is z-index:0 */
[data-theme="dark"] #services::before,
[data-theme="dark"] #apropos::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, var(--bg) 0%, var(--gray-light) 100%);
  z-index: -1;
  pointer-events: none;
}

/* ============================================
   DARK MODE - PORTFOLIO/GALLERY
   ============================================ */

[data-theme="dark"] .real-body {
  background: var(--surface);
  border-color: var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

[data-theme="dark"] .real h3 {
  color: var(--primary);
}

[data-theme="dark"] .portfolio-gallery {
  background: var(--surface);
}

[data-theme="dark"] .gallery-thumbs .thumb {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border);
}

[data-theme="dark"] .gallery-thumbs .thumb.active {
  background: rgba(212, 163, 115, 0.2);
  border-color: var(--primary);
}

[data-theme="dark"] .gallery-thumbs .thumb span {
  color: var(--text);
}

[data-theme="dark"] .gallery-thumbs .thumb.active span {
  color: var(--primary);
}

[data-theme="dark"] .tags li {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border);
}

/* ============================================
   DARK MODE - CONTACT SECTION
   ============================================ */

[data-theme="dark"] .contact-grid p {
  color: var(--text-muted);
}

[data-theme="dark"] .contact-grid a {
  color: var(--primary);
}

[data-theme="dark"] .contact-grid a:hover {
  color: var(--accent);
}

[data-theme="dark"] .contact-info-item {
  background: var(--surface);
  border-color: var(--border);
}

[data-theme="dark"] .contact-info-item span {
  color: #e8ecf1 !important;
}

/* ============================================
   DARK MODE - FOOTER
   ============================================ */

[data-theme="dark"] .footer-title {
  color: #ffffff;
}

[data-theme="dark"] .footer-brand p {
  color: rgba(255, 255, 255, 0.75);
}

[data-theme="dark"] .footer-links a,
[data-theme="dark"] .footer-legal a,
[data-theme="dark"] .footer-contact a {
  color: rgba(255, 255, 255, 0.8);
}

[data-theme="dark"] .footer-links a:hover,
[data-theme="dark"] .footer-legal a:hover,
[data-theme="dark"] .footer-contact a:hover {
  color: var(--accent);
}

[data-theme="dark"] .footer-contact span {
  color: rgba(255, 255, 255, 0.8);
}

/* ============================================
   DARK MODE - UI ELEMENTS
   ============================================ */

[data-theme="dark"] .scroll-indicator {
  color: var(--primary);
  background: var(--surface);
  border-color: var(--border);
}

[data-theme="dark"] .back-to-top {
  background: var(--surface);
  color: var(--primary);
  border-color: var(--border);
}

/* ============================================
   DARK MODE - ADDITIONAL FIXES FOR REMAINING DARK TEXT
   ============================================ */

/* Force ALL elements in dark mode to have light text by default */
[data-theme="dark"] * {
  border-color: var(--border);
}

/* Hero section - description text */
[data-theme="dark"] .hero p,
[data-theme="dark"] .hero .lead,
[data-theme="dark"] .hero-text p,
[data-theme="dark"] .hero-text .lead {
  color: #e8ecf1 !important;
}

[data-theme="dark"] .hero-text .lead.text-muted {
  color: #a0aec0 !important;
}

/* Service cards - everything */
[data-theme="dark"] .services-grid .card,
[data-theme="dark"] #services .card,
[data-theme="dark"] .card {
  color: var(--text);
}

[data-theme="dark"] .services-grid .card h3,
[data-theme="dark"] #services .card h3 {
  color: #D4A373 !important;
}

[data-theme="dark"] .services-grid .card p,
[data-theme="dark"] #services .card p {
  color: #a0aec0 !important;
}

/* About section - all paragraphs */
[data-theme="dark"] #apropos p,
[data-theme="dark"] #apropos .container p {
  color: var(--text) !important;
}

/* Contact section - email and text */
[data-theme="dark"] #contact p,
[data-theme="dark"] .contact-grid p {
  color: var(--text-muted) !important;
}

[data-theme="dark"] .contact-info-item a {
  color: #e8ecf1 !important;
}

/* Section titles - force golden color */
/* Section titles - force golden gradient (already handled by generic .section-title rule) */
[data-theme="dark"] #services .section-title,
[data-theme="dark"] #realisations .section-title,
[data-theme="dark"] #apropos .section-title,
[data-theme="dark"] #contact .section-title {
  /* Let the gradient rule applied above take precedence */
  -webkit-text-fill-color: transparent !important;
}

/* Section subtitles */
[data-theme="dark"] .section-subtitle {
  color: #a0aec0 !important;
}

/* Footer - force all text to be light */
[data-theme="dark"] .site-footer {
  color: rgba(255, 255, 255, 0.8);
}

[data-theme="dark"] .site-footer p,
[data-theme="dark"] .site-footer span,
[data-theme="dark"] .site-footer a {
  color: rgba(255, 255, 255, 0.8) !important;
}

[data-theme="dark"] .site-footer h3,
[data-theme="dark"] .footer-title {
  color: #ffffff !important;
}

/* Portfolio - ensure visibility */
[data-theme="dark"] .real p,
[data-theme="dark"] .real-body p {
  color: var(--text-muted) !important;
}

/* Navigation links in header */
[data-theme="dark"] .site-header a {
  color: rgba(255, 255, 255, 0.95) !important;
}

/* Ensure section backgrounds are dark enough */
[data-theme="dark"] section {
  background-color: var(--bg);
}


html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
  font-size: 16px
}

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

  .reveal {
    transition: none !important
  }
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  /* Teintes bleu pour l'ordinateur */
  --device-blue-1: #1b3d60;
  /* clair */
  --device-blue-2: #0F2B46;
  /* principal */
  --device-blue-3: #0b2238;
  /* foncé */
  --device-blue-4: #081a2b;
  /* très foncé */
}

img {
  max-width: 100%;
  height: auto;
  display: block
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

/* Performance Optimizations */
.ambient-light {
  will-change: transform;
  pointer-events: none;
}

.laptop-container {
  will-change: transform;
}

.card {
  will-change: transform;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: 1.1;
  font-family: 'Poppins', sans-serif;
  color: var(--primary);
  letter-spacing: -0.03em;
}

h1 {
  font-size: clamp(36px, 6vw, 64px);
  margin-bottom: 24px;
  font-weight: 700;
}

h2 {
  font-size: clamp(30px, 4.5vw, 46px);
  margin-bottom: var(--space-sm);
  font-weight: 700;
}

h3 {
  font-size: clamp(22px, 3vw, 28px);
  margin-bottom: 12px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

p {
  margin-bottom: var(--space-sm);
  line-height: 1.75;
  color: var(--text);
  font-weight: 400;
}

.lead {
  font-size: clamp(18px, 2.2vw, 20px);
  color: var(--text-muted);
  line-height: 1.7;
  font-weight: 400;
  letter-spacing: -0.01em;
}

/* ============================================
   UTILITIES
   ============================================ */
.container {
  width: min(var(--container), 94%);
  margin-inline: auto;
  padding-inline: var(--space-sm)
}

/* Mobile: Tighter container padding */
@media (max-width: 480px) {
  .container {
    width: min(var(--container), 92%);
    padding-inline: 16px;
  }
}

.narrow {
  width: min(var(--container-narrow), 94%)
}

.grid {
  display: grid;
  gap: var(--space-md)
}

/* Espacement vertical global des sections (légèrement réduit) */
.section {
  padding: clamp(44px, 6vw, 80px) 0
}

.section-title {
  font-size: clamp(28px, 4vw, 42px);
  margin: 0 0 var(--space-md);
  position: relative;
  padding-bottom: var(--space-sm);
  text-align: center;
  letter-spacing: -0.01em;
}

/*
   Gradient & Animation Setup - MATCHING HERO TITLE
   Strategy: Letters animate in solid (clean), then JS adds .active-gradient to parent for the continuous flow.
*/

/* 1. Default (Animation Phase): Solid Colors */
.section-title {
  color: #0C243C;
  /* Dark Blue matching Hero */
}

.section-title .word,
.section-title .letter,
.section-title span {
  display: inline-block;
  color: inherit;
  background: none;
  -webkit-text-fill-color: initial;
  /* Remove the individual gradient animation */
  animation: none;
}

[data-theme="dark"] .section-title {
  color: #D4A373;
  /* Gold matching Hero Dark Mode */
  filter: drop-shadow(0 0 10px rgba(212, 163, 115, 0.3));
  /* Glow present from start to avoid flash */
}

/* 2. Final State (Post-Animation): Continuous Gradient on Parent */
.section-title.active-gradient {
  /* LIGHT MODE: Hero H1 Exact Match */
  background: linear-gradient(90deg, #0F2B46, #1d4b73, #D4A373, #0F2B46);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: heroHue 8s cubic-bezier(0.4, 0, 0.2, 1) infinite;

  /* Ensure children (if any left) are transparent to show parent */
  color: transparent;
}

[data-theme="dark"] .section-title.active-gradient {
  /* DARK MODE: Hero H1 Exact Match */
  background: linear-gradient(90deg, #D4A373, #F7F5EF, #e5c199, #D4A373);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 10px rgba(212, 163, 115, 0.3));
}

/* Remove local keyframes if they are duplicates of heroHue, but heroHue is already defined in CSS.
   We reuse heroHue from line 1541. */


.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  /* Slightly thinner */
  background: linear-gradient(90deg, transparent, #D4A373, #F7F5EF, #D4A373, transparent);
  border-radius: 3px;
  opacity: 0.8;
  /* Removed old shimmerLine animation to avoid conflict/overload */
}

@keyframes shimmerLine {

  0%,
  100% {
    opacity: 1;
    transform: translateX(-50%) scaleX(1)
  }

  50% {
    opacity: 0.8;
    transform: translateX(-50%) scaleX(1.1)
  }
}

.section-subtitle {
  text-align: center;
  max-width: 700px;
  /* Marge du sous-titre réduite */
  margin: 0 auto var(--space-md);
  font-size: clamp(16px, 2vw, 18px);
  color: var(--text-muted);
  line-height: 1.6;
}

.text-muted {
  color: var(--text-muted)
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 32px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  border: 2px solid transparent;
  box-shadow: var(--shadow-sm);
  text-transform: none;
  letter-spacing: 0.01em;
  position: relative;
  overflow: hidden;
}

/* Mobile: Better touch targets */
@media (max-width: 600px) {
  .btn {
    padding: 14px 28px;
    font-size: 15px;
    min-height: 44px;
    min-width: 44px;
  }
}

/* Effet de press au clic */
.btn:active {
  transform: translateY(1px) scale(0.98);
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 12px rgba(12, 36, 60, 0.2);
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-primary:hover {
  background: var(--primary-light);
  box-shadow: 0 12px 32px rgba(212, 163, 115, 0.35),
    0 0 0 1px rgba(212, 163, 115, 0.3);
  transform: translateY(-1px);
}

/* Effet radial au hover (amélioré) */
.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, var(--accent) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s;
  mix-blend-mode: overlay;
}

.btn-primary:hover::after {
  opacity: 0.3;
}

/* Ripple effect */
.btn-primary::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease-out, height 0.6s ease-out, opacity 0.6s ease-out;
  opacity: 0;
}

.btn-primary:hover::before {
  width: 300px;
  height: 300px;
  opacity: 0;
}

.btn-secondary {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-secondary::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: var(--primary);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.5s ease-out, height 0.5s ease-out;
}

.btn-secondary:hover::before {
  width: 300px;
  height: 300px;
}

.btn-secondary:hover {
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(12, 36, 60, 0.2);
}

.btn-secondary span {
  position: relative;
  z-index: 1
}

.btn-small {
  padding: 10px 20px;
  font-size: 14px
}

/* ============================================
   CARDS
   ============================================ */
.card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius);
  padding: var(--space-md);
  box-shadow: var(--shadow-sm);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  height: 100%;
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-light) 100%);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px var(--accent-glow);
}

/* Shimmer effect qui traverse la carte au hover */
.card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -100%;
  width: 50%;
  height: 200%;
  background: linear-gradient(90deg,
      transparent,
      rgba(255, 255, 255, 0.6),
      transparent);
  transform: skewX(-25deg);
  opacity: 0;
  transition: opacity 0.3s, left 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-xl);
  transform: translateY(-8px) rotateX(2deg);
  border-color: rgba(212, 163, 115, .4);
}

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

.card:hover::after {
  opacity: 1;
  left: 150%;
}

/* Animation de l'icône au hover */
.card .icon {
  transition: all 0.5s cubic-bezier(0.68, -0.6, 0.32, 1.6);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.card:hover .icon {
  transform: translateY(-4px) scale(1.1) rotateY(10deg);
}

.link {
  color: var(--primary);
  font-weight: 600;
  border-bottom: 2px solid transparent
}

.link:hover {
  border-bottom-color: var(--accent)
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: rgba(15, 43, 70, 0.95);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid rgba(212, 163, 115, .25);
  box-shadow: 0 4px 24px rgba(15, 43, 70, .4), 0 1px 3px rgba(0, 0, 0, .1);
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.site-header.scrolled {
  background: rgba(15, 43, 70, 0.98);
  box-shadow: 0 6px 32px rgba(15, 43, 70, .45), 0 2px 8px rgba(0, 0, 0, .15);
  border-bottom-color: rgba(212, 163, 115, .35);
}

.site-header.scrolled .header-inner {
  padding: 12px 0;
  transition: padding 0.3s ease;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: 16px 0;
  transition: padding 0.3s ease;
}

/* Mobile: Reduced header padding */
@media (max-width: 600px) {
  .header-inner {
    padding: 12px 0;
    gap: var(--space-sm);
  }

  .site-header.scrolled .header-inner {
    padding: 10px 0;
  }
}

.brand {
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: 20px;
  color: #fff;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
}

.brand::after {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: var(--radius-sm);
  background: radial-gradient(circle at center, rgba(212, 163, 115, 0.1) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.brand:hover::after {
  opacity: 1;
}

.brand:hover {
  transform: translateY(-1px);
}

.brand img {
  display: block;
  height: 42px;
  width: auto;
  max-width: 280px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
  transition: all 0.3s ease;
}

.brand:hover img {
  filter: drop-shadow(0 4px 8px rgba(212, 163, 115, 0.3));
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-sm)
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.nav-toggle:hover {
  background: rgba(255, 255, 255, .1)
}

.nav-toggle .bar {
  display: block;
  width: 26px;
  background: #ffffff;
  margin: 5px 0;
  border-radius: 2px;
  transition: var(--transition);
}

.nav-list {
  list-style: none;
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.nav-list a {
  color: rgba(255, 255, 255, 0.95);
  font-weight: 600;
  font-size: 15.5px;
  letter-spacing: -0.01em;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  position: relative;
  outline: none;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.nav-list a::after {
  content: '';
  position: absolute;
  bottom: 8px;
  left: 18px;
  right: 18px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(212, 163, 115, 0.4);
}

.nav-list a:hover::after {
  transform: scaleX(1);
}

.nav-list a:hover {
  color: var(--accent);
  background: rgba(255, 255, 255, 0.05);
}

.nav-list a:focus-visible {
  box-shadow: 0 0 0 3px rgba(212, 163, 115, .5);
}

.nav-list a.active {
  color: var(--accent);
  background: rgba(212, 163, 115, 0.08);
}

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

.cta-header {
  display: none;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
  color: var(--primary);
  border: 2px solid var(--accent);
  font-weight: 700;
  font-size: 15px;
  padding: 11px 26px;
  border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(212, 163, 115, .45), 0 1px 3px rgba(0, 0, 0, .1);
  transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  overflow: hidden;
}

.cta-header::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s ease-out, height 0.6s ease-out;
}

.cta-header:hover::before {
  width: 300px;
  height: 300px;
}

.cta-header:hover {
  background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent) 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(212, 163, 115, .65), 0 4px 12px rgba(0, 0, 0, .15);
  color: var(--primary);
  border-color: var(--accent-light);
}

.cta-header:active {
  transform: translateY(0);
}

.cta-header span {
  position: relative;
  z-index: 1;
}

@media (max-width:900px) {

  /* Hide original nav list */
  .nav-list {
    display: none !important;
  }

  /* Afficher le bouton menu */
  .nav-toggle {
    display: block !important;
    position: relative;
    z-index: 2001;
    /* Higher than overlay */
    border: none;
    outline: none;
    -webkit-tap-highlight-color: transparent;
  }

  .nav-toggle:focus-visible {
    outline: none;
  }

  /* Mobile Menu Overlay - Full Screen */
  .mobile-menu-overlay {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: #0F2B46;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transform: translateY(-20px);
  }

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

  /* Dark mode specific background */
  [data-theme="dark"] .mobile-menu-overlay {
    background: #06121e;
  }

  .mobile-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    width: 100%;
  }

  .mobile-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    width: 100%;
  }

  .mobile-nav-list a {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    padding: 12px;
    text-align: center;
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
  }

  .mobile-menu-overlay.open .mobile-nav-list a {
    opacity: 1;
    transform: translateY(0);
  }

  /* Stagger animations */
  .mobile-menu-overlay.open .mobile-nav-list li:nth-child(1) a {
    transition-delay: 0.1s;
  }

  .mobile-menu-overlay.open .mobile-nav-list li:nth-child(2) a {
    transition-delay: 0.15s;
  }

  .mobile-menu-overlay.open .mobile-nav-list li:nth-child(3) a {
    transition-delay: 0.2s;
  }

  .mobile-menu-overlay.open .mobile-nav-list li:nth-child(4) a {
    transition-delay: 0.25s;
  }

  .mobile-menu-overlay.open .mobile-nav-list li:nth-child(5) a {
    transition-delay: 0.3s;
  }

  .mobile-nav-list a:hover,
  .mobile-nav-list a:focus {
    color: var(--accent);
    transform: scale(1.05);
  }

  /* CTA Button in Menu */
  .mobile-cta {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease 0.4s;
    /* Delay after links */
    margin-top: 16px;
    width: auto;
    min-width: 200px;
    justify-content: center;
  }

  .mobile-menu-overlay.open .mobile-cta {
    opacity: 1;
    transform: translateY(0);
  }

  /* Hide CTA in header */
  .cta-header {
    display: none !important;
  }

  /* Animation du bouton burger quand ouvert */
  .nav-toggle[aria-expanded="true"] .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
    background-color: var(--accent);
  }

  .nav-toggle[aria-expanded="true"] .bar:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle[aria-expanded="true"] .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
    background-color: var(--accent);
  }
}

@media (min-width:900px) {
  .cta-header {
    display: inline-flex
  }
}

/* ============================================
   HERO
   ============================================ */
.hero {
  /* Padding increased to account for fixed header */
  padding: clamp(140px, 15vh, 180px) 0 clamp(40px, 5.5vh, 88px);
  background: radial-gradient(circle at top right, rgba(212, 163, 115, 0.15) 0%, transparent 40%),
    radial-gradient(circle at bottom left, rgba(12, 36, 60, 0.03) 0%, transparent 40%);
  position: relative;
  overflow: hidden;
}

/* Mobile: Reduced hero padding */
@media (max-width: 600px) {
  .hero {
    padding: clamp(100px, 12vh, 120px) 0 clamp(32px, 4vh, 48px);
  }
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
  opacity: 0.6;
  pointer-events: none;
}

.hero::after {
  content: none;
}

@keyframes float {

  0%,
  100% {
    transform: translate(0, 0) scale(1)
  }

  50% {
    transform: translate(-30px, 30px) scale(1.1)
  }
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(380px, 1.05fr);
  align-items: center;
  gap: clamp(36px, 5.5vw, 72px);
  position: relative;
  z-index: 1;
}

/* Badge introductif */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  border: 1px solid rgba(212, 163, 115, 0.2);
  color: var(--primary);
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-lg);
  transition: var(--transition-bounce);
}

/* Mobile: Smaller badge */
@media (max-width: 480px) {
  .hero-badge {
    font-size: 11.5px;
    padding: 6px 12px;
    gap: 8px;
    margin-bottom: 10px;
  }
}

.hero-badge:hover {
  transform: translateY(-2px) scale(1.02);
  background: rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow-xl);
  border-color: var(--accent);
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1)
  }

  50% {
    opacity: 0.7;
    transform: scale(1.15)
  }
}

.hero-text h1 {
  margin-bottom: 16px;
  color: var(--primary);
  line-height: 1.2;
  font-size: clamp(28px, 5.2vw, 56px);
  padding-bottom: 0.1em;
}

/* Mobile: Better h1 sizing */
@media (max-width: 480px) {
  .hero-text h1 {
    font-size: clamp(26px, 8vw, 36px);
    margin-bottom: 12px;
    line-height: 1.25;
    padding-bottom: 0.1em;
  }
}

/* Animation de couleur classe pour le titre du hero */
.hero-text .animate-gradient {
  background: linear-gradient(90deg, #0F2B46, #1d4b73, #D4A373, #0F2B46);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: heroHue 8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

/* Déclinaison douce au repos (si pas visible) */
.hero:not(.visible) .animate-gradient {
  animation-play-state: paused
}

@keyframes heroHue {
  0% {
    background-position: 0% 50%
  }

  50% {
    background-position: 100% 50%
  }

  100% {
    background-position: 0% 50%
  }
}

/* Respect des préférences d’accessibilité */
@media (prefers-reduced-motion: reduce) {
  .hero-text .animate-gradient {
    animation: none;
    background-position: 50% 50%
  }
}

.hero .lead {
  margin-bottom: 28px;
  font-size: clamp(16px, 1.8vw, 19px);
  color: var(--text-muted);
  line-height: 1.75;
  max-width: 48ch;
}

/* Mobile: Optimized lead text */
@media (max-width: 480px) {
  .hero .lead {
    font-size: 15px;
    margin-bottom: 20px;
    line-height: 1.65;
  }
}

.hero .actions {
  display: flex;
  gap: 12px 14px;
  flex-wrap: wrap;
  align-items: center;
}

/* Points de réassurance */
.reassure {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 18px;
  margin-top: 18px;
  padding: 0;
  list-style: none
}

.reassure li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  font-size: 14px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px) saturate(130%);
  -webkit-backdrop-filter: blur(10px) saturate(130%);
  border: 1px solid rgba(15, 43, 70, .1);
  padding: 8px 14px;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(15, 43, 70, .06), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transition: var(--transition);
}

.reassure li:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(212, 163, 115, .2), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  border-color: rgba(212, 163, 115, 0.3);
}

.reassure svg {
  color: var(--accent);
  filter: drop-shadow(0 1px 2px rgba(212, 163, 115, .3))
}

.hero-media {
  position: relative;
  perspective: 2000px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  /* Hauteur minimale un peu réduite pour compacter au dessus de la ligne de flottaison */
  min-height: 480px;
  padding-bottom: 32px;
}

/* ============================================
   LAPTOP ANIMATION 3D
   ============================================ */
.laptop-container {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  perspective: 2000px;
  perspective-origin: 50% 40%;
  transform: translateY(0);
}

.laptop {
  position: relative;
  width: 100%;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  -webkit-transform-style: preserve-3d;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.2));
}

/* Base du laptop - ultra fine */
.laptop-base {
  position: relative;
  width: 100%;
  height: 35px;
  /* Teinte bleutée (châssis) */
  background: linear-gradient(180deg, var(--device-blue-1) 0%, var(--device-blue-3) 100%);
  border-radius: 0 0 12px 12px;
  box-shadow:
    0 12px 35px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 -2px 8px rgba(15, 43, 70, 0.25);
  transform-style: preserve-3d;
  z-index: 2;
}

.laptop-keyboard {
  position: absolute;
  top: 4px;
  left: 8%;
  width: 84%;
  height: 20px;
  background: linear-gradient(180deg, #234b73 0%, #102742 100%);
  border-radius: 2px;
  opacity: 0.6;
}

.laptop-trackpad {
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 8px;
  background: linear-gradient(180deg, #2a5a87 0%, #123052 100%);
  border-radius: 4px;
  opacity: 0.4;
}

.laptop-glow {
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  height: 50px;
  background: radial-gradient(ellipse at center, rgba(15, 43, 70, 0.38) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.8s ease-out;
  filter: blur(20px);
  z-index: 1;
}

.laptop.opening .laptop-glow {
  opacity: 0.6;
}

/* Écran du laptop - bordures ultra-fines style MacBook */
.laptop-screen {
  position: absolute;
  bottom: 35px;
  left: 2%;
  width: 96%;
  height: 0;
  padding-bottom: 56.6667%;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  transform-origin: bottom center;
  transform: rotateX(-95deg);
  transition: transform 1.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 1;
}

.laptop.opening .laptop-screen {
  transform: rotateX(-5deg);
}

.screen-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  /* Capot bleuté très sombre */
  background: linear-gradient(180deg, var(--device-blue-4) 0%, var(--device-blue-3) 100%);
  border-radius: 8px 8px 0 0;
  padding: 4px 4px 10px 4px;
  box-shadow:
    0 25px 70px rgba(0, 0, 0, 0.9),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    inset 0 0 0 1px rgba(15, 43, 70, 0.1);
}

.screen-bezel {
  position: absolute;
  top: 4px;
  left: 4px;
  right: 4px;
  bottom: 10px;
  border-radius: 4px;
  border: 0.5px solid rgba(255, 255, 255, 0.15);
  pointer-events: none;
  z-index: 10;
}

.screen-content {
  position: relative;
  width: 100%;
  height: 100%;
  background: #000;
  border-radius: 3px;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.8s ease-out 0.5s;
}

.laptop.opening .screen-content {
  opacity: 1;
}

.screen-content img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  display: block;
}

/* (overlay d'intro supprimé sur demande) */

/* Dark Mode Laptop Overrides - Golden Edition */
[data-theme="dark"] .laptop {
  filter: drop-shadow(0 0 60px rgba(212, 163, 115, 0.2)) drop-shadow(0 30px 50px rgba(212, 163, 115, 0.2));
}

[data-theme="dark"] .laptop-base {
  background: linear-gradient(180deg, #D4A373 0%, #b8935f 100%);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.5), inset 0 -2px 8px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .laptop-keyboard {
  background: linear-gradient(180deg, #333 0%, #1a1a1a 100%);
  opacity: 0.8;
}

[data-theme="dark"] .laptop-trackpad {
  background: linear-gradient(180deg, #e5c199 0%, #c9a06a 100%);
}

[data-theme="dark"] .screen-frame {
  background: linear-gradient(180deg, #D4A373 0%, #c9a06a 100%);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.9), inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

[data-theme="dark"] .screen-bezel {
  border-color: rgba(0, 0, 0, 0.1);
}

@media (max-width:900px) {
  .laptop-screen {
    padding-bottom: 56.6667%;
  }

  .laptop-container {
    max-width: 500px;
  }

  .hero-media {
    min-height: 380px;
  }

  .laptop-base {
    height: 28px;
  }
}

@media (max-width:900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (min-width:900px) {
  .hero-inner {
    grid-template-columns: 1fr 1fr
  }
}

/* Indicateur de scroll */
.scroll-indicator {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 8px;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(212, 163, 115, .3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  box-shadow: 0 6px 24px rgba(212, 163, 115, .2), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: var(--transition);
}

.scroll-indicator:hover {
  transform: translateX(-50%);
  border-color: var(--accent);
  box-shadow: 0 8px 32px rgba(212, 163, 115, .3), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.scroll-indicator .chevron {
  width: 10px;
  height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  margin-top: -2px;
  animation: bounce 1.8s ease-in-out infinite;
}

@keyframes bounce {

  0%,
  100% {
    transform: translateY(-1px) rotate(45deg);
  }

  50% {
    transform: translateY(3px) rotate(45deg);
  }
}

/* Accessibilité: Reduced motion */
@media (prefers-reduced-motion: reduce) {

  .laptop-screen,
  .screen-content,
  .nexite-logo,
  .laptop-glow {
    transition: none !important;
    animation: none !important
  }
}

/* ============================================
   SERVICES
   ============================================ */
#services {
  background: linear-gradient(180deg, var(--white) 0%, rgba(247, 245, 239, 0.5) 100%);
  position: relative;
  overflow: hidden;
}

#services::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(212, 163, 115, 0.3) 50%, transparent 100%);
  box-shadow: 0 1px 3px rgba(212, 163, 115, 0.2);
}

#services::after {
  content: '';
  position: absolute;
  bottom: -50px;
  right: -50px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(15, 43, 70, 0.04) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

#services .container {
  position: relative;
  z-index: 1
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  perspective: 1200px;
  /* Enable 3D transforms */
}

.services-grid .card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(20px, 3vw, 28px);
  background: var(--white);
  border: 2px solid rgba(15, 43, 70, 0.04);
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease;
  will-change: transform;
}

.services-grid .icon {
  width: 72px;
  height: 72px;
  margin: 0 auto var(--space-sm);
  padding: 18px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: var(--white);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  transition: var(--transition-slow);
  position: relative;
  flex-shrink: 0;
}

.services-grid .icon::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: var(--radius);
  padding: 2px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s;
}

.services-grid .card:hover .icon::before {
  opacity: 1
}

.services-grid .card:hover {
  transform: translateY(-12px) rotateX(5deg) rotateY(-2deg) scale(1.02);
  box-shadow: 0 20px 40px rgba(15, 43, 70, 0.15), 0 10px 20px rgba(212, 163, 115, 0.1);
}

.services-grid .card:hover .icon {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
  transform: scale(1.15) rotate(8deg) translateZ(20px);
  box-shadow: var(--shadow-xl);
}

.services-grid h3 {
  margin: 0 0 var(--space-sm);
  color: var(--primary);
  font-size: 20px;
  font-weight: 600;
  width: 100%;
}

.services-grid p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.7;
  font-size: 15px;
  width: 100%;
}

@media (min-width:640px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
  }
}

@media (min-width:1024px) {
  .services-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
  }

  .services-grid .card {
    padding: var(--space-md);
  }

  .services-grid h3 {
    font-size: 18px;
  }

  .services-grid p {
    font-size: 14px;
  }
}

/* ============================================
   RÉALISATIONS
   ============================================ */
#realisations {
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

#realisations::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(212, 163, 115, 0.3) 50%, transparent 100%);
  box-shadow: 0 1px 3px rgba(212, 163, 115, 0.2);
}

.real {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition-slow);
  border: 2px solid rgba(15, 43, 70, .06);
  position: relative;
  padding: 0;
  max-width: 800px;
  margin: 0 auto;
}

.real::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(212, 163, 115, 0.1) 0%, rgba(15, 43, 70, 0.05) 100%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}

.real:hover::after {
  opacity: 1
}

.real:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
  border-color: rgba(212, 163, 115, .3);
}

/* Portfolio Gallery - Améliorée */
.portfolio-gallery {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  background: var(--bg);
}

.gallery-main {
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: #000;
  position: relative;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-main:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-4px);
}

/* Effet de bordure lumineuse animée */
.gallery-main::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  padding: 2px;
  background: linear-gradient(45deg,
      transparent,
      var(--accent),
      transparent,
      var(--primary-light));
  background-size: 300% 300%;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.5s;
  animation: borderGlow 3s ease-in-out infinite;
  pointer-events: none;
}

.gallery-main:hover::before {
  opacity: 0.6;
}

@keyframes borderGlow {

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

  50% {
    background-position: 100% 50%;
  }
}

.gallery-main video {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-main:hover video {
  transform: scale(1.02);
}

.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.thumb {
  background: var(--white);
  border: 2px solid rgba(15, 43, 70, 0.1);
  border-radius: var(--radius-sm);
  padding: 8px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
}

/* Effet de perspective 3D sur les miniatures */
.thumb:hover {
  border-color: var(--accent);
  transform: translateY(-4px) rotateX(5deg);
  box-shadow: var(--shadow-lg);
}

.thumb.active {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(212, 163, 115, 0.15) 0%, rgba(15, 43, 70, 0.05) 100%);
  box-shadow: 0 0 0 1px var(--accent), var(--shadow);
}

/* Effet shimmer sur les miniatures */
.thumb::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -100%;
  width: 50%;
  height: 200%;
  background: linear-gradient(90deg,
      transparent,
      rgba(255, 255, 255, 0.4),
      transparent);
  transform: skewX(-25deg);
  opacity: 0;
  transition: opacity 0.3s, left 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.thumb:hover::after {
  opacity: 1;
  left: 150%;
}

.thumb video {
  width: 100%;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
  display: block;
  background: #000;
  transition: transform 0.3s ease;
}

.thumb:hover video {
  transform: scale(1.05);
}

.thumb span {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  transition: color 0.3s;
}

.thumb.active span,
.thumb:hover span {
  color: var(--accent);
}

.real picture,
.real img {
  aspect-ratio: 16/9;
  object-fit: cover;
  width: 100%;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  filter: brightness(0.95);
}

.real picture {
  display: block
}

.real:hover img {
  transform: scale(1.08);
  filter: brightness(1);
}

.real-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding: clamp(16px, 2.5vw, 24px);
  background: linear-gradient(180deg, var(--white) 0%, var(--gray-light) 100%);
}

.real h3 {
  margin: 0;
  font-size: 20px;
  color: var(--primary);
}

.real .text-muted {
  font-size: 15px;
  line-height: 1.6;
}

.tags {
  display: flex;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: var(--space-xs) 0 0;
  flex-wrap: wrap;
}

.tags li {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(8px) saturate(120%);
  -webkit-backdrop-filter: blur(8px) saturate(120%);
  color: var(--primary);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid rgba(212, 163, 115, 0.2);
  transition: var(--transition-bounce);
  box-shadow: 0 2px 6px rgba(212, 163, 115, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.real:hover .tags li {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
  color: var(--white);
  border-color: var(--accent);
  transform: translateY(-2px) scale(1.05);
  box-shadow: var(--shadow-accent);
}

@media (min-width:640px) {
  .reals-grid {
    grid-template-columns: repeat(2, 1fr)
  }
}

@media (min-width:1024px) {
  .reals-grid {
    grid-template-columns: repeat(3, 1fr)
  }
}

/* ============================================
   À PROPOS
   ============================================ */
#apropos {
  background: linear-gradient(180deg, var(--white) 0%, var(--gray-light) 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}

#apropos::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(212, 163, 115, 0.3) 50%, transparent 100%);
  box-shadow: 0 1px 3px rgba(212, 163, 115, 0.2);
}

#apropos::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(212, 163, 115, 0.06) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

#apropos .container {
  position: relative;
  z-index: 1
}

#apropos p {
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.9;
  color: var(--text-muted);
  max-width: 720px;
  margin-inline: auto;
  padding: clamp(20px, 2.5vw, 28px);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px) saturate(110%);
  -webkit-backdrop-filter: blur(12px) saturate(110%);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(15, 43, 70, 0.08),
    0 4px 16px rgba(212, 163, 115, 0.06);
  border: 1.5px solid;
  border-image: linear-gradient(135deg,
      rgba(212, 163, 115, 0.3) 0%,
      rgba(212, 163, 115, 0.1) 50%,
      rgba(212, 163, 115, 0.3) 100%) 1;
  position: relative;
  overflow: hidden;
}

/* Subtle shimmer effect */
#apropos p::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
      transparent 0%,
      rgba(212, 163, 115, 0.08) 50%,
      transparent 100%);
  animation: shimmerSlide 8s infinite;
  pointer-events: none;
}

@keyframes shimmerSlide {

  0%,
  100% {
    left: -100%;
  }

  50% {
    left: 100%;
  }
}

/* Fallback for browsers without backdrop-filter support */
@supports not (backdrop-filter: blur(12px)) {
  #apropos p {
    background: rgba(255, 255, 255, 0.98);
  }
}

/* ============================================
   CONTACT
   ============================================ */
#contact {
  background: linear-gradient(135deg, rgba(15, 43, 70, 0.03) 0%, rgba(212, 163, 115, 0.08) 50%, rgba(15, 43, 70, 0.02) 100%);
  position: relative;
  overflow: hidden;
}

#contact::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(212, 163, 115, 0.3) 50%, transparent 100%);
  box-shadow: 0 1px 3px rgba(212, 163, 115, 0.2);
  z-index: 2;
}

#contact::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(212, 163, 115, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.contact-grid>div {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.contact-grid p {
  margin: 0;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.8;
}

.contact-info-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm);
  background: var(--white);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(15, 43, 70, .06);
  transition: var(--transition);
}

.contact-info-item:hover {
  transform: translateX(8px);
  box-shadow: var(--shadow);
  border-color: rgba(212, 163, 115, .3);
}

.contact-info-item svg {
  width: 24px;
  height: 24px;
  color: var(--accent);
  flex-shrink: 0;
}

.contact-grid a {
  color: var(--primary);
  font-weight: 600;
  transition: var(--transition);
}

.contact-grid a:hover {
  color: var(--accent)
}

.form {
  background: var(--white);
  /* Formulaire un peu plus compact */
  padding: clamp(20px, 3vw, 28px);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(212, 163, 115, .15);
  position: relative;
  overflow: hidden;
}

.form::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 50%, var(--primary-light) 100%);
  background-size: 200% 100%;
  animation: shimmer 3s linear infinite;
}

.field {
  margin-bottom: var(--space-md);
  position: relative;
}

/* Floating Labels */
.field label {
  position: absolute;
  left: 18px;
  top: 16px;
  font-weight: 500;
  color: var(--text-muted);
  font-size: 15px;
  letter-spacing: 0.02em;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  background: var(--white);
  padding: 0 6px;
  z-index: 1;
}

/* Float label on focus or when input has value */
.field input:focus+label,
.field input:not(:placeholder-shown)+label,
.field textarea:focus+label,
.field textarea:not(:placeholder-shown)+label {
  top: -10px;
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.5px;
}

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  padding: 18px;
  border: 2px solid rgba(15, 43, 70, .1);
  border-radius: var(--radius-sm);
  outline: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--bg);
  font-family: inherit;
  font-size: 15px;
  color: var(--text);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
  position: relative;
}

/* Focus State */
input:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(212, 163, 115, .12),
    0 4px 12px rgba(212, 163, 115, 0.08);
  background: var(--white);
  transform: translateY(-2px);
}

/* Valid State */
input:valid:not(:placeholder-shown),
textarea:valid:not(:placeholder-shown) {
  border-color: rgba(34, 139, 34, 0.4);
  background: rgba(34, 139, 34, 0.02);
}

/* Invalid State (only when touched) */
input:invalid:not(:placeholder-shown):not(:focus),
textarea:invalid:not(:placeholder-shown):not(:focus) {
  border-color: rgba(220, 53, 69, 0.4);
  background: rgba(220, 53, 69, 0.02);
}

textarea {
  resize: vertical;
  min-height: 160px;
  padding-top: 20px;
}

.error {
  color: #c92a2a;
  font-size: 13px;
  margin-top: 6px;
  display: block;
}

.form-status {
  font-size: 14px;
  margin-top: var(--space-sm);
  padding: 12px;
  border-radius: var(--radius-sm);
  text-align: center;
  font-weight: 500;
  transition: all 0.3s ease;
}

.form-status.success {
  background: rgba(34, 139, 34, 0.1);
  color: #228B22;
  border: 1px solid rgba(34, 139, 34, 0.3);
}

.form-status.error {
  background: rgba(220, 53, 69, 0.1);
  color: #dc3545;
  border: 1px solid rgba(220, 53, 69, 0.3);
}

@media (min-width:768px) {
  .contact-grid {
    grid-template-columns: 1fr
  }
}

/* ============================================
   FOOTER - Modern Premium Design
   ============================================ */
.site-footer {
  background: linear-gradient(135deg, #0a1f3a 0%, var(--primary) 50%, #0d2844 100%);
  padding: clamp(60px, 10vw, 100px) 0 clamp(40px, 6vw, 60px);
  position: relative;
  overflow: hidden;
  color: #fff;
}

/* Subtle gradient overlay */
.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(212, 163, 115, 0.4) 50%, transparent 100%);
  box-shadow: 0 1px 6px rgba(212, 163, 115, 0.3);
}

/* Ambient glow effect */
.site-footer::after {
  content: '';
  position: absolute;
  bottom: -200px;
  right: -200px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(212, 163, 115, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.footer-inner {
  position: relative;
  z-index: 1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1.2fr;
  gap: clamp(40px, 6vw, 80px);
  margin-bottom: clamp(40px, 6vw, 60px);
}

/* Footer Brand Section */
.footer-brand {
  display: flex;
  flex-direction: column;
}

.footer-brand .brand {
  display: inline-block;
  margin-bottom: 20px;
  transition: var(--transition);
}

.footer-brand .brand:hover {
  transform: translateX(4px);
  opacity: 0.9;
}

.footer-brand img {
  filter: none;
  transition: var(--transition);
  opacity: 1;
  max-height: 40px;
}

.footer-brand p {
  margin-top: 0;
  line-height: 1.7;
  max-width: 320px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 15px;
  letter-spacing: 0.01em;
}

/* Footer Section Titles */
.footer-title {
  margin: 0 0 20px 0;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  position: relative;
  padding-bottom: 12px;
}

.footer-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent) 0%, transparent 100%);
  border-radius: 2px;
}

/* Footer Links */
.footer-links ul,
.footer-legal ul,
.footer-contact ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a,
.footer-legal a,
.footer-contact a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  padding: 4px 0;
}

.footer-links a::before,
.footer-legal a::before {
  content: '›';
  display: inline-block;
  opacity: 0.6;
  color: var(--accent);
  font-size: 18px;
  transition: var(--transition);
}

.footer-links a:hover,
.footer-legal a:hover,
.footer-contact a:hover {
  color: var(--accent);
  transform: translateX(6px);
  text-shadow: 0 0 8px rgba(212, 163, 115, 0.3);
}

.footer-links a:hover::before,
.footer-legal a:hover::before {
  opacity: 1;
  transform: translateX(2px);
}

.footer-contact span {
  color: rgba(255, 255, 255, 0.75);
  font-size: 14.5px;
}

/* Footer Social Icons */
.social ul {
  display: flex;
  gap: 14px;
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  justify-content: flex-start;
}

.social a {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.9);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

.social a::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, var(--accent) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.social a:hover {
  transform: translateY(-6px) scale(1.05);
  border-color: var(--accent);
  background: var(--white);
  color: var(--primary);
  box-shadow: 0 8px 20px rgba(212, 163, 115, 0.35),
    0 4px 12px rgba(0, 0, 0, 0.15);
}

.social a:hover::before {
  opacity: 0.1;
}

.social svg {
  position: relative;
  z-index: 1;
}

/* Footer Bottom */
.footer-bottom {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(212, 163, 115, 0.2);
  padding-top: clamp(24px, 4vw, 36px);
  margin-top: clamp(24px, 4vw, 36px);
}

.footer-bottom p {
  margin: 0;
  font-size: 14px;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.65);
}

.footer-bottom strong {
  color: #fff;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  font-size: 13px;
}

.made-by {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  font-style: italic;
}

/* Responsive Footer */
@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 48px;
    margin: 48px 0;
  }

  .footer-brand {
    align-items: center;
    margin-bottom: 0;
  }

  .footer-brand p {
    max-width: 100%;
    text-align: center;
  }

  .footer-title::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .footer-links ul,
  .footer-legal ul,
  .footer-contact ul {
    align-items: center;
    gap: 14px;
  }

  .footer-links a,
  .footer-legal a,
  .footer-contact a {
    justify-content: center;
  }

  .social ul {
    justify-content: center;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
    padding-bottom: 20px;
    margin-top: 48px;
  }
}

@media (max-width: 480px) {
  .site-footer {
    padding: 48px 0 32px;
  }

  .footer-grid {
    gap: 40px;
    margin: 40px 0;
  }

  .social a {
    width: 40px;
    height: 40px;
  }

  .footer-brand img {
    max-height: 36px;
  }
}

/* ============================================
   ANIMATIONS (Performance Optimized)
   ============================================ */

/* GPU Acceleration hints for animated elements */
.card,
.laptop-container,
.hero-media,
.ambient-light,
.scroll-indicator,
.back-to-top {
  will-change: auto;
  /* Reset - JS manages this dynamically */
  transform: translateZ(0);
  /* Force GPU layer */
}

/* Optimized reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  contain: layout style;
  /* CSS containment for paint optimization */
}

.reveal.visible {
  opacity: 1;
  transform: translateZ(0);
  /* Hardware accelerated final state */
}

.reveal:nth-child(2) {
  transition-delay: 0.1s
}

.reveal:nth-child(3) {
  transition-delay: 0.2s
}

.reveal:nth-child(4) {
  transition-delay: 0.3s
}

.reveal:nth-child(5) {
  transition-delay: 0.4s
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width:640px) {

  /* Increase touch targets in hero actions */
  .hero .actions {
    gap: 16px;
    justify-content: center;
    flex-direction: column;
    /* Stack buttons on very small screens for better hit targets */
    width: 100%;
  }

  .btn {
    padding: 16px 28px;
    width: 100%;
    /* Full width buttons for better mobile UX */
    display: inline-flex;
    justify-content: center;
    align-items: center;
    text-align: center;
  }
}

@media (max-width:480px) {
  .section {
    padding: 36px 0
  }

  .hero {
    padding: 90px 0 32px
  }

  .hero-media {
    min-height: 320px
  }

  .hero .lead {
    font-size: 15px
  }

  .hero .actions {
    margin-top: 20px;
  }

  /* Reassure items: smaller on mobile */
  .reassure {
    gap: 10px 12px;
    margin-top: 16px;
  }

  .reassure li {
    font-size: 12.5px;
    padding: 6px 12px;
  }

  /* Section titles */
  .section-title {
    font-size: clamp(24px, 7vw, 32px);
    margin-bottom: var(--space-sm);
  }

  .section-subtitle {
    font-size: 14.5px;
    margin-bottom: var(--space-sm);
  }

  /* Galerie: vignettes en 2 colonnes */
  .gallery-thumbs {
    grid-template-columns: repeat(2, 1fr)
  }

  .thumb video {
    height: 56px
  }

  .thumb span {
    font-size: 11px
  }

  /* Services: icône un peu plus petite */
  .services-grid .icon {
    width: 48px;
    height: 48px;
    padding: 10px;
    /* Adjusted padding for smaller icon */
  }

  .services-grid .card {
    padding: 24px;
    /* Fixed padding for consistency */
  }

  /* Portfolio Mobile Polish */
  .project-card .content {
    padding: 24px;
  }

  .project-card .tags {
    margin-bottom: 24px;
    gap: 8px;
  }

  .project-card .btn-outline {
    width: 100%;
    justify-content: center;
    padding: 14px 20px;
  }

  /* About Mobile Polish */
  .about-text p {
    line-height: 1.75;
    margin-bottom: 24px;
    font-size: 16px;
  }

  .about-text h2 {
    margin-bottom: 24px;
  }

  /* Cards: reduced padding */
  .card {
    padding: var(--space-sm);
  }

  /* Inputs: éviter le zoom iOS au focus */
  input[type="text"],
  input[type="email"],
  textarea {
    font-size: 16px
  }

  /* Footer plus compact */
  .social a {
    width: 34px;
    height: 34px
  }

  /* Back to top button */
  .back-to-top {
    width: 44px;
    height: 44px;
    bottom: 20px;
    right: 20px;
  }
}

/* Checkbox Custom */
.checkbox-field {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: var(--space-md);
}

.checkbox-field input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
  margin: 0;
  padding: 0;
  transform: translateY(-3px);
}

.checkbox-field label {
  margin: 0;
  padding: 0;
  font-weight: 500;
  font-size: 15px;
  color: var(--text);
  cursor: pointer;
  line-height: 1.4;
}

.checkbox-field label a {
  color: var(--primary);
  text-decoration: underline;
}

.checkbox-field label a:hover {
  color: var(--accent);
}

/* Back To Top - Amélioré */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 52px;
  height: 52px;
  background: var(--primary);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(15, 43, 70, 0.3);
  cursor: pointer;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.8);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  animation: subtlePulse 3s ease-in-out infinite;
}

@keyframes subtlePulse {

  0%,
  100% {
    box-shadow: 0 4px 16px rgba(15, 43, 70, 0.3);
  }

  50% {
    box-shadow: 0 4px 20px rgba(212, 163, 115, 0.4);
  }
}

.back-to-top:hover {
  background: var(--accent);
  transform: translateY(-6px) rotate(360deg);
  box-shadow: 0 8px 28px rgba(212, 163, 115, 0.5);
  animation: none;
}

.back-to-top svg {
  width: 24px;
  height: 24px;
  transition: transform 0.3s ease;
}

.back-to-top:hover svg {
  transform: translateY(-2px);
}

/* ============================================
   WOW FACTORS
   ============================================ */
/* Scroll Progress Bar - Gradient Animé */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 4px;
  background: linear-gradient(90deg,
      var(--accent) 0%,
      var(--primary-light) 50%,
      var(--accent) 100%);
  background-size: 200% 100%;
  z-index: 9999;
  transition: width 0.1s ease-out;
  box-shadow: 0 0 12px var(--accent-glow), 0 2px 8px rgba(212, 163, 115, 0.3);
  animation: progressGlow 3s ease-in-out infinite;
}

@keyframes progressGlow {

  0%,
  100% {
    background-position: 0% 50%;
    box-shadow: 0 0 12px var(--accent-glow), 0 2px 8px rgba(212, 163, 115, 0.3);
  }

  50% {
    background-position: 100% 50%;
    box-shadow: 0 0 20px var(--accent-glow), 0 2px 12px rgba(212, 163, 115, 0.5);
  }
}

/* Text Reveal Animation */
/* Text Reveal Animation */
.text-reveal,
.hero-text .animate-gradient.text-reveal {
  opacity: 0;
  animation: slideUpFade 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.text-reveal-delay {
  animation-delay: 0.2s;
}

/* Animations au scroll (Intersection Observer) */
.reveal {
  opacity: 0;
  transform: translateY(30px) scale(0.98);
  /* Slight scale for depth */
  transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  /* Premium Ease */
  will-change: opacity, transform;
}

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

/* Tactile Feedback (Mobile Polish) */
.btn:active,
.card:active,
.project-card:active {
  transform: scale(0.98);
  transition: transform 0.1s ease-out;
}

@keyframes slideUpFade {
  0% {
    opacity: 0;
    transform: translateY(20px);
    filter: blur(4px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .text-reveal {
    animation: none;
    opacity: 1;
    transform: none;
    filter: none;
  }

  .laptop-container {
    transition: none;
    transform: none !important;
  }

  .hero-badge {
    transition: none;
    transform: none !important;
  }

  #scroll-progress {
    display: none;
  }
}

/* Staggered Animations */
.stagger-1 {
  transition-delay: 0.1s;
}

.stagger-2 {
  transition-delay: 0.2s;
}

.stagger-3 {
  transition-delay: 0.3s;
}

.stagger-4 {
  transition-delay: 0.4s;
}

/* Parallax Container */
.hero-inner {
  perspective: 1000px;
}

/* ============================================
   PHASE 3: LOADER & FLOATING LABELS
   ============================================ */

/* Floating Labels */
.field {
  position: relative;
  margin-bottom: 24px;
}

.field input,
.field textarea {
  padding: 16px 16px 6px;
  height: 56px;
  /* Fixed height for inputs */
}

.field textarea {
  height: auto;
  min-height: 120px;
  padding-top: 24px;
}



/* Ensure override of old label styles */
label {
  display: inline-block;
}

/* Site Loader */
#site-loader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 10000;
  display: grid;
  place-items: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

#site-loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-logo {
  width: auto;
  height: auto;
  max-width: 200px;
  max-height: 120px;
  object-fit: contain;
  animation: pulseLoader 2s infinite ease-in-out;
}

@keyframes pulseLoader {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(0.9);
    opacity: 0.7;
  }
}

/* Theme Toggle Button Premium */
.theme-toggle {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

/* Effet de glow pulsant */
.theme-toggle::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow), transparent);
  opacity: 0;
  transition: opacity 0.4s;
}

.theme-toggle:focus-visible {
  box-shadow: 0 0 0 3px rgba(212, 163, 115, .4);
  outline: none;
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1) rotate(15deg);
  border-color: rgba(212, 163, 115, 0.4);
}

.theme-toggle:hover::after {
  opacity: 0.3;
}

.theme-toggle:active {
  transform: scale(0.95) rotate(-15deg);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  color: rgba(255, 255, 255, 0.9);
  transition: transform 0.4s cubic-bezier(0.68, -0.6, 0.32, 1.6), opacity 0.3s;
}

[data-theme="dark"] .theme-toggle:hover svg {
  filter: drop-shadow(0 0 8px var(--accent-glow));
}

/* Mobile Nav adjustment for toggle */
@media (max-width: 900px) {
  .theme-toggle {
    margin-left: auto;
    margin-right: 50px;
  }

  /* Position next to burger */
}

/* ============================================
   PHASE 4: HYPER-POLISH
   ============================================ */

/* Cinematic Noise Texture */
.noise-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9000;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

[data-theme="dark"] .noise-overlay {
  opacity: 0.05;
  /* Slightly stronger in dark mode */
  mix-blend-mode: overlay;
}

/* Ambient Glows */
.ambient-light {
  position: fixed;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(212, 163, 115, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(80px);
  z-index: -1;
  pointer-events: none;
  animation: floatAmbient 10s ease-in-out infinite;
  opacity: 0.6;
}

.ambient-light.one {
  top: -10%;
  right: -10%;
  animation-delay: 0s;
  background: radial-gradient(circle, rgba(12, 36, 60, 0.2) 0%, transparent 70%);
}

.ambient-light.two {
  bottom: 10%;
  left: -10%;
  animation-delay: 5s;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(212, 163, 115, 0.08) 0%, transparent 70%);
}

[data-theme="dark"] .ambient-light.one {
  background: radial-gradient(circle, rgba(12, 36, 60, 0.4) 0%, transparent 70%);
  opacity: 0.8;
}

[data-theme="dark"] .ambient-light.two {
  background: radial-gradient(circle, rgba(212, 163, 115, 0.1) 0%, transparent 70%);
  opacity: 0.6;
}

@keyframes floatAmbient {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(-30px, 30px) scale(1.1);
  }
}

/* Magnetic Button Effect Class */
.magnetic-btn {
  display: inline-block;
  transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* THEME TOGGLE FIX (Robust) */
#themeToggle,
.theme-toggle {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 10px;
  border-radius: 50%;
  color: var(--accent);
  display: flex !important;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease, transform 0.3s ease, color 0.3s ease;
  margin-left: 16px;
  width: 44px;
  height: 44px;
}

#themeToggle:hover,
.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: rotate(15deg);
}

#themeToggle svg,
.theme-toggle svg {
  width: 24px;
  height: 24px;
  stroke-width: 2px;
  pointer-events: none;
}

#themeToggle:focus,
.theme-toggle:focus {
  outline: none;
}

#themeToggle:focus-visible,
.theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ============================================
   MOBILE MENU OVERLAY (Fix for Desktop Regression)
   ============================================ */
#mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 90;
  padding: 100px 20px 40px;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  visibility: hidden;
}

#mobile-menu-overlay.open {
  transform: translateX(0);
  visibility: visible;
}

/* ============================================
   ULTRA-PREMIUM ENHANCEMENTS
   ============================================ */

/* Card Tilt - Highlight Effect */
.card::after,
.real::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
      rgba(212, 163, 115, 0.15),
      transparent 40%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  border-radius: inherit;
  z-index: 2;
}

.card:hover::after,
.real:hover::after {
  opacity: 1;
}

/* Enhance card for tilt */
.card,
.real {
  position: relative;
  transition: transform 0.1s ease-out;
  will-change: transform;
}

/* Ripple Effect */
.ripple-effect {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 163, 115, 0.6) 0%, transparent 70%);
  transform: scale(0);
  animation: ripple-animation 0.6s ease-out;
  pointer-events: none;
  z-index: 100;
}

@keyframes ripple-animation {
  to {
    transform: scale(2.5);
    opacity: 0;
  }
}

/* Micro-interactions: Bullets hover */
.reassure li {
  position: relative;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.reassure li:hover {
  transform: translateX(4px) scale(1.05);
}

.reassure li svg {
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.reassure li:hover svg {
  transform: rotate(360deg) scale(1.2);
  filter: drop-shadow(0 0 6px rgba(212, 163, 115, 0.6));
}

/* Tags enhanced hover */
.tags li {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tags li:hover {
  transform: translateY(-3px) scale(1.08);
}

/* Services icons SVG draw animation */
.services-grid .icon svg {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: draw-svg 2s ease-out forwards;
}

@keyframes draw-svg {
  to {
    stroke-dashoffset: 0;
  }
}

.services-grid .card:hover .icon svg {
  stroke-dashoffset: 0;
  /*  Keep visible! (Override generic 1000) */
  animation: pulse-svg 0.6s ease-in-out;
}

@keyframes pulse-svg {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.1);
  }
}

/* ============================================
   SCROLL DOTS NAVIGATION
   ============================================ */
.scroll-dots {
  position: fixed;
  right: 30px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.scroll-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(15, 43, 70, 0.3);
  border: 2px solid rgba(212, 163, 115, 0.4);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  padding: 0;
}

.scroll-dot:hover {
  transform: scale(1.3);
  background: rgba(212, 163, 115, 0.5);
  box-shadow: 0 0 12px rgba(212, 163, 115, 0.6);
}

.scroll-dot.active {
  background: var(--accent);
  transform: scale(1.5);
  box-shadow: 0 0 16px rgba(212, 163, 115, 0.8);
}

.dot-tooltip {
  position: absolute;
  right: 25px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--primary);
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s;
  text-transform: capitalize;
}

.scroll-dot:hover .dot-tooltip {
  opacity: 1;
  right: 30px;
}

@media (max-width: 768px) {
  .scroll-dots {
    display: none;
  }
}

/* ============================================
   BACKGROUND PARTICLES
   ============================================ */
.bg-particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bg-particle {
  position: absolute;
  background: radial-gradient(circle, rgba(212, 163, 115, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  animation: float-particle linear infinite;
  filter: blur(2px);
}

@keyframes float-particle {
  0% {
    transform: translateY(100vh) rotate(0deg);
    opacity: 0;
  }

  10% {
    opacity: 1;
  }

  90% {
    opacity: 1;
  }

  100% {
    transform: translateY(-100px) rotate(360deg);
    opacity: 0;
  }
}

/* ============================================
   CONFETTI ANIMATION
   ============================================ */
@keyframes confetti-fall {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }

  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

/* ============================================
   ACHIEVEMENT TOAST
   ============================================ */
.achievement-toast {
  position: fixed;
  top: 90px;
  right: -400px;
  background: linear-gradient(135deg, var(--primary) 0%, #0a1f3a 100%);
  color: white;
  padding: 16px 20px;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(212, 163, 115, 0.3);
  display: flex;
  gap: 14px;
  align-items: center;
  z-index: 10000;
  transition: right 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  min-width: 280px;
  backdrop-filter: blur(10px);
}

.achievement-toast.show {
  right: 30px;
}

.toast-icon {
  font-size: 32px;
  animation: bounce-trophy 0.6s ease-in-out infinite;
}

@keyframes bounce-trophy {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-5px);
  }
}

.toast-content {
  flex: 1;
}

.toast-title {
  font-weight: 700;
  font-size: 15px;
  color: var(--accent);
  margin-bottom: 4px;
  letter-spacing: 0.5px;
}

.toast-desc {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
}

/* ============================================
   ANIMATED GRID BACKGROUND
   ============================================ */
.hero::before,
#services::before,
#apropos::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(212, 163, 115, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212, 163, 115, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: grid-slide 20s linear infinite;
  pointer-events: none;
  opacity: 0.5;
}

@keyframes grid-slide {
  0% {
    background-position: 0 0, 0 0;
  }

  100% {
    background-position: 50px 50px, 50px 50px;
  }
}

/* ============================================
   DARK MODE ENHANCEMENTS
   ============================================ */
[data-theme="dark"] {
  --bg: #0a1929;
  --white: #1a2332;
  --text: #e8eaed;
  --text-muted: #b4b8bb;
  --gray-light: #151f2e;
  --primary: #0f1921;
  --primary-light: #1a2736;
  --accent: #e4b583;
  --accent-light: #f0c899;
}

[data-theme="dark"] .site-header {
  background: rgba(10, 25, 41, 0.9);
  border-bottom-color: rgba(228, 181, 131, 0.1);
}

[data-theme="dark"] .card,
[data-theme="dark"] .form {
  background: rgba(26, 35, 50, 0.6);
  border-color: rgba(228, 181, 131, 0.1);
}

[data-theme="dark"] input,
[data-theme="dark"] textarea {
  background: rgba(15, 25, 33, 0.8);
  color: var(--text);
  border-color: rgba(228, 181, 131, 0.15);
}

[data-theme="dark"] #apropos p {
  background: rgba(26, 35, 50, 0.85);
}

/* Smooth transitions for theme switching */
* {
  transition: background-color 0.4s ease,
    color 0.4s ease,
    border-color 0.4s ease !important;
}

/* Prevent transition on page load */
.preload * {
  transition: none !important;
}

/* ============================================
   DARK MODE - ENHANCED CONTRAST FIXES
   ============================================ */

/* SVG Icons in cards - ensure they are visible */
[data-theme="dark"] .card .icon svg,
[data-theme="dark"] .services-grid .card .icon svg,
[data-theme="dark"] #services .card .icon svg {
  stroke: var(--primary) !important;
  color: var(--primary) !important;
}

/* Card text - ensure all text is visible */
[data-theme="dark"] .card *,
[data-theme="dark"] .services-grid .card * {
  color: #a0aec0;
}

[data-theme="dark"] .card h3,
[data-theme="dark"] .services-grid .card h3,
[data-theme="dark"] .real h3,
[data-theme="dark"] .real-body h3 {
  color: #D4A373 !important;
}

/* Contact section - SVG icons */
[data-theme="dark"] .contact-info-item svg {
  stroke: #D4A373 !important;
  color: #D4A373 !important;
}

[data-theme="dark"] .contact-info-item span {
  color: #e8ecf1 !important;
}

[data-theme="dark"] .contact-info-item a {
  color: #e8ecf1 !important;
}

/* Reassure list in hero */
[data-theme="dark"] .reassure svg {
  stroke: var(--primary) !important;
}

[data-theme="dark"] .reassure span {
  color: var(--text) !important;
}

/* Tags in portfolio */
[data-theme="dark"] .tags li {
  color: var(--text) !important;
  background: rgba(212, 163, 115, 0.15) !important;
  border-color: rgba(212, 163, 115, 0.3) !important;
}

/* Footer icons */
[data-theme="dark"] .site-footer svg,
[data-theme="dark"] .social svg {
  stroke: rgba(255, 255, 255, 0.8) !important;
}

/* Scroll indicator */
[data-theme="dark"] .scroll-indicator {
  border-color: var(--primary) !important;
}

[data-theme="dark"] .scroll-indicator .chevron {
  border-color: var(--primary) !important;
}

/* Back to top button */
[data-theme="dark"] #backToTop svg {
  stroke: var(--primary) !important;
}

/* Mobile overlay */
[data-theme="dark"] .mobile-menu-overlay {
  background: rgba(6, 18, 30, 0.98) !important;
}

[data-theme="dark"] .mobile-nav-list a {
  color: var(--text) !important;
}

/* Gallery thumbnails text */
[data-theme="dark"] .gallery-thumbs .thumb span {
  color: var(--text) !important;
}

[data-theme="dark"] .gallery-thumbs .thumb.active span {
  color: var(--primary) !important;
}

/* Form labels */
[data-theme="dark"] label {
  color: var(--text-muted) !important;
}

/* Checkbox label link */
[data-theme="dark"] .checkbox-field label,
[data-theme="dark"] .checkbox-field label a {
  color: var(--text) !important;
}

[data-theme="dark"] .checkbox-field label a:hover {
  color: var(--primary) !important;
}

/* Icon background in dark mode */
[data-theme="dark"] .icon {
  background: linear-gradient(135deg, #D4A373 0%, #e5c199 100%) !important;
  border-color: #D4A373 !important;
  color: #06121e !important;
}

[data-theme="dark"] .icon svg {
  stroke: #06121e !important;
  color: #06121e !important;
}

/* ============================================
   FINAL DARK MODE OVERRIDES - HIGHEST PRIORITY
   ============================================ */
/* Force card titles to be golden in dark mode */
[data-theme="dark"] .services-grid .card h3,
[data-theme="dark"] .services-grid article.card h3,
[data-theme="dark"] #services .card h3,
[data-theme="dark"] #services article.card h3,
[data-theme="dark"] .card>h3,
[data-theme="dark"] article.card>h3,
html[data-theme="dark"] .card h3,
html[data-theme="dark"] article.card h3 {
  color: #D4A373 !important;
  -webkit-text-fill-color: #D4A373 !important;
}

/* Force section titles to be golden */
[data-theme="dark"] .section-title,
[data-theme="dark"] h2.section-title,
html[data-theme="dark"] .section-title {
  color: #D4A373 !important;
  -webkit-text-fill-color: #D4A373 !important;
}

/* Force all h3 in cards to golden */
[data-theme="dark"] h3 {
  color: #D4A373 !important;
}

/* Back to top button - make it visible */
[data-theme="dark"] .back-to-top {
  background: linear-gradient(135deg, #D4A373 0%, #e5c199 100%) !important;
  color: #06121e !important;
  border-color: #D4A373 !important;
}

[data-theme="dark"] .back-to-top svg {
  stroke: #06121e !important;
  color: #06121e !important;
}

/* Scroll down indicator - make it visible */
/* Scroll down indicator - Dark Glassmorphism */
[data-theme="dark"] .scroll-indicator {
  background: rgba(255, 255, 255, 0.03) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: var(--accent) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
}

[data-theme="dark"] .scroll-indicator:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: var(--accent) !important;
  box-shadow: 0 8px 32px rgba(212, 163, 115, 0.15) !important;
  transform: translateX(-50%) !important;
}

[data-theme="dark"] .scroll-indicator .chevron {
  border-color: var(--accent) !important;
}

[data-theme="dark"] .scroll-indicator::before,
[data-theme="dark"] .scroll-indicator::after {
  display: none !important;
}

/* ============================================
   CONTACT FORM - COMPLETE OVERRIDE
   ============================================ */

/* Form container */
#contact form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Form fields */
#contact .field {
  position: relative;
  margin-bottom: 0;
}

#contact .field input,
#contact .field textarea {
  width: 100%;
  padding: 16px;
  font-size: 15px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  transition: all 0.3s ease;
}

#contact .field input::placeholder,
#contact .field textarea::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

#contact .field input:focus,
#contact .field textarea:focus {
  outline: none;
  border-color: #D4A373;
  box-shadow: 0 0 0 3px rgba(212, 163, 115, 0.2);
}

#contact .field textarea {
  min-height: 120px;
  resize: vertical;
}

/* Checkbox field - CLEAN VERSION */
#contact .checkbox-field {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 12px !important;
  margin: 8px 0 16px 0 !important;
  padding: 0 !important;
}

#contact .checkbox-field input[type="checkbox"] {
  appearance: none !important;
  -webkit-appearance: none !important;
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  min-height: 20px !important;
  border: 2px solid #D4A373 !important;
  border-radius: 4px !important;
  background: transparent !important;
  cursor: pointer !important;
  margin: 0 !important;
  padding: 0 !important;
  flex-shrink: 0 !important;
  position: relative !important;
  top: 0 !important;
  transform: none !important;
}

#contact .checkbox-field input[type="checkbox"]:checked {
  background: #D4A373 !important;
}

#contact .checkbox-field input[type="checkbox"]:checked::after {
  content: '✓' !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  color: #06121e !important;
  font-size: 14px !important;
  font-weight: bold !important;
}

#contact .checkbox-field label {
  display: inline !important;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  color: #e8ecf1 !important;
  cursor: pointer !important;
  line-height: 1.5 !important;
}

#contact .checkbox-field label a {
  color: #D4A373 !important;
  text-decoration: underline !important;
}

#contact .checkbox-field label a:hover {
  color: #e5c199 !important;
}

/* Hide error span from affecting layout */
#contact .checkbox-field .error {
  display: block !important;
  width: 100% !important;
  margin-top: 4px !important;
}

/* Submit button */
#contact button[type="submit"] {
  margin-top: 8px;
}

/* Privacy notice text */
.form-privacy-notice {
  font-size: 14px;
  color: #e8ecf1;
  margin-top: 16px;
  text-align: center;
}

.form-privacy-notice a {
  color: #D4A373;
  text-decoration: underline;
  font-weight: 500;
}

.form-privacy-notice a:hover {
  color: #e5c199;
}

/* Dark mode override for privacy notice */
[data-theme="dark"] .form-privacy-notice {
  color: #e8ecf1 !important;
}

[data-theme="dark"] .form-privacy-notice a {
  color: #D4A373 !important;
  text-decoration: underline !important;
}

/* Hero secondary button - make visible */
[data-theme="dark"] .btn-secondary {
  color: #D4A373 !important;
  border-color: #D4A373 !important;
  background: transparent !important;
}

[data-theme="dark"] .btn-secondary span {
  color: #D4A373 !important;
}

[data-theme="dark"] .btn-secondary:hover {
  background: #D4A373 !important;
  color: #ffffff !important;
}

[data-theme="dark"] .btn-secondary:hover span {
  color: #ffffff !important;
}

/* Reassure badges icons - make visible */
[data-theme="dark"] .reassure li {
  background: rgba(212, 163, 115, 0.15) !important;
  border-color: rgba(212, 163, 115, 0.3) !important;
}

[data-theme="dark"] .reassure li svg {
  stroke: #D4A373 !important;
  color: #D4A373 !important;
}

[data-theme="dark"] .reassure li span {
  color: #e8ecf1 !important;
}

/* ============================================
   GUIDING LINE (GSAP 3D Effect)
   ============================================ */
#guiding-line-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
  /* Above background, below some modal/nav if needed, but visually consistent */
  overflow: hidden;
  mix-blend-mode: screen;
  /* Nice glow blending */
}

#guiding-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

#guiding-path {
  fill: none;
  stroke: var(--primary);
  /* Fallback */
  stroke-width: 3px;
  stroke-linecap: round;
  stroke-linejoin: round;

  /* The "energy beam" look */
  filter: drop-shadow(0 0 8px var(--primary)) drop-shadow(0 0 15px var(--accent));
  opacity: 0.6;
}

[data-theme="dark"] #guiding-path {
  stroke: var(--primary);
  /* Gold */
  filter: drop-shadow(0 0 10px var(--primary)) drop-shadow(0 0 20px rgba(212, 163, 115, 0.4));
  opacity: 0.8;
}

/* The "Head" projectile */
#guiding-head {
  fill: var(--white);
  filter: drop-shadow(0 0 10px var(--white)) drop-shadow(0 0 20px var(--primary));
}

/* ============================================
   STACKED CARDS EFFECT
   ============================================ */
/* Apply sticky positioning to main sections */
main>section {
  position: sticky;
  top: 0;
  /* Ensure background is opaque so content doesn't show through */
  background-color: var(--bg);
  /* Optional: Adds a subtle shadow to emphasize the stacking/card effect */
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

/* Specific Top Clearances (if needed for header) */
/* Assuming header is about 80px-100px. We use 0 for full overlap, or a small offset if we want a "stack" look */
main>section {
  top: 0;
}

/* Z-Index Stacking Order */
/* We need them to stack in order. Default HTML order usually works with sticky 
   BUT defining z-indexes ensures the next one covers the previous one correctly. */

#hero {
  z-index: 1;
}

#services {
  z-index: 2;
}

#realisations {
  z-index: 3;
}

#apropos {
  z-index: 4;
}

#contact {
  z-index: 5;
}

/* Dark mode compatibility */
[data-theme="dark"] main>section {
  background-color: var(--bg);
  /* or var(--surface) if you want them distinct */
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
}

/* Mobile: Sometimes sticky is annoying on small screens. 
   User didn't ask to disable, but it's good practice to align top. */
@media (max-width: 768px) {
  main>section {
    top: 0;
  }
}

/* ============================================
   SCROLL PATH ANIMATION
   ============================================ */
#path-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  pointer-events: none;
  z-index: 0;
  /* Base level! */
  overflow: hidden;
  /* Blend mode removed to ensure it's behind content */
}

[data-theme="dark"] #path-container {
  mix-blend-mode: screen;
  /* Glow effect in dark mode */
}

#scroll-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.path-line {
  /* stroke is now handled by SVG gradient attribute */
  stroke-width: 2px;
  stroke-opacity: 1;
  /* Gradient controls opacity */
  fill: none;
  transition: stroke 0.3s ease;
  filter: drop-shadow(0 0 2px rgba(212, 163, 115, 0.3));
}

[data-theme="dark"] .path-line {
  stroke: var(--accent);
  stroke-opacity: 0.3;
  /* More visible in dark mode */
  filter: drop-shadow(0 0 8px rgba(212, 163, 115, 0.4));
}

#path-follower {
  transition: opacity 0.5s ease;
  will-change: transform;
}

.follower-glow {
  /* Fill is handled by SVG radial gradient */
  /* Remove fill override so gradient works */
  opacity: 0.8;
  /* Blur via CSS is smoother than SVG filter sometimes, but gradient includes fade */
  filter: blur(4px);
  animation: pulseGlow 4s infinite alternate ease-in-out;
}

@keyframes pulseGlow {
  0% {
    opacity: 0.4;
    transform: scale(0.8);
  }

  100% {
    opacity: 0.8;
    transform: scale(1.2);
  }
}

.follower-core {
  fill: #FFFFFF;
  stroke: var(--accent);
  stroke-width: 2px;
  filter: drop-shadow(0 0 5px rgba(212, 163, 115, 0.8));
}

[data-theme="dark"] .follower-core {
  fill: var(--accent);
  stroke: var(--primary);
}

/* 
  STACKING CONTEXT MANAGEMENT 
  Goal: Path (0) < Content (1) 
  Solution: Content sections must be > 0.
*/

.section {
  position: relative;
  z-index: 1;
  /* Content sits on top of path */
  background-color: transparent;
  /* Transparent so we see body bg + path */
}

/* Header must be above everything */
header.site-header {
  position: fixed;
  z-index: 100;
}

/* Footer above path */
footer.site-footer {
  position: relative;
  z-index: 1;
  background-color: var(--primary);
  /* Footer has own solid bg */
}

/* Ambient lights behind path? No, lights usually overlay */
.ambient-light {
  z-index: 2;
  /* In front of path for atmosphere */
  pointer-events: none;
}

/* Ensure background is really in back */
.noise-overlay {
  z-index: -2;
}

/* ============================================
   GDPR COMPLIANCE STYLES
   ============================================ */

/* Checkbox Field */
.checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 24px;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.checkbox-field input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-radius: 4px;
  margin-top: 2px;
  cursor: pointer;
  background: transparent;
  position: relative;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.checkbox-field input[type="checkbox"]:checked {
  background: var(--primary);
  border-color: var(--primary);
}

.checkbox-field input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 6px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-field input[type="checkbox"]:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.checkbox-field label a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 2px;
}

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

/* Cookie Banner */
#cookie-banner {
  display: none;
  /* Hidden by default until JS runs */
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  width: min(90%, 600px);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  /* Always on top */
  flex-direction: column;
  gap: 15px;
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

#cookie-banner.visible {
  display: flex;
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

#cookie-banner p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.5;
}

#cookie-banner .actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* Dark Mode Overrides */
[data-theme="dark"] #cookie-banner {
  background: rgba(6, 18, 30, 0.85);
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .checkbox-field input[type="checkbox"] {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .checkbox-field input[type="checkbox"]:checked {
  background: var(--primary);
  border-color: var(--primary);
}

[data-theme="dark"] .checkbox-field input[type="checkbox"]:checked::after {
  border-color: #000;
}

/* FIX: Override generic .field label styles for checkbox */
.checkbox-field label {
  position: static;
  transform: none;
  pointer-events: auto;
  background: transparent;
  padding: 0;
  margin-top: 2px;
  /* Align with checkbox */
  font-weight: 400;
  font-size: 0.9rem;
  color: var(--text-muted);
}

[data-theme="dark"] .checkbox-field label {
  color: var(--text-muted);
}

/* REFINEMENT: Robust Checkbox Styling */
.checkbox-field input[type="checkbox"] {
  /* Reset generic input styles */
  background-image: none !important;
  box-shadow: none !important;
  transform: none !important;
  transition: border-color 0.2s, background-color 0.2s !important;
}

/* Fix generic :focus effects */
.checkbox-field input[type="checkbox"]:focus {
  box-shadow: 0 0 0 2px var(--accent) !important;
  transform: none !important;
  background-color: transparent !important;
  border-color: var(--accent) !important;
}

/* Fix generic :invalid effects (remove red tint on unchecked required) */
.checkbox-field input[type="checkbox"]:invalid,
.checkbox-field input[type="checkbox"]:valid {
  background: transparent !important;
  border-color: var(--border) !important;
}

/* Checked state overrides */
.checkbox-field input[type="checkbox"]:checked {
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
}

/* Dark mode adjustments */
[data-theme="dark"] .checkbox-field input[type="checkbox"]:invalid,
[data-theme="dark"] .checkbox-field input[type="checkbox"]:valid {
  border-color: rgba(255, 255, 255, 0.2) !important;
  background: rgba(0, 0, 0, 0.3) !important;
}

[data-theme="dark"] .checkbox-field input[type="checkbox"]:checked {
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
}

/* REFINEMENT: Improve Checkbox Label Readability */
.checkbox-field label {
  color: var(--text) !important;
  /* Force darker color (Dark Blue) */
  font-weight: 500 !important;
  /* Adding weight for better visibility */
}

/* Ensure link is distinct but readable */
.checkbox-field label a {
  color: var(--primary-light) !important;
  font-weight: 600 !important;
}

/* Dark mode specific - ensure it stays light */
[data-theme="dark"] .checkbox-field label {
  color: #e8ecf1 !important;
  /* Force light off-white */
}

[data-theme="dark"] .checkbox-field label a {
  color: var(--accent) !important;
}

/* FINAL FIX: Ultra-high specificity to readability */
#contact .checkbox-field label,
#contact-form .checkbox-field label {
  color: #0C243C !important;
  /* Hardcoded Dark Blue */
  opacity: 1 !important;
  font-weight: 500 !important;
  text-shadow: none !important;
  -webkit-text-fill-color: #0C243C !important;
}

[data-theme="dark"] #contact .checkbox-field label,
[data-theme="dark"] #contact-form .checkbox-field label {
  color: #e8ecf1 !important;
  -webkit-text-fill-color: #e8ecf1 !important;
}

/* REFINEMENT: Custom Checkbox via Label (Most Robust) */

/* 1. Hide the native input completely but keep it accessible for tab/screen readers */
.checkbox-field input[type="checkbox"] {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
  pointer-events: none;
  margin: 0;
}

/* 2. Style the label to hold the custom box */
.checkbox-field label {
  position: relative;
  padding-left: 32px;
  /* Space for box */
  cursor: pointer;
  display: inline-block;
  user-select: none;
  min-height: 24px;
  /* Align with box height */
}

/* 3. Create the box */
.checkbox-field label::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-radius: 4px;
  background: transparent;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
}

/* 4. Create the checkmark */
.checkbox-field label::after {
  content: '';
  position: absolute;
  left: 7px;
  top: 3px;
  width: 6px;
  height: 12px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  opacity: 0;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* checked state: box */
.checkbox-field input[type="checkbox"]:checked+label::before {
  background-color: var(--primary);
  border-color: var(--primary);
}

/* checked state: checkmark */
.checkbox-field input[type="checkbox"]:checked+label::after {
  transform: rotate(45deg) scale(1);
  opacity: 1;
}

/* focus state: ring */
.checkbox-field input[type="checkbox"]:focus+label::before {
  box-shadow: 0 0 0 4px rgba(212, 163, 115, 0.25);
  /* Accent shadow */
  border-color: var(--accent);
}

/* invalid state overrides */
.checkbox-field input[type="checkbox"]:invalid+label::before {
  border-color: var(--border);
  /* No red border by default */
}

/* Dark mode adjustments */
[data-theme="dark"] .checkbox-field label::before {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .checkbox-field input[type="checkbox"]:checked+label::before {
  background-color: var(--primary);
  /* Orange in dark mode logic? No, primary is gold in dark mode usually, wait. */
  border-color: var(--primary);
}

/* Ensure checkmark is black if primary is light in dark mode */
[data-theme="dark"] .checkbox-field input[type="checkbox"]:checked+label::after {
  border-color: #06121e;
  /* Dark check on Gold bg */
}

/* 
   ==========================================================================
   NUCLEAR OPTION: FINAL CHECKBOX FIX
   Overrides all previous conflicting #contact rules
   ==========================================================================
*/

/* 1. Reset Parent Layout (Kill Flex conflict) */
#contact .checkbox-field,
#contact-form .checkbox-field {
  display: block !important;
  position: relative !important;
  margin: 10px 0 20px 0 !important;
  padding: 0 !important;
  width: 100% !important;
}

/* 2. Hide Native Input (It was interfering) */
#contact .checkbox-field input[type="checkbox"],
#contact-form .checkbox-field input[type="checkbox"] {
  position: absolute !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  pointer-events: none !important;
  margin: 0 !important;
  z-index: -1 !important;
}

/* 3. Style Label Container (The Clickable Area) */
#contact .checkbox-field label,
#contact-form .checkbox-field label {
  display: inline-block !important;
  position: relative !important;
  padding-left: 36px !important;
  /* Force space for box */
  margin: 0 !important;
  cursor: pointer !important;
  font-size: 15px !important;
  line-height: 24px !important;
  /* Vertically center with 20px box */
  text-align: left !important;
  width: auto !important;
  /* FORCE VISIBILITY & COLOR */
  color: #0C243C !important;
  opacity: 1 !important;
  font-weight: 500 !important;
  -webkit-text-fill-color: #0C243C !important;
}

/* 4. The Custom Box (Pseudo-element) */
#contact .checkbox-field label::before,
#contact-form .checkbox-field label::before {
  content: '' !important;
  position: absolute !important;
  left: 0 !important;
  top: 2px !important;
  /* precise alignment */
  width: 20px !important;
  height: 20px !important;
  border: 2px solid rgba(15, 43, 70, 0.2) !important;
  border-radius: 4px !important;
  background-color: #fff !important;
  transition: all 0.2s ease !important;
  box-sizing: border-box !important;
  z-index: 1 !important;
}

/* 5. The Checkmark Icon */
#contact .checkbox-field label::after,
#contact-form .checkbox-field label::after {
  content: '' !important;
  position: absolute !important;
  left: 7px !important;
  top: 5px !important;
  width: 6px !important;
  height: 12px !important;
  border: solid #ffffff !important;
  border-width: 0 2px 2px 0 !important;
  transform: rotate(45deg) scale(0) !important;
  opacity: 0 !important;
  transition: all 0.2s ease !important;
  z-index: 2 !important;
}

/* 6. Checked User State */
#contact .checkbox-field input:checked+label::before,
#contact-form .checkbox-field input:checked+label::before {
  background-color: #0C243C !important;
  /* Primary color */
  border-color: #0C243C !important;
}

#contact .checkbox-field input:checked+label::after,
#contact-form .checkbox-field input:checked+label::after {
  transform: rotate(45deg) scale(1) !important;
  opacity: 1 !important;
}

/* 7. Dark Mode Overrides */
[data-theme="dark"] #contact .checkbox-field label,
[data-theme="dark"] #contact-form .checkbox-field label {
  color: #e8ecf1 !important;
  -webkit-text-fill-color: #e8ecf1 !important;
}

[data-theme="dark"] #contact .checkbox-field label a,
[data-theme="dark"] #contact-form .checkbox-field label a {
  color: #D4A373 !important;
}

[data-theme="dark"] #contact .checkbox-field label::before,
[data-theme="dark"] #contact-form .checkbox-field label::before {
  background-color: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

[data-theme="dark"] #contact .checkbox-field input:checked+label::before,
[data-theme="dark"] #contact-form .checkbox-field input:checked+label::before {
  background-color: #D4A373 !important;
  border-color: #D4A373 !important;
}

[data-theme="dark"] #contact .checkbox-field input:checked+label::after,
[data-theme="dark"] #contact-form .checkbox-field input:checked+label::after {
  border-color: #06121e !important;
}