/* Animations pour les transitions entre les pages de réservation */

/* Animation de base pour les transitions de page */
.page-transition {
    animation-duration: 0.5s;
    animation-fill-mode: both;
}

/* Animation d'entrée de page - Fade + Slide */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 30px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.fade-in-up {
    animation-name: fadeInUp;
}

/* Animation pour les entrées d'éléments en cascade */
@keyframes fadeInStagger {
    from {
        opacity: 0;
        transform: translate3d(0, 20px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.staggered-item {
    opacity: 0;
}

.staggered-item.animate {
    animation: fadeInStagger 0.4s ease forwards;
}

/* Animation fluide pour la carte de réservation */
@keyframes cardSlideIn {
    from {
        opacity: 0;
        transform: translate3d(0, 50px, 0);
        box-shadow: 0 0 0 rgba(0,0,0,0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
        box-shadow: 0 6px 18px rgba(0,0,0,0.1);
    }
}

.card-animate {
    animation: cardSlideIn 0.6s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

/* Animation de succès pour la coche */
@keyframes checkmarkDraw {
    0% {
        stroke-dashoffset: 100;
        opacity: 0;
    }
    30% {
        opacity: 1;
    }
    100% {
        stroke-dashoffset: 0;
        opacity: 1;
    }
}

.checkmark-animate {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: checkmarkDraw 1s ease-in-out forwards;
    animation-delay: 0.3s;
}

/* Animation pour le cercle de succès */
@keyframes circleFadeIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.circle-animate {
    animation: circleFadeIn 0.5s ease-out forwards;
}

/* Animation de sortie pour la navigation entre pages */
@keyframes fadeOutLeft {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
        transform: translate3d(-30px, 0, 0);
    }
}

.fade-out-left {
    animation-name: fadeOutLeft;
}

/* Animation pour les transitions de page sans JS */
.page-content {
    animation: cardSlideIn 0.6s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

/* Animation de pulse pour les boutons d'action */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(13, 110, 253, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(13, 110, 253, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(13, 110, 253, 0);
    }
}

.btn-pulse {
    animation: pulse 2s infinite;
}

/* Effet de transition pour les liens et boutons */
.smooth-hover {
    transition: all 0.3s ease;
}

/* Animation spéciale pour le code de réservation */
@keyframes highlightCode {
    0% {
        background-color: rgba(40, 167, 69, 0.2);
    }
    50% {
        background-color: rgba(40, 167, 69, 0.3);
    }
    100% {
        background-color: rgba(40, 167, 69, 0.2);
    }
}

.reservation-code {
    animation: highlightCode 2s ease-in-out infinite;
}

/* Styles pour l'animation SVG du checkmark */
.checkmark {
    width: 56px;
    height: 56px;
    margin: 0 auto;
    display: block;
}

.checkmark-circle {
    stroke: white;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    fill: none;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-check {
    stroke: white;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    transform-origin: 50% 50%;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) 0.3s forwards;
}

@keyframes stroke {
    100% {
        stroke-dashoffset: 0;
    }
}

/* Animation de la page pour les transitions */
.page-enter-active {
    transition: opacity 0.5s, transform 0.5s;
}

.page-enter {
    opacity: 0;
    transform: translateX(30px);
}

/* Animation pour le survol des boutons */
.btn-primary {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Animation de l'écran de chargement */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #0d6efd;
    animation: spin 1s ease-in-out infinite;
    margin: 40px auto;
}

/* Effet de vague pour les boutons */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple:after {
    content: "";
    display: block;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, #fff 10%, transparent 10.01%);
    background-repeat: no-repeat;
    background-position: 50%;
    transform: scale(10, 10);
    opacity: 0;
    transition: transform .5s, opacity 1s;
}

.ripple:active:after {
    transform: scale(0, 0);
    opacity: .3;
    transition: 0s;
} 