/* =====================================
   BARRYTECH - ANIMATIONS MODERNES
   Fichier CSS pour animations "WOW"
   ==================================== */

/* Variables CSS pour cohérence */
:root {
    --primary-color: #00a8ff;
    --secondary-color: #ff6b6b;
    --accent-color: #4ecdc4;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --transition-fast: 0.3s ease;
    --transition-medium: 0.5s ease;
    --transition-slow: 0.8s ease;
    --shadow-sm: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.15);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.2);
}

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

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

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(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 shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* =====================================
   CLASSES D'ANIMATION WOW
   ==================================== */

.wow-fadeInUp {
    animation: fadeInUp 0.8s ease-out;
}

.wow-fadeInDown {
    animation: fadeInDown 0.8s ease-out;
}

.wow-fadeInLeft {
    animation: fadeInLeft 0.8s ease-out;
}

.wow-fadeInRight {
    animation: fadeInRight 0.8s ease-out;
}

.wow-zoomIn {
    animation: zoomIn 0.6s ease-out;
}

.wow-slideInRight {
    animation: slideInRight 0.8s ease-out;
}

/* Éléments cachés par défaut pour animation au scroll */
.animate-on-scroll {
    opacity: 0;
    transition: all 0.8s ease-out;
}

.animate-on-scroll.animated {
    opacity: 1;
}

/* =====================================
   EFFETS HOVER AVANCÉS
   ==================================== */

/* Cards avec effet 3D au hover */
.card-3d {
    transition: all var(--transition-medium);
    transform-style: preserve-3d;
    perspective: 1000px;
}

.card-3d:hover {
    transform: translateY(-10px) rotateX(5deg);
    box-shadow: var(--shadow-lg);
}

/* Effet de brillance au survol */
.shine-effect {
    position: relative;
    overflow: hidden;
}

.shine-effect::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.shine-effect:hover::before {
    left: 100%;
}

/* Bouton avec effet de vague */
.btn-wave {
    position: relative;
    overflow: hidden;
    transition: all var(--transition-fast);
}

.btn-wave::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-wave:hover::after {
    width: 300px;
    height: 300px;
}

/* Image avec zoom au hover */
.img-zoom {
    overflow: hidden;
    transition: all var(--transition-medium);
}

.img-zoom img {
    transition: transform var(--transition-slow);
}

.img-zoom:hover img {
    transform: scale(1.1);
}

/* =====================================
   HEADER ANIMATIONS
   ==================================== */

.header {
    transition: all var(--transition-fast);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header.sticky {
    animation: slideInDown 0.5s ease-out;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
}

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

/* Menu avec effet de ligne animée */
.nav-menu-item {
    position: relative;
    transition: color var(--transition-fast);
}

.nav-menu-item::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width var(--transition-medium);
}

.nav-menu-item:hover::after,
.nav-menu-item.active::after {
    width: 100%;
}

/* =====================================
   SLIDER ANIMATIONS
   ==================================== */

.single-slider .text {
    animation: fadeInUp 1s ease-out 0.3s both;
}

.single-slider .text h1 {
    animation: fadeInDown 1s ease-out 0.5s both;
}

.single-slider .text p {
    animation: fadeInUp 1s ease-out 0.7s both;
}

.single-slider .button {
    animation: fadeInUp 1s ease-out 0.9s both;
}

/* Optimisation slider pour visibilité sans scroll */
.slider .single-slider {
    height: 65vh !important;
    min-height: 450px !important;
    max-height: 500px !important;
}

.slider .single-slider .text {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* =====================================
   CARDS & SERVICES
   ==================================== */

.single-schedule,
.single-features,
.single-table {
    transition: all var(--transition-medium);
    position: relative;
    overflow: hidden;
}

.single-schedule::before,
.single-features::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0,168,255,0.1), transparent);
    transition: left 0.6s;
}

.single-schedule:hover::before,
.single-features:hover::before {
    left: 100%;
}

.single-schedule:hover,
.single-features:hover,
.single-table:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-lg);
}

.single-schedule .icon,
.single-features .signle-icon {
    transition: all var(--transition-medium);
}

.single-schedule:hover .icon,
.single-features:hover .signle-icon {
    transform: scale(1.2) rotate(5deg);
    animation: pulse 1s infinite;
}

/* =====================================
   PARTNERS/CAROUSEL
   ==================================== */

.single-clients {
    transition: all var(--transition-medium);
    filter: grayscale(100%);
    opacity: 0.7;
}

.single-clients:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}

/* =====================================
   BUTTONS ANIMATIONS
   ==================================== */

.btn {
    position: relative;
    overflow: hidden;
    transition: all var(--transition-fast);
    border-radius: 0 !important;
    padding: 12px 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.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;
}

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

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.btn:active {
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border: none;
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
}

/* =====================================
   LOADING ANIMATIONS
   ==================================== */

