/* ===============================================
   DK SUD SERRURERIE -- style.css
   Tokens + animations + nav structurel uniquement
   =============================================== */

:root {
  /* -- Couleurs -- */
  --color-primary:            #1e3a5f;
  --color-primary-dark:       #152b47;
  --color-primary-light:      #60a5fa;
  --color-azure:              #dbeafe;
  --color-azure-mid:          #3b82f6;
  --color-accent:             #f59e0b;
  --color-accent-dark:        #d97706;
  --color-accent-green:       #16a34a;
  --color-accent-green-dark:  #15803d;

  --color-bg:             #ffffff;
  --color-bg-alt:         #eff6ff;
  --color-bg-dark:        #2563eb;

  --color-text:           #1a202c;
  --color-text-muted:     #6b7280;
  --color-border:         #bfdbfe;
  --color-border-light:   #e2e8f0;

  /* -- Typographie -- */
  --font-heading: 'Quicksand', 'Roboto Condensed', Arial, sans-serif;
  --font-body:    'Quicksand', 'Roboto', Arial, sans-serif;

  /* -- Layout -- */
  --max-width: 1200px;

  /* -- Ombres -- */
  --shadow-sm:  0 1px 3px rgba(37,99,235,0.07);
  --shadow-md:  0 4px 16px rgba(37,99,235,0.10);
  --shadow-lg:  0 8px 32px rgba(37,99,235,0.13);
  --shadow-xl:  0 20px 40px rgba(37,99,235,0.12);

  /* -- Tokens standards -- */
  --text-xs: 0.75rem; --text-sm: 0.875rem; --text-base: 1rem;
  --text-lg: 1.125rem; --text-xl: 1.25rem; --text-2xl: 1.5rem;
  --text-3xl: 1.875rem; --text-4xl: 2.25rem; --text-5xl: 3rem; --text-6xl: 3.75rem;
  --space-xs: 0.25rem; --space-sm: 0.5rem; --space-md: 1rem;
  --space-lg: 1.5rem; --space-xl: 2rem; --space-2xl: 3rem;
  --space-3xl: 4rem; --space-4xl: 6rem;
  --radius-default: 6px; --radius-sm: 4px; --radius-md: 8px;
  --radius-lg: 12px; --radius-xl: 16px; --radius-full: 9999px;
}

/* -- Animations -- */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}
@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.6); opacity: 0.5; }
}
@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* -- Scroll reveal -- */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}
[data-reveal-stagger] > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
[data-reveal-stagger].is-visible > *:nth-child(1) { transition-delay: 0ms; }
[data-reveal-stagger].is-visible > *:nth-child(2) { transition-delay: 80ms; }
[data-reveal-stagger].is-visible > *:nth-child(3) { transition-delay: 160ms; }
[data-reveal-stagger].is-visible > *:nth-child(4) { transition-delay: 240ms; }
[data-reveal-stagger].is-visible > *:nth-child(5) { transition-delay: 320ms; }
[data-reveal-stagger].is-visible > *:nth-child(6) { transition-delay: 400ms; }
[data-reveal-stagger].is-visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* -- Navigation structurelle -- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10000;
  background-color: var(--color-bg);
  border-bottom: 1px solid var(--color-border-light);
  transition: box-shadow 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}
.site-header.is-scrolled {
  box-shadow: 0 2px 20px rgba(37,99,235,0.08);
  background-color: rgba(255,255,255,0.97);
  backdrop-filter: blur(10px);
  border-bottom-color: transparent;
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-logo {
  text-decoration: none;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.nav-logo img {
  height: 64px;
  width: auto;
  display: block;
}

.nav-desktop { display: none; align-items: center; }

.nav-link {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  color: var(--color-primary);
  padding: 0.4rem 0.75rem;
  border-radius: 4px;
  text-decoration: none;
  transition: color 0.2s, background-color 0.2s;
  white-space: nowrap;
}
.nav-link:hover {
  color: var(--color-azure-mid);
  background-color: var(--color-azure);
}
.nav-link--active {
  color: var(--color-azure-mid);
  background-color: var(--color-azure);
  font-weight: 700;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1.1rem;
  background-color: var(--color-accent);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  border-radius: 4px;
  text-decoration: none;
  transition: background-color 0.2s, transform 0.2s;
  white-space: nowrap;
}
.nav-cta:hover {
  background-color: var(--color-accent-dark);
  transform: translateY(-1px);
}

.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--color-primary);
  flex-shrink: 0;
}

