/* ========================================= */
/* == MODES DE PERFORMANCE == */
/* ========================================= */

/* Mode Performance (Classe ajoutée via JS pour les appareils moins puissants) */

/* 1. DÉSACTIVATION DES ANIMATIONS SPATIALES ET LOURDES */
html.performance-mode body::before,
html.performance-mode body::after,
html.performance-mode .ultra-particles,
html.performance-mode .ultra-particle {
    display: none !important;
    animation: none !important;
}

/* 2. ARRIÈRE-PLAN SIMPLIFIÉ MAIS PROPRE */
html.performance-mode body {
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%) !important;
    background-attachment: scroll !important; /* Fixed peut ramer sur mobile low-end */
}

/* 3. TRANSITIONS SÉLECTIVES */
html.performance-mode * {
    /* On garde les transitions de couleur/opacité pour que ça fasse "fini" */
    transition-property: color, background-color, border-color, opacity, box-shadow !important;
    transition-duration: 0.2s !important;
    transition-timing-function: ease-out !important;
    
    /* On tue les transformations spatiales gourmandes et les filtres */
    transform: none !important;
    filter: none !important;
    backdrop-filter: none !important;
    user-select: auto !important;
}

/* 4. NETTOYAGE DES CARTES ET ÉLÉMENTS FLOTTANTS */
html.performance-mode .avantage-card,
html.performance-mode .tarif-card,
html.performance-mode .info-block,
html.performance-mode .contact-form-wrapper,
html.performance-mode .footer-card {
    background: var(--bg-secondary) !important; /* Fallback solide opaque pour lisibilité */
    border: 1px solid var(--border-color, rgba(255,255,255,0.1)) !important;
    box-shadow: none !important;
    transform: none !important;
    backdrop-filter: none !important;
}

/* Au survol, on garde juste un petit changement de fond ou de bordure */
html.performance-mode .avantage-card:hover,
html.performance-mode .tarif-card:hover,
html.performance-mode .info-block:hover,
html.performance-mode .footer-card:hover {
    background: var(--bg-tertiary) !important;
    border-color: var(--primary-color) !important;
    transform: none !important;
    box-shadow: none !important;
}

/* 5. BOUTONS STABLES */
html.performance-mode .btn-primary,
html.performance-mode .btn-secondary,
html.performance-mode .modern-btn {
    transform: none !important;
    box-shadow: none !important;
}

html.performance-mode .btn-primary:hover,
html.performance-mode .btn-secondary:hover,
html.performance-mode .modern-btn:hover {
    transform: none !important;
    /* Juste un changement de couleur géré par la transition globale */
    opacity: 0.9 !important;
}

/* 6. CORRECTIONS DE LAYOUT */
html.performance-mode section {
    transform: none !important;
    opacity: 1 !important; /* Force la visibilité immédiate */
    visibility: visible !important;
}

/* Suppression des pseudo-éléments décoratifs lourds */
html.performance-mode .social-icon::before,
html.performance-mode .btn-primary::after,
html.performance-mode .footer-link::after {
    display: none !important; 
    content: none !important;
}

/* Scroll natif performant */
html.performance-mode html {
    scroll-behavior: auto !important;
}
