/* ==========================================================================
   Design System — axelantelme.fr
   Thème sombre premium, typographie Space Grotesk, tokens CSS
   ========================================================================== */

/* --- Reset + Fonts + Tokens -------------------------------------------- */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* --- Tokens (thème sombre par défaut) ---------------------------------- */

:root,
[data-theme="dark"] {
  /* Arrière-plans */
  --bg-primary: #050508;
  --bg-secondary: #0a0d14;
  --bg-tertiary: #111827;
  --bg-card: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.1);
  --border-hover: rgba(37, 99, 235, 0.4);

  /* Texte */
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.6);
  --text-muted: rgba(255, 255, 255, 0.35);

  /* Accent */
  --accent: #2563EB;
  --accent-light: #60a5fa;
  --accent-glow: rgba(37, 99, 235, 0.3);
  --accent-bg: rgba(37, 99, 235, 0.08);
  --accent-gradient: linear-gradient(135deg, #2563EB, #818cf8);

  /* Composants */
  --nav-bg: rgba(5, 5, 8, 0.8);
  --card-border: rgba(255, 255, 255, 0.1);

  /* Échelle d'espacement */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Rayons */
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-pill: 99px;

  /* Easing */
  --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --- Tokens (thème clair) ---------------------------------------------- */

[data-theme="light"] {
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --bg-card: #ffffff;
  --border: rgba(0, 0, 0, 0.12);
  --border-hover: rgba(37, 99, 235, 0.4);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --accent-light: #2563EB;
  --nav-bg: rgba(255, 255, 255, 0.85);
  --card-border: rgba(0, 0, 0, 0.1);
  --accent-bg: rgba(37, 99, 235, 0.08);
  --accent-glow: rgba(37, 99, 235, 0.2);
}

/* Light mode card shadows for depth (since bg-card = bg-primary = white) */
[data-theme="light"] .bento-card,
[data-theme="light"] .service-card,
[data-theme="light"] .contact-info-card,
[data-theme="light"] .contact-chip {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .bento-card:hover,
[data-theme="light"] .service-card:hover,
[data-theme="light"] .contact-info-card:hover {
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.1), 0 8px 24px rgba(0, 0, 0, 0.06);
}

/* Light mode section tag — darker blue for contrast */
[data-theme="light"] .section-tag {
  color: #1d4ed8;
}

/* Light mode service num — visible watermark */
[data-theme="light"] .service-num {
  color: rgba(37, 99, 235, 0.12);
}

/* Light mode tech pills */
[data-theme="light"] .tech-pill {
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
  border-color: rgba(37, 99, 235, 0.15);
}

/* Light mode project tags */
[data-theme="light"] .project-tags span {
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
  border-color: rgba(37, 99, 235, 0.15);
}

/* Light mode services bg for rhythm */
[data-theme="light"] .services {
  background: #f8fafc;
}

/* Light mode contact bg */
[data-theme="light"] .contact {
  background: #ffffff;
}

/* Light mode nav — subtle border */
[data-theme="light"] .nav {
  border-bottom-color: rgba(0, 0, 0, 0.06);
}

/* Light mode footer */
[data-theme="light"] .footer span,
[data-theme="light"] .footer a {
  color: #64748b;
}

/* Light mode bento stat */
[data-theme="light"] .bento-stat {
  color: #1d4ed8;
}

/* Light mode progress bar */
[data-theme="light"] .scroll-progress {
  background: linear-gradient(90deg, #2563EB, #1d4ed8);
}

/* Light mode hero tag pill */
[data-theme="light"] .hero-tag {
  background: rgba(37, 99, 235, 0.1);
  border-color: rgba(37, 99, 235, 0.2);
  color: #1d4ed8;
}

/* Forcer le thème sombre (hero, projets, etc.) */
.always-dark {
  --bg-primary: #050508;
  --bg-secondary: #0a0d14;
  --bg-tertiary: #111827;
  --bg-card: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.1);
  --border-hover: rgba(37, 99, 235, 0.4);
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.6);
  --text-muted: rgba(255, 255, 255, 0.35);
  --nav-bg: rgba(5, 5, 8, 0.8);
  --card-border: rgba(255, 255, 255, 0.1);
  --accent-bg: rgba(37, 99, 235, 0.1);
  --accent-glow: rgba(37, 99, 235, 0.3);
}

/* Transition de thème */
body,
section,
.nav,
.footer {
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

/* --- Réduction de mouvement -------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --- Base -------------------------------------------------------------- */

/* scroll-behavior handled by Lenis — no CSS override */

body {
  font-family: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

/* --- Accessibilité ----------------------------------------------------- */

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-sm);
  z-index: 9999;
  font-weight: 600;
}

