/* =========================
   SOBER MINIMALIST THEME
   Hand Motion - Light Gray-Blue
   ========================= */

/* =========================
   CSS VARIABLES
   ========================= */
:root {
  --hm-accent: #5A7A94;
  --hm-accent-light: #6B8BA4;
  --hm-accent-dark: #3D5A73;
  --electric-blue: #6B8BA4;
  --deep-blue: #5A7A94;
  --ultra-blue: #3D5A73;
  --bg-main: #C8D5DE;
  --surface: #FFFFFF;
  --text-primary: #2C3E50;
  --text-secondary: #6B7B8D;
  --border-color: #D5DDE3;
  --border-subtle: rgba(90,122,148,0.15);
  --shadow-soft: 0 2px 15px rgba(0,0,0,0.08);
  --shadow-medium: 0 4px 20px rgba(0,0,0,0.10);
  --shadow-strong: 0 8px 30px rgba(0,0,0,0.12);
  --mobile-padding: 1.25rem;
  --tablet-padding: 2rem;
  --section-gap-mobile: 4rem;
  --section-gap-tablet: 5rem;
}

/* =========================
   SKIP TO CONTENT
   ========================= */
.skip-to-content {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 999999;
}

.skip-to-content:focus {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  width: auto;
  height: auto;
  padding: 1rem 2rem;
  background: var(--surface);
  color: var(--text-primary);
  border: 2px solid var(--hm-accent);
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  box-shadow: var(--shadow-strong);
}

/* =========================
   FOCUS VISIBLE
   ========================= */
:focus-visible {
  outline: 2px solid var(--hm-accent) !important;
  outline-offset: 2px !important;
}

:focus:not(:focus-visible) {
  outline: none;
}

/* =========================
   HIDDEN/DISABLED EFFECT LAYERS
   These selectors are kept empty so nothing
   breaks if HTML references still exist.
   ========================= */
.noise-bg {
  display: none;
  pointer-events: none;
}

.aurora-bg {
  display: none;
  pointer-events: none;
}

.wow-sparkles {
  display: none;
  pointer-events: none;
}

.floating-orbs {
  display: none;
  pointer-events: none;
}

.floating-orbs .orb,
.floating-orbs .orb-1,
.floating-orbs .orb-2,
.floating-orbs .orb-3,
.floating-orbs .orb-4,
.floating-orbs .orb-5 {
  display: none;
}

/* Keep keyframes as no-ops so no JS errors */
@keyframes auroraMove {
  0%, 100% { opacity: 0; }
}
@keyframes sparkleTwinkle {
  0%, 100% { opacity: 0; }
}
@keyframes floatOrb {
  0%, 100% { opacity: 0; }
}
@keyframes floatParticle {
  0%, 100% { opacity: 0; }
}
@keyframes bluePulse {
  0%, 100% { opacity: 1; }
}
@keyframes scanLine {
  0%, 100% { opacity: 0; }
}
@keyframes shimmerMove {
  0%, 100% { opacity: 0; }
}
@keyframes textGlow {
  0%, 100% { text-shadow: none; }
}
@keyframes borderGlow {
  0%, 100% { border-color: var(--border-color); box-shadow: none; }
}

/* =========================
   BASE STYLES
   ========================= */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}

body {
  -webkit-font-smoothing: antialiased;
}

/* Make sure main content stays above backgrounds */
body > :not(.noise-bg):not(.aurora-bg):not(.wow-sparkles):not(.floating-orbs):not(#pageLoader):not(.floating-cta-btn) {
  position: relative;
  z-index: 1;
}

/* =========================
   SMOOTH SCROLL
   ========================= */
html {
  scroll-behavior: smooth;
}

/* =========================
   PORTFOLIO CAROUSEL
   ========================= */
.portfolio-carousel {
  position: relative;
  max-width: 100%;
  margin: 0 auto;
}

.carousel-viewport {
  overflow: hidden;
}

.carousel-track {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
  will-change: transform;
}

.carousel-slide {
  min-width: 100%;
  flex-shrink: 0;
}

/* Desktop: reduce card sizes */
@media (min-width: 1025px) {
  .portfolio-carousel {
    max-width: 720px;
  }

  .carousel-slide .portfolio-card .portfolio-media {
    aspect-ratio: 16 / 9;
  }

  .carousel-slide .portfolio-card .p-5,
  .carousel-slide .portfolio-card .p-6 {
    padding: 1rem 1.25rem;
  }
}

/* Arrows */
.carousel-arrow {
  cursor: pointer;
  transition: all 0.3s ease;
}

.carousel-arrow:active {
  transform: translateY(-50%) scale(0.92);
}

/* Dots */
.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid rgba(90, 122, 148, 0.3);
  background: transparent;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
  position: relative;
}

