/* ==========================================================================
   KEYFRAMES GLOBALES
   ========================================================================== */

/* Dégradé animé du fond de page */
@keyframes gradient {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Loader : cercle externe */
@keyframes loader-1 {
    0%   { transform: translate3d(0, 0, 0) scale(0);   opacity: 1; }
    100% { transform: translate3d(0, 0, 0) scale(1.5); opacity: 0; }
}

/* Loader : cercle interne */
@keyframes loader-2 {
    0%   { transform: translate3d(0, 0, 0) scale(0); opacity: 1; }
    100% { transform: translate3d(0, 0, 0) scale(1); opacity: 0; }
}

.loader span::after {
    animation: loader-2 1.5s cubic-bezier(0.075, 0.820, 0.165, 1.000) .25s infinite;
}

/* Curseur du typewriter */
@keyframes blink {
    50% { opacity: 0; }
}

/* Rotation des puces de la page d'accueil */
@keyframes rotateBack {
    from { transform: rotate(45deg); }
    to   { transform: rotate(0deg); }
}

/* Retournement du contenu (mobile) */
@keyframes rotateAnimation {
    from { transform: rotateY(0deg); }
    to   { transform: rotateY(180deg); }
}

/* Ouverture / fermeture de la carte (mobile) */
@keyframes slideUp {
    from { margin-top: 100vh; }
    to   { margin-top: 7vh; }
}

@keyframes slideDown {
    from { margin-top: 7vh; }
    to   { margin-top: 100vh; }
}

/* ==========================================================================
   MOBILE
   ========================================================================== */
@media (max-width: 768px) {
    .slideUp {
        animation-name: slideUp;
        animation-duration: 0.5s;
        animation-fill-mode: forwards;
        animation-timing-function: ease;
    }

    .slideDown {
        animation-name: slideDown;
        animation-duration: 0.5s;
        animation-fill-mode: forwards;
        animation-timing-function: ease;
    }
}

/* ==========================================================================
   ACCESSIBILITÉ : respecter la préférence système « animations réduites »
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}