/* ================================================================
   MOBILE FILTER OVERLAY — CSS
   Tous les sélecteurs sont préfixés mob- pour éviter tout conflit
   avec les styles desktop existants.
   ================================================================ */

@media (max-width: 768px) {

    /* Masquer les éléments desktop sur mobile */
    .form-filter-search .list-filters,
    .more-filters-content,
    .result-txt-filter-wrapper {
        display: none !important;
    }

    /* ====== OVERLAY PLEIN ÉCRAN ====== */
    .mobile-filter-overlay {
        display: none;
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background: #fff;
        z-index: 9999;
        flex-direction: column;
        overflow: hidden;
    }
    .mobile-filter-overlay.active {
        display: flex;
    }

    /* ====== HEADER ====== */
    .mobile-filter-header {
        display: flex;
        align-items: center;
        gap: 0;
        padding: 10px 12px;
        flex-shrink: 0;
    }
    .mobile-search-input {
        flex: 1;
        padding: 11px 14px;
        border: none;
        border-radius: 4px 0 0 4px;
        font-size: 14px;
        outline: none;
        color: #333;
        background: #fff;
    }
    .mobile-search-btn {
        width: 44px;
        height: 44px;
        background: #fdc800;
        border: none;
        border-radius: 0 4px 4px 0;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }

    /* ====== BODY SCROLLABLE ====== */
    .mobile-filter-body {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* ====== ACCORDÉON ITEM ====== */
    .mob-acc-item {
        border-bottom: 1px solid #e5e5e5;
    }

    .mob-acc-trigger {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 15px 16px;
        background: #f7f7f7;
        cursor: pointer;
        font-size: 15px;
        font-weight: 600;
        color: #222;
        user-select: none;
        -webkit-tap-highlight-color: transparent;
    }

    .mob-acc-arrow {
        display: inline-block;
        width: 20px;
        height: 20px;
        position: relative;
        flex-shrink: 0;
        background: url('../images/icn-bg.png') no-repeat center center;
        background-size: contain;
        transform: rotate(90deg);
        transition: transform 0.25s ease;
    }

    .mob-acc-arrow::before,
    .mob-acc-arrow::after {
        display: none;
    }

    /* À l'ouverture : flèche pointe vers le haut */
    .mob-acc-trigger.open .mob-acc-arrow {
        transform: rotate(-90deg);
    }

    /* Contenu accordéon */
    .mob-acc-content {
        display: none;
        background: #fff;
        padding: 18px 16px 14px;
    }
    .mob-acc-content.open {
        display: block;
        animation: mobSlideDown 0.2s ease;
    }
    @keyframes mobSlideDown {
        from { opacity: 0; transform: translateY(-5px); }
        to   { opacity: 1; transform: translateY(0); }
    }

    /* Titre de section */
    .mob-section-title {
        font-size: 16px;
        font-weight: 700;
        color: #222;
        margin: 0 0 16px;
    }

    /* ====== CHECKBOX PARENT ====== */
    .mob-checkbox-label {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 9px 0;
        cursor: pointer;
        font-size: 14px;
        color: #333;
        position: relative;
    }
    .mob-checkbox-label.mob-parent {
        font-weight: 700;
        text-transform: uppercase;
        font-size: 13px;
        letter-spacing: 0.3px;
    }
    .mob-checkbox-label input {
        display: none;
    }
    .mob-checkmark {
        width: 18px;
        height: 18px;
        border: 2px solid #ccc;
        border-radius: 2px;
        background: #fff;
        flex-shrink: 0;
        position: relative;
        transition: all 0.2s;
    }
    .mob-checkbox-label input:checked ~ .mob-checkmark {
        background: #fdc800;
        border-color: #fdc800;
    }
    .mob-checkbox-label input:checked ~ .mob-checkmark::after {
        content: '';
        position: absolute;
        left: 3px; top: 0;
        width: 5px; height: 10px;
        border: solid #fff;
        border-width: 0 2px 2px 0;
        transform: rotate(45deg);
    }

    /* ====== SOUS-ENFANTS ====== */
    .mob-children {
        display: none;
        padding-left: 30px;
        margin-top: 2px;
    }
    .mob-children.show {
        display: block;
    }

    /* Radio enfant */
    .mob-radio-child-label {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 8px 0;
        cursor: pointer;
        font-size: 13px;
        color: #666;
        position: relative;
    }
    .mob-radio-child-label input {
        display: none;
    }
    .mob-radio-dot-sm {
        width: 12px;
        height: 12px;
        border: 2px solid #ccc;
        border-radius: 50%;
        flex-shrink: 0;
        position: relative;
        transition: border-color 0.2s;
    }
    .mob-radio-child-label input:checked ~ .mob-radio-dot-sm {
        border-color: #fdc800;
    }
    .mob-radio-child-label input:checked ~ .mob-radio-dot-sm::after {
        content: '';
        position: absolute;
        left: 50%; top: 50%;
        transform: translate(-50%, -50%);
        width: 6px; height: 6px;
        background: #fdc800;
        border-radius: 50%;
    }
    .mob-radio-child-label input:checked ~ span:last-child {
        color: #fdc800;
        font-weight: 600;
    }

    /* ====== ÂGE : PARTICIPANTS ====== */
    .mob-participant-row {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 14px;
        flex-wrap: nowrap;
    }
    .mob-participant-label {
        font-size: 13px;
        color: #555;
        white-space: nowrap;
        min-width: 105px;
    }
    .mob-participant-age {
        width: 60px;
        padding: 8px;
        border: 1px solid #ddd;
        border-radius: 4px;
        text-align: center;
        font-size: 14px;
        outline: none;
        -moz-appearance: textfield;
    }
    .mob-participant-age::-webkit-outer-spin-button,
    .mob-participant-age::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
    .mob-participant-age:focus { border-color: #fdc800; }
    .mob-participant-unit { font-size: 13px; color: #666; }

    .mob-btn-remove-participant {
        width: 28px; height: 28px;
        border-radius: 50%;
        background: #fdc800;
        border: none;
        cursor: pointer;
        font-size: 18px;
        color: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        line-height: 1;
        flex-shrink: 0;
        margin-left: auto;
    }
    .mob-btn-add-participant {
        width: 30px; height: 30px;
        border-radius: 50%;
        background: #fdc800;
        border: none;
        cursor: pointer;
        font-size: 22px;
        color: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        line-height: 1;
        margin-bottom: 12px;
    }

    /* ====== DATE TABS ====== */
    .mob-date-tabs-header {
        display: flex;
        border-bottom: 2px solid #eee;
        margin-bottom: 16px;
    }
    .mob-date-tab-btn {
        flex: 1;
        padding: 10px 6px;
        font-size: 12px;
        font-weight: 500;
        background: none;
        border: none;
        color: #888;
        cursor: pointer;
        position: relative;
        text-align: center;
    }
    .mob-date-tab-btn.active {
        color: #222;
        font-weight: 700;
    }
    .mob-date-tab-btn.active::after {
        content: '';
        position: absolute;
        bottom: -2px; left: 0; right: 0;
        height: 3px;
        background: #fdc800;
    }
    .mob-tab-pane { display: none; }
    .mob-tab-pane.active { display: block; }

    /* Calendrier */
    .mob-calendar-container {
        background: #f9f9f9;
        border-radius: 6px;
        padding: 10px;
        margin-bottom: 14px;
    }
    .mob-datepicker { width: 100%; }

    /* Durée */
    .mob-duration-block {
        margin-top: 18px;
        padding-top: 14px;
        border-top: 1px solid #f0f0f0;
    }

    /* ====== RADIO PÉRIODE (mois, vacances, any) ====== */
    .mob-radio-row {
        margin-bottom: 14px;
    }
    .mob-radio-label {
        display: flex;
        align-items: center;
        gap: 10px;
        cursor: pointer;
        font-size: 14px;
        color: #333;
        margin-bottom: 6px;
    }
    .mob-radio-label input { display: none; }
    .mob-radio-dot {
        width: 14px; height: 14px;
        border: 2px solid #ccc;
        border-radius: 50%;
        flex-shrink: 0;
        position: relative;
        transition: border-color 0.2s;
    }
    .mob-radio-label input:checked ~ .mob-radio-dot {
        border-color: #fdc800;
    }
    .mob-radio-label input:checked ~ .mob-radio-dot::after {
        content: '';
        position: absolute;
        left: 50%; top: 50%;
        transform: translate(-50%, -50%);
        width: 6px; height: 6px;
        background: #fdc800;
        border-radius: 50%;
    }
    .mob-select {
        display: block;
        width: 100%;
        margin-top: 6px;
        padding: 8px 10px;
        border: 1px solid #ddd;
        border-radius: 4px;
        font-size: 13px;
        outline: none;
        background: #f6f6f6;
        appearance: none;
        -webkit-appearance: none;
        color: #333;
    }
    .mob-select:focus { border-color: #fdc800; }
    .mob-select:disabled { color: #aaa; background: #f0f0f0; }

    /* ====== BOUTON APPLIQUER ====== */
    .mob-apply-wrap {
        display: flex;
        justify-content: flex-end;
        margin-top: 16px;
        padding-top: 10px;
        clear: both;
    }
    .mob-btn-apply {
        padding: 9px 18px;
        background: none;
        border: 1.5px solid #222;
        border-radius: 4px;
        font-size: 12px;
        font-weight: 700;
        color: #222;
        cursor: pointer;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        transition: all 0.2s;
    }
    .mob-btn-apply:active,
    .mob-btn-apply:hover { background: #222; color: #fff; }

    /* ====== FOOTER ====== */
    .mobile-filter-footer {
        flex-shrink: 0;
        background: #fff;
        border-top: 1px solid #e5e5e5;
    }

    .mob-results-bar {
        padding: 10px 16px 8px;
    }
    .mob-results-count {
        display: none;
        font-size: 17px;
        font-weight: 700;
        color: #fdc800;
        margin-bottom: 8px;
    }
    #mob-results-count.show {
        display: block !important;
    }
    #mob-results-count.hide {
        display: none !important;
    }
    .mob-tags-row {
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
        align-items: center;
    }
    .mob-filter-tag {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        background: #fdc800;
        color: #333;
        padding: 4px 8px;
        border-radius: 4px;
        font-size: 12px;
        font-weight: 500;
    }
    .mob-tag-remove {
        cursor: pointer;
        font-size: 15px;
        color: #555;
        line-height: 1;
        font-weight: bold;
    }
    .mob-clear-link {
        font-size: 12px;
        color: #fdc800;
        text-decoration: underline;
        cursor: pointer;
        font-weight: 700;
        white-space: nowrap;
    }

    .mob-footer-btns {
        display: flex;
    }
    .mob-btn-rechercher {
        flex: 1;
        padding: 16px;
        background: #fdc800;
        border: none;
        font-size: 15px;
        font-weight: 700;
        color: #fff;
        cursor: pointer;
        text-transform: uppercase;
        letter-spacing: 1px;
        transition: background 0.2s;
    }
    .mob-btn-rechercher:active { background: #e5b600; }

    .mob-btn-fermer {
        padding: 16px 18px;
        background: #fff;
        border: none;
        border-left: 1px solid #e5e5e5;
        font-size: 14px;
        color: #333;
        cursor: pointer;
        font-weight: 500;
        white-space: nowrap;
    }

    .mobile-search-trigger-bar {
        display: flex;
        align-items: center;
        background: #fff;
        padding: 10px 12px;
        border-bottom: 1px solid #e5e5e5;
        cursor: pointer;
        margin-bottom: 20px;
    }
    .mobile-search-trigger-bar input {
        flex: 1;
        background: #f5f5f5;
        border: 1px solid #ddd;
        border-radius: 4px 0 0 4px;
        padding: 10px 14px;
        font-size: 14px;
        color: #888;
        outline: none;
        cursor: pointer;
        pointer-events: none;
    }
    .mobile-search-trigger-bar .mob-open-btn {
        width: 44px;
        height: 44px;
        background: #fdc800;
        border: none;
        border-radius: 0 4px 4px 0;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        flex-shrink: 0;
    }

    /* Transport : affichage nom + moyen de transport sur deux colonnes */
    .mob-transport-row {
        display: grid;
        grid-template-columns: 0fr auto;
        gap: 10px;
        align-items: center;
    }
    .mob-transport-row .mob-transport-type {
        font-size: 11px;
        color: #aaa;
        text-align: right;
    }

    .radio-label input[type="radio"]:checked + span::before {
        width: 10px;
        height: 10px;
        left: 3px;
        top: 6px;
    }

    .radio-label span:first-of-type {
        min-width: 421px;
    }
    .mob-trigger-summary {
        background: #fff;
        padding: 0 12px;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.25s ease, padding 0.25s ease;
    }

    .mob-trigger-summary.has-filters {
        max-height: 200px;
        padding: 10px 12px 0;
        border-bottom: 1px solid #f0f0f0;
    }

    .mob-trigger-count {
        font-size: 13px;
        font-weight: 700;
        color: #fdc800;
        margin-bottom: 6px;
    }

    .mob-trigger-count:empty {
        display: none;
    }

    .mob-trigger-count-num {
        font-size: 15px;
    }

    /* Rangée de tags */
    .mob-trigger-tags {
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
        align-items: center;
        padding-bottom: 10px;
    }

    /* Tag individuel */
    .mob-trigger-tag {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        background: #fdc800;
        color: #333;
        padding: 4px 8px;
        border-radius: 4px;
        font-size: 11px;
        font-weight: 500;
        max-width: 200px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mob-trigger-tag-remove {
        cursor: pointer;
        font-size: 14px;
        color: #555;
        line-height: 1;
        font-weight: bold;
        flex-shrink: 0;
    }

    .mob-trigger-tag-remove:active {
        color: #000;
    }

    /* Lien Tout effacer */
    .mob-trigger-clear {
        font-size: 11px;
        color: #fdc800;
        text-decoration: underline;
        cursor: pointer;
        font-weight: 700;
        white-space: nowrap;
        padding: 4px 0;
    }
}

/* Sur desktop, cacher l'overlay mobile */
@media (min-width: 769px) {
    .mobile-filter-overlay,
    .mobile-search-trigger-bar,
    .mob-trigger-summary {
        display: none !important;
    }
}