.carousel-dot::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: transparent;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.carousel-dot.active {
  background: var(--hm-accent);
  border-color: var(--hm-accent);
  box-shadow: 0 1px 6px rgba(90, 122, 148, 0.35);
  transform: scale(1.2);
}

.carousel-dot.active::after {
  opacity: 0;
}

.carousel-dot:hover:not(.active) {
  border-color: var(--hm-accent-light);
  background: rgba(90, 122, 148, 0.1);
}

/* Mobile carousel adjustments */
@media (max-width: 768px) {
  .carousel-arrow {
    width: 40px !important;
    height: 40px !important;
  }

  .carousel-arrow-prev {
    left: 0.25rem !important;
  }

  .carousel-arrow-next {
    right: 0.25rem !important;
  }

  .carousel-dot {
    width: 8px;
    height: 8px;
  }

  .carousel-dots {
    margin-top: 1.25rem !important;
  }
}

/* =========================
   VIDEO CAROUSEL CARDS
   ========================= */
.video-card {
  background: var(--hm-surface);
  transition: all 0.3s ease;
}

.video-play-overlay {
  transition: background-color 0.3s ease;
}

.video-play-overlay.playing {
  opacity: 0;
  pointer-events: none;
}

.video-card video {
  background: #000;
}

@media (min-width: 1025px) {
  .video-carousel {
    max-width: 720px;
  }
}

/* =========================
   PORTFOLIO CARDS - SOBER
   ========================= */
.portfolio-card::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 1.5rem;
  background: transparent;
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: -1;
  pointer-events: none;
}
.portfolio-card:hover::before {
  opacity: 0;
}

.portfolio-shine {
  background: transparent;
  opacity: 0;
  mix-blend-mode: normal;
  transition: opacity 0.6s ease;
}
.portfolio-card:hover .portfolio-shine {
  opacity: 0;
}

.portfolio-glow {
  background: transparent;
  filter: none;
  display: none;
}

/* CTA inside portfolio - sober */
.cta-wow {
  position: relative;
  overflow: hidden;
}
.cta-wow::after {
  content: "";
  display: none;
}
@keyframes ctaGlow {
  0%, 100% { opacity: 0; }
}

.cta-spark {
  display: none;
  pointer-events: none;
}

/* =========================
   HERO IMAGE (optional bg)
   ========================= */
.hero-ai-bg {
  position: absolute;
  inset: -10%;
  z-index: -1;
  opacity: 0.15;
  filter: blur(0px) saturate(0.9);
  background-image: url("assets/img/ai-bg-hero.webp");
  background-size: cover;
  background-position: center;
  mask-image: radial-gradient(circle at 50% 35%, rgba(0,0,0,1) 0%, rgba(0,0,0,.9) 35%, rgba(0,0,0,0) 70%);
  -webkit-mask-image: radial-gradient(circle at 50% 35%, rgba(0,0,0,1) 0%, rgba(0,0,0,.9) 35%, rgba(0,0,0,0) 70%);
  mix-blend-mode: multiply;
  pointer-events: none;
}

/* =========================
   HOVER UTILITIES - SOBER
   ========================= */
.hover-glow-blue {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-glow-blue:hover {
  box-shadow: var(--shadow-medium);
  border-color: var(--border-color) !important;
  transform: translateY(-2px);
}

/* =========================
   INTRO PARALLAX - SLIDE UP SÉQUENTIEL
   ========================= */

.parallax-intro {
  position: fixed !important;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: calc(var(--vh, 1vh) * 100);
  overflow: hidden;
  background-color: #C8D5DE;
  pointer-events: none;
  z-index: 9999;
  transition: opacity 0.6s ease-out;
}

/* Une fois l'animation terminée, reste en fond fixe */
.parallax-intro.parallax-done {
  z-index: 0;
  pointer-events: none;
}

/* Le site défile par-dessus le parallax — chaque section a son propre z-index */
.site-content {
  position: relative;
}

.parallax-intro.hidden {
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
  z-index: -1 !important;
}

/* Chaque couche */
.parallax-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center bottom;
  background-repeat: no-repeat;
  will-change: transform, opacity;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}


/* État caché : en bas, invisible */
.parallax-layer--hidden {
  transform: translateY(100%);
  opacity: 0;
}

/* État visible : en place */
.parallax-layer--visible {
  transform: translateY(0);
  opacity: 1;
}

/* Animation slide-up — vitesse variable par couche */
.parallax-layer--sliding {
  transform: translateY(0);
  opacity: 1;
}

/* Couches lointaines : montée lente et douce */
.parallax-layer[data-layer="5"].parallax-layer--sliding {
  transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.6s ease-out;
}

