/* ============================================================
   PUBLIC RESPONSIVE — couverture globale (toutes pages front)
   Complète responsive.css | Breakpoints: 991 / 768 / 576 px
   ============================================================ */

html {
    -webkit-text-size-adjust: 100%;
}

body.nav-fixed {
    overflow-x: hidden;
}

/* ── Desktop : containers centrés (Bootstrap), pas plein écran ─ */
@media (min-width: 576px) {
    .container:not(.container-fluid) {
        max-width: 540px;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (min-width: 768px) {
    .container:not(.container-fluid) {
        max-width: 720px;
    }
}

@media (min-width: 992px) {
    .container:not(.container-fluid) {
        max-width: 960px;
    }
}

@media (min-width: 1200px) {
    .container:not(.container-fluid) {
        max-width: 1140px;
    }
}

@media (min-width: 1400px) {
    .container:not(.container-fluid) {
        max-width: 1320px;
    }

    .container-xxl {
        max-width: 1320px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* ── Conteneurs & titres de page ───────────────────────────── */
@media (max-width: 768px) {
    .pageheader {
        padding: 32px 0 !important;
    }

    .pageheader h1 {
        font-size: 1.5rem !important;
    }

    .innerpagewrap {
        padding-top: 1.5rem !important;
        padding-bottom: 2rem !important;
    }

    .page-title-section h1,
    .page-hero h1 {
        font-size: 1.65rem !important;
    }
}

/* ── Grilles Bootstrap — tablette uniquement (pas le desktop ≥992px) ─ */
@media (min-width: 768px) and (max-width: 991.98px) {
    body:not(.user-area) .row:not(.hotels-listing-page .row) > .col-lg-3,
    body:not(.user-area) .row:not(.hotels-listing-page .row) > .col-lg-4,
    body:not(.user-area) .row:not(.hotels-listing-page .row) > .col-lg-5,
    body:not(.user-area) .row:not(.hotels-listing-page .row) > .col-lg-6,
    body:not(.user-area) .row:not(.hotels-listing-page .row) > .col-lg-7,
    body:not(.user-area) .row:not(.hotels-listing-page .row) > .col-lg-8,
    body:not(.user-area) .row:not(.hotels-listing-page .row) > .col-lg-9,
    body:not(.user-area) .row:not(.hotels-listing-page .row) > .col-lg-10,
    body:not(.user-area) .row:not(.hotels-listing-page .row) > .col-xl-3,
    body:not(.user-area) .row:not(.hotels-listing-page .row) > .col-xl-4,
    body:not(.user-area) .row:not(.hotels-listing-page .row) > .col-xl-6,
    body:not(.user-area) .row:not(.hotels-listing-page .row) > .col-xl-8 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    body:not(.user-area) .sticky-top:not(.blogsidebar),
    body:not(.user-area) .position-sticky:not(.blogsidebar) {
        position: static !important;
        top: auto !important;
    }
}

@media (max-width: 767.98px) {
    body:not(.user-area) .row > .col-md-3,
    body:not(.user-area) .row > .col-md-4,
    body:not(.user-area) .row > .col-md-5,
    body:not(.user-area) .row > .col-md-6,
    body:not(.user-area) .row > .col-md-7,
    body:not(.user-area) .row > .col-md-8 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* ── Parcours réservation (tous modules) ───────────────────── */
@media (max-width: 991.98px) {
    .booking-steps-container,
    .hbs-wrap,
    .booking-form-wrapper {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .booking-stepper-wrapper {
        padding: 16px 12px !important;
        margin-bottom: 20px !important;
        border-radius: 12px !important;
    }

    .booking-stepper {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap !important;
        justify-content: flex-start !important;
        padding-bottom: 8px;
        scrollbar-width: none;
    }

    .booking-stepper::-webkit-scrollbar {
        display: none;
    }

    .booking-stepper .step {
        flex: 0 0 auto !important;
        min-width: 72px;
    }

    .step-label {
        font-size: 0.65rem !important;
        max-width: 64px !important;
    }
}

@media (max-width: 767.98px) {
    .booking-steps-container {
        padding: 24px 0 60px !important;
    }

    .booking-form-card,
    .hbs-card,
    .booking-card-body {
        padding: 16px !important;
        border-radius: 12px !important;
    }

    .booking-form-card .row > [class*="col-"],
    .hbs-card-body .row > [class*="col-"],
    .booking-steps-container .row > [class*="col-md"],
    .booking-steps-container .row > [class*="col-lg"],
    .hbs-wrap .row > [class*="col-md"],
    .hbs-wrap .row > [class*="col-lg"] {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }

    .step-navigation,
    .hbs-nav,
    .booking-nav-actions {
        flex-direction: column !important;
        gap: 10px !important;
    }

    .step-navigation .btn,
    .hbs-nav .btn,
    .booking-nav-actions .btn {
        width: 100% !important;
    }

    .booking-hero,
    .booking-form-hero {
        padding: 48px 0 36px !important;
    }

    .booking-hero .hero-title,
    .booking-form-hero h1 {
        font-size: 1.5rem !important;
    }

    .tour-info-badge,
    .booking-summary-strip {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
    }
}

/* ── Vols — offres, détail, formulaire ─────────────────────── */
@media (max-width: 767.98px) {
    .sortingbox {
        padding: 16px !important;
        margin-bottom: 20px !important;
    }

    .flight-card,
    .flight-offer-card,
    .fd-offer-row {
        padding: 14px !important;
    }

    .flight-segment-row,
    .flight-route-row,
    .offer-price-block {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
    }

    .select-flight-btn,
    .btn-select-flight {
        width: 100% !important;
    }

    .flight-booking-form .passenger-card,
    .passenger-form-block {
        padding: 14px !important;
    }
}

/* ── Hôtels — détail, GDS, confirmation ────────────────────── */
@media (max-width: 767.98px) {
    .hd-wrap {
        padding: 20px 0 40px !important;
    }

    .bk-sidebar,
    .booking-sidebar-card {
        position: static !important;
        max-height: none !important;
        margin-top: 20px;
    }

    .room-card .row > [class*="col-"] {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }

    .confirmation-wrap,
    .guest-confirm-wrap {
        padding: 16px 12px !important;
    }

    .invoice-actions,
    .booking-actions-bar {
        flex-direction: column !important;
        gap: 10px !important;
    }

    .invoice-actions .btn,
    .booking-actions-bar .btn,
    .booking-actions-bar a {
        width: 100% !important;
    }
}

/* ── Circuits & voitures — détail / formulaire ─────────────── */
@media (max-width: 767.98px) {
    .tour-detail-header,
    .car-detail-header {
        flex-direction: column !important;
        align-items: flex-start !important;
    }

    .tour-gallery-main,
    .car-gallery-main {
        height: 220px !important;
    }

    .car-specs-grid,
    .tour-highlights-grid {
        grid-template-columns: 1fr 1fr !important;
    }

    .booking-widget .btn,
    .car-booking-widget .btn,
    .tour-book-btn {
        width: 100% !important;
    }
}

@media (max-width: 575.98px) {
    .car-specs-grid,
    .tour-highlights-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ── Paiement & attente (Momo, OM, Stripe, Paystack) ─────── */
@media (max-width: 767.98px) {
    .payment-selection {
        padding: 28px 0 !important;
    }

    .payment-card {
        padding: 18px 14px !important;
        margin: 0 8px !important;
        border-radius: 12px !important;
    }

    .payment-btn {
        padding: 14px !important;
    }

    .ps-section .container {
        padding-left: 12px;
        padding-right: 12px;
    }

    .momo-waiting-card .card-body,
    .om-waiting-card .card-body,
    .card.shadow-lg .card-body.p-5 {
        padding: 20px 16px !important;
    }

    .payment-waiting-actions,
    .d-flex.gap-2.justify-content-center {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .payment-waiting-actions .btn {
        width: 100% !important;
    }
}

/* ── Panier ────────────────────────────────────────────────── */
@media (max-width: 767.98px) {
    .cart-content,
    .checkout-layout {
        display: flex !important;
        flex-direction: column !important;
        gap: 1.25rem !important;
    }

    .cart-summary,
    .checkout-sidebar {
        order: 2;
        position: static !important;
        width: 100% !important;
    }

    .cart-item-header,
    .cart-item .item-header {
        flex-wrap: wrap !important;
    }

    .cart-item-image {
        width: 100% !important;
        max-width: 100% !important;
        margin-bottom: 12px;
    }
}

/* ── Blog, services, CMS, légal ────────────────────────────── */
@media (max-width: 767.98px) {
    .hmblog .blogsidebar {
        margin-bottom: 24px;
    }

    .hmblog .row > .col-lg-3 + .col-lg-9,
    .hmblog .row > .col-lg-9 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .subposts .row > [class*="col-"],
    .blog-detail-content .row > [class*="col-"] {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }

    .serviceslisting .servpostimg,
    .serviceslisting .servpostcontent {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }

    .cms-content iframe,
    .legal-content iframe,
    .cms-page-content iframe {
        max-width: 100%;
        height: auto;
        min-height: 200px;
    }

    .cms-content pre,
    .legal-content pre {
        overflow-x: auto;
        max-width: 100%;
    }
}

/* ── Auth (login, register, reset…) ────────────────────────── */
@media (max-width: 767.98px) {
    .auth-wrapper,
    .account-wrapper {
        padding: 16px 12px !important;
    }

    .auth-split,
    .login-split {
        flex-direction: column !important;
    }

    .auth-split .auth-image,
    .login-split .login-banner {
        display: none !important;
    }

    .two-factor-challenge .card {
        margin: 0 12px;
    }
}

/* ── Succès / erreurs / pages paiement legacy ──────────────── */
@media (max-width: 767.98px) {
    .success-page-card,
    .declined-card,
    .confirmed-card,
    .stripe-payment-wrap {
        margin: 0 12px !important;
        padding: 24px 16px !important;
    }

    .section-404 {
        padding: 48px 16px !important;
        min-height: auto !important;
    }

    .inner-404 {
        flex-direction: column-reverse !important;
        gap: 24px !important;
    }

    .col-404-text {
        align-items: center !important;
        max-width: 100% !important;
    }

    .btn-404-home {
        width: 100%;
        justify-content: center;
    }
}

/* ── Footer renfort (grille inline) ────────────────────────── */
@media (max-width: 991.98px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr !important;
    }

    .footer-brand,
    .newsletter-section {
        grid-column: 1 / -1 !important;
    }
}

@media (max-width: 767.98px) {
    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    .footer-newsletter-form {
        flex-direction: column !important;
    }

    .footer-newsletter-form input,
    .footer-newsletter-form button {
        width: 100% !important;
    }

    .social-links {
        justify-content: flex-start !important;
        flex-wrap: wrap !important;
    }
}

/* ── Navbar renfort ────────────────────────────────────────── */
@media (max-width: 991.98px) {
    .site-navbar .nav-inner {
        height: 68px !important;
    }

    .nav-actions {
        gap: 8px !important;
    }

    .nav-cart,
    .nav-hamburger {
        width: 42px !important;
        height: 42px !important;
    }
}

@media (max-width: 575.98px) {
    .nav-divider {
        display: none !important;
    }

    .nav-logo img {
        height: 34px !important;
        max-width: 140px !important;
    }
}

/* ── Utilitaires publics ───────────────────────────────────── */
@media (max-width: 767.98px) {
    body:not(.user-area) .d-flex.flex-md-row,
    body:not(.user-area) .d-flex.flex-lg-row {
        flex-direction: column !important;
    }

    body:not(.user-area) .table-responsive {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    body:not(.user-area) .btn-group:not(.btn-group-vertical) {
        flex-direction: column;
        width: 100%;
    }

    body:not(.user-area) .btn-group:not(.btn-group-vertical) > .btn {
        width: 100%;
        border-radius: 0.375rem !important;
        margin-bottom: 6px;
    }

    .w-md-auto,
    .mw-md-100 {
        width: 100% !important;
        max-width: 100% !important;
    }

    img,
    video,
    iframe,
    embed {
        max-width: 100%;
    }

    .owl-carousel .item img {
        width: 100%;
        height: auto;
    }
}

/* Inputs iOS — pages publiques */
@media (max-width: 767.98px) {
    body:not(.user-area) input,
    body:not(.user-area) select,
    body:not(.user-area) textarea {
        font-size: 16px;
    }
}

/* Touch targets */
@media (max-width: 991.98px) {
    body:not(.user-area) .btn,
    body:not(.user-area) a.btn,
    body:not(.user-area) .nav-drawer-menu a {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    body:not(.user-area) .filter-btn,
    body:not(.user-area) .search-tab-btn,
    body:not(.user-area) .hotel-search-tab-btn {
        min-height: 40px;
    }
}

@media (prefers-reduced-motion: reduce) {
    body:not(.user-area) * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ── Breadcrumb mobile (visible uniquement < 768px) ──────────── */
.mobile-breadcrumb {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    position: sticky;
    top: 0;
    z-index: 1020;
    width: 100%;
}

.mobile-breadcrumb-inner {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    gap: 6px;
    max-width: 100%;
    overflow: hidden;
}

.mobile-bc-back {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid #dee2e6;
    color: #1e3a8a;
    text-decoration: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: background 0.15s ease;
}

.mobile-bc-back:hover,
.mobile-bc-back:active {
    background: #e8eef8;
    color: #1e3a8a;
}

.mobile-bc-nav {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.mobile-bc-list {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: nowrap;
    overflow: hidden;
    white-space: nowrap;
}

.mobile-bc-item {
    font-size: 0.78rem;
    color: #6c757d;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 120px;
}

.mobile-bc-item.active {
    color: #1e3a8a;
    font-weight: 600;
    max-width: 160px;
}

.mobile-bc-link {
    color: #6c757d;
    text-decoration: none;
}

.mobile-bc-link:hover {
    color: #1e3a8a;
    text-decoration: underline;
}

.mobile-bc-link .fa-home {
    font-size: 0.75rem;
}

.mobile-bc-sep {
    font-size: 0.75rem;
    color: #adb5bd;
    padding: 0 3px;
    flex-shrink: 0;
}

/* Masquer sur desktop */
@media (min-width: 768px) {
    .mobile-breadcrumb {
        display: none !important;
    }
}
