/**
 * Animations CSS Custom - Auberge de Vandoeuvres
 * Animations incroyables et effets visuels
 */

/* ============================================
   KEYFRAMES ANIMATIONS
   ============================================ */

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(198, 151, 101, 0.5);
    }
    50% {
        box-shadow: 0 0 30px rgba(198, 151, 101, 0.8);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-10px);
    }
    75% {
        transform: translateX(10px);
    }
}

@keyframes slideInFromLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInFromRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes rotateIn {
    from {
        transform: rotate(-200deg) scale(0);
        opacity: 0;
    }
    to {
        transform: rotate(0) scale(1);
        opacity: 1;
    }
}

/* ============================================
   RIPPLE EFFECT
   ============================================ */

.btn, button, a[href] {
    position: relative;
    overflow: hidden;
}

.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: scale(0);
    animation: ripple 0.6s ease-out;
    pointer-events: none;
}

/* ============================================
   HOVER EFFECTS
   ============================================ */

/* Smooth transitions sur tous les éléments interactifs */
a, button, .btn, picture img, .photo img {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Lift effect sur les cards */
.service .item,
.related-article-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service .item:hover,
.related-article-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* Glow effect sur les boutons primaires */
.btn-primary {
    transition: all 0.3s ease;
}

.btn-primary:hover {
    box-shadow: 0 0 20px rgba(198, 151, 101, 0.6);
    transform: scale(1.05);
}

/* Image zoom sur hover */
.cuisine picture img:hover,
.carte picture img:hover,
.la-cave picture img:hover,
.votre picture img:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

/* ============================================
   PARALLAX & PERFORMANCE
   ============================================ */

/* GPU Acceleration pour les éléments animés */
.mainban,
.mainban .overlay,
.mainban h1,
.mainban p,
.cuisine img,
.carte img,
.la-cave img,
.service .item,
.swiper-slide img {
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* ============================================
   SCROLL PROGRESS INDICATOR
   ============================================ */

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #c69765 0%, #8b6f47 100%);
    transform: scaleX(0);
    transform-origin: left;
    z-index: 9999;
}

/* ============================================
   LOADING STATES
   ============================================ */

/* Skeleton loading pour les images */
picture img,
.photo img {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

picture img[src],
.photo img[src] {
    animation: none;
    background: none;
}

/* ============================================
   HERO SECTION
   ============================================ */

.mainban {
    position: relative;
    overflow: hidden;
}

.mainban video {
    transform: scale(1.1);
    transition: transform 10s ease-out;
}

.mainban:hover video {
    transform: scale(1);
}

.mainban .overlay {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    transition: backdrop-filter 0.5s ease;
}

.mainban:hover .overlay {
    backdrop-filter: blur(0px);
}

/* ============================================
   TEXT EFFECTS
   ============================================ */

/* Gradient text pour les titres importants */
.la-cave h1 {
    background: linear-gradient(135deg, #c69765 0%, #8b6f47 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Text shadow subtil pour améliorer la lisibilité */
.mainban h1,
.mainban p {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* ============================================
   ACCORDION ANIMATIONS
   ============================================ */

.accordion-button {
    transition: all 0.3s ease;
}

.accordion-button:not(.collapsed) {
    transform: translateX(10px);
}

.accordion-button::after {
    transition: transform 0.3s ease;
}

.accordion-button:not(.collapsed)::after {
    transform: rotate(180deg);
}

/* ============================================
   CAROUSEL ENHANCEMENTS
   ============================================ */

/* Smooth transition pour Swiper */
.swiper-slide {
    transition: transform 0.5s ease, opacity 0.5s ease;
    opacity: 1;
    transform: scale(1);
}

/* Owl Carousel hover effect */
.owl-carousel .item {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.owl-carousel .item:hover {
    transform: scale(1.02);
}

.owl-carousel .item .overlay {
    transition: all 0.3s ease;
}

.owl-carousel .item:hover .overlay {
    background: rgba(0, 0, 0, 0.7);
}

/* Permettre au texte de déborder sur les côtés */
.privatisation.owl-carousel .owl-stage-outer {
    overflow: visible !important;
}

.privatisation.owl-carousel .owl-stage {
    overflow: visible !important;
}

.privatisation.owl-carousel .owl-item {
    overflow: visible !important;
}

.privatisation.owl-carousel .item {
    overflow: visible !important;
}

.privatisation.owl-carousel .item .overlay {
    overflow: visible !important;
}

.privatisation.owl-carousel .item .overlay h1 {
    white-space: nowrap;
    overflow: visible !important;
}

/* ============================================
   NAVIGATION EFFECTS
   ============================================ */

.navbar {
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* ============================================
   FAQ SECTION
   ============================================ */

.faqs .accordion-item {
    transition: all 0.3s ease;
}

/* ============================================
   RESPONSIVE ANIMATIONS
   ============================================ */

@media (max-width: 768px) {
    /* Simplifier les animations sur mobile */
    .service .item:hover,
    .related-article-card:hover {
        transform: translateY(-5px);
    }

    /* Réduire les effets parallax */
    .mainban video {
        transform: scale(1);
    }

    /* Désactiver certains effets lourds */
    .mainban .overlay {
        backdrop-filter: none;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

/* Respecter les préférences utilisateur */
@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;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.animate {
    opacity: 0;
    transform: translateY(30px);
}

.animate.animated {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.6s ease;
}

.fade-in {
    animation: fadeInUp 0.8s ease forwards;
}

.slide-in-left {
    animation: slideInFromLeft 0.8s ease forwards;
}

.slide-in-right {
    animation: slideInFromRight 0.8s ease forwards;
}

.zoom-in {
    animation: zoomIn 0.8s ease forwards;
}

.rotate-in {
    animation: rotateIn 0.8s ease forwards;
}

.float {
    animation: float 3s ease-in-out infinite;
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

.glow {
    animation: glow 2s ease-in-out infinite;
}

/* ============================================
   PERFORMANCE OPTIMIZATIONS
   ============================================ */

/* Forcer l'accélération GPU */
.mainban,
.service .item,
.swiper-slide,
picture img {
    transform: translate3d(0, 0, 0);
}

/* Optimiser le rendu des ombres */
.service .item,
.related-article-card {
    will-change: box-shadow, transform;
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    * {
        animation: none !important;
        transition: none !important;
    }
}