.parallax-layer[data-layer="4"].parallax-layer--sliding {
  transition: transform 0.85s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.5s ease-out;
}

.parallax-layer[data-layer="3"].parallax-layer--sliding {
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.45s ease-out;
}

/* Couches proches : montée rapide et punchy */
.parallax-layer[data-layer="2"].parallax-layer--sliding {
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.35s ease-out;
}

.parallax-layer[data-layer="1"].parallax-layer--sliding {
  transition: transform 0.45s cubic-bezier(0.33, 1, 0.68, 1),
              opacity 0.3s ease-out;
}

/* Images pour chaque couche */
.parallax-layer[data-layer="6"] {
  background-image: url('assets/parallax/couche6.png');
  background-color: #C8D5DE;
  z-index: 10;
}

.parallax-layer[data-layer="5"] {
  background-image: url('assets/parallax/couche5.png');
  z-index: 20;
}

.parallax-layer[data-layer="4"] {
  background-image: url('assets/parallax/couche4.png');
  z-index: 30;
}

.parallax-layer[data-layer="3"] {
  background-image: url('assets/parallax/couche3.png');
  z-index: 60;
}

.parallax-layer[data-layer="2"] {
  background-image: url('assets/parallax/couche2.png');
  z-index: 70;
}

.parallax-layer[data-layer="1"] {
  background-image: url('assets/parallax/couche1.png');
  z-index: 90;
}

/* Mobile */
@media (max-width: 768px) {
  .parallax-intro {
    height: 100vh;
    height: calc(var(--vh, 1vh) * 100);
  }

  /* Couche 3 (logo) : réduit sur mobile pour ne pas être trop gros */
  .parallax-layer[data-layer="3"] {
    background-size: 150% auto;
    background-position: center 35%;
  }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
  .parallax-layer[data-layer="1"] {
    position: relative;
  }

  .parallax-layer[data-layer="1"]::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 40%;
    background: linear-gradient(to bottom, transparent 0%, #C8D5DE 30%, #C8D5DE 100%);
    pointer-events: none;
  }
}

/* Accessibilité - reduced motion : tout visible sans animation */
@media (prefers-reduced-motion: reduce) {
  .parallax-layer {
    transition: none !important;
  }

  .parallax-layer--hidden {
    transform: translateY(0) !important;
    opacity: 1 !important;
  }

  .parallax-intro {
    transition: none !important;
  }
}

/* =========================
   LOGO HANDMOTION - SUBTLE
   ========================= */



/* =========================
   CONTACT MODAL - SOBER
   ========================= */

/* Block scroll when modal is open */
html.modal-open,
html.modal-open body {
  overflow: hidden !important;
  touch-action: pan-y !important;
  overscroll-behavior: none !important;
  -webkit-overflow-scrolling: auto !important;
}

/* Modal visible state */
.contact-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.contact-modal.active .modal-content {
  transform: scale(1);
  opacity: 1;
}

/* Backdrop */
.modal-backdrop {
  transition: opacity 0.5s ease;
}

/* Modal orbs - hidden in sober theme */
.modal-orb {
  display: none;
  pointer-events: none;
}

.modal-orb-1,
.modal-orb-2,
.modal-orb-3 {
  display: none;
}

@keyframes modalOrbFloat {
  0%, 100% { opacity: 0; }
}

/* Modal glow border - replaced with subtle border */
.modal-glow-border {
  background: var(--border-color);
  animation: none;
  filter: none;
  opacity: 0.5;
}

@keyframes modalBorderRotate {
  0%, 100% { opacity: 1; }
}

/* Scan line effect - disabled */
.modal-scanline::before {
  display: none;
}

@keyframes modalScan {
  0%, 100% { opacity: 0; }
}

/* Icon glow - subtle */
.modal-icon-glow {
  background: radial-gradient(circle, rgba(90, 122, 148, 0.15), transparent 70%);
  filter: blur(15px);
  animation: none;
  opacity: 0.4;
}

@keyframes modalIconPulse {
  0%, 100% { opacity: 0.4; }
}

/* Icon rings - subtle */
.modal-icon-ring {
  animation: none;
  opacity: 0.15;
}

.modal-icon-ring-2 {
  animation: none;
  opacity: 0.1;
}

@keyframes modalRingPulse {
  0%, 100% { opacity: 0.15; }
}

/* Title shimmer - disabled */
@keyframes shimmerText {
  0%, 100% { background-position: 0% center; }
}

/* Contact item shine - subtle hover */
.modal-item-shine {
  background: linear-gradient(
    120deg,
    transparent 30%,
    rgba(90, 122, 148, 0.06) 50%,
    transparent 70%
  );
  transform: translateX(-100%);
}