.skip-link:focus {
  top: var(--space-md);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* --- Utilitaires ------------------------------------------------------- */

.gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

@media (min-width: 768px) {
  .container {
    padding: 0 48px;
  }
}

/* --- En-tête de section ------------------------------------------------ */

.section-header {
  margin-bottom: var(--space-3xl);
  text-align: center;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-bottom: var(--space-md);
}

.section-line {
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--accent);
  vertical-align: middle;
}

/* --- Séparateur de section --------------------------------------------- */

.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-glow), var(--accent), var(--accent-glow), transparent);
  transform-origin: left;
  /* scaleX animated by GSAP */
}

/* --- Transition dégradée entre sections -------------------------------- */

.gradient-transition {
  height: 64px;
  background: linear-gradient(to bottom, var(--bg-primary), var(--bg-secondary));
  pointer-events: none;
}


/* ==========================================================================
   Navigation
   ========================================================================== */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: var(--space-md) 20px;
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.nav-logo {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-link {
  display: none;
  position: relative;
  overflow: hidden;
  font-size: 14px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.5);
}

@media (min-width: 768px) {
  .nav-link { display: inline-flex; }
}

.nav-link-inner {
  display: inline-block;
  transition: transform 0.3s ease;
}

.nav-link-clone {
  position: absolute;
  top: 100%;
  left: 0;
  color: var(--accent-light);
}

.nav-link:hover .nav-link-inner {
  transform: translateY(-100%);
}

/* --- Sélecteur de thème ------------------------------------------------ */

.theme-toggle {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-pill);
  padding: var(--space-xs);
}

.theme-toggle button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.5);
  transition: background 0.2s, box-shadow 0.2s, color 0.2s;
}

.theme-toggle button:hover {
  color: rgba(255, 255, 255, 0.8);
}

.theme-toggle button[aria-pressed="true"] {
  background: var(--accent);
  box-shadow: 0 0 12px rgba(37, 99, 235, 0.4);
  color: #fff;
}

/* --- Hamburger --------------------------------------------------------- */

.nav-hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  z-index: 1001;
}

@media (min-width: 768px) {
  .nav-hamburger {
    display: none;
  }
}

.nav-hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.3s var(--ease-out-expo), opacity 0.3s;
  transform-origin: center;
}

.nav-hamburger.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-hamburger.is-open span:nth-child(2) {
  opacity: 0;
}

.nav-hamburger.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --- Menu mobile ------------------------------------------------------- */

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-xl);
  background: var(--bg-primary);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
}

.mobile-menu a {
  font-size: 32px;
  font-weight: 600;
  color: var(--text-primary);
  transition: color 0.2s;
}

.mobile-menu a:hover {
  color: var(--accent-light);
}


/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  height: 100vh;
  height: 100dvh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 120px 0 var(--space-3xl);
  z-index: 10;
  background: var(--bg-primary);
}

/* All pin-spacers get stacking context */
.pin-spacer {
  z-index: 2 !important;
  position: relative !important;
}

/* Hero pin-spacer: solid background to hide sections scrolling behind */
.hero.pin-spacer,
.pin-spacer > .hero {
  background: var(--bg-primary) !important;
}

.marquee {
  position: relative;
  z-index: 5;
  background: var(--bg-primary);
}

.gradient-transition {
  position: relative;
  z-index: 5;
}

.bento {
  position: relative;
  z-index: 1;
}

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

.projects {
  position: relative;
  z-index: 1;
}

/* Grille de fond */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 60% 50% at 50% 50%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 50%, black 20%, transparent 70%);
  pointer-events: none;
}

/* Orbes lumineuses — parallax via custom properties */
.hero {
  --scroll-y: 0px;
  --gyro-x: 0px;
  --gyro-y: 0px;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  opacity: 0.5;
  will-change: transform;
}

.hero-orb--blue {
  width: 350px;
  height: 350px;
  background-color: #60a5fa;
  box-shadow: inset -40px 30px 50px rgba(37, 99, 235, 0.6);
  top: 10%;
  right: -5%;
  animation: orbFloat1 6s linear infinite;
  translate: var(--gyro-x) calc(var(--scroll-y) + var(--gyro-y));
}

.hero-orb--violet {
  width: 280px;
  height: 280px;
  background-color: #a78bfa;
  box-shadow: inset -40px 30px 50px rgba(99, 102, 241, 0.6);
  bottom: 10%;
  left: 30%;
  animation: orbFloat2 8s linear infinite;
  translate: calc(var(--gyro-x) * -0.5) calc(var(--scroll-y) * 0.5 + var(--gyro-y) * -0.5);
}

