/* ============================================================
   ALPHA TRAVELS TOURS — RESPONSIVE STYLES
   Mobile-first breakpoints
   ============================================================ */

/* ─── BREAKPOINTS ────────────────────────────────────────── */
/* xs  : < 480px   */
/* sm  : 480–767px */
/* md  : 768–1023px */
/* lg  : 1024–1279px */
/* xl  : 1280–1535px */
/* 2xl : ≥ 1536px */

/* ─── DESKTOP (≥ 1024px) — base defined in style.css ──── */
@media (min-width: 1024px) {
  .navbar-toggle  { display: none; }
  .navbar-nav     { display: flex; }
  .navbar-mobile  { display: none !important; }
}

/* ─── TABLET LANDSCAPE (768–1023px) ─────────────────────── */
@media (max-width: 1023px) {
  :root {
    --navbar-h: 70px;
    --space-24: 4rem;
    --space-20: 3.5rem;
    --space-16: 3rem;
  }

  /* Navbar */
  .navbar-nav      { display: none; }
  .navbar-toggle   { display: flex; }
  .navbar-mobile   { display: block; }
  .navbar-phone    { display: none; }

  /* Sur tablette : cacher le btn Réserver dans la topbar pour ne pas
     écraser le burger avec du contenu — le menu mobile l'a déjà */
  .navbar-actions .btn:not(.navbar-toggle) { display: none; }

  /* Hero */
  .hero-title { font-size: clamp(2rem, 6vw, 3.5rem); }
  .hero-stats { gap: var(--space-5); }

  /* Grid layouts → 2 cols */
  .stats-grid      { grid-template-columns: repeat(2, 1fr); }
  .why-us-grid     { grid-template-columns: 1fr; gap: var(--space-10); }
  .footer-top      { grid-template-columns: 1fr 1fr; gap: var(--space-8); }

  /* Gallery */
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 180px);
  }
  .gallery-item:first-child { grid-column: span 2; grid-row: span 2; }

  /* Testimonials → show 2 */
  .testimonial-card { flex: 0 0 calc(50% - var(--space-3)); }

  /* Package grid */
  .packages-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ─── TABLET PORTRAIT (480–767px) ───────────────────────── */
@media (max-width: 767px) {
  :root {
    --navbar-h: 64px;
    --space-24: 3.5rem;
    --space-20: 3rem;
    --space-16: 2.5rem;
    --space-12: 2rem;
  }

  /* Section spacing */
  section { padding: 3.5rem 0; }

  /* Container padding */
  .container { padding: 0 var(--space-4); }

  /* Hero */
  .hero { min-height: 100svh; }
  .hero-subtitle { font-size: 1rem; }
  .hero-ctas { flex-direction: column; align-items: flex-start; }
  .hero-ctas .btn { width: 100%; justify-content: center; }
  .hero-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
    border-top: none;
  }
  .hero-stat-divider { display: none; }

  /* Trust bar */
  .trust-bar-inner { flex-direction: column; gap: var(--space-4); }
  .trust-divider   { display: none; }

  /* Stats */
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-number { font-size: 2.25rem; }

  /* Why us */
  .why-us-image-main img { height: 320px; }

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

  /* Packages */
  .packages-grid { grid-template-columns: 1fr; }
  .packages-tabs { gap: var(--space-2); }
  .pkg-tab       { padding: 0.625rem 1.25rem; font-size: 0.875rem; }

  /* Events */
  .events-grid { grid-template-columns: 1fr; }

  /* Gallery */
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto;
  }
  .gallery-item:first-child { grid-column: span 2; grid-row: span 1; }
  .gallery-item { height: 160px; }

  /* Testimonials → show 1 */
  .testimonial-card { flex: 0 0 100%; }

  /* Blog */
  .blog-grid { grid-template-columns: 1fr; }

  /* Footer */
  .footer-top { grid-template-columns: 1fr; gap: var(--space-8); }
  .footer-bottom { flex-direction: column; text-align: center; }

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

  /* Navbar actions — hide phone on small (déjà masqué en tablette) */
  .navbar-actions .btn:not(.navbar-toggle) {
    display: none;
  }

  /* Page hero */
  .page-hero { min-height: 260px; }
  .page-hero-title { font-size: 1.875rem; }
  .page-hero-subtitle { font-size: 0.9375rem; }

  /* Section header */
  .section-header { margin-bottom: var(--space-10); }
  .section-title { font-size: 1.75rem; }

  /* Boutons dans hero-ctas — éviter débordement */
  .hero-ctas .btn { min-width: 0; }

  /* Cards */
  .service-card, .package-card, .event-card { padding: var(--space-5); }

  /* Footer */
  .footer-links { flex-direction: column; }
}

/* ─── MOBILE (< 480px) ───────────────────────────────────── */
@media (max-width: 479px) {
  :root {
    --navbar-h: 60px;
    --space-24: 3rem;
    --space-20: 2.5rem;
  }

  .hero-title { font-size: clamp(1.75rem, 8vw, 2rem); }
  .hero-badge { font-size: 0.6875rem; padding: var(--space-1) var(--space-3); }
  .hero-subtitle { font-size: 0.9375rem; }

  /* Sur très petit écran : 2 boutons max visibles dans le hero */
  .hero-ctas .btn:nth-child(3) { display: none; }

  .stat-card { padding: var(--space-5); }
  .stat-number { font-size: 2rem; }

  .why-feature { flex-direction: column; }
  .why-feature-icon { width: 44px; height: 44px; font-size: 1.125rem; }

  .cta-title { font-size: 1.5rem; }
  .cta-actions { flex-direction: column; }
  .cta-actions .btn { width: 100%; }

  .footer-socials { flex-wrap: wrap; }
  .footer-top { gap: var(--space-6); }

  .pkg-footer { flex-direction: column; align-items: flex-start; gap: var(--space-3); }
  .pkg-footer .btn { width: 100%; justify-content: center; }

  /* Floating buttons */
  .whatsapp-btn { width: 52px; height: 52px; font-size: 1.375rem; bottom: 1.25rem; right: 1.25rem; }
  .back-to-top  { width: 40px; height: 40px; font-size: 0.9rem; bottom: 1.25rem; right: 5rem; }

  .navbar-logo-text { display: none; }
  .navbar-logo img  { height: 40px; width: auto; }

  /* Mobile nav links — hauteur minimale 48px pour accessibilité tactile */
  .mobile-nav-link { padding: var(--space-4) var(--space-4); min-height: 48px; }

  /* Page hero */
  .page-hero-title { font-size: 1.625rem; }

  /* Testimonial nav controls */
  .testi-controls { gap: var(--space-2); }

  /* Form inputs — taille minimale recommandée iOS */
  input, select, textarea { font-size: 16px !important; }

  /* Section tag */
  .section-tag { font-size: 0.6875rem; }

  /* Section title */
  .section-title { font-size: 1.625rem; }
}

/* ─── LARGE DESKTOP (≥ 1536px) ──────────────────────────── */
@media (min-width: 1536px) {
  :root { --container-max: 1480px; }
  .section-title { font-size: 3.5rem; }
  .hero-title    { font-size: 5.5rem; }
}

/* ─── PRINT ───────────────────────────────────────────────── */
@media print {
  .navbar, .whatsapp-float, .back-to-top, .page-loader { display: none !important; }
  body { background: white; color: black; }
  a { color: black; }
}

/* ─── REDUCED MOTION ─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .whatsapp-btn { animation: none; }
}