.modal-contact-item:hover .modal-item-shine {
  animation: modalItemShine 0.8s ease forwards;
}

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

/* Modal CTA Button - sober */
.modal-cta-bg {
  background: linear-gradient(135deg, var(--hm-accent-dark), var(--hm-accent));
  transition: all 0.3s ease;
  pointer-events: none;
}

.modal-cta-btn:hover .modal-cta-bg {
  filter: brightness(1.08);
  box-shadow: var(--shadow-medium);
}

.modal-cta-shine {
  background: linear-gradient(
    120deg,
    transparent 30%,
    rgba(255, 255, 255, 0.08) 50%,
    transparent 70%
  );
  transform: translateX(-100%);
  animation: modalCtaShine 4s ease-in-out infinite;
  pointer-events: none;
}

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

/* =========================
   SECTION CTA BUTTONS - SOBER
   ========================= */

.section-cta-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  border-radius: 9999px;
  font-weight: 600;
  color: white;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(90, 122, 148, 0.25);
  background: var(--hm-accent);
  backdrop-filter: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(90, 122, 148, 0.15);
  cursor: pointer;
}

.section-cta-btn::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 9999px;
  background: transparent;
  opacity: 0;
  z-index: -1;
  pointer-events: none;
}

.section-cta-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  background: linear-gradient(
    120deg,
    transparent 30%,
    rgba(255, 255, 255, 0.1) 50%,
    transparent 70%
  );
  transform: translateX(-100%);
  transition: transform 0.6s ease;
  pointer-events: none;
}

.section-cta-btn:hover {
  transform: translateY(-2px);
  border-color: var(--hm-accent-dark);
  box-shadow: var(--shadow-medium);
  background: var(--hm-accent-dark);
}

.section-cta-btn:hover::before {
  opacity: 0;
}

.section-cta-btn:hover::after {
  transform: translateX(100%);
}

.section-cta-btn .cta-icon {
  transition: transform 0.3s ease;
}

.section-cta-btn:hover .cta-icon {
  transform: translateX(4px);
}

/* Pulse animation - subtle */
.section-cta-btn.pulse {
  animation: ctaBtnPulse 3s ease-in-out infinite;
}

@keyframes ctaBtnPulse {
  0%, 100% {
    box-shadow: 0 2px 10px rgba(90, 122, 148, 0.2);
  }
  50% {
    box-shadow: 0 4px 20px rgba(90, 122, 148, 0.35);
  }
}

/* =========================
   FLOATING CTA BUTTON - SOBER
   ========================= */

.floating-cta-btn {
  box-shadow: var(--shadow-strong);
}

.floating-cta-btn:hover {
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.18);
}

.floating-cta-glow {
  background: radial-gradient(circle, rgba(90, 122, 148, 0.15), transparent 70%);
  filter: blur(10px);
  animation: none;
  pointer-events: none;
  opacity: 0.3;
}

@keyframes floatingCtaPulse {
  0%, 100% { opacity: 0.3; }
}

.floating-cta-ring {
  animation: none;
  pointer-events: none;
  opacity: 0.15;
}

@keyframes floatingCtaRing {
  0%, 100% { opacity: 0.15; }
}

.floating-cta-bg {
  transition: all 0.3s ease;
  pointer-events: none;
}

.floating-cta-btn:hover .floating-cta-bg {
  filter: brightness(1.06);
}

/* Entry animation then attention wiggle for floating button */
.floating-cta-btn {
  animation: floatingCtaEntry 0.6s ease-out 2s both, ctaWiggle 3s ease-in-out 4s infinite;
}

@keyframes floatingCtaEntry {
  0% {
    opacity: 0;
    transform: translateY(100px) scale(0.5);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes ctaWiggle {
  0%, 65%, 100% { transform: scale(1) rotate(0deg); }
  70% { transform: scale(1.15) rotate(-8deg); }
  75% { transform: scale(1.18) rotate(8deg); }
  80% { transform: scale(1.15) rotate(-6deg); }
  85% { transform: scale(1.12) rotate(6deg); }
  90% { transform: scale(1.08) rotate(-3deg); }
  95% { transform: scale(1) rotate(0deg); }
}

/* Tooltip on hover */
.floating-cta-btn::before {
  content: 'Contactez-nous';
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%) translateX(10px);
  padding: 8px 16px;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-soft);
}

