/* ========== ANIMATIONS PREMIUM POUR SEN-MAJORDOME ========== */
/* Ajoute ce fichier à ton site pour des animations sophistiquées */

/* ========== KEYFRAME DEFINITIONS ========== */

/* Floating Animation - Lévitation douce */
@keyframes floatingAnimation {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Glow Pulse Animation - Respiration lumineuse */
@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(212, 175, 55, 0.3), 0 0 40px rgba(13, 93, 159, 0.1);
    }
    50% {
        box-shadow: 0 0 40px rgba(212, 175, 55, 0.6), 0 0 80px rgba(13, 93, 159, 0.3);
    }
}

/* Shimmer Animation - Effet scintillant */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* Gradient Shift Animation - Dégradé animé */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Slide In From Left */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Slide In From Right */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Slide In From Bottom */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(100px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Slide Down Animation */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade In Zoom - Zoom en + fondu */
@keyframes fadeInZoom {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Rotate Entrance - Rotation entrée */
@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-10deg) scale(0.9);
    }
    to {
        opacity: 1;
        transform: rotate(0) scale(1);
    }
}

/* Bounce Animation - Rebond */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Pulse Animation - Impulsion */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Wave Animation - Mouvement vague */
@keyframes wave {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(25deg);
    }
    75% {
        transform: rotate(-25deg);
    }
}

/* Gradient Border Animation - Bordure dégradée animée */
@keyframes gradientBorder {
    0% {
        border-color: #0d5d9f;
    }
    50% {
        border-color: #d4af37;
    }
    100% {
        border-color: #0d5d9f;
    }
}

/* Float Icon Animation - Icône flottante */
@keyframes floatIcon {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-15px) rotate(5deg);
    }
}

/* Neon Glow - Lueur néon */
@keyframes neonGlow {
    0%, 100% {
        text-shadow: 0 0 10px #d4af37, 0 0 20px #0d5d9f;
    }
    50% {
        text-shadow: 0 0 20px #d4af37, 0 0 40px #0d5d9f, 0 0 60px #d4af37;
    }
}

