﻿
/*Styles qui décrivent un changement sur une durée définie (fondu, glissement, pulse, zoom au chargement).*/

/* 
   *** ANIMATION GLISSEMENT GENERIQUE ***
   APPLIQUEE A TOUTE LES SOUS-DIV DES BLOCS AVEC MENTION CLASS DRAG
   Avec gestion de la vitesse d'apparition : slow vs. speed
   Avec gestion de la direction : depuis la gauche ou la droite
   Avec possibilité de définir si l'animation est déclenché lors du chargement vs. viewport
*/

/* Exemple utilisation : 
    drag dragSpeed-left animation-is-visible (déclenchement immédiat - glissement depuis la gauche - vitesse rapide)
    drag dragSpeed-left viewport-condition (déclenchement après rendu viewport - glissement depuis la gauche - vitesse rapide)
    [...]
A noter : L'important est que l'élément parent ait toujours :
Soit : drag + [vitesse/direction] + animation-is-visible
Soit : drag + [vitesse/direction] + viewport-condition 

*/

/* ======================================================= */
/* Effet glissement LEFT 
[ÉTAT ACTIVÉ (DANS VIEWPORT) - GÉRÉ PAR JS initié dans MainLayout] */

/* A. LEFT Vitesse RAPIDE++ */
.dragSpeed2-left.animation-is-visible div,
.viewport-condition.dragSpeed2-left.animation-is-visible div {
    animation: slideInLeft 0.5s cubic-bezier(0.68, -0.6, 0.32, 0.3) forwards;
    animation-delay: calc(0.1s + (var(--i, 0) * 0.1s));
}

/* B. LEFT Vitesse RAPIDE */
.dragSpeed-left.animation-is-visible div,
.viewport-condition.dragSpeed-left.animation-is-visible div {
    animation: slideInLeft 1s cubic-bezier(0.68, -0.6, 0.32, 1.6) forwards;
    animation-delay: calc(0.1s + (var(--i, 0) * 0.5s));
}

/* C. LEFT Vitesse LENTE */
.dragSlow-left.animation-is-visible div,
.viewport-condition.dragSlow-left.animation-is-visible div {
    animation: slideInLeft 1s cubic-bezier(0.68, -0.6, 0.32, 0.6) forwards;
    animation-delay: calc(0s + (var(--i, 0) * 0.15s));
}

/* C. LEFT Cascade */
.dragCascadingleft.animation-is-visible div,
.viewport-condition.dragCascadingleft.animation-is-visible div {
    /* Utilisation de la keyframe définie ci-dessus.
    Durée : 1s (comme votre transition JS)
    Timing Function : cubic-bezier(0.68, -0.55, 0.27, 1.55) (similaire à votre transition JS)
    */
    animation: slideInLeft 1s cubic-bezier(0.68, -0.55, 0.27, 1.55) forwards;
    /* Gestion du délai en cascade :
    Votre JS utilisait 0s, 0.1s, 0.2s, 0.3s... 
    Ici on utilise var(--i, 0) * 0.1s pour un pas de 0.1s
    */
    animation-delay: calc(0s + (var(--i, 0) * 0.1s));
}



/* KEYFRAMES : Effet LEFT */
@keyframes slideInLeft {
    0% {
        opacity: 0;
        transform: translateX(-250px); 
    }

    100% {
        opacity: 1;
        transform: translateX(0);
    }
}


/* ======================================================= */

/* Effet glissement RIGHT 
[ÉTAT ACTIVÉ (DANS VIEWPORT) - GÉRÉ PAR JS initié dans MainLayout] */

/* A. RIGHT Vitesse RAPIDE */
.dragSpeed-right.animation-is-visible div,
.viewport-condition.dragSpeed-right.animation-is-visible div {
    animation: slideInRight 1s cubic-bezier(0.68, -0.6, 0.32, 1.6) forwards;
    animation-delay: calc(0.1s + (var(--i, 0) * 0.5s));
}

/* B. RIGHT Vitesse LENTE */
.dragSlow-right.animation-is-visible div,
.viewport-condition.dragSlow-right.animation-is-visible div {
    animation: slideInRight 1s cubic-bezier(0.68, -0.6, 0.32, 0.6) forwards;
    animation-delay: calc(0s + (var(--i, 0) * 0.15s));
}

/* KEYFRAMES : Effet RIGHT */
@keyframes slideInRight {
    0% {
        opacity: 0;
        transform: translateX(120%); 
    }

    100% {
        opacity: 1;
        transform: translateX(0);
    }
}


