/* Responsive : adaptations mobiles, tablettes et grands ecrans. */

/* mobile first */
@media (max-width: 480px) {
    .container-fluid { padding: 0 15px !important; }

    h1 { font-size: 36px !important; }
    h6 { font-size: 34px !important; }
    .logo-size { width: 130px; height: auto; }

    .icon-circle { width: 30px; height: 30px; border: 1.5px solid var(--border-color); }
    .icon-circle svg { width: 13px; height: 13px; }
    .nav-link span.mt-1 { font-size: 10.5px; }
    .sticky-top .nav-link { font-size: 13.5px; padding: 10px 6px !important; }

    footer .col-md-3, footer .col-md-6 { margin-bottom: 35px; text-align: center; }
    footer h5 { font-size: 1.15rem; }
    footer p, footer a { font-size: 0.92rem; }
    .mini-map-container { max-width: 100%; }
}

/* petits ecrans */
@media (min-width: 481px) and (max-width: 767px) {
    h1 { font-size: 42px; }
    h6 { font-size: 40px; }
    .logo-size { width: 150px; }
    .sticky-top .nav-link { font-size: 14.5px; }
}

/* tablettes */
@media (min-width: 768px) and (max-width: 991px) {
    .container-fluid { padding: 0 40px; }
    .logo-size { width: 170px; }
    .sticky-top .navbar-nav { gap: 1.8rem; }
    .sticky-top .nav-link { font-size: 15.5px; }
    footer .mini-map-container { max-width: 420px; }
}

/* petits desktops */
@media (min-width: 992px) and (max-width: 1199px) {
    .container-fluid { max-width: 960px; }
    .sticky-top .nav-link { font-size: 15.8px; }
}

/* grands desktops */
@media (min-width: 1200px) {
    .container-fluid { max-width: 1360px; }
    .custom-navbar > .container-fluid { padding: 20px 100px; }
}

/* tres grands ecrans */
@media (min-width: 1600px) {
    .container-fluid { max-width: 1580px; }
    h1 { font-size: 62px; }
    h6 { font-size: 58px; }
    .logo-size { width: 260px; height: auto; }
}