.floating-cta-btn:hover::before {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* Mobile: hide tooltip */
@media (max-width: 768px) {
  .floating-cta-btn::before {
    display: none;
  }

  .floating-cta-btn {
    bottom: 1rem;
    right: 1rem;
    width: 56px;
    height: 56px;
  }
}

/* ==========================================================
   RESPONSIVE PREMIUM - MOBILE & TABLET
   ========================================================== */

/* =============================================
   JS DETECTION CLASSES
   ============================================= */
.is-mobile-device .backdrop-blur-xl,
.is-mobile-device .backdrop-blur-2xl,
.is-mobile-device .backdrop-blur-md,
.is-mobile-device [class*="backdrop-blur"] {
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
}

/* iOS specific - GPU acceleration (targeted, sans parallax layers) */
.is-ios-device section,
.is-ios-device video,
.is-ios-device .fixed,
.is-ios-device nav {
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}
@media (min-width: 769px) {
  .is-ios-device .parallax-intro {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
  }
}

/* =============================================
   MOBILE (max-width: 768px)
   ============================================= */
@media (max-width: 768px) {

  /* === BASE RESET === */
  html {
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  body {
    overflow-x: hidden;
    overflow-y: auto;
    min-height: 100%;
    min-height: -webkit-fill-available;
    font-size: 15px;
  }

  /* === SITE-CONTENT === */
  .site-content {
    position: relative !important;
    z-index: 1 !important;
    pointer-events: auto !important;
  }

  /* === PARALLAX INTRO MOBILE — PAS de fixed, scroll normal === */
  .parallax-intro {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    width: 100% !important;
    height: 100vh !important;
    height: 100dvh !important;
    background-color: #C8D5DE !important;
    z-index: 1 !important;
    overflow: hidden !important;
    pointer-events: none !important;
  }

  /* Spacer inutile sur mobile (plus de fixed) */
  .parallax-hero-spacer {
    display: none !important;
  }

  /* Layer 1 : zoom + décalage pour centrer les deux personnages */
  .parallax-layer[data-layer="1"] {
    background-size: 180% auto !important;
    background-position: 20% bottom !important;
  }

  /* === NAVBAR MOBILE === */
  nav {
    position: fixed !important;
    top: 0.75rem !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 92% !important;
    z-index: 9998 !important;
  }

  #navContainer {
    background: rgba(255, 255, 255, 0.92) !important;
    backdrop-filter: blur(20px) saturate(1.2) !important;
    -webkit-backdrop-filter: blur(20px) saturate(1.2) !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: 1.25rem !important;
  }

  /* Mobile menu open */
  #mobileMenuContent {
    background: transparent !important;
  }

  #mobileMenuContent a {
    font-size: 1.1rem !important;
    padding: 0.5rem 0 !important;
  }

  /* === SITE CONTENT === */
  .site-content {
    padding-top: 0 !important;
  }

  /* Supprimer l'écart beige entre parallax et hero */
  #main-content {
    background-color: transparent !important;
    background-image: linear-gradient(to bottom, #1a2f4a 0px, #1a2f4a 80px, #F5F0EB 80px) !important;
  }

  /* === HERO SECTION MOBILE === */
  section.min-h-screen {
    min-height: auto !important;
    padding-top: 7rem !important;
    padding-bottom: 3rem !important;
  }

  /* Main title */
  h1.font-display {
    font-size: 2.75rem !important;
    line-height: 1 !important;
    margin-bottom: 1.25rem !important;
  }

  /* Subtitle */
  .text-electric-blue.font-semibold {
    font-size: 0.95rem !important;
    margin-bottom: 0.75rem !important;
  }

  /* Hero description */
  #work {
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
    margin-bottom: 2rem !important;
    padding: 0 0.5rem !important;
  }

  /* Hero main CTA */
  #showreelTrigger {
    padding: 0.875rem 1.5rem !important;
    font-size: 0.9rem !important;
  }

  /* Video showreel container */
  #showreelSection {
    margin-top: 2.5rem !important;
    margin-left: var(--mobile-padding) !important;
    margin-right: var(--mobile-padding) !important;
  }

  /* Video info bar */
  #showreelSection .p-4 {
    padding: 0.75rem !important;
  }

  /* === MARQUEE TEXT === */
  .animate-marquee span {
    font-size: 2rem !important;
    padding: 0 1rem !important;
  }

  .animate-marquee {
    animation: marquee 40s linear infinite !important;
  }

  /* === TRUST SECTION (LOGOS) === */
  section.py-20.bg-black\/30 {
    padding: 3rem 0 !important;
  }

  section.py-20.bg-black\/30 h2 {
    font-size: 1.5rem !important;
  }

  section.py-20.bg-black\/30 p {
    font-size: 0.85rem !important;
  }

  .logos-slide img {
    height: 2.5rem !important;
  }

  .logos-marquee {
    gap: 2rem !important;
    animation-duration: 18s !important;
  }

  .logos-slide {
    gap: 2rem !important;
  }

  /* === PORTFOLIO SECTION === */
  #realisations {
    padding: 3rem var(--mobile-padding) !important;
  }

  #realisations h2 {
    font-size: 1.75rem !important;
  }

  #realisations .grid {
    gap: 1.25rem !important;
  }

  .portfolio-card .p-6 {
    padding: 1rem !important;
  }

  .portfolio-card .text-lg {
    font-size: 1rem !important;
  }

  /* === SERVICES SECTION === */
  section.py-24.px-6 {
    padding: 3rem var(--mobile-padding) !important;
  }

  section.py-24.px-6 h2 {
    font-size: 1.75rem !important;
    margin-bottom: 0.75rem !important;
  }

  section.py-24.px-6 .grid {
    gap: 0.875rem !important;
  }

  section.py-24.px-6 .grid > div {
    padding: 1.25rem !important;
  }

  section.py-24.px-6 .grid > div h3 {
    font-size: 1.1rem !important;
  }

  section.py-24.px-6 .grid > div .text-4xl {
    font-size: 2rem !important;
    margin-bottom: 0.75rem !important;
  }

  /* === FAQ SECTION === */
  #agency {
    padding: 3rem var(--mobile-padding) !important;
  }

  #agency h2 {
    font-size: 1.75rem !important;
    margin-bottom: 1.5rem !important;
  }

  .accordion-btn {
    padding: 1rem !important;
  }

  .accordion-btn span:first-child {
    font-size: 0.95rem !important;
    padding-right: 2rem !important;
  }

  /* === CONTACT SECTION === */
  #contact {
    padding: 3rem var(--mobile-padding) 0 !important;
  }

  #contact h2 {
    font-size: 2rem !important;
    margin-bottom: 1.5rem !important;
  }

  #contact .text-xl {
    font-size: 1rem !important;
  }

  /* === FOOTER MOBILE === */
  footer {
    padding: 2rem var(--mobile-padding) !important;
  }

  footer > div {
    flex-direction: column !important;
    gap: 1.25rem !important;
    text-align: center !important;
  }

  footer .text-sm {
    font-size: 0.75rem !important;
    line-height: 1.5 !important;
  }

  footer .flex.gap-6 {
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 0.75rem 1.5rem !important;
  }

  /* === All CTA buttons must be clickable on mobile === */
  button[onclick*="openContactModal"]:not(.floating-cta-btn) {
    pointer-events: auto !important;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: rgba(90, 122, 148, 0.15) !important;
    cursor: pointer !important;
    position: relative !important;
    z-index: 100 !important;
  }

  /* === CTA BUTTONS MOBILE === */
  .section-cta-btn {
    padding: 0.875rem 1.5rem !important;
    font-size: 0.9rem !important;
    width: 100% !important;
    max-width: 320px !important;
    pointer-events: auto !important;
    position: relative !important;
    z-index: 100 !important;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: rgba(90, 122, 148, 0.15) !important;
    cursor: pointer !important;
  }

  .section-cta-btn.pulse {
    animation: ctaBtnPulse 3s ease-in-out infinite !important;
  }

  /* === FLOATING CTA MOBILE === */
  .floating-cta-btn {
    position: fixed !important;
    bottom: 1.25rem !important;
    right: 1.25rem !important;
    width: 54px !important;
    height: 54px !important;
    font-size: 1.5rem !important;
    z-index: 10001 !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: rgba(90, 122, 148, 0.15) !important;
    cursor: pointer !important;
  }

  .floating-cta-btn::before {
    display: none !important;
  }

  .floating-cta-glow,
  .floating-cta-ring {
    display: none !important;
  }

  /* === MODAL CONTACT MOBILE === */
  .contact-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    z-index: 999999 !important;
    -webkit-transform: translateZ(0) !important;
    transform: translateZ(0) !important;
  }

  .contact-modal.active {
    pointer-events: auto !important;
    opacity: 1 !important;
  }

  .contact-modal .modal-backdrop {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
  }

  .contact-modal .modal-content {
    margin: 1rem !important;
    max-height: none !important;
    overflow: visible !important;
    -webkit-overflow-scrolling: auto !important;
    position: relative !important;
    z-index: 10 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .modal-orb {
    display: none !important;
  }

  .modal-contact-item {
    padding: 0.875rem !important;
  }

  .modal-contact-item .w-14 {
    width: 3rem !important;
    height: 3rem !important;
  }

  /* === PERFORMANCE OPTIMIZATIONS === */
  .aurora-bg {
    display: none !important;
  }

  .floating-orbs {
    display: none !important;
  }

  .wow-sparkles {
    display: none !important;
  }

  .noise-bg {
    display: none !important;
  }

  .animate-blob {
    display: none !important;
  }

  /* Light animations only */
  .animate-pulse-glow,
  .animate-float-slow {
    animation: none !important;
  }

  /* Subtle box shadows */
  .shadow-blue-glow {
    box-shadow: var(--shadow-soft) !important;
  }

  .shadow-blue-glow-lg {
    box-shadow: var(--shadow-medium) !important;
  }

  /* Smooth transitions - exclude critical elements */
  *:not(.contact-modal):not(.contact-modal *):not(.section-cta-btn):not(.floating-cta-btn):not(.modal-content) {
    transition-duration: 0.2s !important;
  }

  /* Restore transitions for contact modal */
  .contact-modal,
  .contact-modal .modal-content {
    transition-duration: 0.5s !important;
  }

  /* === iOS FIXES === */
  .fixed {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
  }

  video {
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
  }

  section {
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
  }
}