/* Partie commune de l'animation */
/* État initial (hors viewport) : l'opacité est à 0 et l'élément est décalé */
.drag div {
    display: block;
    position: relative;
    opacity: 0;
    /* On utilise will-change sur l'état initial, pour ne pas ré-évaluer le layout */
    will-change: transform, opacity;
    /* Le transform initial est défini par les classes de direction/vitesse */

    overflow-x: hidden; /* C'est crucial pour masquer le contenu translateX() */
}

    /* GESTION DU DÉCALAGE (STAGGERING) */
    .drag div:nth-child(1) {
        --i: 0;
    }

    .drag div:nth-child(2) {
        --i: 1;
    }

    .drag div:nth-child(3) {
        --i: 2;
    }

    .drag div:nth-child(4) {
        --i: 3;
    }

    .drag div:nth-child(5) {
        --i: 4;
    }

    .drag div:nth-child(6) {
        --i: 5;
    }


/* -------------------------------------- */
/* -------------------------------------- */
/* -------------------------------------- */



/* Définition de l'animation de Fondu-Zoom */
/* Application de l'animation au chargement */
.zoom-in {
    animation-name: fade-zoom-in;
    animation-duration: 0.6s; /* Durée plus lente pour l'effet de zoom */
    animation-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94); /* Courbe de vitesse très élégante (Smooth Easing) */
    animation-fill-mode: forwards;
}

@keyframes fade-zoom-in {
    0% {
        opacity: 0; /* Commence invisible */
        transform: scale(1.5); /* Commence avec un zoom de 50% */
    }

    100% {
        opacity: 1; /* Finit complètement visible */
        transform: scale(1); /* Finit à la taille normale */
    }
}


/* -------------------------------------- */
/* -------------------------------------- */
/* -------------------------------------- */


/* pulse */
.pulse-element {
    position: relative; /*Très important pour positionner l'overlay */
    overflow: hidden; /*Assure que rien ne dépasse */
}

/* Définition de l'animation */
@keyframes subtle-pulse {
    0%, 100% {
        opacity: 0; /* Commence invisible et finit invisible */
        visibility: hidden;
    }

    1% {
        visibility: visible; /* Devient visible juste avant de commencer */
    }

    10%, 90% {
        opacity: 0.4; /* Le point culminant de la pulsation */
    }

    50% {
        opacity: 0.1; /* Le point bas de la pulsation */
    }
}



/*Création du calque (overlay) */
/* Création du calque (overlay) */
.pulse-element::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #34495e;
    /* ⚠️ État Initial : Cacher le calque */
    opacity: 0;
    visibility: hidden;
    /* Application de l'animation */
    /* La propriété `none` fonctionne, mais l'effet est géré par les keyframes */
    animation: subtle-pulse 0.5s 1 ease-in-out forwards;
    /* 1s pour le cycle complet, jouée 2 fois */
    /* ⚠️ REMPLACEMENT :
     * 0.5s: durée
     * 2: nombre de répétitions
     * forwards: GARDE l'état final (100% du keyframe)
    */
}


/* -------------------------------------- */
/* -------------------------------------- */
/* -------------------------------------- */



/**************************************************/
/* Barre de progression indéterminée (structure) */
/**************************************************/

.progress-bar {
    position: relative;
    /* La largeur sera définie par le composant appelant (.loading-container) ou une autre classe de layout */
    height: 6px;
    background: var(--color-background-light); /* Couleur de fond grise (utilise la variable de Settings) */
    border-radius: var(--radius); /* Utilise la variable de Settings */
    overflow: hidden;
}

    /* Barre animée à l'intérieur de .progress-bar */
    .progress-bar .indeterminate {
        position: absolute;
        top: 0;
        left: -40%;
        width: 40%;
        height: 100%;
        /* Gradient spécifique pour ce style de progression */
        background: linear-gradient(90deg, #4facfe, #00f2fe);
        border-radius: var(--radius);
        animation: indeterminate 2s infinite ease-in-out, pulse 1.8s infinite ease-in-out;
    }

/* Animation de défilement */
@keyframes indeterminate {
    0% {
        left: -40%;
    }

    50% {
        left: 60%;
    }

    100% {
        left: 100%;
    }
}

/* Effet pulse doux */
@keyframes pulse {
    0%, 100% {
        opacity: 0.7;
    }

    50% {
        opacity: 1;
    }
}


/* -------------------------------------- */
/* -------------------------------------- */
/* -------------------------------------- */


/* Classes pour les flèches d'expansion (absorbe .arrow-icon) */
.arrow-icon-transition {
    width: 20px;
    height: 20px;
    margin-left: auto;
    transition: transform 0.3s ease;
}

    .arrow-icon-transition.rotated {
        transform: rotate(180deg);
    }



/**************************************/
.testfilter {
    /* 1. Inverser (Noir devient Blanc) */
    /* 2. Appliquer une ombre portée (drop-shadow) pour le relief et le contraste */
    filter: invert(1) drop-shadow(3px 3px 6px rgba(0, 0, 0, 0.6)) drop-shadow(-1px -1px 2px rgba(0, 0, 0, 0.4));
    width: 80%; /* Pour garantir que le logo soit bien visible et responsive */
    max-width: 450px; /* Limiter la taille sur grand écran */
    height: auto;
    margin-bottom: 2rem;
}








/************************************************/

/*@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}*/