/* === Hand-drawn whiteboard style (UI UX Pro Max: Anti-Polish Raw Aesthetic) === */
.process-visual, .service-visual {
  background: #FAFAF8;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}
.process-visual svg, .service-visual svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.process-visual::after, .service-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4'%3E%3Crect width='4' height='4' fill='%23000' fill-opacity='0.02'/%3E%3C/svg%3E");
  pointer-events: none;
  border-radius: 12px;
}
/* Slight rotation for authentic feel */
.process-card:nth-child(odd) .process-visual { transform: rotate(-0.5deg); }
.process-card:nth-child(even) .process-visual { transform: rotate(0.5deg); }
.service-card:nth-child(odd) .service-visual { transform: rotate(-0.5deg); }
.service-card:nth-child(even) .service-visual { transform: rotate(0.5deg); }

/* === Photo carousel fullscreen overlay === */
.carousel-overlay {
  position: fixed;
  inset: 0;
  /* Doit passer au-dessus de .site-header, monté à 900 par premium.css.
     À 200, l'en-tête fixe recouvrait le coin haut-droit — donc la croix
     de fermeture, qui devenait invisible et incliquable. Une visionneuse
     plein écran doit couvrir tout le chrome du site. */
  z-index: 9990;
  background: oklch(8% 0.02 250 / 0.97);
  backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
  touch-action: pan-y;
}
.carousel-overlay.active { display: flex; }
.carousel-track {
  display: flex;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}
.carousel-slide {
  flex: 0 0 100vw;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  width: 100vw;
  height: 100vh;
  box-sizing: border-box;
}
.carousel-slide img {
  max-width: 92vw;
  max-height: 80vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.5);
  user-select: none;
  -webkit-user-drag: none;
}
.carousel-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: oklch(100% 0 0 / 0.15);
  backdrop-filter: blur(8px);
  border: 1px solid oklch(100% 0 0 / 0.2);
  color: #fff;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 210;
  cursor: pointer;
}
.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: oklch(100% 0 0 / 0.1);
  backdrop-filter: blur(8px);
  border: 1px solid oklch(100% 0 0 / 0.15);
  color: #fff;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 210;
  cursor: pointer;
}
.carousel-prev { left: 12px; }
.carousel-next { right: 12px; }
.carousel-counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: oklch(100% 0 0 / 0.6);
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.1em;
}
@media (max-width: 768px) {
  .carousel-nav { width: 40px; height: 40px; font-size: 18px; }
  .carousel-prev { left: 8px; }
  .carousel-next { right: 8px; }
}

/* === Fix mobile header === */
@media (max-width: 768px) {
  .nav-pill {
    top: 8px;
    max-width: calc(100vw - 16px);
    padding: 6px 6px 6px 16px;
    gap: 8px;
  }
  .nav-brand { font-size: 14px; letter-spacing: 0.1em; }
  .nav-links { display: none; }
  .nav-pill .btn { padding: 6px 14px; font-size: 11px; }
  /* Mobile menu button */
  .nav-toggle {
    display: flex;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--color-gold);
    color: var(--color-navy);
    align-items: center;
    justify-content: center;
    font-size: 16px;
    border: none;
  }
}
.nav-toggle { display: none; }
@media (max-width: 768px) { .nav-toggle { display: flex; } }
/* Mobile menu open */
.nav-mobile-menu {
  display: none;
  position: fixed;
  top: 56px;
  left: 8px;
  right: 8px;
  background: oklch(100% 0 005 240 / 0.97);
  backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--color-glass-border);
  border-radius: 16px;
  padding: 16px;
  z-index: 99;
  box-shadow: 0 8px 32px oklch(12% 0.02 250 / 0.12);
}
.nav-mobile-menu.open { display: flex; }
.nav-mobile-menu a {
  display: block;
  padding: 12px 16px;
  font-family: var(--font-mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-ink);
  border-radius: 8px;
}
.nav-mobile-menu a:hover { background: var(--color-gold-soft); color: var(--color-navy); }

