/* ============================================================
   Spa - Catalogue
   Layout : filtres (gauche) + catalogue (droite)
   ============================================================ */

main {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 1.5rem;
    align-items: start;
}

#be-messages {
    grid-column: 1 / -1;
}

@media (max-width: 640px) {
    main {
        grid-template-columns: 1fr;
    }

    #catalog-filter {
        display: none;
    }
}

/* ============================================================
   Filtres (ModuleCatalogFilter)
   ============================================================ */

#catalog-filter {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    padding: 0.5rem 1rem 1rem;
    position: sticky;
    top: 1rem;
}

.catalog-filter-header .zone-title {
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--lc-primary);
    margin: 0.5rem 0 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--lc-primary);
}

/* Accordions */
.catalog-filters .acc_node {
    border-bottom: 1px solid #eee;
}

.catalog-filters .acc_node:last-child {
    border-bottom: none;
}

.catalog-filters .acc_header {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.65rem 0.25rem;
    cursor: pointer;
    user-select: none;
    color: #333;
}

.catalog-filters .acc_header:hover {
    color: var(--lc-primary);
}

.catalog-filters .acc_header .acc_icon {
    font-size: 0.75rem;
    color: var(--lc-primary);
}

.catalog-filters .acc_header .acc_title {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 600;
}

.catalog-filters .acc_content {
    padding: 0.25rem 0.25rem 0.75rem;
}

/* --- Range sliders (durée, budget) --- */
.free-range-value {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #555;
    margin-bottom: 0.75rem;
}

.slider-range.ui-slider {
    background: #e5e5e5;
    height: 6px;
    border-radius: 3px;
    border: none;
    margin: 0.5rem 0.5rem 1rem;
}

.slider-range .ui-slider-range {
    background: var(--lc-primary) !important;
    border: none;
}

.slider-range .ui-slider-handle {
    background: #fff !important;
    border: 2px solid var(--lc-primary) !important;
    border-radius: 50% !important;
    width: 16px !important;
    height: 16px !important;
    top: -6px !important;
    margin-left: -8px !important;
    cursor: grab;
}

.slider-range .ui-slider-handle:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(68, 112, 93, 0.2);
}

/* --- Checkboxes (types, marques) --- */
.ast-checkboxlist-root {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.ast-btn-reset-filter {
    align-self: flex-end;
    background: transparent;
    border: none;
    color: var(--lc-primary);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.15rem 0.35rem;
    margin-bottom: 0.35rem;
}

.ast-btn-reset-filter:hover {
    text-decoration: underline;
}

.ast-checkboxlist-item label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: #444;
    cursor: pointer;
    padding: 0.15rem 0;
}

.ast-checkbox-item {
    margin: 0 !important;
    accent-color: var(--lc-primary);
}

/* --- Datepicker jQuery UI (filtre Date) --- */
#datePickerWrapper .searchDate {
    margin-bottom: 0.5rem;
}

.input-search-date {
    width: 100%;
}

#datePickerWrapper .ui-datepicker-inline {
    width: 100% !important;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    padding: 0.35rem;
    font-size: 0.8rem;
    background: #fff;
}

#datePickerWrapper .ui-datepicker-header {
    background: transparent;
    border: none;
    padding: 0.35rem 0;
}

#datePickerWrapper .ui-datepicker-title,
#datePickerWrapper .ui-datepicker-month,
#datePickerWrapper .ui-datepicker-year {
    color: #333 !important;
    font-size: 0.85rem;
    font-weight: 600;
}

#datePickerWrapper .ui-datepicker-calendar th {
    font-size: 0.7rem;
    color: #999;
    font-weight: 600;
    padding: 0.35rem 0;
}

#datePickerWrapper .ui-datepicker-calendar td {
    text-align: center;
    font-size: 0.75rem;
    padding: 1px;
}

#datePickerWrapper .ui-datepicker-calendar td a,
#datePickerWrapper .ui-datepicker-calendar td span {
    display: block;
    padding: 0.35rem 0;
    text-decoration: none;
    color: #333;
    border: 0;
    background: transparent;
    border-radius: 3px;
}

#datePickerWrapper .ui-datepicker-calendar td.ui-state-disabled span {
    color: #ccc;
}

/* Survol d'une cellule non sélectionnée */
#datePickerWrapper .ui-datepicker-calendar td a:hover,
#datePickerWrapper .ui-datepicker-calendar td a.ui-state-hover,
#datePickerWrapper .ui-datepicker-calendar td a.ui-state-focus {
    background: rgba(68, 112, 93, 0.12) !important;
    color: var(--lc-primary) !important;
    border-color: transparent !important;
}

/* Cellule sélectionnée (jour courant du filtre) */
#datePickerWrapper .ui-datepicker-calendar td.ui-datepicker-current-day a,
#datePickerWrapper .ui-datepicker-calendar td a.ui-state-active {
    background: var(--lc-primary) !important;
    color: #fff !important;
    border-color: var(--lc-primary) !important;
}

/* ============================================================
   Zone catalogue
   ============================================================ */

.catalog-zone-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.catalog-zone-header .zone-title {
    font-family: 'Roboto', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--lc-primary);
    margin: 0;
}

.catalog-sort-zone .shortcut {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.9rem;
    font-size: 0.85rem;
    cursor: pointer;
    width: 110px !important;
}

/* Chips de filtres actifs */
.ast-filter-chips-module {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.ast-filter-chips-module:empty {
    display: none;
}

/* ============================================================
   Grille produits (ModuleCatalog)
   ============================================================ */

#catalog .product-catalog {
    width: 100%;
}

/* Ne PAS toucher au display/position de #media-container :
   les items sont positionnés en absolute par jquery.paginatedScrollingContainer */

.responsive-gallery-item {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.responsive-gallery-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.prod-item-top-content {
    height: 126px;
    margin: 0;
    background: #f5f5f5;
    overflow: hidden;
    border-radius: 0;
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 0 !important;
}

.prod-item-middle-content {
    padding: 0.85rem 1rem 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    flex: 1;
}

.product-label {
    margin: 0;
}

.product-label label {
    font-size: 0.95rem;
    color: var(--lc-primary);
    margin: 0;
    cursor: text;
}

.product-main-description {
    font-size: 0.825rem;
    color: #666;
    line-height: 1.4;
}

.product-main-description p {
    margin: 0;
}

.product-duration-desc {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: #777;
}

.product-duration-desc label {
    margin: 0;
    cursor: text;
}

.product-price-infos {
    margin-top: auto;
    padding-top: 0.35rem;
}

.product-price-infos label {
    display: block;
    margin: 0;
    cursor: text;
}

.product-catalog-price {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: var(--lc-primary);
    line-height: 1.3;
}

.prod-item-bottom-content {
    padding: 0.5rem 1rem 1rem;
    display: flex;
    justify-content: flex-end;
}

.btn-catalog-product-file {
    padding: 0.5rem 1rem;
    color: #fff !important;
    border: 1px solid var(--lc-primary);
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
}