/* ajustements globaux */
@media (max-width: 991.98px) {
    .custom-navbar.navbar-light.sticky-top {
        position: static !important;
        top: auto !important;
        z-index: auto;
        height: auto !important;
        display: block;
        align-items: stretch;
        border-bottom: 1px solid #eee;
    }

    .custom-navbar.navbar-light.sticky-top > .container-fluid {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

    nav.custom-navbar > .container-fluid {
        padding: 16px 18px !important;
    }
    .admin-desktop-nav {
        display: none !important;
    }
    .admin-menu-toggle {
        display: flex !important;
        margin-left: auto;
        border: 0;
        border-radius: var(--btn-radius);
        padding: 10px 12px;
        background: transparent;
        color: var(--secondary-color);
        font-weight: 800;
    }
    .admin-menu-toggle:hover {
        background: rgba(254, 185, 20, 0.1);
        color: var(--primary-color);
    }
    .admin-mobile-panel,
    .mobile-nav-panel {
        width: calc(100% - 32px);
        margin: 0 auto 12px;
        padding: 12px;
        background: #fff;
        border: 1px solid var(--border-color);
        border-radius: var(--border-radius);
        box-shadow: 0 12px 28px rgba(10, 75, 129, 0.12);
    }

    .admin-mobile-panel.collapsing,
    .mobile-nav-panel.collapsing {
        height: 0;
        overflow: hidden;
        transition: height 0.22s ease;
    }

    .mobile-nav-panel .navbar-nav {
        width: 100%;
        flex-direction: column;
        gap: 4px;
        align-items: stretch;
    }
    .mobile-nav-panel .nav-item {
        margin: 0 !important;
    }
    .admin-mobile-panel a,
    .admin-mobile-panel button,
    .mobile-nav-panel .nav-link {
        width: 100%;
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 10px 12px;
        border: 0;
        border-radius: var(--btn-radius);
        background: transparent;
        color: var(--secondary-color);
        text-decoration: none;
        font-weight: 700;
        text-align: left;
    }
    .admin-mobile-panel a.active,
    .admin-mobile-panel a:hover,
    .admin-mobile-panel button:hover,
    .mobile-nav-panel .nav-link.active,
    .mobile-nav-panel .nav-link:hover {
        background: rgba(254, 185, 20, 0.1);
        color: var(--primary-color);
    }
    .sticky-top .dropdown-menu {
        border: none;
        border-radius: var(--border-radius);
        margin-top: 8px;
        background: #fafafa;
    }

    .voyage-menu-title h1 { font-size: 36px !important; padding: 0 20px; }
    .admin-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* alignement navbar desktop */
@media (min-width: 992px) {
    .navbar-nav.mx-auto { width: 100%; justify-content: center; }
}

/* modales mobile */
@media (max-width: 576px) {
    .voyage-menu-title h1 { font-size: 32px !important; }
    .modal-dialog { margin: 15px; }
    .modal-content { border-radius: var(--border-radius) !important; }
}

/* style modale */
.modal-content { border-radius: var(--border-radius) !important; overflow: hidden; }

/* footer mobile */
@media (max-width: 767.98px) {
    footer .row > div { text-align: center !important; }
    .mini-map-container { order: 1; margin: 25px auto 15px; }
}

/* espacement global */
main { padding-top: 20px; }
.sticky-top + main { padding-top: 90px; }
@media (max-width: 991px) { .sticky-top + main { padding-top: 15px; } }

/* hover desktop */
@media (hover: hover) {
    .icon-circle:hover {
        transform: translateY(-4px) scale(1.18);
        background: rgba(254, 185, 20, 0.08);
        border-color: var(--primary-color);
    }
    .icon-circle:hover svg { fill: var(--primary-color); }
}

/* hover mobile */
@media (hover: none) {
    .icon-circle:hover { transform: none !important; background: white !important; }
}

/* hover carte footer */
#footerMap:hover { transform: scale(1.03); }

/* menu voyage mobile */
@media (max-width: 991.98px) {

    #voyageBar .voyage-menu.d-none.d-lg-flex { display: none !important; }

    #voyageBar {
        position: sticky !important;
        top: 0 !important;
        height: 90px;
        background: var(--bg-light);
        border-bottom: 1px solid #eee;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0 20px;
        z-index: 1040;
    }

    .mobile-search-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        gap: 14px;
        background: linear-gradient(135deg, var(--primary-color), #FEB914);
        color: white;
        font-weight: 700;
        font-size: 1.1rem;
        padding: 16px 32px;
        border-radius: var(--btn-radius);
        border: none;
        min-width: 240px;
        height: 64px;
        transition: all 0.3s ease;
    }
    .mobile-search-toggle:hover { transform: translateY(-3px); }
    .mobile-search-toggle svg {
        width: 26px;
        height: 26px;
        stroke: white;
        stroke-width: 2.8;
    }

    .voyage-mobile-drawer {
        position: fixed;
        top: 0; left: 0;
        width: 100%; height: 100vh;
        background: white;
        z-index: 10;
        transform: translateY(-100%);
        transition: transform 0.42s cubic-bezier(0.65, 0, 0.35, 1);
        overflow-y: auto;
    }
    .voyage-mobile-drawer.open { transform: translateY(0); }

    .drawer-header {
        position: sticky;
        top: 0;
        background: white;
        padding: 20px;
        border-bottom: 1px solid #eee;
        display: flex;
        justify-content: space-between;
        align-items: center;
        z-index: 10;
    }
    .close-drawer {
        background: none;
        border: none;
        font-size: 2.8rem;
        color: #999;
        width: 50px;
        height: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
    }

    .voyage-mobile-drawer .voyage-dropdown {
        width: 100% !important;
        margin-bottom: 18px;
    }
    .voyage-mobile-drawer .voyage-btn {
        height: 78px;
        border-radius: var(--border-radius);
        border: 1.8px solid #e0e0e0;
        background: white;
        font-size: 1.1rem;
        justify-content: space-between;
        padding: 0 20px;
    }
    .voyage-mobile-drawer .voyage-dropdown-content {
        position: static;
        display: none;
        margin-top: 10px;
        border-radius: var(--border-radius);
        border: 1.8px solid #e0e0e0;
        background: #fafafa;
        padding: 12px 0;
    }
    .voyage-mobile-drawer .voyage-dropdown-content.show { display: block; }

    .carousel-image { height: 70vh !important; }
    .card-img-top { height: 300px !important; }
    .big-card .card-img-top { height: 420px !important; }
    .section-title { font-size: 2rem; }
    .section-subtitle { font-size: 1.1rem; }
}

/* bouton mobile petit */
@media (max-width: 576px) {
    .mobile-search-toggle {
        font-size: 1rem;
        padding: 14px 26px;
        min-width: 200px;
        height: 58px;
    }
    .mobile-search-toggle svg { width: 23px; height: 23px; }
}

/* desktop */
@media (min-width: 992px) {
    .mobile-search-toggle,
    .voyage-mobile-drawer {
        display: none !important;
    }
    #voyageBar .voyage-menu.d-none.d-lg-flex {
        display: flex !important;
    }
}

/* responsive */
@media (max-width: 991px) {
    #voyageBar .voyage-menu {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 10px 16px;
    }

    .voyage-field {
        width: 100%;
        height: auto;
        padding: 12px 14px;
    }

    .voyage-search-group {
        width: 100%;
        height: auto;
        justify-content: center;
    }

    .voyage-search-btn {
        width: 100%;
        height: 64px;
        flex-direction: row;
        gap: 10px;
    }

    .voyage-reset-icon {
        margin-top: 0;
    }
}