/* -- Menu mobile -- */
.mobile-menu {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 9999;
  background-color: #ffffff;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  opacity: 0;
  pointer-events: none;
  transform: translateX(100%);
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.mobile-menu.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.mobile-menu-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 5.5rem 1.5rem 1.75rem;
  text-align: center;
  border-bottom: 1px solid var(--color-azure);
  margin-bottom: 0.5rem;
  background: linear-gradient(180deg, var(--color-bg-alt) 0%, #ffffff 100%);
}
.mobile-menu-brand-icon {
  width: 52px;
  height: 52px;
  background: rgba(96,165,250,0.10);
  border: 1.5px solid rgba(96,165,250,0.30);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-azure-mid);
  margin-bottom: 0.5rem;
}
.mobile-menu-brand-icon .icon { width: 1.6em; height: 1.6em; }
.mobile-menu-brand-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 0.1em;
  color: var(--color-primary);
  line-height: 1;
}
.mobile-menu-brand-sub {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  text-transform: uppercase;
  margin-top: 0.1rem;
}
.mobile-menu-brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.75rem;
  padding: 0.3rem 0.85rem;
  background: rgba(22,163,74,0.07);
  border: 1px solid rgba(22,163,74,0.22);
  border-radius: 50px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.73rem;
  color: var(--color-accent-green);
  letter-spacing: 0.04em;
}
.mobile-menu-badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--color-accent-green);
  flex-shrink: 0;
  animation: pulse-dot 2s ease-in-out infinite;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 0;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-primary);
  border-bottom: 1px solid var(--color-azure);
  text-decoration: none;
  transition: color 0.2s, padding-left 0.2s;
  min-height: 56px;
}
.mobile-nav-link:hover,
.mobile-nav-link--active {
  color: var(--color-azure-mid);
  padding-left: 0.5rem;
}

.mobile-menu-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 1rem 1.5rem;
  background: var(--color-accent);
  border-radius: 6px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  text-decoration: none;
  transition: background 0.2s;
  min-height: 56px;
}
.mobile-menu-cta:hover { background: var(--color-accent-dark); }
.mobile-menu-cta-sub {
  text-align: center;
  font-size: 0.78rem;
  margin-top: 0.6rem;
  color: var(--color-text-muted);
  font-family: var(--font-body);
}

/* -- Icônes -- */
.icon {
  display: inline-block;
  width: 1.25em; height: 1.25em;
  vertical-align: -0.15em;
  flex-shrink: 0;
}
.icon.hidden { display: none; }
.icon-sm { width: 1em;   height: 1em; }
.icon-lg { width: 1.5em; height: 1.5em; }
.icon-xl { width: 2em;   height: 2em; }

/* -- Bouton téléphone sticky -- */
.sticky-phone-btn {
  position: fixed;
  bottom: 1.25rem;
  right: 1rem;
  z-index: 8900;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.1rem;
  background: var(--color-accent);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.03em;
  border-radius: 50px;
  box-shadow: 0 4px 20px rgba(245,158,11,0.45);
  text-decoration: none;
  /* Toujours visible, jamais masqué par JS ni scroll */
  opacity: 1 !important;
  pointer-events: auto !important;
  /* Animation float perpétuelle */
  animation: float 3s ease-in-out infinite;
  transition: box-shadow 0.2s;
}

/* Numéro toujours affiché sur tous les écrans, y compris mobile */
.sticky-phone-btn span {
  display: inline !important;
  white-space: nowrap;
}

.sticky-phone-btn:hover {
  box-shadow: 0 8px 28px rgba(245,158,11,0.55);
  /* Pause le float au hover pour éviter le conflit transform */
  animation-play-state: paused;
}

/* -- Nav secondaire services (desktop uniquement) -- */
.services-subnav {
  display: none;
  background: #fff;
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  z-index: 100;
  overflow: hidden;
}

.services-subnav > div {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.services-subnav > div::-webkit-scrollbar { display: none; }

.services-subnav-link {
  display: inline-flex;
  align-items: center;
  padding: 0.85rem 0.9rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}
.services-subnav-link:hover {
  color: var(--color-azure-mid);
  border-bottom-color: var(--color-azure-mid);
}

/* -- Nav mobile services (mobile/tablette uniquement) -- */
.services-mobile-nav {
  display: block;
}

/* -- scroll-margin-top sur les ancres -- */
#ouverture-porte,
#cylindre-serrure,
#porte-blindee,
#blindage,
#coffre-fort,
#rideau-metallique,
#volet-roulant,
#autres-services {
  scroll-margin-top: 160px;
}