/* =============================================
   TABLET (769px - 1024px)
   ============================================= */
@media (min-width: 769px) and (max-width: 1024px) {

  body {
    font-size: 16px;
  }

  /* === PARALLAX TABLET === */
  .parallax-intro {
    background: transparent !important;
  }

  /* === NAVBAR TABLET === */
  nav {
    width: 94% !important;
  }

  /* === HERO TABLET === */
  section.min-h-screen {
    padding-top: 10rem !important;
  }

  h1.font-display {
    font-size: 4.5rem !important;
  }

  /* === SECTIONS TABLET === */
  #services,
  #realisations,
  section.py-24.px-6,
  #agency,
  #contact {
    padding-left: var(--tablet-padding) !important;
    padding-right: var(--tablet-padding) !important;
  }

  /* Services grid 2 columns */
  section.py-24.px-6 .grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* === FOOTER TABLET === */
  footer > div {
    flex-wrap: wrap !important;
    justify-content: center !important;
    text-align: center !important;
  }

  footer .text-sm {
    flex-basis: 100% !important;
  }

  /* === PERFORMANCE TABLET === */
  .aurora-bg {
    display: none !important;
  }

  .floating-orbs {
    display: none !important;
  }

  .animate-blob {
    display: none !important;
  }

  .backdrop-blur-xl,
  .backdrop-blur-2xl {
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
  }

  .animate-pulse-glow {
    animation: none !important;
  }
}