/* === v44.1 mobile whiteboard/storyboard correction === */
.process {
  position: relative;
  scroll-margin-top: 104px;
  background:
    linear-gradient(oklch(35% 0.03 245 / 0.035) 1px, transparent 1px),
    linear-gradient(90deg, oklch(35% 0.03 245 / 0.035) 1px, transparent 1px),
    var(--color-paper-2);
  background-size: 28px 28px;
}
.process .section-title { position: relative; z-index: 1; }
.process-grid { align-items: stretch; }
.process-card,
.service-card {
  border: 2px solid oklch(22% 0.04 250 / 0.12) !important;
  background: oklch(99% 0.006 85 / 0.94) !important;
  box-shadow: 0 18px 42px oklch(18% 0.04 250 / 0.08), 3px 4px 0 oklch(18% 0.04 250 / 0.04);
  isolation: isolate;
}
.process-card::before,
.service-card::before {
  height: 0 !important;
}
.process-card::after,
.service-card::after {
  content: '';
  position: absolute;
  top: 14px;
  right: 18px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--color-gold);
  border: 2px solid var(--color-navy);
  box-shadow: 0 3px 0 oklch(12% 0.02 250 / 0.12);
  z-index: 3;
}
.process-card:nth-child(odd),
.service-card:nth-child(odd) { transform: rotate(-0.25deg); }
.process-card:nth-child(even),
.service-card:nth-child(even) { transform: rotate(0.25deg); }
.process-card:hover,
.service-card:hover { transform: translateY(-5px) rotate(0deg); }
.whiteboard-visual {
  width: min(100%, 260px) !important;
  height: auto !important;
  aspect-ratio: 16 / 10.4;
  margin-inline: auto;
  margin-bottom: var(--space-lg) !important;
  padding: 10px;
  border: 2px solid oklch(24% 0.04 250 / 0.10);
  border-radius: 20px !important;
  background: oklch(100% 0.004 95) !important;
  box-shadow: 4px 6px 0 oklch(18% 0.04 250 / 0.05);
  overflow: visible !important;
}
.whiteboard-visual::before {
  content: '';
  position: absolute;
  top: -11px;
  left: 50%;
  width: 70px;
  height: 20px;
  transform: translateX(-50%) rotate(-2deg);
  border-radius: 5px;
  background: oklch(88% 0.09 82 / 0.70);
  border: 1px solid oklch(73% 0.10 82 / 0.22);
  z-index: 2;
}
.whiteboard-visual svg,
.whiteboard-modal-visual svg {
  display: block;
  width: 100% !important;
  height: 100% !important;
  overflow: visible;
}
.process-name,
.service-name { position: relative; display: inline-block; width: fit-content; }
.process-name::after,
.service-name::after {
  content: '';
  position: absolute;
  left: -4px;
  right: -7px;
  bottom: -5px;
  height: 9px;
  border-radius: 999px;
  background: oklch(83% 0.12 205 / 0.32);
  transform: rotate(-1deg);
  z-index: -1;
}
.process-num,
.service-num {
  font-family: 'Patrick Hand', var(--font-mono);
  font-size: 1.3rem !important;
  letter-spacing: 0.08em;
}
.process-tag {
  font-family: 'Patrick Hand', var(--font-body);
  font-size: 0.86rem !important;
  background: oklch(90% 0.08 80 / 0.80) !important;
  border: 1.5px solid oklch(45% 0.06 70 / 0.14);
  border-radius: 12px 15px 13px 11px !important;
  box-shadow: 2px 3px 0 oklch(12% 0.02 250 / 0.04);
  transform: rotate(-0.8deg);
}
.process-tag:nth-child(2) { transform: rotate(1deg); }
.process-tag:nth-child(3) { transform: rotate(-1.2deg); }

/* Modal: centered mobile card, vertical whiteboard layout */
.modal {
  margin: auto !important;
  width: min(520px, calc(100vw - 32px)) !important;
  max-height: calc(100dvh - 72px) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  border-radius: 30px !important;
  background: oklch(99% 0.005 85) !important;
}
.modal-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 34px 28px 30px !important;
  text-align: center;
}
.modal-content h3 {
  margin: 0 !important;
  padding-right: 28px;
  font-family: var(--font-display);
  color: var(--color-navy);
  font-size: clamp(2rem, 10vw, 3.2rem);
  line-height: 0.95;
  text-transform: uppercase;
}
.modal-img,
.whiteboard-modal-visual {
  width: min(100%, 310px) !important;
  height: auto !important;
  aspect-ratio: 16 / 10.4;
  margin: 2px auto 4px !important;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  object-fit: unset !important;
  overflow: visible !important;
  border: 2px solid oklch(24% 0.04 250 / 0.10);
  border-radius: 22px !important;
  background: oklch(100% 0.004 95) !important;
  box-shadow: 4px 6px 0 oklch(18% 0.04 250 / 0.05);
}
.modal-content p {
  margin: 0 !important;
  max-width: 31ch;
  color: oklch(34% 0.03 250 / 0.78);
  font-size: clamp(1rem, 4.2vw, 1.12rem);
  line-height: 1.65;
  font-weight: 400;
}
.modal-close {
  z-index: 5;
  background: oklch(96% 0.01 85 / 0.82);
}
.modal-close-link {
  width: min(100%, 260px);
  justify-content: center;
  min-height: 52px;
  margin-top: 2px !important;
}
@media (max-width: 480px) {
  html, body { overflow-x: clip; }
  .process { padding-top: 78px; }
  .process-grid { gap: 22px !important; }
  .process-card,
  .service-card {
    padding: 34px 24px 30px !important;
    border-radius: 28px !important;
  }
  .whiteboard-visual { width: min(100%, 245px) !important; padding: 9px; }
  .process-desc, .service-desc { font-size: 0.98rem !important; line-height: 1.65; }
  .modal { width: calc(100vw - 28px) !important; max-height: calc(100dvh - 62px) !important; }
  .modal-content { padding: 30px 22px 26px !important; gap: 16px; }
  .modal-img, .whiteboard-modal-visual { width: min(100%, 285px) !important; padding: 10px; }
}


/* === v44.2 generated storyboard scenes === */
.story-visual,
.story-modal-visual {
  padding: 0 !important;
  background: var(--color-navy) !important;
  border-color: oklch(22% 0.04 250 / 0.16) !important;
  overflow: hidden !important;
}
.story-visual::before { display: none !important; }
.story-visual::after { display: none !important; }
.whiteboard-story-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  background: var(--color-navy);
}
.process-card .story-visual {
  width: min(100%, 310px) !important;
  aspect-ratio: 3 / 2;
  max-height: 210px;
}
.modal .story-modal-visual {
  width: min(100%, 430px) !important;
  aspect-ratio: 3 / 2;
  max-height: 290px;
}
@media (max-width: 480px) {
  .process-card .story-visual { width: min(100%, 295px) !important; max-height: 210px; }
  .modal .story-modal-visual { width: min(100%, 318px) !important; max-height: 218px; }
  .modal-content { gap: 14px !important; }
}
