/* Styles personnalisés */
:root {
    --primary-blue: #1a56db;
    --secondary-blue: #3b82f6;
    --primary-yellow: #f59e0b;
    --secondary-yellow: #fbbf24;
    --primary-gray: #4b5563;
    --secondary-gray: #9ca3af;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Animation pour les éléments au survol */
.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

/* Animation pour le bouton de retour en haut */
#back-to-top {
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
    opacity: 0;
    visibility: hidden;
}

#back-to-top.show {
    opacity: 1;
    visibility: visible;
}

/* Animation pour le menu de navigation */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--primary-blue);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Animation pour les cartes de services */
.service-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Animation pour les icônes */
.icon-animate {
    transition: transform 0.3s ease;
}

.icon-animate:hover {
    transform: rotate(10deg);
}

/* Animation pour le formulaire de contact */
.form-input {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

/* Animation pour les boutons */
.btn-animate {
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.btn-animate:hover {
    transform: translateY(-3px);
}

/* Animation pour le header au défilement */
.header-scroll {
    transition: padding 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Animation pour les sections */
.section-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.section-animate.show {
    opacity: 1;
    transform: translateY(0);
}

/* Styles pour les sections avec fond en dégradé */
.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
}

.bg-gradient-secondary {
    background: linear-gradient(135deg, var(--primary-yellow), var(--secondary-yellow));
}

/* Styles pour les cartes avec effet de survol */
.card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Styles pour les images avec effet de zoom au survol */
.img-zoom {
    overflow: hidden;
}

.img-zoom img {
    transition: transform 0.5s ease;
}

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

/* Styles pour les boutons avec effet de pulsation */
.btn-pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}

/* Styles pour les textes avec effet de dégradé */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    -webkit-background-clip: text;
    color: transparent;
    background-clip: text;
}

/* Styles pour les bordures avec animation */
.border-animate {
    position: relative;
}

.border-animate::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-yellow);
    transition: width 0.3s ease;
}

.border-animate:hover::after {
    width: 100%;
}

/* Styles pour les listes avec animation */
.list-animate li {
    transition: transform 0.3s ease;
}

.list-animate li:hover {
    transform: translateX(5px);
}

/* Animation de chargement */
.loader {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 4px solid var(--primary-blue);
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Animation pour les compteurs */
.counter {
    animation: count 2s ease-out forwards;
}

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

/* Animation pour les témoignages */
.testimonial-slide {
    animation: slide 15s infinite;
}

@keyframes slide {
    0%, 25% {
        transform: translateX(0);
    }
    30%, 55% {
        transform: translateX(-100%);
    }
    60%, 85% {
        transform: translateX(-200%);
    }
    90%, 100% {
        transform: translateX(0);
    }
}

/* Styles pour le menu mobile */
.mobile-menu-enter {
    opacity: 0;
    transform: translateY(-10px);
}

.mobile-menu-enter-active {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s, transform 0.3s;
}

.mobile-menu-exit {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu-exit-active {
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s, transform 0.3s;
}

/* Styles responsives */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .text-4xl {
        font-size: 2rem;
    }
    
    .text-5xl {
        font-size: 2.5rem;
    }
    
    /* Ajout de styles responsifs pour améliorer l'affichage mobile */
    #accueil .flex-col {
        text-align: center;
    }
    
    .grid {
        gap: 1.5rem;
    }
}

/* Animation d'apparition progressive */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.show {
    opacity: 1;
    transform: translateY(0);
}

/* Styles pour les notifications toast */
.toast {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    max-width: 400px;
    padding: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.toast.show {
    transform: translateX(0);
}

/* Styles pour le mode sombre */
.dark {
    background-color: #1a202c;
    color: #e2e8f0;
}

.dark .bg-white {
    background-color: #2d3748;
}

.dark .text-gray-800 {
    color: #e2e8f0;
}

.dark .text-gray-600 {
    color: #a0aec0;
}

.dark .bg-gray-100 {
    background-color: #2d3748;
}

.dark .bg-gray-50 {
    background-color: #374151;
}

/* Animation pour les barres de progression */
.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-blue), var(--secondary-blue));
    width: 0%;
    transition: width 2s ease;
    border-radius: 4px;
}

/* Styles pour les modales */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 0.5rem;
    max-width: 500px;
    width: 90%;
    max-height: 90%;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: scale(1);
}

/* Styles pour les onglets */
.tab-button {
    padding: 0.75rem 1.5rem;
    border: none;
    background-color: #e5e7eb;
    color: #374151;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 0.5rem 0.5rem 0 0;
}

.tab-button.active {
    background-color: var(--primary-blue);
    color: white;
}

.tab-content {
    padding: 2rem;
    background-color: white;
    border-radius: 0 0.5rem 0.5rem 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Styles pour le carousel */
.carousel {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
}

.carousel-slide {
    width: 100%;
    transition: transform 0.5s ease;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background-color 0.3s ease;
}

.carousel-nav:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

.carousel-prev {
    left: 1rem;
}

.carousel-next {
    right: 1rem;
}

/* Animation pour les éléments au scroll */
@keyframes slideInFromLeft {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

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

@keyframes slideInFromBottom {
    0% {
        transform: translateY(100%);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

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

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

.slide-in-bottom {
    animation: slideInFromBottom 0.8s ease forwards;
}

/* Styles pour les tooltips */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 120px;
    background-color: #555;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px 0;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Styles pour les badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-primary {
    background-color: var(--primary-blue);
    color: white;
}

.badge-secondary {
    background-color: var(--primary-yellow);
    color: var(--primary-blue);
}

/* Styles pour les alertes */
.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #d1fae5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.alert-error {
    background-color: #fee2e2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.alert-warning {
    background-color: #fef3c7;
    border: 1px solid #fde68a;
    color: #92400e;
}

.alert-info {
    background-color: #dbeafe;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

/* Améliorations pour l'accessibilité */
:focus {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
}

/* Améliorations pour la performance */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Améliorations pour la section hero */
#accueil {
    position: relative;
    background-size: cover;
    background-position: center;
}

/* Améliorations pour les cartes de services */
#services .bg-white {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#services .bg-white:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Améliorations pour le formulaire de contact */
#contact input, 
#contact textarea {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#contact input:focus, 
#contact textarea:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

/* Améliorations pour le footer */
footer a {
    transition: color 0.3s ease;
}

/* Améliorations pour les performances mobiles */
@media (max-width: 640px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    #accueil {
        padding-top: 6rem;
        padding-bottom: 3rem;
    }
    
    .text-4xl {
        font-size: 1.875rem;
    }
    
    .text-5xl {
        font-size: 2.25rem;
    }
    
    .grid {
        gap: 1rem;
    }
}