/* =============================================
   iOS SPECIFIC (via JS class)
   ============================================= */
.is-ios-device {
  -webkit-overflow-scrolling: touch;
}

.is-ios-device body {
  position: relative;
  min-height: 100%;
  min-height: -webkit-fill-available;
}

/* iOS : fixed uniquement sur desktop, relative sur mobile (géré par la media query mobile) */
@media (min-width: 769px) {
  .is-ios-device .parallax-intro {
    position: fixed;
    background: transparent;
  }
}

/* =============================================
   ACCESSIBILITY - REDUCED MOTION
   ============================================= */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  /* Parallax : pas d'animation, tout visible d'un coup */
  .parallax-layer--hidden {
    transform: none !important;
    opacity: 1 !important;
  }

  .animate-marquee {
    animation: none !important;
  }

  .logos-marquee {
    animation: none !important;
  }

  .floating-cta-btn,
  .card-flip-hint,
  .card-flip-hint svg {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .carousel-track {
    transition: none !important;
  }

  .portfolio-media img {
    transition: none !important;
  }

  html {
    scroll-behavior: auto !important;
  }
}

/* =========================
   LOGOS MARQUEE - TRUST SECTION
   ========================= */
/* Text marquee (Motion Design, Branding...) */
.animate-marquee {
  display: flex;
  width: fit-content;
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.animate-marquee span {
  flex-shrink: 0;
}

.logos-marquee-container {
  position: relative;
  width: 100%;
  mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
}

.logos-marquee {
  display: flex;
  width: fit-content;
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  gap: 0 !important;
}

.logos-slide {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-shrink: 0;
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  padding-right: 2rem;
}

@media (min-width: 768px) {
  .logos-slide {
    gap: 4rem;
    padding-right: 4rem;
  }
}

.logos-slide img {
  will-change: opacity;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* Mobile: slow down animation */
@media (max-width: 768px) {
  .logos-marquee {
    animation-duration: 20s;
  }

  .logos-slide img {
    height: 3rem !important;
  }
}

/* ===== Banderole types d'enseignes ===== */
.enseignes-marquee-container {
  position: relative;
  width: 100%;
  mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
}

.enseignes-marquee {
  display: flex;
  width: fit-content;
  animation: enseignes-scroll 30s linear infinite;
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

@keyframes enseignes-scroll {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-50%, 0, 0); }
}

.enseignes-slide {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 0;
}

.enseigne-item {
  font-family: var(--font-display, 'Satoshi', sans-serif);
  font-size: 0.85rem;
  font-weight: 500;
  color: #5A7184;
  white-space: nowrap;
  padding: 0.35rem 1rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.enseigne-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: #8FAABB;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .enseigne-item {
    font-size: 1rem;
    padding: 0.5rem 1.25rem;
  }
  .enseigne-dot {
    width: 6px;
    height: 6px;
  }
}