/* -- Carte tarifs -- */
.tarifs-card {
  background: var(--color-bg-alt);
  border: 1.5px solid var(--color-border);
  border-left: 4px solid var(--color-accent);
  border-radius: 8px;
  overflow: hidden;
}
.tarifs-card-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 1.25rem;
  background: var(--color-accent);
}
.tarifs-card-header span {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: #fff;
  text-transform: uppercase;
}
.tarifs-card-body {
  padding: 0 1.25rem 1.25rem;
}
.tarifs-card-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--color-border);
  gap: 1rem;
}
.tarifs-card-row:first-child { margin-top: 1.25rem; }
.tarifs-card-row:last-of-type { border-bottom: none; }
.tarifs-card-label {
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--color-text);
  line-height: 1.4;
}
.tarifs-card-price {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--color-primary);
  white-space: nowrap;
  flex-shrink: 0;
}
.tarifs-card-note {
  font-family: var(--font-body);
  font-size: 0.72rem;
  color: var(--color-text-muted);
  margin-top: 1rem;
  line-height: 1.6;
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-border);
}

.tarifs-sticky {
  position: sticky;
  top: calc(80px + 80px + 1.5rem);
}

/* -- Carte CTA sidebar -- */
.sidebar-cta-card {
  margin-top: 1.25rem;
  background: var(--color-bg-dark);
  border-radius: 8px;
  padding: 1.25rem;
}
.sidebar-cta-card p {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: rgba(255,255,255,0.85);
  line-height: 1.7;
  margin-bottom: 1rem;
}
.sidebar-cta-card a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--color-accent);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.2s;
}
.sidebar-cta-card a:hover { background: var(--color-accent-dark); }

/* -- Formulaire dévis : grille prénom/nom responsive -- */
.name-grid {
  grid-template-columns: 1fr 1fr;
}

/* -- Responsive -- */
@media (max-width: 479px) {
  /* Grille prénom/nom : 1 colonne sur très petits écrans */
  .name-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (min-width: 768px) {
  .nav-toggle  { display: none; }
  .nav-desktop { display: flex; }
  .nav-inner   { height: 88px; padding: 0 1.5rem; }
  .nav-logo img { height: 68px; }

  #ouverture-porte,
  #cylindre-serrure,
  #porte-blindee,
  #blindage,
  #coffre-fort,
  #rideau-metallique,
  #volet-roulant,
  #autres-services {
    scroll-margin-top: 170px;
  }

  .tarifs-sticky { top: calc(88px + 80px + 1.5rem); }

  .footer-main-grid        { grid-template-columns: 1.4fr 1fr 1fr 1.2fr !important; gap: 2.5rem !important; }
  .hero-grid               { grid-template-columns: 58fr 42fr !important; }
  .pres-grid               { grid-template-columns: 1fr 1fr !important; }
  .zones-grid              { grid-template-columns: 1fr 1.4fr !important; }
  .devis-grid              { grid-template-columns: 1.1fr 0.9fr !important; }
  .service-layout-grid     { grid-template-columns: 1.15fr 0.85fr !important; }

  .footer-bottom {
    flex-direction: row !important;
    justify-content: space-between !important;
    text-align: left !important;
    align-items: center !important;
  }
}

@media (min-width: 1024px) {
  .nav-inner { height: 96px; }
  .nav-logo img { height: 76px; }

  .services-mobile-nav { display: none; }
  .services-subnav {
    display: block;
    top: 96px;
  }

  #ouverture-porte,
  #cylindre-serrure,
  #porte-blindee,
  #blindage,
  #coffre-fort,
  #rideau-metallique,
  #volet-roulant,
  #autres-services {
    scroll-margin-top: 196px;
  }

  .tarifs-sticky { top: calc(96px + 52px + 1.5rem); }
}

/* -- Bouton close mobile -- */
.mobile-menu-close {
  position: absolute;
  top: 1rem; right: 1rem;
  background: transparent;
  border: 0;
  cursor: pointer;
  color: var(--color-text-muted);
  padding: 0.5rem;
  line-height: 1;
  z-index: 1;
}

/* -- Accessibilité -- */
@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;
  }
}

body { margin: 0; }