/**
 * Kaiser & Partenaires — couche premium (typo, drawer, CTA, finitions)
 */

:root {
  --kp-warm: #f7f4fef5;
  --kp-warm-solid: #f5f0f3;
  --kp-slate-muted: #64748b;
  --kp-red: #ea0c22;
  --kp-red-dark: #bb0a1b;
}

/* --- Typo tagline éditoriale (remplace script) --- */
.elegant-script-text {
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.5rem, 4vw, 2.15rem);
  letter-spacing: 0.02em;
  color: #1a1a1a;
  line-height: 1.35;
}

/* --- Hero pages intérieures : voile sombre uniforme --- */
.hero-page-gradient {
  background: rgba(0, 0, 0, 0.56);
}

.hero-page-title {
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.85), 0 1px 3px rgba(0, 0, 0, 0.9);
}

.hero-page-subtitle {
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.75);
  font-weight: 300;
}

/* --- Accueil hero : voile sombre uniforme --- */
.hero-home-gradient {
  background: rgba(0, 0, 0, 0.5);
}

/* --- Harmonisation hero home + pages --- */
.hero-unified {
  min-height: 10.5rem;
}

@media (min-width: 768px) {
  .hero-unified {
    min-height: 12.5rem;
  }
}

.hero-unified-title {
  font-size: clamp(1.35rem, 2.8vw, 2.2rem);
  line-height: 1.12;
  font-weight: 800;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.7), 0 1px 3px rgba(0, 0, 0, 0.85);
}

.hero-unified-subtitle {
  font-size: clamp(0.8rem, 1.3vw, 0.95rem);
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.75);
}

.hero-section-with-bg .hero-content {
  z-index: 2;
}

.hero-content h2 {
  text-shadow: 0 2px 22px rgba(0, 0, 0, 0.65), 0 1px 4px rgba(0, 0, 0, 0.85);
}

/* --- Chiffres clés : contraste graisses --- */
.key-stat-value {
  font-weight: 800;
  letter-spacing: -0.03em;
}

.key-stat-label {
  font-weight: 300;
  letter-spacing: 0.04em;
  opacity: 0.95;
}

/* --- Sections fond chaud --- */
.bg-warm-section {
  background: linear-gradient(180deg, var(--kp-warm-solid) 0%, #faf8fa 100%);
}

/* --- Cartes : micro-interactions renforcées --- */
.card-bg,
article.bg-white.rounded-xl.shadow-lg {
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.35s ease;
}

.card-bg:hover,
article.bg-white.rounded-xl.shadow-lg:hover {
  transform: translateY(-0.5rem);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.18);
}

/* --- Boutons : rayon harmonisé + léger dégradé --- */
.btn-primary {
  border-radius: 0.75rem;
  background: linear-gradient(145deg, #f0152e 0%, var(--kp-red) 40%, var(--kp-red-dark) 100%);
  box-shadow: 0 4px 14px rgba(234, 12, 34, 0.35);
  border: none;
}

.btn-primary:hover {
  background: linear-gradient(145deg, #ff1a32 0%, #d60d22 50%, #9d0816 100%);
  box-shadow: 0 8px 24px rgba(234, 12, 34, 0.45);
}

.btn-secondary {
  border-radius: 0.75rem;
}

.btn-learn-more {
  border-radius: 0.75rem;
}

/* --- Navigation desktop : lien actif & survol --- */
header nav ul.flex.flex-row a {
  position: relative;
  transition: color 0.25s ease;
}

header nav ul.flex.flex-row a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0.1rem;
  width: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.95);
  transform: translateX(-50%);
  transition: width 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  border-radius: 2px;
}

header nav ul.flex.flex-row a:hover::after {
  width: 70%;
}

.nav-link--active {
  font-weight: 600;
}

header nav ul.flex.flex-row a.nav-link--active::after {
  width: 70%;
  background: #fff;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.45);
}

/* --- Menu mobile : backdrop + drawer --- */
.mobile-menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: rgba(9, 6, 8, 0.48);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  pointer-events: none;
}

.mobile-menu-backdrop.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

#mobile-menu-container.mobile-drawer {
  position: fixed !important;
  top: 0.65rem !important;
  right: 0 !important;
  left: auto !important;
  width: min(88vw, 18rem) !important;
  max-width: 22rem !important;
  height: auto !important;
  max-height: calc(100dvh - 1.3rem) !important;
  padding: 3.85rem 0.35rem 0.9rem !important;
  margin: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  align-items: stretch !important;
  background: linear-gradient(180deg, #820712 0%, #5f040a 62%, #490307 100%) !important;
  border-radius: 1rem 0 0 1rem !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.28) !important;
  z-index: 120 !important;
  overflow-y: auto !important;
  transform: translateX(100%) !important;
  transition: transform 0.32s cubic-bezier(0.22, 0.61, 0.36, 1) !important;
}

#mobile-menu-container.mobile-drawer.is-open {
  transform: translateX(0) !important;
}

#mobile-menu-container.mobile-drawer ul {
  width: 100%;
  padding: 0;
}

#mobile-menu-container.mobile-drawer a {
  border-radius: 0.7rem;
  text-align: left;
  padding: 0.65rem 0.85rem !important;
  font-size: 0.72rem !important;
  line-height: 1.25 !important;
  letter-spacing: 0.1em !important;
}

