/* ===== KGL — Correctif mobile premium (charger APRÈS style.css) ===== */

/* Annule les règles obsolètes : header 70px vs bandeau 108px */
@media (max-width: 768px) {
  header {
    height: auto !important;
    min-height: unset !important;
    padding: 10px 0 8px !important;
  }

  header.scrolled {
    height: auto !important;
    min-height: unset !important;
    padding: 8px 0 6px !important;
  }

  .header-container {
    display: grid !important;
    grid-template-columns: 1fr auto auto;
    grid-template-rows: auto auto;
    align-items: center;
    height: auto !important;
    gap: 8px 10px;
    padding: 0 14px !important;
    padding-left: max(14px, env(safe-area-inset-left)) !important;
    padding-right: max(14px, env(safe-area-inset-right)) !important;
  }

  /* Ligne 1 : logo | menu | actions */
  .header-brand {
    grid-column: 1;
    grid-row: 1;
    flex-direction: row !important;
    align-items: center !important;
    justify-self: start;
    gap: 0 !important;
  }

  .header-brand .logo img {
    height: 46px !important;
    padding: 5px !important;
    max-width: 140px;
  }

  .menu-toggle {
    grid-column: 2;
    grid-row: 1;
    display: flex !important;
    justify-self: end;
    align-self: center;
    z-index: 1002;
  }

  .header-actions {
    grid-column: 3;
    grid-row: 1;
    display: flex !important;
    justify-self: end;
    align-self: center;
    gap: 6px !important;
    position: static !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .header-actions .client-login span {
    display: none;
  }

  .header-actions .client-login {
    padding: 7px 9px !important;
    min-width: 34px;
  }

  .lang-switcher .lang-btn {
    padding: 4px 7px;
    font-size: 10px;
  }

  nav {
    display: block !important;
  }

  /* Ligne 2 : bandeau valeurs pleine largeur */
  .header-values-bar {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    padding: 4px 0 2px;
    border-top: 1px solid rgba(197, 160, 40, 0.12);
  }

  .header-values-bar .header-values-marquee {
    max-width: 100% !important;
    width: 100%;
    mask-image: linear-gradient(90deg, transparent 0%, #000 3%, #000 97%, transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 3%, #000 97%, transparent 100%);
  }

  .header-values-text {
    font-size: 7.5px !important;
    letter-spacing: 0.13em !important;
    padding-right: 2rem;
  }

  /* Hero : ne plus chevaucher le header */
  .hero {
    min-height: 100svh !important;
    padding-top: calc(var(--header-height, 124px) + 20px) !important;
    align-items: flex-start !important;
    box-sizing: border-box;
  }

  .hero-content {
    padding: 0 18px 36px !important;
    padding-top: 8px !important;
    width: 100%;
    max-width: 100%;
  }

  .hero-top-meta {
    margin-top: 0 !important;
    margin-bottom: var(--space-5) !important;
    position: relative;
    z-index: 2;
  }

  .hero-location {
    order: unset !important;
    font-size: 11px !important;
    padding: 6px 14px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 999px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(197, 160, 40, 0.2);
  }

  .hero-content h1 {
    margin-top: var(--space-4) !important;
  }

  .page-header,
  .executive-header {
    padding-top: calc(var(--header-height, 124px) + 28px) !important;
  }

  .nav-menu.active {
    padding-top: calc(var(--header-height, 124px) + 16px) !important;
  }
}

@media (max-width: 480px) {
  .header-container {
    grid-template-columns: 1fr auto;
  }

  .menu-toggle {
    grid-column: 2;
  }

  .header-actions {
    grid-column: 1 / -1;
    grid-row: 3;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px !important;
    padding-top: 4px !important;
  }

  .header-values-bar {
    grid-row: 2;
  }

  .header-actions .client-login {
    display: none !important;
  }

  .header-values-text {
    font-size: 6.5px !important;
    letter-spacing: 0.1em !important;
  }
}

/* Desktop : bandeau sous le logo (colonne brand) */
@media (min-width: 769px) {
  .header-values-bar {
    display: none;
  }

  .header-brand .header-values-marquee,
  .header-brand > .header-values-marquee {
    display: block;
  }
}

@media (max-width: 768px) {
  .header-brand > .header-values-marquee {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .header-values-track {
    animation: none !important;
    justify-content: center;
    width: 100%;
  }

  .header-values-track .header-values-text:last-child {
    display: none;
  }
}
