/* --- BASE --- */
body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    -webkit-font-smoothing: antialiased;
    cursor: default;
    /* Changé de 'none' pour éviter les soucis d'UX si JS ne charge pas */
}

/* On réactive le curseur none seulement si on peut supporter le custom cursor */
@media (pointer: fine) {
    body {
        cursor: none;
    }

    body:hover .cursor-dot,
    body:hover .cursor-outline {
        opacity: 1;
    }
}

/* --- CURSOR EFFECT --- */
.cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    width: 8px;
    height: 8px;
    background-color: #169e5e;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s;
}

.cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(22, 158, 94, 0.5);
    background-color: transparent;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9998;
    transition: width 0.2s, height 0.2s, background-color 0.2s, border-color 0.2s, top 0.1s, left 0.1s, opacity 0.3s;
    opacity: 0;
}

/* --- LOADER --- */
#preloader {
    position: fixed;
    inset: 0;
    background: #f8fafc;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}

html.dark #preloader {
    background: #020617;
}

.circular-loader {
    width: 90px;
    height: 90px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #169e5e;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

html.dark .circular-loader {
    border-color: #1e293b;
    border-top-color: #22c55e;
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.2);
}

.loader-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    animation: pulse 2s infinite;
}

/* --- HERO SLIDESHOW --- */
.hero-slider img {
    transition: opacity 1s ease-in-out;
}

.hero-slider img.active-slide {
    z-index: 10;
    opacity: 1 !important;
}

/* --- UI ELEMENTS --- */
.modern-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modern-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -15px rgba(22, 158, 94, 0.15);
    border-color: #169e5e;
}

/* Boutons Appareils */
.appliance-btn {
    transition: all 0.2s;
    user-select: none;
    cursor: pointer;
}

.appliance-btn:active {
    transform: scale(0.95);
}

.appliance-btn.active {
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

html.dark .appliance-btn.active {
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.15);
}

/* Liens Footer */
.footer-link {
    position: relative;
}

.footer-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #169e5e;
    transition: width 0.3s;
}

.footer-link:hover::after {
    width: 100%;
}

/* Filtres */
.filter-btn:hover {
    border-color: #169e5e;
}

.filter-btn.active {
    background-color: #169e5e;
    color: white;
    box-shadow: 0 4px 10px rgba(22, 158, 94, 0.3);
}

/* Input Search Focus Effect */
.dark-input:focus {
    border-color: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.1);
}

/* Hide scrollbar for horizontal scroll */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(0.95);
        opacity: 0.8;
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}