@media (max-width: 768px) {
  .enseignes-marquee {
    animation-duration: 22s;
  }
}


}

/* =========================
   MOUNTAIN SVG DIVIDERS
   Rappel visuel du parallax entre les sections
   ========================= */
.mountain-divider {
  pointer-events: none;
  overflow: hidden;
  line-height: 0;
}

.mountain-divider img {
  width: 100%;
  height: auto;
  display: block;
}

.mountain-divider-1 {
  margin-top: -1px;
}

.mountain-divider-2 {
  margin-top: 1rem;
}

.mountain-divider-footer {
  margin-top: -4rem;
}

.mountain-divider-footer img {
  min-height: 120px;
  object-fit: cover;
  object-position: bottom;
}

/* Mobile: un peu plus compacts */
@media (max-width: 768px) {
  .mountain-divider-1 img,
  .mountain-divider-2 img {
    min-height: 60px;
  }

  .mountain-divider-footer img {
    min-height: 80px;
  }
}

/* Desktop: taille généreuse */
@media (min-width: 1025px) {
  .mountain-divider-1 img,
  .mountain-divider-2 img {
    min-height: 100px;
  }

  .mountain-divider-footer {
    margin-top: -6rem;
  }

  .mountain-divider-footer img {
    min-height: 160px;
  }

}

/* ==========================================
   3D BUSINESS CARD
   ========================================== */
.card-3d-container {
  perspective: 1200px;
  cursor: pointer;
  width: 100%;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.card-3d {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  transform-style: preserve-3d;
  will-change: transform;
}

.card-3d-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 16px;
  overflow: hidden;
  box-shadow:
    0 25px 60px rgba(44, 62, 80, 0.18),
    0 0 0 1px rgba(213, 221, 227, 0.4);
  transition: box-shadow 0.4s ease;
}

.card-3d-container:hover .card-3d-face {
  box-shadow:
    0 35px 80px rgba(44, 62, 80, 0.25),
    0 0 0 1px rgba(90, 122, 148, 0.3);
}

.card-3d-face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.card-3d-back {
  transform: rotateY(180deg);
}

/* Flip hint pulse animation */
.card-flip-hint {
  animation: flipHintPulse 2.5s ease-in-out infinite;
  transform-origin: center;
}

.card-flip-hint svg {
  animation: flipHintRotate 2.5s ease-in-out infinite;
}

@keyframes flipHintPulse {
  0%, 100% { transform: scale(1); opacity: 0.75; }
  50% { transform: scale(1.2); opacity: 1; }
}

@keyframes flipHintRotate {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(15deg); }
  75% { transform: rotate(-15deg); }
}

@media (max-width: 640px) {
  .card-3d-container {
    max-width: 340px;
  }
  .card-3d-face {
    border-radius: 12px;
  }
}

/* ==========================================
   MODAL 3D CARD - Fullscreen Close-up
   ========================================== */
.modal-card-3d-container {
  perspective: 1500px;
  cursor: default;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.modal-card-3d {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  transform-style: preserve-3d;
  will-change: transform;
}

.modal-card-3d-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 20px;
  overflow: hidden;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.1);
  transition: box-shadow 0.4s ease;
}

.modal-card-3d-container:hover .modal-card-3d-face {
  box-shadow:
    0 40px 100px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.15);
}

.modal-card-3d-face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.modal-card-3d-back {
  transform: rotateY(180deg);
}

/* Initial state - starts from slight angle for entrance effect */
.modal-card-3d.modal-card-entering {
  animation: modalCardEntrance 1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes modalCardEntrance {
  0% {
    transform: rotateY(-30deg) rotateX(10deg) scale(0.8);
    opacity: 0;
  }
  100% {
    transform: rotateY(0deg) rotateX(0deg) scale(1);
    opacity: 1;
  }
}

/* Auto-flip animation */
.modal-card-3d.modal-card-auto-flip {
  animation: modalCardAutoFlip 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes modalCardAutoFlip {
  0% {
    transform: rotateY(0deg);
  }
  100% {
    transform: rotateY(180deg);
  }
}

/* Hint animation */
.modal-card-hint {
  animation: modalCardHintFade 0.5s ease 3.5s both;
}

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

@media (max-width: 640px) {
  .modal-card-3d-container {
    max-width: 90vw;
  }
  .modal-card-3d-face {
    border-radius: 14px;
  }
}
