:root {
    /* Couleurs extraites du logo Kayra */
    --primary-color: #2B7A8B;     /* Bleu-vert principal du logo */
    --secondary-color: #7CB342;   /* Vert du K */
    --accent-color: #FF8A00;      /* Orange du K */
    --success-color: #7CB342;     /* Vert pour succès */
    --warning-color: #FF8A00;     /* Orange pour avertissements */
    --error-color: #dc3545;       /* Rouge standard */
    --dark-color: #1f2937;        /* Gris foncé */
    --light-color: #f8fafc;       /* Gris très clair */
    --teal-light: #E0F2F1;        /* Teal très clair */
    --green-light: #F1F8E9;       /* Vert très clair */
    --orange-light: #FFF3E0;      /* Orange très clair */
    
    /* Variables pour les animations */
    --transition-fast: 0.2s ease-out;
    --transition-normal: 0.3s ease-out;
    --transition-slow: 0.5s ease-out;
    --shadow-light: 0 2px 8px rgba(43, 122, 139, 0.1);
    --shadow-medium: 0 8px 25px rgba(43, 122, 139, 0.15);
    --shadow-heavy: 0 20px 40px rgba(43, 122, 139, 0.2);
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Animations d'apparition */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

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

/* Classes d'animation */
.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

.animate-fade-in-left {
    animation: fadeInLeft 0.6s ease-out forwards;
}

.animate-fade-in-right {
    animation: fadeInRight 0.6s ease-out forwards;
}

.animate-scale-in {
    animation: scaleIn 0.4s ease-out forwards;
}

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

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

/* Délais d'animation pour les éléments en séquence */
.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }
.animate-delay-5 { animation-delay: 0.5s; }

/* Navigation */
.navbar {
    transition: all var(--transition-normal);
    background: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.navbar.scrolled {
    box-shadow: var(--shadow-medium);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: all var(--transition-normal);
    position: relative;
    padding: 12px 16px !important;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary-color) !important;
}

.navbar-nav .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
}

/* Mega Menu Styles - Simplifié et lisible */
.mega-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(43, 122, 139, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    padding: 25px;
    margin-top: 10px;
}

.navbar-nav .dropdown:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.mega-menu-content {
    width: 100%;
}

.mega-menu-category {
    margin-bottom: 20px;
}

.mega-menu-category h5 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 12px;
    font-size: 1rem;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 6px;
    display: flex;
    align-items: center;
}

.mega-menu-category h5 i {
    margin-right: 8px;
    color: var(--accent-color);
}

.mega-menu-item {
    display: block;
    padding: 8px 12px;
    color: #495057;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    border-radius: 6px;
    margin-bottom: 2px;
}

.mega-menu-item:hover {
    color: var(--primary-color);
    background: var(--teal-light);
    text-decoration: none;
    transform: translateX(3px);
}

.mega-menu-item i {
    margin-right: 8px;
    width: 16px;
    color: var(--secondary-color);
    font-size: 0.8rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    font-weight: 500;
    padding: 12px 30px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(43, 122, 139, 0.3);
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 500;
    padding: 12px 30px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.gradient-bg {
    background: linear-gradient(135deg, var(--teal-light) 0%, #ffffff 50%, var(--green-light) 100%);
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.card {
    border: none;
    border-radius: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(43, 122, 139, 0.1);
}

.service-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.stats-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(43, 122, 139, 0.1);
}

.stats-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.hero-section {
    background: linear-gradient(135deg, var(--teal-light) 0%, #ffffff 50%, var(--green-light) 100%);
    padding: 100px 0;
}

.section-padding {
    padding: 80px 0;
}

/* Hero Slider Styles */
.hero-slider {
    position: relative;
    height: 500px;
    overflow: hidden;
    border-radius: 0 0 20px 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.hero-slider .carousel-item {
    height: 500px;
    position: relative;
}

.hero-slider .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7);
}

.hero-slider .carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    padding: 40px;
}

.hero-slider .slide-content {
    max-width: 800px;
    animation: fadeInUp 0.8s ease-out;
}

.hero-slider .slide-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-slider .slide-subtitle {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    opacity: 0.95;
}

.hero-slider .slide-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-slider .slide-btn {
    background: var(--accent-color);
    border: none;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
    text-decoration: none;
    color: white;
    display: inline-block;
}

.hero-slider .slide-btn:hover {
    background: #e67e00;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 138, 0, 0.4);
    color: white;
}

.hero-slider .carousel-control-prev,
.hero-slider .carousel-control-next {
    width: 60px;
    height: 60px;
    background: rgba(43, 122, 139, 0.8);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.hero-slider .carousel-control-prev {
    left: 30px;
}

.hero-slider .carousel-control-next {
    right: 30px;
}

.hero-slider .carousel-control-prev:hover,
.hero-slider .carousel-control-next:hover {
    background: var(--primary-color);
    border-color: var(--accent-color);
}

.hero-slider .carousel-indicators {
    bottom: 30px;
    margin: 0;
}

.hero-slider .carousel-indicators button {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    margin: 0 8px;
    background-color: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

.hero-slider .carousel-indicators button.active {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    transform: scale(1.2);
}

/* Couleurs spécifiques pour les badges */
.badge.bg-success {
    background-color: var(--secondary-color) !important;
}

.badge.bg-primary {
    background-color: var(--primary-color) !important;
}

.badge.bg-warning {
    background-color: var(--accent-color) !important;
}

/* Couleurs pour les icônes et éléments décoratifs */
.text-primary {
    color: var(--primary-color) !important;
}

.text-success {
    color: var(--secondary-color) !important;
}

.text-warning {
    color: var(--accent-color) !important;
}

/* Footer */
.bg-dark {
    background: #1a1a1a !important;
}

.footer-text {
    color: #ffffff !important;
}

.footer-link {
    color: #e9ecef !important;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--accent-color) !important;
    text-decoration: none;
}

.footer-heading {
    color: #ffffff !important;
    font-weight: 600;
}

.footer-icon {
    color: var(--accent-color) !important;
}

/* Animations au scroll */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* Effet de zoom sur les images */
.hover-zoom {
    overflow: hidden;
    border-radius: 8px;
}

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

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

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fff;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.preloader-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(43, 122, 139, 0.2);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s linear infinite;
}

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

/* Responsive */
@media (max-width: 768px) {
    .hero-section {
        padding: 60px 0;
    }
    .section-padding {
        padding: 60px 0;
    }
    .hero-slider {
        height: 350px;
    }
    .hero-slider .carousel-item {
        height: 350px;
    }
    .hero-slider .slide-title {
        font-size: 2rem;
    }
    .hero-slider .slide-subtitle {
        font-size: 1.2rem;
    }
    .hero-slider .slide-description {
        font-size: 1rem;
    }
    .hero-slider .carousel-control-prev,
    .hero-slider .carousel-control-next {
        width: 45px;
        height: 45px;
    }
    .hero-slider .carousel-control-prev {
        left: 15px;
    }
    .hero-slider .carousel-control-next {
        right: 15px;
    }
    .mega-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        padding: 20px;
        width: 100%;
        margin-top: 0;
    }
}

/* Animations optimisées pour les performances */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}