.loader {
    border: 4px solid var(--light-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: rotate 1s linear infinite;
}

/* =====================================
   SCROLL ANIMATIONS
   ==================================== */

.scroll-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* =====================================
   MODAL ANIMATIONS
   ==================================== */

.modal.fade .modal-dialog {
    transform: scale(0.8) translateY(-50px);
    transition: all var(--transition-medium);
}

.modal.show .modal-dialog {
    transform: scale(1) translateY(0);
    animation: zoomIn 0.3s ease-out;
}

/* =====================================
   FOOTER ANIMATIONS
   ==================================== */

.footer .social li {
    transition: all var(--transition-fast);
}

.footer .social li:hover {
    transform: translateY(-5px) scale(1.2);
}

.footer .social li a {
    transition: all var(--transition-fast);
}

.footer .social li:hover a {
    color: var(--primary-color);
    box-shadow: 0 5px 15px rgba(0,168,255,0.3);
}

/* =====================================
   CART ANIMATIONS
   ==================================== */

#cart-count {
    animation: pulse 1s infinite;
}

.cart-item-enter {
    animation: slideInRight 0.5s ease-out;
}

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

@media (max-width: 768px) {
    .animate-on-scroll {
        opacity: 1; /* Désactiver les animations sur mobile pour performance */
    }
    
    .card-3d:hover {
        transform: none;
    }
}

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

.will-animate {
    will-change: transform, opacity;
}

/* Réduire les animations pour les utilisateurs qui préfèrent moins de mouvement */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* =====================================
   AMÉLIORATIONS DESIGN GLOBALES
   ==================================== */

/* Amélioration du header sticky */
.header.sticky {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95) !important;
}

/* Amélioration des boutons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    border: none;
    position: relative;
    overflow: hidden;
    border-radius: 0 !important;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--primary-color) 100%);
    transform: translateY(-2px);
}

/* Boutons du header sans border-radius - TRÈS SPÉCIFIQUE */
.header .get-quote .btn,
.header .get-quote .btn-primary,
.header .get-quote .btn-outline-primary,
.header .get-quote .btn-wave,
.header .get-quote button.btn,
.header .get-quote a.btn,
.get-quote .btn.btn-outline-primary,
.get-quote .btn.btn-primary,
button.btn.btn-outline-primary.btn-wave,
a.btn.btn-primary.btn-wave {
    border-radius: 0 !important;
    -webkit-border-radius: 0 !important;
    -moz-border-radius: 0 !important;
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

/* Amélioration des cartes */
.card, .single-schedule, .single-features {
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover, .single-schedule:hover, .single-features:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Amélioration des sections */
.section-title h2 {
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

/* Effet de glassmorphism pour les modals */
.modal-content {
    border-radius: 20px;
    border: none;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Amélioration du footer */
.footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="%23ffffff" fill-opacity="0.05"><path d="M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z"/></g></g></svg>');
    opacity: 0.3;
    z-index: 0;
}

.footer > * {
    position: relative;
    z-index: 1;
}

/* Animation du logo */
.logo img {
    transition: transform 0.3s ease;
}

.logo:hover img {
    transform: scale(1.1) rotate(5deg);
}

/* Scrollbar personnalisée */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-color), var(--accent-color));
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--accent-color), var(--primary-color));
}

/* =====================================
   NOUVELLES ANIMATIONS WOW ! 🎉
   ==================================== */

/* Effet hover spécial pour les cartes produit */
.card-hover-effect {
    transform: translateY(-15px) scale(1.03) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25) !important;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.card-hover-effect .card-img-top {
    transform: scale(1.1) !important;
    transition: transform 0.4s ease-out !important;
}

/* Animation pulse pour les boutons CTA */
@keyframes pulse-effect-animation {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(0, 168, 255, 0.7);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(0, 168, 255, 0);
    }
}

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

/* Animation shake améliorée */
@keyframes shake-enhanced {
    0%, 100% { transform: translateX(0) rotate(0deg); }
    10% { transform: translateX(-10px) rotate(-2deg); }
    20% { transform: translateX(10px) rotate(2deg); }
    30% { transform: translateX(-10px) rotate(-2deg); }
    40% { transform: translateX(10px) rotate(2deg); }
    50% { transform: translateX(-5px) rotate(-1deg); }
    60% { transform: translateX(5px) rotate(1deg); }
    70% { transform: translateX(-5px) rotate(-1deg); }
    80% { transform: translateX(5px) rotate(1deg); }
    90% { transform: translateX(-2px) rotate(0deg); }
}

.shake {
    animation: shake-enhanced 0.5s ease-in-out !important;
}

/* Animation fade-in pour le header */
@keyframes headerFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header-fade-in {
    animation: headerFadeIn 0.6s ease-out !important;
}

/* Animation pour les icônes */
.icon-bounce {
    animation: bounceIcon 0.6s ease-in-out !important;
}

@keyframes bounceIcon {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-10px) scale(1.1); }
}

/* Animation de zoom pour les modals */
.modal-zoom-in {
    animation: modalZoomIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

@keyframes modalZoomIn {
    from {
        opacity: 0;
        transform: scale(0.7) translateY(-50px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Animation de click sur les boutons */
.btn.clicked {
    animation: buttonClick 0.3s ease-out !important;
}

@keyframes buttonClick {
    0% { transform: scale(1); }
    50% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

/* Animation stagger pour les listes */
.footer ul li.animated,
.single-features.animated {
    animation: fadeInUp 0.6s ease-out both;
}

/* Amélioration des transitions globales */
* {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Performance : utiliser will-change pour les animations */
.card-3d,
.btn,
.single-features,
.single-schedule {
    will-change: transform, opacity;
}

/* Désactiver will-change après l'animation pour la performance */
.card-3d:not(:hover),
.btn:not(:hover) {
    will-change: auto;
}