@keyframes orbFloat1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25%      { transform: translate(25px, -35px) scale(1.05); }
  50%      { transform: translate(-15px, 25px) scale(0.95); }
  75%      { transform: translate(20px, 15px) scale(1.02); }
}

@keyframes orbFloat2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(-20px, 30px) scale(1.08); }
  66%      { transform: translate(25px, -20px) scale(0.96); }
}

/* Contenu hero */
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
  padding: 0 var(--space-md);
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-bottom: var(--space-xl);
  padding: 6px 16px;
  background: var(--accent-bg);
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: var(--radius-pill);
}

.hero-title {
  display: block;
  font-size: 56px;
  font-weight: 700;
  line-height: 1.0;
  letter-spacing: -0.04em;
}

.hero-title--accent {
  display: block;
  font-size: 64px;
  margin-top: var(--space-sm);
  margin-bottom: var(--space-xl);
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 80px;
  }
  .hero-title--accent {
    font-size: 96px;
  }
}

@media (min-width: 1024px) {
  .hero-title {
    font-size: 88px;
  }
  .hero-title--accent {
    font-size: 104px;
  }
}

span.hero-title--accent {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 30px rgba(37, 99, 235, 0.3));
}

/* When text is split into .char spans, each char needs the gradient */
span.hero-title--accent .char {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 480px;
  margin-bottom: var(--space-xl);
}

@media (min-width: 768px) {
  .hero-desc {
    font-size: 19px;
  }
}

.hero-btns {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

/* --- Hero entrance — hidden until GSAP reveals ----------------------- */
.hero-tag,
.hero h1,
.hero-desc,
.hero-btns {
  visibility: hidden;
}

/* --- Scroll-triggered elements — hidden until GSAP reveals ----------- */
.bento .section-header,
.bento-card,
.services .section-header,
.service-card,
.service-num,
.projects .section-header,
.project-card,
.contact .section-header,
.contact-title,
.contact-sub,
.contact-info-card {
  visibility: hidden;
}

/* Custom cursor (desktop only, mix-blend-mode difference) */
.cursor-main {
  --size: 0px;
  position: fixed;
  top: calc(var(--size) / -2);
  left: calc(var(--size) / -2);
  width: var(--size);
  height: var(--size);
  border-radius: 50px;
  pointer-events: none;
  z-index: 99;
  background-color: #93b4ff;
  box-shadow: 0 0 30px #2563EB;
  mix-blend-mode: difference;
  transition: top 0.3s ease-out, left 0.3s ease-out, width 0.3s ease-out, height 0.3s ease-out;
}

@media (min-width: 600px) {
  .cursor-main { --size: 40px; }
}

/* Hide on touch devices */
@media (hover: none) {
  .cursor-main { display: none; }
}

/* Animated gradient on hero background */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    125deg,
    rgba(37, 99, 235, 0.05) 0%,
    transparent 40%,
    rgba(129, 140, 248, 0.04) 60%,
    transparent 100%
  );
  background-size: 200% 200%;
  animation: heroGradientShift 8s ease-in-out infinite;
  pointer-events: none;
}

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

/* --- Scroll progress bar ----------------------------------------------- */

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent-gradient);
  z-index: 1001;
  transform-origin: left;
  transform: scaleX(0);
  will-change: transform;
  pointer-events: none;
}

/* --- Boutons ----------------------------------------------------------- */

.btn-glow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 14px 28px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  border-radius: var(--radius-pill);
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
  animation: glowPulse 3s ease-in-out infinite;
}

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

.btn-glow:active {
  transform: scale(0.98);
}

@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 20px var(--accent-glow); }
  50%      { box-shadow: 0 0 40px var(--accent-glow), 0 0 60px rgba(37, 99, 235, 0.15); }
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 14px 28px;
  background: transparent;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}

.btn-outline:hover {
  border-color: var(--border-hover);
  background: var(--accent-bg);
}

.btn-outline:active {
  transform: scale(0.98);
}


/* ==========================================================================
   Marquee (défilement continu)
   ========================================================================== */

.marquee {
  overflow: hidden;
  padding: var(--space-xl) 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.marquee-track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: marqueeScroll 25s linear infinite;
}