#mobile-menu-container.mobile-drawer a.nav-link--active {
  background: rgba(255, 255, 255, 0.15);
  border-left: 2px solid #fff;
}

.mobile-drawer-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 10;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.mobile-drawer-close:hover {
  background: rgba(255, 255, 255, 0.28);
}

@media (min-width: 768px) {
  .mobile-menu-backdrop {
    display: none !important;
  }
  #mobile-menu-container.mobile-drawer {
    display: none !important;
  }
}

@media (max-width: 767px) {
  #mobile-menu-container.mobile-drawer {
    top: auto !important;
    bottom: 0 !important;
    right: 0 !important;
    left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    max-height: min(78dvh, 36rem) !important;
    border-radius: 1.1rem 1.1rem 0 0 !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: none !important;
    box-shadow: 0 -14px 36px rgba(0, 0, 0, 0.35) !important;
    transform: translateY(110%) !important;
    transition: transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1) !important;
    padding: 3.2rem 0.7rem 0.8rem !important;
  }

  #mobile-menu-container.mobile-drawer::before {
    content: "";
    position: absolute;
    top: 0.55rem;
    left: 50%;
    width: 2.7rem;
    height: 0.3rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    transform: translateX(-50%);
    pointer-events: none;
  }

  #mobile-menu-container.mobile-drawer.is-open {
    transform: translateY(0) !important;
  }

  #mobile-menu-container.mobile-drawer ul {
    padding-bottom: max(0.65rem, env(safe-area-inset-bottom, 0px));
    gap: 0.28rem;
  }

  #mobile-menu-container.mobile-drawer li {
    opacity: 0;
    transform: translateY(8px);
  }

  #mobile-menu-container.mobile-drawer.is-open li {
    animation: mobile-link-stagger-in 0.34s ease forwards;
  }

  #mobile-menu-container.mobile-drawer.is-open li:nth-child(1) { animation-delay: 0.03s; }
  #mobile-menu-container.mobile-drawer.is-open li:nth-child(2) { animation-delay: 0.06s; }
  #mobile-menu-container.mobile-drawer.is-open li:nth-child(3) { animation-delay: 0.09s; }
  #mobile-menu-container.mobile-drawer.is-open li:nth-child(4) { animation-delay: 0.12s; }
  #mobile-menu-container.mobile-drawer.is-open li:nth-child(5) { animation-delay: 0.15s; }
  #mobile-menu-container.mobile-drawer.is-open li:nth-child(6) { animation-delay: 0.18s; }
  #mobile-menu-container.mobile-drawer.is-open li:nth-child(7) { animation-delay: 0.21s; }
  #mobile-menu-container.mobile-drawer.is-open li:nth-child(8) { animation-delay: 0.24s; }
  #mobile-menu-container.mobile-drawer.is-open li:nth-child(9) { animation-delay: 0.27s; }
  #mobile-menu-container.mobile-drawer.is-open li:nth-child(10) { animation-delay: 0.30s; }

  #mobile-menu-container.mobile-drawer a {
    font-size: 0.74rem !important;
    border: 1px solid rgba(255, 255, 255, 0.09);
  }

  .mobile-drawer-close {
    top: 0.6rem;
    right: 0.6rem;
  }

  @media (prefers-reduced-motion: reduce) {
    #mobile-menu-container.mobile-drawer li,
    #mobile-menu-container.mobile-drawer.is-open li {
      animation: none !important;
      opacity: 1;
      transform: none;
    }
  }
}

@keyframes mobile-link-stagger-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- WhatsApp : pulse discret (toutes les ~5s) --- */
@keyframes whatsapp-soft-pulse {
  0%,
  88% {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2), 0 0 0 0 rgba(37, 211, 102, 0.45);
  }
  92% {
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.28), 0 0 0 12px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2), 0 0 0 0 rgba(37, 211, 102, 0.45);
  }
}

.whatsapp-button {
  animation: whatsapp-soft-pulse 6s ease-in-out infinite;
}

/* --- Loader : disparition plus douce --- */
#loading-overlay {
  transition: opacity 0.85s cubic-bezier(0.4, 0, 0.2, 1);
}

#loading-overlay.hidden {
  opacity: 0;
}

/* --- Vidéo portfolio : zone play premium --- */
.portfolio-item video {
  border-radius: 0.75rem;
}

.portfolio-play-icon {
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
}

/* --- Formule vedette (offre) --- */
.offre-featured {
  background: linear-gradient(165deg, #fff5f5 0%, #f8fafc 50%, #fef2f2 100%) !important;
  border: 1px solid rgba(234, 12, 34, 0.2) !important;
  box-shadow: 0 20px 50px -15px rgba(234, 12, 34, 0.35) !important;
  transform: scale(1.03);
  z-index: 1;
}

@media (max-width: 1023px) {
  .offre-featured {
    transform: none;
  }
}

.service-item.offre-featured:hover {
  transform: translateY(-0.5rem) scale(1.03);
}

@media (max-width: 1023px) {
  .service-item.offre-featured:hover {
    transform: translateY(-0.5rem);
  }
}