/* Background Slide - Dégradé de fond */
@keyframes bgSlide {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Orbit Animation - Animation orbitale */
@keyframes orbit {
    from {
        transform: rotate(0deg) translateX(50px) rotate(0deg);
    }
    to {
        transform: rotate(360deg) translateX(50px) rotate(-360deg);
    }
}

/* Spin Loader - Chargement rotatif */
@keyframes spinLoader {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Typing Effect - Effet de frappe */
@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

/* Expand Animation - Expansion */
@keyframes expand {
    from {
        transform: scale(0.95);
        opacity: 0.8;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Flip Animation - Retournement */
@keyframes flip {
    0% {
        transform: rotateY(0deg);
    }
    100% {
        transform: rotateY(360deg);
    }
}

/* Swing Animation - Balancement */
@keyframes swing {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(5deg);
    }
    75% {
        transform: rotate(-5deg);
    }
}

/* ========== APPLY ANIMATIONS ========== */

/* HERO SECTION */
.hero-content {
    animation: slideInUp 0.8s ease-out;
}

.hero-subtitle {
    animation: fadeInZoom 0.6s ease-out 0.2s both;
}

.hero-title {
    animation: slideInUp 0.8s ease-out 0.4s both;
    letter-spacing: 2px;
}

.hero-tagline {
    animation: fadeInZoom 0.6s ease-out 0.6s both;
}

.welcome-message {
    animation: slideInUp 0.8s ease-out 0.8s both !important;
}

/* SECTION HEADERS */
.section-header {
    animation: slideInUp 0.7s ease-out;
}

.section-subtitle {
    animation: fadeInZoom 0.6s ease-out 0.2s both;
}

.section-title {
    animation: slideInUp 0.7s ease-out 0.3s both;
}

.section-description {
    animation: fadeInZoom 0.6s ease-out 0.4s both;
}

/* SERVICE CARDS - Animations échelonnées */
.service-card {
    animation: fadeInZoom 0.6s ease-out;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.service-card:nth-child(1) { animation-delay: 0.1s; }
.service-card:nth-child(2) { animation-delay: 0.2s; }
.service-card:nth-child(3) { animation-delay: 0.3s; }
.service-card:nth-child(4) { animation-delay: 0.4s; }
.service-card:nth-child(5) { animation-delay: 0.5s; }

.service-card:hover {
    animation: floatingAnimation 3s ease-in-out infinite;
    box-shadow: 0 20px 50px rgba(13, 93, 159, 0.3) !important;
}

.service-icon {
    animation: floatIcon 3s ease-in-out infinite;
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    animation: rotateIn 0.6s ease-out;
    color: #d4af37;
}

.service-card:hover .service-title {
    animation: pulse 1.5s ease-in-out infinite;
}

/* TARGET CARDS */
.target-card {
    animation: slideInUp 0.7s ease-out;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.target-card:nth-child(1) { animation-delay: 0.2s; }
.target-card:nth-child(2) { animation-delay: 0.4s; }

.target-card:hover {
    animation: floatingAnimation 3s ease-in-out infinite;
}

.target-card:hover .target-card-bg {
    animation: zoom 0.6s ease-out;
}

@keyframes zoom {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(1.1);
    }
}

/* ACCORDION ITEMS */
.accordion-item {
    animation: slideInUp 0.6s ease-out;
}

.accordion-item:nth-child(1) { animation-delay: 0.1s; }
.accordion-item:nth-child(2) { animation-delay: 0.2s; }
.accordion-item:nth-child(3) { animation-delay: 0.3s; }
.accordion-item:nth-child(4) { animation-delay: 0.4s; }
.accordion-item:nth-child(5) { animation-delay: 0.5s; }

.accordion-header:hover {
    animation: pulse 1.5s ease-in-out infinite;
}

.accordion-header:hover {
    background: linear-gradient(135deg, rgba(13, 93, 159, 0.15) 0%, rgba(212, 175, 55, 0.15) 100%) !important;
}

/* BUTTONS */
.btn {
    animation: fadeInZoom 0.6s ease-out;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    z-index: -1;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary:hover {
    animation: glow 0.4s ease-out;
}

@keyframes glow {
    0% {
        box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
    }
    100% {
        box-shadow: 0 0 20px rgba(212, 175, 55, 0.8);
    }
}

/* CONTACT CARDS */
.contact-card {
    animation: slideInUp 0.6s ease-out;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.contact-card:nth-child(1) { animation-delay: 0.1s; }
.contact-card:nth-child(2) { animation-delay: 0.2s; }
.contact-card:nth-child(3) { animation-delay: 0.3s; }
.contact-card:nth-child(4) { animation-delay: 0.4s; }

.contact-card-icon {
    animation: floatIcon 3s ease-in-out infinite;
    transition: all 0.3s ease;
}

.contact-card:hover .contact-card-icon {
    animation: bounce 0.6s ease-out;
    color: #d4af37;
}

.contact-card:hover {
    animation: floatingAnimation 2.5s ease-in-out infinite;
}

/* FOOTER */
.footer-section {
    animation: slideInUp 0.6s ease-out;
}

.footer-section:nth-child(1) { animation-delay: 0.1s; }
.footer-section:nth-child(2) { animation-delay: 0.2s; }
.footer-section:nth-child(3) { animation-delay: 0.3s; }
.footer-section:nth-child(4) { animation-delay: 0.4s; }

/* MODAL ANIMATIONS */
.modal-overlay.active .modal-content,
.modal-contact-overlay.active .modal-contact-content {
    animation: slideInUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* TOP BAR */
.top-bar {
    animation: slideInDown 0.6s ease-out;
}

/* NAVIGATION */
.main-nav {
    animation: slideInDown 0.6s ease-out 0.2s both;
}

.main-menu li {
    animation: fadeInZoom 0.4s ease-out;
}

.main-menu li:nth-child(1) { animation-delay: 0.3s; }
.main-menu li:nth-child(2) { animation-delay: 0.35s; }
.main-menu li:nth-child(3) { animation-delay: 0.4s; }
.main-menu li:nth-child(4) { animation-delay: 0.45s; }
.main-menu li:nth-child(5) { animation-delay: 0.5s; }

.main-menu a {
    position: relative;
}

.main-menu a::before {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #0d5d9f, #d4af37);
    transition: width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.main-menu a:hover::before,
.main-menu a:active::before {
    width: 100%;
}

/* CAROUSEL SLIDES */
.carousel-slide.fade {
    animation: fade 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fade {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* CONTACT OPTIONS */
.contact-option {
    animation: slideInUp 0.5s ease-out;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.contact-option:nth-child(1) { animation-delay: 0.1s; }
.contact-option:nth-child(2) { animation-delay: 0.2s; }
.contact-option:nth-child(3) { animation-delay: 0.3s; }
.contact-option:nth-child(4) { animation-delay: 0.4s; }

.contact-option:hover {
    animation: floatingAnimation 2s ease-in-out infinite;
    transform: translateX(5px) !important;
}

/* WHATSAPP BUTTON */
.whatsapp-float {
    animation: bounce 2s ease-in-out infinite;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    transition: all 0.3s ease;
}

.whatsapp-float:hover {
    animation: bounce 1.2s ease-in-out infinite;
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.6);
}

/* SERVICE LIST ITEMS */
.service-list-item {
    animation: slideInUp 0.5s ease-out;
    transition: all 0.3s ease;
}

.service-list-item:nth-child(1) { animation-delay: 0.05s; }
.service-list-item:nth-child(2) { animation-delay: 0.1s; }
.service-list-item:nth-child(3) { animation-delay: 0.15s; }
.service-list-item:nth-child(4) { animation-delay: 0.2s; }
.service-list-item:nth-child(5) { animation-delay: 0.25s; }
.service-list-item:nth-child(6) { animation-delay: 0.3s; }

.service-list-item:hover {
    animation: swing 0.6s ease-in-out;
}

.service-list-item:hover i {
    animation: rotateIn 0.5s ease-out;
    color: #0d5d9f;
}

/* SPINNER LOADER */
.fa-spinner {
    animation: spinLoader 0.8s linear infinite;
}

/* SOCIAL ICONS */
.social-icon {
    animation: fadeInZoom 0.6s ease-out;
    transition: all 0.3s ease;
}

.social-icon:hover {
    animation: bounce 0.6s ease-out;
    transform: scale(1.2);
}

.footer-social a {
    animation: fadeInZoom 0.6s ease-out;
    transition: all 0.3s ease;
}

.footer-social a:hover {
    animation: bounce 0.6s ease-out;
    transform: translateY(-5px) scale(1.15);
}

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

/* Ripple Effect on Buttons */
@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

.btn:active::after {
    animation: ripple 0.6s ease-out;
}

/* Smooth Color Transition */
.service-title {
    transition: color 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.service-card:hover .service-title {
    color: #0d5d9f;
}

/* Enhanced Form Focus */
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    animation: glowPulse 1.5s ease-in-out infinite;
}

/* ========== SPECIAL EFFECTS ========== */

/* Hero Slide Entrance */
.hero-slide.active {
    animation: fadeInZoom 1.5s ease-out;
}

/* About Text Animation */
.about-text h3 {
    animation: slideInLeft 0.7s ease-out;
}

.about-text p {
    animation: slideInLeft 0.7s ease-out;
}

/* Video Section Animation */
.video-header h2 {
    animation: slideInUp 0.6s ease-out 0.2s both;
}

.video-header p {
    animation: slideInUp 0.6s ease-out 0.4s both;
}

.video-wrapper {
    animation: slideInUp 0.7s ease-out 0.5s both;
}

/* ========== PERFORMANCE OPTIMIZATION ========== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Disable animations on mobile for performance */
@media (max-width: 768px) {
    .service-card:hover {
        animation: none;
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15) !important;
    }

    .target-card:hover {
        animation: none;
    }

    .contact-option:hover {
        animation: none;
        transform: translateX(5px) !important;
    }

    .whatsapp-float {
        animation: none;
    }
}

/* ========== SCROLL ANIMATIONS (optional - requiert JavaScript) ========== */

.scroll-animate {
    opacity: 0;
    transform: translateY(50px);
    animation: slideInUp 0.7s ease-out forwards;
}

/* Light Theme Variants */
.dark-theme .service-card:hover .service-icon {
    color: #d4af37;
}

/* ========== SPECIAL TEXT ANIMATIONS ========== */

.highlight-text {
    background: linear-gradient(90deg, #0d5d9f, #d4af37);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
}

/* ========== FINAL TOUCHES ========== */

/* Smooth transitions everywhere */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Optimize animations on mobile */
@supports (animation-timeline: view()) {
    .service-card {
        animation: slideInUp 0.6s ease-out both;
        animation-timeline: view();
        animation-range: entry 0% cover 30%;
    }
}