@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.marquee-item {
  display: inline-flex;
  align-items: center;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.marquee-dot {
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  margin: 0 var(--space-lg);
  flex-shrink: 0;
}


/* ==========================================================================
   Bento Grid
   ========================================================================== */

.bento {
  padding: var(--space-3xl) 0;
  background: var(--bg-secondary);
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

@media (min-width: 768px) {
  .bento-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
  }
}

.bento-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: border-color 0.3s, transform 0.3s;
  overflow: hidden;
}

.bento-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 40%;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transition: transform 0.3s var(--ease-out-expo);
}

.bento-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(37, 99, 235, 0.1), 0 0 0 1px var(--border-hover);
}

.bento-card:hover::after {
  transform: translateX(-50%) scaleX(1);
}

.bento-card:active {
  transform: scale(0.98);
}

.bento-wide {
  grid-column: span 2;
}

.bento-icon {
  font-size: 28px;
  margin-bottom: var(--space-md);
}

.bento-label {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.bento-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.bento-stat {
  font-size: 40px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: var(--space-sm);
}

.tech-pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.tech-pills span {
  font-size: 12px;
  font-weight: 500;
  padding: var(--space-xs) var(--space-sm);
  background: var(--accent-bg);
  color: var(--accent-light);
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
}


/* ==========================================================================
   Services
   ========================================================================== */

.services {
  background: var(--bg-tertiary);
  padding: var(--space-3xl) 0;
}

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

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

.service-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl) var(--space-lg);
  transition: border-color 0.3s, transform 0.3s;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 2px;
  height: 100%;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.4s var(--ease-out-expo);
}

.service-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 8px 32px rgba(37, 99, 235, 0.08);
  transform: translateY(-2px);
}

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

.service-card:active {
  transform: scale(0.98);
}

.service-num {
  position: absolute;
  top: var(--space-md);
  right: var(--space-lg);
  font-size: 52px;
  font-weight: 700;
  color: var(--text-muted);
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

.service-name {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.service-desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 380px;
}


/* ==========================================================================
   Projets
   ========================================================================== */

.projects {
  padding: var(--space-3xl) 0;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

@media (min-width: 768px) {
  .project-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
  }
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.3s var(--ease-out-expo), border-color 0.3s;
}

.project-card:hover {
  transform: scale(1.03) translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: 0 12px 40px rgba(37, 99, 235, 0.12);
}

.project-card:active {
  transform: scale(0.98);
}

.project-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.project-cover-label {
  position: absolute;
  top: var(--space-sm);
  left: var(--space-sm);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  z-index: 1;
}

.project-cover img,
.project-cover-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out-expo);
}

.project-cover-bg {
  position: absolute;
  inset: 0;
}

.project-card:hover .project-cover img,
.project-card:hover .project-cover-bg {
  transform: scale(1.08);
}

.project-body {
  padding: var(--space-lg);
}

.project-body h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.project-body p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-md);
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.project-tags span {
  font-size: 11px;
  font-weight: 500;
  padding: 3px 10px;
  background: var(--accent-bg);
  color: var(--accent-light);
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
}


/* ==========================================================================
   Contact
   ========================================================================== */

.contact {
  position: relative;
  padding: var(--space-3xl) 0;
}

.contact::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
  opacity: 0.5;
}

/* Contact layout — Calendly left, infos right */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}

@media (min-width: 768px) {
  .contact-layout {
    grid-template-columns: 1fr 320px;
    gap: var(--space-xl);
  }
}

@media (min-width: 1024px) {
  .contact-layout {
    grid-template-columns: 1fr 360px;
    gap: var(--space-2xl);
  }
}

.contact-left {
  min-width: 0;
}

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

.contact-info-card {
  background: var(--bg-card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: border-color 0.3s;
}

.contact-info-card:hover {
  border-color: var(--border-hover);
}

.contact-info-card a {
  color: var(--accent-light);
  transition: color 0.2s;
}

.contact-info-card a:hover {
  color: var(--accent);
}

.contact-cta-card {
  margin-top: auto;
}

.contact-cta-card p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: var(--space-md);
}

.contact-title {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-md);
  position: relative;
}

@media (min-width: 768px) {
  .contact-title {
    font-size: 44px;
  }
}

.contact-sub {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 600px;
  margin-bottom: var(--space-2xl);
  line-height: 1.7;
  position: relative;
}

.calendly-embed {
  min-height: 650px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  border: 1px solid var(--card-border);
  background: var(--bg-card);
}

.calendly-inline-widget {
  border-radius: var(--radius-lg);
}

/* Override Calendly iframe to match dark theme */
.calendly-inline-widget iframe {
  border-radius: var(--radius-lg);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  margin-top: var(--space-2xl);
  position: relative;
}

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

.contact-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--text-secondary);
  transition: border-color 0.3s, color 0.3s;
}

