/* ═══════════════════════════════════════════════════════════
   GothamDev — Navigation mobile & responsivité globale
   Breakpoint menu : 1024px
═══════════════════════════════════════════════════════════ */

:root {
  --nav-bp: 1024px;
}

/* Évite les shifts décoratifs au chargement */
body::before,
body::after {
  contain: strict;
}

/* ── Desktop : barre horizontale ── */
@media (min-width: 1025px) {
  .burger {
    display: none !important;
  }

  .nav-panel-head,
  .nav-panel-label {
    display: none !important;
  }

  .nav-links {
    position: static !important;
    top: auto !important;
    right: auto !important;
    width: auto !important;
    max-width: none !important;
    height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 4px !important;
    overflow: visible !important;
    background: transparent !important;
    border: none !important;
    backdrop-filter: none !important;
    transform: none !important;
    box-shadow: none !important;
  }

  .nav-panel-body {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    flex: 1;
  }

  .nav-links .nav-mobile-only {
    display: none !important;
  }

  .nav-panel-body > a:not(.btn) {
    padding: 8px 12px;
    font-size: 0.82rem;
    white-space: nowrap;
  }

  .nav-panel-cta {
    margin-left: 4px;
  }
}

/* ── Tablette & mobile : drawer + burger ── */
@media (max-width: 1024px) {
  .burger {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    margin: 0;
    margin-left: auto;
    z-index: 1001;
    border-radius: var(--radius-md, 10px);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-lg, rgba(255, 255, 255, 0.1));
  }

  .burger span {
    width: 20px;
  }

  .navbar .nav-inner {
    padding: 8px clamp(14px, 4vw, 20px);
    min-height: 58px;
    gap: 12px;
  }

  .navbar.scrolled .nav-inner {
    min-height: 54px;
  }

  .logo-img {
    width: 42px;
    height: 42px;
  }

  .nav-links {
    position: fixed !important;
    top: 0;
    right: 0;
    width: min(92vw, 340px) !important;
    max-width: 340px !important;
    height: 100dvh !important;
    height: 100vh !important; /* fallback */
    max-height: 100dvh;
    margin: 0 !important;
    padding: 0 !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 0 !important;
    background: rgba(7, 9, 14, 0.98) !important;
    border-left: 1px solid var(--border-lg, rgba(255, 255, 255, 0.1)) !important;
    border-radius: 0 !important;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: -16px 0 48px rgba(0, 0, 0, 0.45);
    z-index: 999;
    overflow: hidden;
    transform: translateX(100%);
    transition: transform 0.35s var(--ease-out, cubic-bezier(0.22, 1, 0.36, 1));
    visibility: visible;
  }

  .nav-links.open {
    transform: translateX(0);
  }

  .nav-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    padding: max(16px, env(safe-area-inset-top)) 20px 14px;
    border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.08));
    background: rgba(255, 255, 255, 0.02);
  }

  .nav-panel-title {
    font-family: var(--font-display, system-ui);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-0, #f8fafc);
    letter-spacing: 0.02em;
  }

  .nav-panel-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border: none;
    border-radius: var(--radius-md, 10px);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-1, #e2e8f0);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
  }

  .nav-panel-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-0, #fff);
  }

  .nav-panel-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 12px 16px max(24px, env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .nav-panel-label {
    margin: 16px 0 6px;
    padding: 0 12px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-3, #8b95a8);
  }

  .nav-links a:not(.btn),
  .nav-links a.nav-mobile-only {
    display: flex !important;
    align-items: center;
    min-height: 48px;
    padding: 12px 14px !important;
    font-size: 1rem !important;
    font-weight: 500;
    color: var(--text-1, #e2e8f0) !important;
    border-radius: var(--radius-md, 10px);
    white-space: normal;
  }

  .nav-links a.nav-mobile-only {
    font-size: 0.92rem !important;
    color: var(--text-2, #a8b0c4) !important;
    padding-left: 18px !important;
  }

  .nav-links a:not(.btn):hover,
  .nav-links a.nav-mobile-only:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-0, #fff) !important;
  }

  .nav-links a.nav-active:not(.btn) {
    background: rgba(91, 140, 255, 0.14) !important;
    color: var(--text-0, #fff) !important;
  }

  .nav-links .lang-switch {
    margin-top: 8px;
    min-height: 44px;
    justify-content: flex-start;
  }

  .nav-panel-cta {
    width: 100% !important;
    min-height: 48px !important;
    margin-top: 16px !important;
    justify-content: center !important;
    font-size: 0.95rem !important;
    padding: 14px 20px !important;
  }

  html.nav-open,
  body.nav-open {
    overflow: hidden;
    touch-action: none;
  }
}

/* ── Onglets services : labels visibles + scroll ── */
@media (max-width: 1024px) {
  .cat-tabs-wrapper {
    margin-left: -18px;
    margin-right: -18px;
    padding: 0 18px;
  }

  .cat-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 8px;
    padding: 8px 4px 12px;
    mask-image: linear-gradient(90deg, #000 92%, transparent);
  }

  .cat-tabs::-webkit-scrollbar {
    display: none;
  }

  .cat-tab {
    flex: 0 0 auto !important;
    width: auto !important;
    height: auto !important;
    min-height: 44px;
    padding: 10px 14px !important;
    font-size: 0.8rem !important;
    gap: 6px !important;
    justify-content: flex-start !important;
  }

  .cat-tab span:not(.tab-icon):not(.tab-new) {
    display: inline !important;
  }

  .tab-icon {
    font-size: 1rem !important;
  }

  .tab-new {
    position: static;
    margin-left: 4px;
    font-size: 0.55rem;
    padding: 3px 6px;
    background: #166534;
    color: #fff;
  }

  .cat-tab--gaming {
    border-color: rgba(91, 140, 255, 0.35);
  }
}

/* ── Tarifs, FiveM, formulaire, sections ── */
@media (max-width: 1024px) {
  .pricing-switcher {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    gap: 8px;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .pricing-switcher::-webkit-scrollbar {
    display: none;
  }

  .ps-btn {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 10px 16px;
    font-size: 0.85rem;
    white-space: nowrap;
    color: #c5cdd9;
  }

  .ps-btn.active {
    color: #fff;
  }

  .pricing-grid {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .pricing-custom {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 22px 18px;
  }

  .pricing-custom-actions {
    width: 100%;
    flex-direction: column;
  }

  .pricing-custom-actions .btn {
    width: 100%;
    justify-content: center;
    min-height: 44px;
  }

  .fm-store-grid {
    grid-template-columns: 1fr !important;
  }

  .fm-store-cta {
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
    padding: 24px 18px;
  }

  .fm-store-cta-actions {
    flex-direction: column;
    width: 100%;
  }

  .fm-store-cta-actions .btn {
    width: 100%;
    min-height: 48px;
    justify-content: center;
  }

  .fm-product-foot {
    flex-wrap: wrap;
    gap: 10px;
  }

  .fm-product-link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  .form-mode-switch {
    flex-direction: column;
  }

  .form-mode-btn {
    min-height: 44px;
  }

  .contact-layout {
    gap: 32px;
  }

  .contact-form {
    padding: 22px 18px;
  }

  .form-row {
    grid-template-columns: 1fr !important;
  }

  .hero-actions--grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .hero-actions--grid .btn {
    width: 100%;
    justify-content: center;
    min-height: 48px;
  }

  .proof-trust {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .proof-trust-item {
    text-align: center;
    padding: 12px;
  }

  .portfolio-grid {
    grid-template-columns: 1fr !important;
  }

  .testi-grid,
  .testi-grid--shop,
  .testi-grid--trustpilot {
    grid-template-columns: 1fr !important;
  }

  .shop-custom,
  .tp-custom {
    flex-direction: column;
    align-items: flex-start;
    padding: 22px 18px;
  }

  .shop-custom-actions,
  .tp-custom-actions {
    width: 100%;
    flex-direction: column;
  }

  .shop-custom-actions .btn,
  .tp-custom-actions .btn {
    width: 100%;
    min-height: 44px;
    justify-content: center;
  }

  .shop-source a,
  .tp-source a,
  .pf-case-link {
    min-height: 44px;
    padding: 10px 14px;
  }

  .footer-body {
    grid-template-columns: 1fr 1fr;
    gap: 28px 20px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-bottom-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .footer-legal {
    flex-wrap: wrap;
    gap: 12px 16px;
  }

  .footer-legal a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  .consent-banner {
    left: 12px;
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
  }

  .consent-panel {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .consent-actions {
    flex-direction: column;
    width: 100%;
  }

  .consent-actions .btn {
    width: 100%;
    min-height: 44px;
    justify-content: center;
  }

  .fab-bar {
    display: flex;
  }

  .sticky-cta-desktop {
    display: none !important;
  }
}

@media (max-width: 640px) {
  .footer-body {
    grid-template-columns: 1fr;
  }

  .hero-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px 10px !important;
    padding: 14px 16px !important;
  }

  .hero-metrics .hm-item {
    padding-left: 0 !important;
    border-left: none !important;
    align-items: center !important;
    text-align: center;
  }

  .hero-metrics .hm-value {
    justify-content: center;
  }

  .hero-metrics .hm-label {
    min-height: auto;
    margin-top: 0;
  }

  .section {
    padding: 56px 0;
  }

  .section-header {
    margin-bottom: 40px;
  }

  .container {
    padding-left: 18px;
    padding-right: 18px;
  }

  .process-steps-grid {
    grid-template-columns: 1fr !important;
  }

  .services-grid {
    grid-template-columns: 1fr !important;
  }

  .gmb-layout {
    grid-template-columns: 1fr !important;
  }

  .scene-float,
  .showcase-float-badge {
    display: none !important;
  }
}

@media (max-width: 380px) {
  .nav-links {
    width: 100vw !important;
    max-width: 100vw !important;
  }

  .hero-title {
    font-size: clamp(1.85rem, 9vw, 2.4rem);
  }

  .cat-tab {
    padding: 8px 12px !important;
    font-size: 0.75rem !important;
  }
}

/* Contraste accessibilité */
.ss-label {
  color: #a8b4c8;
}

.cl-wa-hint {
  color: #9aa6ba;
}
