/* ================================
   CALENDRIER MODERNE OPENSPLACE
   ================================ */

.fs-date-trigger {
    width: 100%;
    height: 46px;
    border-radius: 12px;
    border: 2px solid var(--fs-primary);
    background: #fff;
    padding: 0 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: border-color .2s ease, box-shadow .2s ease;
}

    .fs-date-trigger:hover,
    .fs-date-trigger:focus {
        border-color: var(--fs-accent);
        box-shadow: 0 0 0 2px rgba(255,159,46,0.18);
    }

.fs-date-trigger-main {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.fs-date-trigger-label {
    font-size: .75rem;
    color: var(--fs-muted);
}

.fs-date-trigger-value {
    font-size: .95rem;
    font-weight: 600;
    color: var(--fs-primary-700);
}

.fs-date-trigger-icon i {
    font-size: 1.1rem;
    color: var(--fs-primary);
}

/* DROPDOWN */
.fs-date-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 16px 36px rgba(0,0,0,.12);
    padding: 18px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: all .25s ease;
    z-index: 30;
}

    .fs-date-dropdown.open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0px);
    }

/* CALENDAR HEADER */
.fs-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.fs-cal-nav {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: none;
    background: #f0f7f7;
    color: var(--fs-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background .2s ease;
}

    .fs-cal-nav:hover {
        background: var(--fs-primary);
        color: #fff;
    }

.fs-calendar-current {
    font-weight: 700;
    font-size: 1rem;
    color: var(--fs-primary-700);
}

/* WEEKDAYS */
.fs-calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    font-size: .75rem;
    color: var(--fs-muted);
    text-align: center;
    margin-bottom: 6px;
}

/* GRID DAYS */
.fs-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.fs-day {
    height: 42px;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
    transition: all .15s ease;
}

    .fs-day.disabled {
        opacity: .35;
        cursor: not-allowed;
    }

    .fs-day:hover:not(.disabled) {
        background: #e8f7f6;
    }

    .fs-day.selected {
        background: var(--fs-primary);
        color: #fff;
    }

    .fs-day.in-range {
        background: rgba(6,147,152,.18);
        color: var(--fs-primary-700);
    }

    .fs-day.start,
    .fs-day.end {
        background: var(--fs-primary);
        color: #fff !important;
        font-weight: 700;
    }

/* FLEX DAYS INSIDE CALENDAR */
.fs-calendar-flex {
    margin-top: 20px;
}

.fs-calendar-flex-label {
    display: block;
    font-size: .85rem;
    font-weight: 600;
    color: var(--fs-primary-700);
    margin-bottom: 6px;
}

/* FOOTER */
.fs-calendar-footer {
    margin-top: 18px;
    display: flex;
    justify-content: space-between;
}

.fs-btn-sm {
    height: 38px;
    padding: 0 14px;
    font-size: .85rem;
}

.fs-field-daterange {
    position: relative;
    z-index: 999; /* Nouveau pour éviter d’être coupé */
}

.fs-date-dropdown {
    z-index: 9999 !important; /* Passe toujours par-dessus */
}

.fs-search-wrap {
    position: relative;
    z-index: 1;
}

/* FLEX CHIPS */

.fs-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.fs-chip {
    border-radius: 999px;
    border: 2px solid var(--fs-primary);
    background: #fff;
    color: var(--fs-primary);
    padding: 6px 10px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

    .fs-chip.active,
    .fs-chip:hover {
        background: var(--fs-accent);
        border-color: var(--fs-accent);
        color: #fff;
    }

/* MOBILE */
@media (max-width: 480px) {
    .fs-date-dropdown {
        max-width: 100%;
        left: 0;
    }

    .fs-calendar-grid .fs-day {
        height: 36px;
    }
}
