/**
 * NDK Filter Overlay - CSS Styles
 * Surcouche visuelle pour les filtres produits
 */

/* ==========================================================================
   FEATURE 1: Contraste automatique des couleurs
   ========================================================================== */

/* Le texte des filtres couleur sera géré par JS, 
   mais on prépare les classes CSS */
.ndkfo-light-text .name {
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.ndkfo-dark-text .name {
    color: #333333 !important;
    text-shadow: none;
}

/* Amélioration générale des items de couleur */
.af_filter[data-url="couleur"] .group-item {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.af_filter[data-url="couleur"] .group-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}


/* ==========================================================================
   FEATURE 2: Amélioration du slider de prix (sobre et professionnel)
   ========================================================================== */

/* Container principal du slider */
.ndkfo-enhanced-slider .p_slider.af-slider {
    padding: 15px 10px 10px;
    margin: 5px 0;
}

/* Barre de fond du slider */
.ndkfo-enhanced-slider .slider-bar {
    height: 6px !important;
    margin: 12px 0 20px !important;
}

.ndkfo-enhanced-slider .back-bar {
    height: 6px !important;
    background: #e5e5e5 !important;
    border-radius: 3px !important;
    position: relative !important;
}

/* Barre de sélection */
.ndkfo-enhanced-slider .selected-bar {
    height: 6px !important;
    background: var(--ndkfo-slider-color) !important;
    border-radius: 3px !important;
}

/* Poignées du slider */
.ndkfo-enhanced-slider .pointer {
    width: 18px !important;
    height: 18px !important;
    background: #ffffff !important;
    border: 2px solid var(--ndkfo-slider-color) !important;
    border-radius: 50% !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15) !important;
    cursor: grab !important;
    transition: box-shadow 0.2s ease, transform 0.2s ease !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    margin-top: 0 !important;
}

.ndkfo-enhanced-slider .pointer:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2) !important;
}

.ndkfo-enhanced-slider .pointer:active {
    cursor: grabbing !important;
    transform: translateY(-50%) scale(0.95) !important;
}

/* Zone des valeurs */
.ndkfo-enhanced-slider .slider-values {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-top: 10px !important;
}

/* Affichage des valeurs min/max */
.ndkfo-enhanced-slider .slider_value {
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #555 !important;
}

.ndkfo-enhanced-slider .slider_value .value {
    color: #333 !important;
    font-weight: 600 !important;
}

.ndkfo-enhanced-slider .slider_value .suffix {
    color: #777 !important;
}

/* Masquer les inputs texte */
.ndkfo-enhanced-slider .slider_value input[type="text"],
.ndkfo-enhanced-slider .slider_value input[type="hidden"] {
    display: none !important;
}

/* ==========================================================================
   Utilitaires généraux
   ========================================================================== */

/* Transition douce pour tous les éléments du filtre */
.af_filter * {
    transition: color 0.2s ease, background-color 0.2s ease;
}

/* Retirer la bordure basse des filtres */
.af_filter {
    border-bottom: 1px solid rgba(242, 138, 27, 0.5) !important;
}

/* Plus d'espace sous le contenu des filtres expandables */
.af_filter.expandable .af_filter_content {
    margin-bottom: 1em !important;
}

/* Margin sous le toggle-cut-off */
.af_filter.expandable .toggle-cut-off {
    margin-bottom: 0.3em !important;
}

/* Flèche du toggle en couleur */
.af_subtitle.toggle-content:before {
    border-color: var(--ndkfo-toggle-color) !important;
}

/* Bordure du titre de bloc */
.block .title_block, .block h4 {
    border-bottom: 1px solid rgba(242, 138, 27, 0.5) !important;
}


/* ==========================================================================
   FEATURE 3: Amélioration du bouton "Effacer les filtres"
   ========================================================================== */

/* Container du bouton - écraser les styles existants */
.ndkfo-enhanced-clear .clearAll {
    padding: 10px 5px !important;
    background: transparent !important;
    text-align: center !important;
    line-height: 1 !important;
}

/* Bouton "Effacer les filtres" */
.ndkfo-enhanced-clear .clearAll a.all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid var(--ndkfo-clear-color);
    color: var(--ndkfo-clear-color);
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.ndkfo-enhanced-clear .clearAll a.all:hover {
    background: var(--ndkfo-clear-color);
    color: #fff;
}

.ndkfo-enhanced-clear .clearAll a.all .txt {
    order: 1;
    font-size: 0.9em !important;
    margin-top: 0.3em !important;
}

.ndkfo-enhanced-clear .clearAll a.all i,
.ndkfo-enhanced-clear .clearAll a.all .icon-eraser {
    order: 2;
    font-size: 16px;
}


/* ==========================================================================
   FEATURE 4: Amélioration du bouton "Voir plus/moins"
   ========================================================================== */

/* Bouton toggle */
.ndkfo-enhanced-toggle .toggle-cut-off {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    color: var(--ndkfo-toggle-color);
    background: transparent;
}

.ndkfo-enhanced-toggle .toggle-cut-off:hover {
    background: rgba(157, 109, 172, 0.1);
}

/* Texte du bouton */
.ndkfo-enhanced-toggle .toggle-cut-off .more,
.ndkfo-enhanced-toggle .toggle-cut-off .less {
    padding: 0 !important;
    background: transparent !important;
    color: var(--ndkfo-toggle-color) !important;
}

/* Flèche après le texte */
.ndkfo-enhanced-toggle .toggle-cut-off .more::after {
    content: ' ▼';
    font-size: 10px;
    margin-left: 4px;
}

.ndkfo-enhanced-toggle .toggle-cut-off .less::after {
    content: ' ▲';
    font-size: 10px;
    margin-left: 4px;
}


/* ==========================================================================
   FEATURE 5: Checkbox en mode switch
   ========================================================================== */

/* Container du switch */
.ndkfo-switch-container .af-checkbox-label {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    cursor: pointer !important;
    padding: 5px 0 !important;
}

/* Cacher le checker original */
.ndkfo-switch-container .checker {
    display: none !important;
}

/* Le switch */
.ndkfo-switch {
    position: relative;
    width: 44px;
    height: 24px;
    background: #ccc;
    border-radius: 12px;
    transition: background 0.2s ease;
    flex-shrink: 0;
    margin-left: 10px;
}

/* Le rond du switch */
.ndkfo-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
}

/* État actif */
.ndkfo-switch.active {
    background: var(--ndkfo-switch-color);
}

.ndkfo-switch.active::after {
    transform: translateX(20px);
}

/* Nom du filtre */
.ndkfo-switch-container .name {
    flex-grow: 1;
    font-size: 14px;
    color: #333;
}
