/* ============================================================
   RESPONSIVE — MIDAL Agency
   Tablet ≤ 1024px | Mobile ≤ 768px | XS ≤ 480px
   ============================================================ */

/* ── Tablet ≤ 1024px ─────────────────────────────────────── */
@media (max-width: 1024px) {
  /* Hero */
  .hero-inner        { grid-template-columns: 1fr; gap: 50px; }
  .hero-visual       { order: -1; height: 340px; animation: none; }
  .hv-main           { height: 260px; }
  .hv-sec            { width: 55%; height: 160px; }

  /* About */
  .about-inner       { grid-template-columns: 1fr; gap: 48px; }

  /* Services */
  .svc-layout        { grid-template-columns: 1fr; }

  /* Réalisations */
  .real-grid         { grid-template-columns: 1fr 1fr; }
  .real-card:nth-child(1) { grid-column: 1 / 3; }

  /* Process */
  .proc-grid         { grid-template-columns: 1fr 1fr; }

  /* Témoignages */
  .t-grid            { grid-template-columns: 1fr 1fr; }

  /* Contact */
  .contact-inner     { grid-template-columns: 1fr; gap: 48px; }

  /* Footer */
  .footer-grid       { grid-template-columns: 1fr 1fr; gap: 32px; }

  /* Masonry */
  .real-masonry      { columns: 3; }

  /* Phases */
  .phases            { grid-template-columns: 1fr; }
}

/* ── Mobile ≤ 768px ──────────────────────────────────────── */
@media (max-width: 768px) {

  /* Global */
  .sec               { padding: 60px 0; }
  .wrap              { padding: 0 18px; }

  /* Navigation */
  .nav-menu, .nav-right { display: none; }
  .hamburger         { display: flex; }

  /* ── Hero : passe en 1 colonne, cache le robot Spline ── */
  .wrap[style*="grid-template-columns: 62%"],
  .wrap[style*="grid-template-columns:62%"] {
    display: flex !important;
    flex-direction: column !important;
  }

  /* Cache la colonne Spline sur mobile (perf + lisibilité) */
  .wrap[style*="grid-template-columns: 62%"] > div:last-child,
  .wrap[style*="grid-template-columns:62%"] > div:last-child {
    display: none !important;
  }

  /* Contenu hero centré */
  .hero-content {
    text-align: center;
    padding: 120px 0 60px;
  }
  .hero-ctas, .hero-badges, .hero-stats-row {
    justify-content: center;
  }
  .hero-desc { max-width: 100%; }
  .hero-h1-shimmer { font-size: clamp(32px, 9vw, 52px); }
  .hero-ticker { width: 100%; }

  /* Stats hero */
  .hero-stats-row    { gap: 12px; flex-wrap: wrap; }
  .hstat-card        { min-width: 90px; }

  /* Badges */
  .hero-badges       { display: none; }

  /* Team grid */
  .team-grid         { grid-template-columns: 1fr 1fr !important; gap: 20px; }

  /* Digital studio 360° grid (3→1 col) */
  [style*="grid-template-columns: repeat(3, 1fr)"] {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  /* Réalisations */
  .real-grid         { grid-template-columns: 1fr; }
  .real-card:nth-child(1) { grid-column: 1; }

  /* Services */
  .svc-head          { flex-direction: column; align-items: flex-start; gap: 20px; }
  .svc-cards         { grid-template-columns: 1fr; }

  /* About stats */
  .about-stats       { grid-template-columns: 1fr 1fr; }

  /* Process */
  .proc-grid         { grid-template-columns: 1fr 1fr; }

  /* Témoignages */
  .t-grid            { grid-template-columns: 1fr; }

  /* Form */
  .form-row          { grid-template-columns: 1fr; }

  /* Footer */
  .footer-grid       { grid-template-columns: 1fr; }
  .footer-bottom     { flex-direction: column; text-align: center; gap: 10px; }

  /* Masonry */
  .real-masonry      { columns: 2; }

  /* Strip */
  .strip-track       { animation-duration: 20s; }

  /* Agence intro grid */
  .ag-intro-grid     { grid-template-columns: 1fr !important; gap: 40px !important; }
}

/* ── XS ≤ 480px ──────────────────────────────────────────── */
@media (max-width: 480px) {
  /* Hero */
  .hero-ctas         { flex-direction: column; align-items: center; }
  .hero-ctas .btn    { width: 100%; text-align: center; }

  /* Titre hero */
  .hero-h1-shimmer   { font-size: clamp(28px, 10vw, 42px); }

  /* Team */
  .team-grid         { grid-template-columns: 1fr !important; }

  /* Process */
  .proc-grid         { grid-template-columns: 1fr; }

  /* Masonry */
  .real-masonry      { columns: 1; }

  /* Tabs */
  .tabs-bar          { flex-direction: column; align-items: center; }

  /* About stats */
  .about-stats       { grid-template-columns: 1fr 1fr; }

  /* Footer nav cols */
  .footer-grid       { grid-template-columns: 1fr; }

  /* Wrap extra narrow */
  /* Mobile Accordion (TKT-007) */
  .mob-acc-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    flex-direction: column;
  }
  .mob-acc-content.open {
    max-height: 500px;
    padding: 10px 0;
  }
  .mob-sublink {
    padding: 12px 30px;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    border-left: 2px solid transparent;
    transition: all 0.2s;
  }
  .mob-sublink:hover {
    color: var(--lime);
    border-left-color: var(--lime);
    background: rgba(163, 212, 20, 0.05);
  }
  .mob-acc-btn span {
    display: inline-block;
    transition: transform 0.3s;
    margin-left: 6px;
  }
}

/* ── Floating CTA Mobile (TKT-008) ───────────────────────── */
@media (max-width: 768px) {
  .mobile-cta-bar {
    display: flex !important;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(7, 6, 31, 0.9);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(163, 212, 20, 0.3);
    padding: 10px 18px;
    z-index: 9999;
    gap: 12px;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.3);
  }
  .mobile-cta-bar .btn {
    flex: 1;
    padding: 12px;
    font-size: 14px;
    font-weight: 700;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
  }
  .mobile-cta-bar .btn-wa {
    background: #25D366;
    color: white;
  }
  .mobile-cta-bar .btn-call {
    background: var(--lime);
    color: var(--dark);
  }
  /* Padding footer to avoid overlapping */
  .footer { padding-bottom: 80px; }
}
@media (min-width: 769px) {
  .mobile-cta-bar { display: none !important; }
}
