/* ==========================================================================
   Curseur Temporel - Slider horizontal et sélecteur de date SunFinder
   Méthodologie BEM : curseur-temporel (block)
   Éléments : __ligne-haut, __ligne-bas, __slider, __heure, __borne, __date, __bouton-maintenant
   Modificateurs : --visible, --masque, --lever, --coucher
   ========================================================================== */

.curseur-temporel {
    position: fixed;
    bottom: 80px;
    left: 10px;
    right: 10px;
    z-index: 960;

    display: flex;
    flex-direction: column;
    gap: 6px;

    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(6px);

    transition: opacity 0.25s ease, transform 0.25s ease;
}

/* Modificateur : visible */
.curseur-temporel--visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Modificateur : masqué */
.curseur-temporel--masque {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

/* ─── Ligne du haut : date + heure + bouton ─── */

.curseur-temporel__ligne-haut {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.curseur-temporel__date {
    padding: 4px 8px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fff;
    font-size: 13px;
    color: #333;
    cursor: pointer;
}

.curseur-temporel__date:focus {
    outline: 2px solid #f0a500;
    outline-offset: 1px;
}

.curseur-temporel__heure {
    font-size: 20px;
    font-weight: 700;
    color: #222;
    font-variant-numeric: tabular-nums;
    min-width: 56px;
    text-align: center;
}

.curseur-temporel__bouton-maintenant {
    padding: 5px 12px;
    border: 1px solid #f0a500;
    border-radius: 6px;
    background: #fff3cd;
    color: #8a6d00;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.curseur-temporel__bouton-maintenant:hover {
    background: #ffe69c;
    box-shadow: 0 1px 4px rgba(240, 165, 0, 0.3);
}

.curseur-temporel__bouton-maintenant:active {
    background: #ffd54f;
}

/* ─── Ligne du bas : bornes + slider ─── */

.curseur-temporel__ligne-bas {
    display: flex;
    align-items: center;
    gap: 8px;
}

.curseur-temporel__borne {
    font-size: 11px;
    color: #888;
    white-space: nowrap;
    min-width: 38px;
    text-align: center;
}

.curseur-temporel__borne--lever {
    color: #e67e22;
}

.curseur-temporel__borne--coucher {
    color: #8e44ad;
}

/* ─── Slider ─── */

.curseur-temporel__slider {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(to right, #f39c12, #f1c40f 40%, #f1c40f 60%, #8e44ad);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.curseur-temporel__slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #f0a500;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
    cursor: grab;
    transition: transform 0.15s ease;
}

.curseur-temporel__slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.curseur-temporel__slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #f0a500;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
    cursor: grab;
}

.curseur-temporel__slider:focus {
    outline: 2px solid #f0a500;
    outline-offset: 2px;
}

/* ─── Responsive mobile ─── */

@media (max-width: 600px) {
    .curseur-temporel {
        bottom: 76px;
        left: 6px;
        right: 6px;
        padding: 8px 10px;
        gap: 4px;
    }

    .curseur-temporel__heure {
        font-size: 16px;
    }

    .curseur-temporel__bouton-maintenant {
        padding: 4px 8px;
        font-size: 11px;
    }

    .curseur-temporel__date {
        font-size: 12px;
        padding: 3px 6px;
    }

    .curseur-temporel__borne {
        font-size: 10px;
        min-width: 32px;
    }
}
