/* ============================================================
   FIRSTCLASS TRAVEL — RESPONSIVE / MOBILE
   Chargé EN DERNIER sur toutes les pages publiques.
   Les !important servent à neutraliser les styles inline
   (style="grid-template-columns:...") présents dans les pages.
   ============================================================ */

/* Utilitaires globaux */
.hide-mobile { display: inline-flex; }
img, video, iframe, table { max-width: 100%; }
.table-scroll { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ---------- <= 1024px : tablettes ---------- */
@media (max-width: 1024px) {
  .search-box { padding: 26px 22px; }
  .search-grid { grid-template-columns: 1fr 1fr !important; }
  .search-grid .btn-search { grid-column: 1 / -1; width: 100%; justify-content: center; }
  .contact-grid, .devis-wrap, .account-wrap { grid-template-columns: 1fr !important; }
}

/* ---------- <= 900px ---------- */
@media (max-width: 900px) {
  /* search-vols.php / reserver-vol.php : sidebar + contenu */
  .container { grid-template-columns: 1fr !important; }
  .filters-panel { position: static !important; height: auto !important; }
  .summary-card { position: static !important; }
  .flight-card { grid-template-columns: 1fr !important; gap: 16px !important; }
}

/* ---------- <= 768px : téléphones ---------- */
@media (max-width: 768px) {
  html { -webkit-text-size-adjust: 100%; }
  body { overflow-x: hidden; }

  .hide-mobile { display: none !important; }

  /* Navbar / drawer */
  .navbar { padding: 0 18px; }
  .nav-logo img { height: 34px; }
  .nav-logo-text { font-size: 1.05rem; }
  .nav-drawer { overflow-y: auto; }

  /* Sections */
  section { padding: 48px 18px !important; }
  .section-header { margin-bottom: 30px; }
  .section-sub { font-size: .9rem; }

  /* Bloc de recherche : tout en une colonne */
  .search-section { padding: 0 16px 48px; margin-top: -50px; }
  .search-box { padding: 20px 16px; border-radius: 16px; }
  .search-grid,
  .search-grid.flights,
  .search-grid.flights.roundtrip,
  .search-grid.hotels { grid-template-columns: 1fr !important; }
  .search-tabs { width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .search-tab { white-space: nowrap; padding: 9px 16px; font-size: .82rem; }
  .swap-btn { align-self: center; margin: 0 auto; transform: rotate(90deg); }
  .swap-btn:hover { transform: rotate(270deg); }
  .btn-search { width: 100%; justify-content: center; }
  .trip-type-row { flex-wrap: wrap; gap: 12px; }

  /* Empêche le zoom automatique iOS sur les champs */
  input, select, textarea { font-size: 16px !important; }

  /* Grilles génériques inline (style="grid-template-columns:repeat(N,1fr)") */
  .form-row, .form-row-3 { grid-template-columns: 1fr !important; }
  .grid-2, .grid-3 { grid-template-columns: 1fr !important; }

  /* Hero */
  .hero-slider { height: auto; min-height: 88vh; }
  .slide-content { padding: 90px 20px 40px; }
  .slider-dots { bottom: 70px; left: 20px; }
  .slider-arrows { display: none; }
  .scroll-hint { display: none; }

  /* Cartes vols */
  .flights-grid { grid-template-columns: 1fr !important; }
  .fc-iata { font-size: 1.25rem; }

  /* Tableaux : défilement horizontal au lieu de casser la page */
  .table-scroll table { min-width: 620px; }

  /* Bouton WhatsApp flottant plus discret */
  a[href^="https://wa.me"] { bottom: 18px !important; right: 18px !important;
    width: 48px !important; height: 48px !important; font-size: 1.2rem !important; }

  /* Modales génériques */
  div[id^="modal"] { padding: 12px !important; align-items: flex-start !important; overflow-y: auto !important; }
  div[id^="modal"] > div { width: 100% !important; max-width: 100% !important; margin: 12px 0 !important; }
}

/* ---------- <= 480px : petits téléphones ---------- */
@media (max-width: 480px) {
  section { padding: 40px 14px !important; }
  .section-title { font-size: 1.45rem; }
  .btn { padding: 11px 20px; font-size: .85rem; }
  .btn-lg { padding: 13px 24px; font-size: .9rem; }
  .stats-grid { grid-template-columns: 1fr 1fr !important; gap: 18px !important; }
  .dest-mosaic { grid-template-columns: 1fr !important; }
  .packages-grid, .features-grid { grid-template-columns: 1fr !important; }
  .footer-main { grid-template-columns: 1fr !important; padding: 48px 18px 32px; gap: 26px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; padding: 18px; }
  .page-hero { min-height: 210px; padding: 90px 18px 26px; }
  .card, .box { padding: 20px !important; border-radius: 14px !important; }
  .table-scroll table { min-width: 520px; }
}
