/* JYCO-Expression — couche téléphone.
   Chargée après les styles inline. Ne touche pas le bureau (≥ 900px),
   sauf quelques filets de sécurité (débordement, zones tactiles). */

html { -webkit-text-size-adjust: 100%; }
html, body { max-width: 100%; }
body { overflow-x: clip; }
img, svg, video { max-width: 100%; height: auto; }
a, button, [role="button"], input, select, textarea, label, summary {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* ── Optimisation images mobile ───────────────────────────────────── */
/* Images de galerie : optimisation avec content-visibility.
   L'opacite 0 n'est active QUE si mobile.js a pris la main
   (body.img-fade-on) : sans JS, les photos restent visibles au lieu de
   rester invisible (occasion === bug "images coupees"). */
body.img-fade-on .pr-gallery img,
body.img-fade-on .gallery-grid img,
body.img-fade-on .work-card-frame img {
  content-visibility: auto;
  contain-intrinsic-size: 0 0;
  opacity: 0;
  transition: opacity 0.6s ease-out;
}
body.img-fade-on .pr-gallery img.loaded,
body.img-fade-on .gallery-grid img.loaded,
body.img-fade-on .work-card-frame img.loaded {
  opacity: 1;
}

/* Éviter le reflow lors du chargement des images - réserver l'espace */
.work-card-frame img,
.cat-card-frame img,
.pr-piece img,
.gallery-item img {
  min-height: 1px;
}
/* Fix layout shift by using proper intrinsic sizes instead of 0 0 */
.work-card-frame img { contain-intrinsic-size: 400px 500px; }
.cat-card-frame img { contain-intrinsic-size: 400px 500px; }
.cat-card-frame.wide img { contain-intrinsic-size: 600px 338px; }

/* Placeholder gris pendant le chargement */
.work-card-frame img,
.cat-card-frame img,
.pr-piece img,
.gallery-item img {
  background: #f0f0f0;
}

/* ── Burger ─────────────────────────────────────────────────────────── */
.nav-burger {
  display: none;
  align-items: center;
  gap: 10px;
  min-width: 44px;
  min-height: 44px;
  padding: 8px 2px 8px 10px;
  margin: 0;
  border: 0;
  background: transparent;
  color: inherit;
  pointer-events: auto;
  font-family: var(--font-mono, 'IBM Plex Mono', ui-monospace, monospace);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  z-index: 100040;
}
.nav-burger-lines {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 18px;
}
.nav-burger-lines i {
  display: block;
  height: 1px;
  width: 100%;
  background: currentColor;
  transition: transform .35s cubic-bezier(.16,1,.3,1), opacity .2s ease;
}
.nav-burger[aria-expanded="true"] .nav-burger-lines i:first-child {
  transform: translateY(3px) rotate(45deg);
}
.nav-burger[aria-expanded="true"] .nav-burger-lines i:last-child {
  transform: translateY(-3px) rotate(-45deg);
}
.nav-burger:focus-visible { outline: 1px solid currentColor; outline-offset: 4px; }

/* ── Panneau plein écran ────────────────────────────────────────────── */
.mobile-panel {
  position: fixed;
  inset: 0;
  z-index: 100030;
  display: flex;
  flex-direction: column;
  background: #fff;
  color: #0d0d0d;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .4s cubic-bezier(.16,1,.3,1),
              transform .4s cubic-bezier(.16,1,.3,1),
              visibility 0s linear .4s;
  padding: calc(72px + env(safe-area-inset-top, 0px)) 20px calc(24px + env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Bouton de fermeture (croix X) : fixe pour ne pas defiler avec le panneau */
.mobile-close {
  position: fixed;
  top: calc(16px + env(safe-area-inset-top, 0px));
  right: 20px;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #0d0d0d;
  font-size: 32px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  z-index: 100031;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background .2s ease, color .2s ease;
}
.mobile-close:hover,
.mobile-close:focus-visible {
  background: rgba(13, 13, 13, 0.08);
  color: #0d0d0d;
}
.mobile-close:focus-visible {
  outline: 2px solid #0d0d0d;
  outline-offset: 2px;
}
.mobile-panel.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: none;
  transition: opacity .4s cubic-bezier(.16,1,.3,1),
              transform .4s cubic-bezier(.16,1,.3,1),
              visibility 0s;
}
.mobile-panel-eyebrow {
  margin: 0 0 4px;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono, 'IBM Plex Mono', ui-monospace, monospace);
  font-size: 10px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: #767676;
}
.mobile-panel-eyebrow::after {
  content: '';
  height: 1px;
  flex: 1;
  background: rgba(13, 13, 13, 0.12);
}
.mobile-panel-nav {
  display: flex;
  flex-direction: column;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}
.mobile-panel-nav > li { border-top: 1px solid rgba(13,13,13,.12); }
.mobile-panel-nav > li:last-child { border-bottom: 1px solid rgba(13,13,13,.12); }
.mobile-panel-nav a,
.mobile-panel-nav button.mobile-acc {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-height: 54px;
  padding: 12px 0;
  border: 0;
  background: transparent;
  color: #0d0d0d;
  font-family: var(--font-sans, 'DM Sans', system-ui, sans-serif);
  font-size: clamp(19px, 6vw, 26px);
  font-weight: 300;
  letter-spacing: -.02em;
  line-height: 1.15;
  text-align: left;
  text-decoration: none;
}
.mobile-panel-nav a:hover,
.mobile-panel-nav a:focus-visible,
.mobile-panel-nav button.mobile-acc:hover,
.mobile-panel-nav button.mobile-acc:focus-visible { color: #3a3a3a; }
.mobile-acc-mark {
  font-family: var(--font-mono, 'IBM Plex Mono', ui-monospace, monospace);
  font-size: 15px;
  font-weight: 400;
  color: #767676;
  flex-shrink: 0;
}
.mobile-sub {
  display: none;
  list-style: none;
  margin: 0 0 12px;
  padding: 0 0 8px;
}
.mobile-acc[aria-expanded="true"] + .mobile-sub { display: block; }
.mobile-sub > li { margin: 0; }
.mobile-sub a {
  min-height: 44px;
  padding: 8px 0 8px 2px;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0;
  color: #3a3a3a;
}
.mobile-sub .mobile-group {
  margin: 14px 0 4px;
  font-family: var(--font-mono, 'IBM Plex Mono', ui-monospace, monospace);
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #767676;
}
.mobile-sub .mobile-group a {
  font-family: inherit;
  font-size: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  font-weight: 400;
  min-height: 32px;
  padding: 4px 0;
  color: #767676;
}
.mobile-sub .mobile-nested { padding-left: 12px; }
.mobile-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  margin-top: 28px;
  padding: 14px 20px;
  border: 1px solid #0d0d0d;
  background: #0d0d0d;
  color: #fff !important;
  font-family: var(--font-mono, 'IBM Plex Mono', ui-monospace, monospace) !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  letter-spacing: .14em !important;
  text-transform: uppercase;
  text-decoration: none;
}
.mobile-cta:hover, .mobile-cta:focus-visible {
  background: #3a3a3a;
  border-color: #3a3a3a;
  color: #fff !important;
}
.mobile-panel-foot {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid rgba(13,13,13,.12);
  font-family: var(--font-mono, 'IBM Plex Mono', ui-monospace, monospace);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #767676;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}
.mobile-panel-foot a { color: #767676; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.mobile-panel-foot a:hover { color: #0d0d0d; }

/* Bouton CTA "Demandez votre devis" dans le pied de panneau */
.mobile-panel-cta {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  min-height: 52px !important;
  margin-bottom: 24px !important;
  padding: 14px 20px !important;
  border: 1px solid #0d0d0d !important;
  background: #0d0d0d !important;
  color: #fff !important;
  font-family: var(--font-mono, 'IBM Plex Mono', ui-monospace, monospace) !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  letter-spacing: .14em !important;
  text-transform: uppercase !important;
  text-decoration: none !important;
  border-radius: 4px;
  transition: background .2s ease, border-color .2s ease, transform .1s ease;
}
.mobile-panel-cta:hover,
.mobile-panel-cta:focus-visible {
  background: #3a3a3a !important;
  border-color: #3a3a3a !important;
  color: #fff !important;
  transform: translateY(-1px);
}
.mobile-panel-cta:active {
  transform: translateY(0);
}

body.menu-open { overflow: hidden; }
body.menu-open .site-header {
  mix-blend-mode: normal !important;
  background: #fff !important;
  color: #0d0d0d !important;
  pointer-events: auto;
}
body.menu-open .logo-mark img { filter: none; }
body.menu-open .nav-burger { color: #0d0d0d; }
body.menu-open .header-overlay { visibility: hidden !important; pointer-events: none !important; }

@media (prefers-reduced-motion: reduce) {
  .mobile-panel, .nav-burger-lines i { transition: none; }
}

/* ── Téléphone / tablette portrait ──────────────────────────────────── */
@media (max-width: 899px) {
  /* Évite le reflow au déverrouillage du preloader : le passage de
     body.is-locked (overflow hidden) à visible fait apparaître la
     scrollbar, rétrécit le viewport et décale toute la page (CLS).
     Le gutter stable réserve sa place dès le départ. */
  html { scrollbar-gutter: stable; }
  .nav-burger { display: inline-flex; }
  .primary-nav { display: none !important; }
  .header-overlay { display: none !important; }
  .header-row {
    padding: calc(16px + env(safe-area-inset-top, 0px)) 20px 16px;
    align-items: center;
  }
  .header-overlay-row { padding-top: calc(16px + env(safe-area-inset-top, 0px)); }
  .logo-mark img { width: 56px; }
  


  .preloader-mark video {
    max-width: min(68vw, 240px) !important;
    max-height: 26vh !important;
  }
  .preloader-foot {
    left: 20px;
    right: 20px;
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  }
  .preloader-label { font-size: 10px; }
  .preloader-count { font-size: 10px; }

  .scroll-counter { display: none; }

  .ed-hero {
    height: 100svh;
    min-height: 100svh;
    max-height: 100svh;
  }
  .ed-hero-body {
    padding: calc(88px + env(safe-area-inset-top, 0px)) 20px 72px;
    justify-content: flex-end;
  }
  .ed-back {
    position: absolute;
    top: calc(88px + env(safe-area-inset-top, 0px));
    left: 20px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
  .ed-hero-bottom {
    width: 100% !important;
    max-width: 100% !important;
  }
  .ed-h1 { font-size: clamp(32px, 10vw, 48px); }
  .ed-lead { margin-top: 12px; font-size: 15px; max-width: none; }
  .ed-hero-secondary { margin-top: 16px; flex-wrap: wrap; }
  .ed-hero-secondary-link { min-height: 44px; display: inline-flex; align-items: center; }
  .ed-hero-corner {
    left: 20px;
    right: 20px;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    align-items: stretch;
    flex-direction: row;
    justify-content: space-between;
    gap: 12px;
  }
  .ed-scroll { display: none; }
  .ed-hero-nav { gap: 8px; flex-wrap: wrap; }
  .ed-hero-nav-link { min-height: 44px; }

  .work-pin { position: static; height: auto; display: block; padding-top: 96px; padding-bottom: 32px; }
  .work-track { gap: 56px; padding-inline: 20px; }
  .work-card { width: 100% !important; max-width: none !important; }
  .work-card h3 { font-size: 18px; margin-top: 16px; }

  .playground-teaser { padding: 72px 20px; }
  .playground-link {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .section-head,
  .about-grid,
  .about-lists,
  .contact-section,
  .cat-section,
  .legal-block,
  .site-footer {
    padding-inline: 20px;
  }
  .section-head {
    flex-direction: column;
    align-items: flex-start;
    padding-block: 40px;
  }
  .section-head h2 { font-size: clamp(20px, 6vw, 32px); }
  .about-portrait-sticky { position: static; }
  .about-copy-col p { font-size: clamp(15px, calc(6px + 1.6svh), 25px) !important; }
  /* Tablette portrait : memes grilles empilees que sur telephone, sinon les
     colonnes 12u du bureau deviennent minuscules (texte serre, images a 100px). */
  .about-grid { grid-template-columns: 1fr !important; }
  .about-lists { grid-template-columns: 1fr !important; }
  .approach-item { grid-template-columns: 1fr !important; gap: 6px; align-items: start; }
  .contact-head {
    flex-direction: column;
    align-items: flex-start;
  }
  .contact-head p { text-align: left; max-width: none; }
  .contact-head h2 { font-size: clamp(20px, 6vw, 32px); }
  .say-hello { margin-top: 32px; }
  .say-hello-inner { font-size: clamp(14px, 4vw, 16px); padding: 10px 20px; }
  /* Fix for inline style override on contact CTA */
  .say-hello-inner[data-tone="type"] { font-size: clamp(18px, 5vw, 22px) !important; line-height: 1.2 !important; }
  .contact-wordmark { margin-top: 40px; }
  .contact-bottom { gap: 14px; }
  .cb-top { justify-self: start; }

  .footer-row,
  .footer-left,
  .footer-right {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .top-btn { min-height: 44px; }

  .cat-grid { gap: 36px 20px; margin-top: 32px; grid-template-columns: 1fr !important; }
  .cat-filter-btn { min-height: 44px; padding: 12px 16px; }
  .cat-hero-grid { gap: 24px; margin-top: 32px; grid-template-columns: 1fr !important; }
  .cat-specs { grid-template-columns: 1fr; }
  .cat-card-frame { aspect-ratio: 4 / 5; }
  .cat-card-frame.wide { aspect-ratio: 16 / 9; }

  .pr-meta {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 48px 20px 0;
  }
  .pr-body { padding: 48px 20px 64px; gap: 12px; }
  .pr-body p { font-size: 16px; }
  .pr-gallery { padding: 0 16px 80px; }
  .pr-gallery-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 24px;
  }
  .pr-grid { gap: 28px; grid-template-columns: 1fr !important; }
  .pr-piece { margin-top: 0 !important; }
  .pr-next { height: 70svh; min-height: 280px; }
  .pr-next-body { padding: 28px 20px calc(28px + env(safe-area-inset-bottom, 0px)); }
  .pr-next-count {
    right: 20px;
    bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  }

  .lab-grid { padding: 64px 16px 80px; }
  .lab-columns { gap: 36px; margin-top: 36px; grid-template-columns: 1fr !important; }
  .lab-col { margin-top: 0 !important; }

  /* Main gallery layouts for prestations pages */
  .gallery-grid { grid-template-columns: 1fr !important; gap: 32px !important; }
  .gallery-item { width: 100% !important; }

  /* Grid layouts for portfolio sections */
  .clients-grid { grid-template-columns: 1fr !important; }
  .channels { grid-template-columns: 1fr 1fr !important; }

  .ed-index { padding: 64px 20px 32px; }
  .ed-row { gap: 12px; padding: 22px 0; }
  .ed-title { font-size: clamp(22px, 7vw, 34px); }
  .ed-arrow { width: 16px; height: 16px; }

  .devis-grid { gap: 32px; margin-top: 32px; }
  .devis-row { grid-template-columns: 1fr; }
  .devis-field input,
  .devis-field select,
  .devis-field textarea { font-size: 16px; min-height: 48px; }
  .devis-submit {
    width: 100%;
    min-height: 52px;
    align-self: stretch;
    text-align: center;
  }
  /* Fix contact matrix links touch targets */
  .cm-col a { min-height: 44px; display: inline-flex; align-items: center; }
  .footer-social a { min-height: 44px; display: inline-flex; align-items: center; }

  .lightbox { padding: 12px; }
  .lightbox-close {
    top: calc(10px + env(safe-area-inset-top, 0px));
    right: 12px;
    width: 44px;
    height: 44px;
  }

  .cs-intro-visual {
    height: 52vh;
    min-height: 240px;
    margin-top: 72px;
    border-radius: 0;
  }
  .cs-intro-content { padding: 20px 20px 36px; }
  .cs-title span { font-size: clamp(32px, 10vw, 48px); }
  .cs-intro-cta { min-height: 44px; }

  .lg-fly-cap { padding: 20px 16px; font-size: 22px; }
}

@media (max-width: 480px) {
  .header-row { padding-inline: 16px; }
  .work-track,
  .section-head,
  .about-grid,
  .about-lists,
  .contact-section,
  .cat-section,
  .legal-block,
  .playground-teaser,
  .ed-index { padding-inline: 16px; }
  .ed-hero-body { padding-inline: 16px; }
  .ed-back { left: 16px; }
  .ed-hero-corner { left: 16px; right: 16px; }
  .pr-meta, .pr-body { padding-inline: 16px; }
  .mobile-panel { padding-inline: 16px; }
  .mobile-panel-nav a,
  .mobile-panel-nav button.mobile-acc { font-size: 19px; }
  .mobile-close { right: 16px; }
}

@media (max-height: 620px) and (orientation: landscape) {
  .ed-hero { height: 100svh; min-height: 0; max-height: none; }
  .ed-hero-body { padding-top: 64px; padding-bottom: 56px; }
  .ed-back { top: 56px; }
  .preloader-mark video { max-height: 40vh !important; }
  .mobile-panel { padding-top: 56px; }
  .mobile-close { top: calc(8px + env(safe-area-inset-top, 0px)); }
  .mobile-panel-nav a,
  .mobile-panel-nav button.mobile-acc { min-height: 44px; font-size: 18px; }
}

/* Galerie privée */
@media (max-width: 560px) {
  .gal-inner {
    padding: 14px 16px;
    padding-top: calc(14px + env(safe-area-inset-top, 0px));
    align-items: flex-start;
  }
  .gal-client { text-align: left; }
  main.ga { padding: 28px 16px 110px; }
  .rules-banner { padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); }
  .terms-accept { min-height: 48px; }
  .code-box button { min-height: 48px; }
  .code-box input { font-size: 18px; min-height: 48px; }
}

/* Admin */
@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  .nav button { min-height: 44px; }
  .otp input { min-height: 48px; font-size: 20px; }
}

/* ── Tablette large (640-899) : meubler l'espace comme le mobile ──── */
@media (min-width: 640px) and (max-width: 899px) {
  .header-row {
    padding: calc(20px + env(safe-area-inset-top, 0px)) 32px 20px;
    align-items: center;
  }
  .header-overlay-row { padding-top: calc(20px + env(safe-area-inset-top, 0px)); }
  .logo-mark img { width: 64px; }

  .preloader-foot { left: 32px; right: 32px; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }

  .work-pin { padding-top: 112px; }

  .work-track,
  .section-head,
  .about-grid,
  .about-lists,
  .contact-section,
  .cat-section,
  .legal-block,
  .site-footer,
  .playground-teaser,
  .ed-index {
    padding-inline: 32px;
  }
  .ed-hero-body { padding-inline: 32px; }
  .ed-back { left: 32px; }
  .ed-hero-corner { left: 32px; right: 32px; }
  .pr-meta, .pr-body { padding-inline: 32px; }
  .pr-gallery { padding-inline: 28px; }
  .mobile-panel { padding-inline: 40px; }
  .mobile-close { right: 32px; }

  .section-head {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    padding-block: 56px 64px;
  }
  .section-head h2,
  .contact-head h2 { font-size: clamp(28px, 5vw, 40px); }

  .contact-head { flex-direction: row; align-items: flex-end; justify-content: space-between; gap: 32px; }
  .contact-head p { text-align: right; max-width: 30ch; }

  .about-copy-col p { font-size: clamp(15px, calc(6px + 1.6svh), 25px) !important; }
  .work-card h3 { font-size: 20px; }

  .ed-h1 { font-size: clamp(40px, 8vw, 60px); }
  .ed-lead { font-size: 17px; }

  .say-hello { margin-top: 64px; }
  .say-hello-inner[data-tone="type"] { font-size: clamp(20px, 4vw, 30px) !important; line-height: 1.15 !important; }

  .footer-row,
  .footer-left,
  .footer-right {
    flex-direction: row;
    align-items: center;
    gap: 24px;
  }
}

/* ── Boutons fixes mobile/tablette en bas d'écran ────────────────────────── */
.mobile-fixed-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100025;
  display: none;
  gap: 0;
  padding: 12px 0 calc(12px + env(safe-area-inset-bottom, 0px));
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-top: 0;
  box-shadow: none;
}

/* Afficher les boutons quand le preloader est terminé */
body.preloader-done .mobile-fixed-bar,
body:not(.is-locked) .mobile-fixed-bar {
  display: flex;
}
.mobile-fixed-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 12px 16px;
  border: 0;
  border-radius: 0;
  font-family: var(--font-mono, 'IBM Plex Mono', ui-monospace, monospace);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}
.mobile-fixed-btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.mobile-fixed-btn.primary {
  background: #0d0d0d;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.mobile-fixed-btn.primary:hover,
.mobile-fixed-btn.primary:focus-visible {
  background: #3a3a3a;
  transform: translateY(-1px);
}
.mobile-fixed-btn.secondary {
  background: rgba(255, 255, 255, 0.95);
  color: #0d0d0d;
  border: 1px solid rgba(13, 13, 13, 0.2);
}
.mobile-fixed-btn.secondary:hover,
.mobile-fixed-btn.secondary:focus-visible {
  background: #ffffff;
  transform: translateY(-1px);
}
.mobile-fixed-btn:active {
  transform: translateY(0);
}
/* Masquer la barre sur desktop */
@media (min-width: 900px) {
  .mobile-fixed-bar { display: none !important; }
}

/* ── CTA "Demandez votre devis" : taille fluide (svh) tablette/mobile ─────
   Ordi (>= 1024 px) intouche : conserve le clamp d'origine de chaque page.
   Seuls la tablette et le mobile suivent la regle fluide proportionnelle
   a la hauteur d'ecran, comme le texte "A propos". */
@media (max-width: 1023px) {
  .cat-outro-cta { font-size: clamp(22px, calc(10px + 2.4svh), 44px); }
  .say-hello-inner { font-size: clamp(32px, calc(14px + 4.2svh), 96px); }
  .say-hello-inner[data-tone="type"] { font-size: clamp(32px, calc(14px + 4.2svh), 96px) !important; line-height: 1.1 !important; }
}

/* ── Tablette portrait (768-899) : grilles 2 colonnes pour respirer ── */
@media (min-width: 768px) and (max-width: 899px) and (orientation: portrait) {
  .work-track {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100% !important;
    align-items: stretch;
    gap: 48px 24px;
  }
  .work-card h3 { margin-top: 20px; }

  .about-grid { grid-template-columns: 0.9fr 1.1fr !important; gap: 48px 32px; }
  .about-portrait-col { grid-column: auto !important; }
  .about-copy-col { grid-column: auto !important; }

  .cat-grid { grid-template-columns: 1fr 1fr !important; gap: 48px 24px; }
  .cat-hero-grid { grid-template-columns: 1fr 1fr !important; gap: 28px 24px; }
  .gallery-grid { grid-template-columns: 1fr 1fr !important; gap: 32px 24px !important; }
  .pr-grid { grid-template-columns: 1fr 1fr !important; gap: 48px 28px; align-items: start; }
  .lab-columns { grid-template-columns: 1fr 1fr !important; gap: 48px 28px; }
  .clients-grid { grid-template-columns: 1fr 1fr !important; }
  .channels { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ── Bouton "Demandez votre devis" de la barre de menus : libellé tablette/mobile ──
   Ordinateur (>= 1024 px) : conserve "Demandez votre devis".
   Tablette et mobile (<= 1023 px) : affiche "Demandez votre Devis". */
@media (max-width: 1023px) {
  .overlay-nav a.nav-cta {
    font-size: 0;
  }
  .overlay-nav a.nav-cta::after {
    content: "Demandez votre Devis";
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    white-space: nowrap;
  }
}

/* ── Bouton "Voir la vidéo" des carrousels drone : mobile + tablette ──────
   Sur ordinateur (>= 1024 px), un onglet vertical reste collé au bord droit.
   Sur tablette et mobile (<= 1023 px), le bouton devient une pilule lisible
   centrée sur la diapo, dans le meme langage visuel (fond bone, case + icon). */
@media (min-width: 768px) and (max-width: 1023px) {
  .cs-car-video-btn {
    top: 50%;
    left: 50%;
    right: auto;
    transform: translate(-50%, -50%);
    flex-direction: row;
    gap: 10px;
    min-width: 0;
    min-height: 0;
    height: 52px;
    padding: 0 22px;
    border: 0;
    border-radius: 999px;
    background: var(--bone);
    color: var(--ink);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
  }
  .cs-car-video-btn:hover,
  .cs-car-video-btn:focus-visible {
    transform: translate(-50%, -50%) translateY(-2px);
  }
  .cs-car-video-btn svg { width: 15px; height: 15px; }
  .cs-car-video-btn span {
    writing-mode: horizontal-tb;
    transform: none;
    line-height: 1;
  }
}

@media (max-width: 767px) {
  .cs-car-video-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    right: auto;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-direction: row;
    gap: 10px;
    min-width: 0;
    min-height: 0;
    height: 52px;
    padding: 0 22px;
    border: 0;
    border-radius: 999px;
    background: var(--bone);
    color: var(--ink);
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
    transform: translate(-50%, -50%);
    transition: transform 0.2s var(--ease-expo), background-color 0.2s var(--ease-expo);
  }
  .cs-car-video-btn:hover,
  .cs-car-video-btn:focus-visible {
    transform: translate(-50%, -50%) translateY(-2px);
  }
  .cs-car-video-btn svg { width: 15px; height: 15px; flex: 0 0 auto; }
  .cs-car-video-btn span {
    writing-mode: horizontal-tb;
    transform: none;
    line-height: 1;
  }
  /* Lecteur mural mobile : le style desktop n'existant qu'en >= 768 px,
     on le redefinit entierement pour l'experience mobile. */
  .cs-video-modal {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    place-items: center;
    padding: 16px;
    background: rgba(13, 13, 13, 0.9);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-out, visibility 0s linear 0.3s;
  }
  body.cs-video-open { overflow: hidden; }
  .cs-video-modal.is-open {
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
  }
  .cs-video-dialog {
    position: relative;
    width: 100%;
    transform: translateY(14px) scale(0.985);
    transition: transform 0.35s var(--ease-soft);
  }
  .cs-video-modal.is-open .cs-video-dialog { transform: none; }
  .cs-video-frame {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
    background: #000;
  }
  .cs-video-close {
    position: absolute;
    top: -48px;
    right: 0;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    font-size: 30px;
    line-height: 1;
    border: 1px solid var(--border);
    background: var(--ink);
    color: var(--bone);
    cursor: pointer;
  }
  .cs-video-close:hover,
  .cs-video-close:focus-visible { border-color: var(--bone-dim); }
}
@media (prefers-reduced-motion: reduce) {
  @media (max-width: 767px) {
    .cs-video-modal,
    .cs-video-dialog,
    .cs-car-video-btn { transition: none; }
  }
}

/* ── Fluidité des animations mobile / tablette (≤ 1023 px) ──────────
   Supprime les effets coûteux (flous GPU, halos floutés, grandes
   amplitudes) et raccourcit les transitions : navigation plus réactive.
   Le bureau (≥ 1024 px) conserve tout le comportement d'origine. */
@media (max-width: 1023px) {
  /* Halos floutés (blur 90–110 px) : très chers sur petit écran,
     et sans intérêt sans survol réel. On les coupe. */
  .glow-host::before,
  .cs-car .cs-car-item::before { display: none !important; }

  /* Bouton vidéo : le backdrop-blur est du GPU gaspillé sur un fond
     déjà opaque (remplacé par l'ombre portée). */
  .cs-car-video-btn {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  /* Grille "focus" : pas de flou ni de recollement au survol. */
  .focus-grid:hover .focus-card,
  .focus-grid .focus-card:hover,
  .focus-grid .focus-card:focus-visible {
    filter: none !important;
    transform: none !important;
  }

  /* Carrousel scroll-gallery : snap plus net pendant le défilement. */
  .cs-car.is-scroll-gallery .cs-car-item {
    transition: transform .24s var(--ease-soft), opacity .24s ease-out;
  }

  /* Transition de page : masque centre-ouvert plus rapide. */
  .page-transition img {
    transition: transform .38s var(--ease-soft), clip-path .38s var(--ease-soft);
  }

  /* Entrée initiale, au lever de rideau : plus rapide et moins d'amplitude. */
  .load-in.js-armed {
    transform: scale(.96) translateY(10px);
    transition: opacity .25s var(--ease-soft), transform .25s var(--ease-soft);
    transition-delay: 380ms;
  }
  .load-in.js-armed.load-d2 { transition-delay: 440ms; }
  .load-in.js-armed.is-ready { opacity: 1; transform: none; }
  .cs-title.js-armed span {
    transform: translateY(104%);
    transition: transform .25s var(--ease-soft);
    transition-delay: 420ms;
  }
  .cs-title.js-armed.is-ready span { transform: translateY(0); }
  .hero-grow.js-armed {
    opacity: 0;
    transform: scale(.78);
    transition: opacity .5s var(--ease-soft), transform .65s var(--ease-soft);
  }
  .hero-grow.js-armed.is-ready { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .load-in, .cs-title span, .hero-grow, .page-transition img,
  .cs-car.is-scroll-gallery .cs-car-item { transition: none; }
}