.contact-chip:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.contact-chip:active {
  transform: scale(0.98);
}


/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  padding: var(--space-xl) 20px;
  border-top: 1px solid var(--border);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-md);
  width: 100%;
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-siret {
  font-size: 11px !important;
  color: var(--text-muted);
}

.footer span,
.footer a {
  color: var(--text-muted);
  font-size: 13px;
  text-decoration: none;
}

.footer a:hover {
  color: var(--text-secondary);
}


/* ==========================================================================
   Animations au scroll (reveal)
   ========================================================================== */

/* Scroll reveals handled by GSAP ScrollTrigger */

/* ═══════════════════════════════════
   Loading screen
   ═══════════════════════════════════ */
.loader {
  position: fixed;
  width: 100vw;
  height: 100dvh;
  background-color: #050508;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loader-wrap {
  padding: 6px;
  position: relative;
  border-radius: 100px;
  background-color: rgba(37, 99, 235, 0.15);
  overflow: hidden;
  transition: 0.8s ease-in-out;
  transition-delay: 0.2s;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
  display: flex;
  justify-content: center;
  align-items: center;
}

.loader-wrap.loader-clicked {
  transition-delay: 0ms;
  transition-timing-function: cubic-bezier(0.33, 0.11, 1, 0.72);
  min-width: calc(100vw + 5000px);
  border-radius: 5000px;
  min-height: calc(100vh + 500px);
  box-shadow: none;
}

.loader-button {
  padding: 18px 48px;
  border-radius: 100px;
  background-color: var(--accent);
  overflow: hidden;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #fff;
  cursor: pointer;
  border: none;
  font-family: inherit;
  position: relative;
  z-index: 9;
  transition: transform 0.2s;
}

.loader-button:hover {
  transform: scale(1.05);
}

.loader-button:active {
  transform: scale(0.98);
}

.loader-hover {
  background-color: #60a5fa;
  width: 200px;
  height: 100px;
  position: absolute;
  top: var(--mouse-y, 50%);
  left: var(--mouse-x, 50%);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  filter: blur(30px);
  opacity: 0;
  transition: opacity 0.5s;
  pointer-events: none;
}

.loader-wrap:hover .loader-hover {
  opacity: 1;
}

.loader-clicked .loader-hover {
  opacity: 0;
}

.loader-clicked .loader-button {
  opacity: 0;
  transition: opacity 0.3s;
}

/* ═══════════════════════════════════
   Hero — split text chars
   ═══════════════════════════════════ */
.char {
  display: inline-block;
  will-change: transform, opacity;
}

/* ═══════════════════════════════════
   Horizontal scroll — projects
   ═══════════════════════════════════ */
.projects-scroll-wrapper {
  overflow: hidden;
}

.project-grid {
  display: flex;
  gap: var(--space-lg);
  padding-right: 20px;
  will-change: transform;
}

.project-card {
  min-width: 280px;
  max-width: 320px;
  flex-shrink: 0;
}

@media (max-width: 767px) {
  .project-card {
    min-width: 260px;
    max-width: 280px;
  }
}

/* Override the grid layout from before */
@media (min-width: 768px) {
  .project-grid {
    gap: var(--space-xl);
  }
  .project-card {
    min-width: 300px;
    max-width: 360px;
  }
}


/* ==========================================================================
   Pages secondaires (404, mentions légales, etc.)
   ========================================================================== */

.page-secondary {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-3xl) var(--space-md);
}

.page-secondary h1 {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: var(--space-md);
}

.page-secondary p {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 520px;
  line-height: 1.7;
  margin-bottom: var(--space-xl);
}

.page-secondary a {
  color: var(--accent-light);
  font-weight: 500;
  transition: color 0.2s;
}

.page-secondary a:hover {
  color: var(--accent);
}


/* ==========================================================================
   Missing rules — bento stats, contact chips, secondary page content
   ========================================================================== */

/* Bento stat label */
.bento-stat-label {
  color: var(--text-muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Contact chip parts */
.contact-chip-label {
  color: var(--text-muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
}
.contact-chip-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

/* Secondary page content */
.page-secondary-content {
  flex: 1;
  padding: 100px 20px 48px;
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
}
.page-secondary-content h1 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 24px;
}
.page-secondary-content h2 {
  font-size: 20px;
  font-weight: 600;
  margin-top: 32px;
  margin-bottom: 16px;
}
.page-secondary-content p,
.page-secondary-content li {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 16px;
}
.page-secondary-content a {
  color: var(--accent);
  text-decoration: underline;
}
