/* Variables CSS - Couleurs KADGIM */
:root {
    /* Couleurs principales KADGIM */
    --bs-primary: #2E5AA8;
    --bs-primary-rgb: 46, 90, 168;
    --bs-secondary: #7A7A7A;
    --bs-secondary-rgb: 122, 122, 122;
    --bs-success: #198754;
    --bs-info: #0dcaf0;
    --bs-warning: #ffc107;
    --bs-danger: #dc3545;
    --bs-light: #f8f9fa;
    --bs-dark: #212529;
    
    /* Couleurs personnalisées KADGIM */
    --kadgim-primary: #2E5AA8;
    --kadgim-primary-dark: #1E4088;
    --kadgim-primary-light: #4A7BC8;
    --kadgim-secondary: #7A7A7A;
    --kadgim-accent: #E8F4FD;
    --kadgim-gray: #7A7A7A;
    --kadgim-light-blue: #E8F4FD;
    --kadgim-warm: #fef3c7;
    --kadgim-cool: #e0f2fe;
    --kadgim-dark-blue: #1a365d;
    
    /* Opacités personnalisées */
    --bs-white-75: rgba(255, 255, 255, 0.75);
    --bs-white-50: rgba(255, 255, 255, 0.5);
    --bs-white-25: rgba(255, 255, 255, 0.25);

    /* Couleurs principales KADGIM */
    --primary-color: #2E5AA8;
    --primary-dark: #1E4088;
    --primary-light: #4A7BC8;
    --secondary-color: #7A7A7A;
    --accent-color: #E8F4FD;
    
    /* Couleurs système */
    --success-color: #198754;
    --info-color: #0dcaf0;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --white: #ffffff;
    
    /* Nuances de gris KADGIM */
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #7A7A7A;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    
    /* Couleurs spécifiques KADGIM */
    --kadgim-blue: #2E5AA8;
    --kadgim-gray: #7A7A7A;
    --kadgim-light-blue: #E8F4FD;
}

/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--gray-700);
    overflow-x: hidden;
}

/* Navigation */
.navbar {
    background: var(--kadgim-dark-blue) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: white !important;
}

.logo-img {
    height: 45px;
    width: auto;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.navbar-brand:hover .logo-img {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
    color: #a0aec0 !important;
}

.navbar-nav .nav-link:hover {
    color: white !important;
}

.navbar-nav .nav-link.active {
    color: white !important;
}

.navbar-nav .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 2px;
    background-color: white;
}

/* Dropdown amélioré */
.dropdown-menu {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(30, 58, 138, 0.1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    padding: 0.5rem 0;
}

.dropdown-item {
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    border-radius: 8px;
    margin: 0 0.5rem;
    font-weight: 500;
}

.dropdown-item:hover {
    background: linear-gradient(135deg, var(--kadgim-accent), var(--kadgim-cool));
    transform: translateX(5px);
    color: var(--kadgim-primary) !important;
}

.dropdown-item.active {
    background: linear-gradient(135deg, var(--kadgim-primary), var(--kadgim-primary-light));
    color: white !important;
}

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
}

.hero-carousel {
    height: 100vh;
}

.hero-carousel .carousel-item {
    height: 100vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
}

.hero-carousel .carousel-item.slide-deco {
    background-image: url('../logo/deco.jpg');
}

.hero-carousel .carousel-item.slide-location {
    background-image: url('../logo/location.jpg');
}

.hero-carousel .carousel-item.slide-renovation {
    background-image: url('../logo/renovation.jpg');
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(46, 90, 168, 0.4) 0%, rgba(30, 64, 136, 0.5) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: left;
}

.hero-carousel .carousel-control-prev,
.hero-carousel .carousel-control-next {
    width: 60px;
    height: 60px;
    background: rgba(46, 90, 168, 0.8);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    margin: 0 2rem;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.hero-carousel .carousel-control-prev:hover,
.hero-carousel .carousel-control-next:hover {
    opacity: 1;
    background: var(--kadgim-blue);
}

.hero-carousel .carousel-indicators {
    bottom: 30px;
    margin-bottom: 0;
}

.hero-carousel .carousel-indicators button {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid var(--white);
    margin: 0 8px;
    transition: all 0.3s ease;
}

.hero-carousel .carousel-indicators button.active {
    background: var(--white);
    transform: scale(1.2);
}

/* Carousel Inner */
.hero-carousel .carousel-inner {
    height: 100vh;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-carousel,
    .hero-carousel .carousel-inner,
    .hero-carousel .carousel-item {
        height: 70vh;
    }
    
    .hero-carousel .carousel-item {
        background-attachment: scroll;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-carousel .carousel-control-prev,
    .hero-carousel .carousel-control-next {
        width: 50px;
        height: 50px;
        margin: 0 1rem;
    }
}

.hero-section h1 {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: var(--kadgim-primary);
    border-color: var(--kadgim-primary);
}

.btn-primary:hover {
    background: var(--kadgim-primary-dark);
    border-color: var(--kadgim-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(46, 90, 168, 0.4);
}

.btn-outline-primary {
    color: var(--kadgim-primary);
    border-color: var(--kadgim-primary);
}

.btn-outline-primary:hover {
    background: var(--kadgim-primary);
    border-color: var(--kadgim-primary);
    transform: translateY(-2px);
}

.btn-outline-light:hover {
    background: white;
    color: var(--kadgim-primary);
    transform: translateY(-2px);
}

/* Cards */
.card {
    border-radius: 15px;
    transition: all 0.3s ease;
    border: none;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.card-body {
    padding: 2rem;
}

.service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--kadgim-primary), var(--kadgim-primary-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(46, 90, 168, 0.2);
}

.service-icon i {
    color: white !important;
}

.card:hover .service-icon {
    transform: scale(1.1);
}

/* Carousel */
.carousel {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.carousel-item {
    padding: 2rem;
    background: var(--gray-100);
}

.carousel-content {
    padding: 2rem;
}

.carousel-content h3 {
    margin-bottom: 1rem;
}

.carousel-content ul li {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.price-tag {
    background: var(--primary-color);
    color: var(--white);
    padding: 1rem 2rem;
    border-radius: 25px;
    display: inline-block;
    margin: 1rem 0;
    font-weight: bold;
}

.carousel-control-prev,
.carousel-control-next {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    margin: 0 2rem;
}

.carousel-indicators {
    bottom: -50px;
}

.carousel-indicators button {
    background: var(--primary-color);
    border-radius: 50%;
    width: 12px;
    height: 12px;
}

/* Sections */
section {
    padding: 5rem 0;
}

.bg-light {
    background: var(--gray-100) !important;
}

/* Typography */
.display-4 {
    font-weight: 700;
    line-height: 1.2;
}

.display-5 {
    font-weight: 600;
    line-height: 1.3;
}

.lead {
    font-size: 1.25rem;
    font-weight: 400;
}

.text-primary {
    color: var(--primary-color) !important;
}

/* Footer */
footer {
    background: linear-gradient(135deg, var(--bs-dark) 0%, #0f172a 100%) !important;
    border-top: 4px solid var(--kadgim-primary);
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--kadgim-primary), transparent);
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--primary-light);
    transform: translateY(-3px);
}

/* Contact CTA */
.bg-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark)) !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        background-attachment: scroll;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .carousel-item {
        padding: 1rem;
    }
    
    .carousel-content {
        padding: 1rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .display-5 {
        font-size: 2rem;
    }
    
    .carousel-control-prev,
    .carousel-control-next {
        width: 40px;
        height: 40px;
        margin: 0 1rem;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Utility Classes */
.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

.shadow {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.shadow-lg {
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important;
}

.rounded {
    border-radius: 0.375rem !important;
}

.rounded-lg {
    border-radius: 0.5rem !important;
}

/* Form Styles */
.form-control {
    border-radius: 15px;
    border: 2px solid var(--gray-300);
    transition: all 0.3s ease;
    padding: 0.75rem 1rem;
    font-size: 1rem;
}

.form-control:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(46, 90, 168, 0.25);
    outline: none;
}

.form-select {
    border-radius: 15px;
    border: 2px solid var(--gray-300);
    transition: all 0.3s ease;
    padding: 0.75rem 1rem;
    font-size: 1rem;
}

.form-select:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(46, 90, 168, 0.25);
    outline: none;
}

.form-label {
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

textarea.form-control {
    border-radius: 15px;
    resize: vertical;
    min-height: 120px;
}

/* Amélioration des formulaires dans les modales */
.modal .form-control,
.modal .form-select {
    border-radius: 15px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.modal .form-control:focus,
.modal .form-select:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(46, 90, 168, 0.25);
}

/* Styles pour les champs de validation */
.form-control.is-valid {
    border-color: var(--bs-success);
}

.form-control.is-invalid {
    border-color: var(--bs-danger);
}

.invalid-feedback {
    font-size: 0.875rem;
    color: var(--bs-danger);
    margin-top: 0.25rem;
}

.valid-feedback {
    font-size: 0.875rem;
    color: var(--bs-success);
    margin-top: 0.25rem;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--white);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
}

/* Classes utilitaires personnalisées */
.text-white-75 {
    color: var(--bs-white-75) !important;
}

.text-white-50 {
    color: var(--bs-white-50) !important;
}

.text-white-25 {
    color: var(--bs-white-25) !important;
}

.bg-primary-opacity-10 {
    background-color: rgba(var(--bs-primary-rgb), 0.1) !important;
}

.bg-primary-opacity-20 {
    background-color: rgba(var(--bs-primary-rgb), 0.2) !important;
}

/* Styles spécifiques KADGIM */
.kadgim-section {
    background: linear-gradient(135deg, var(--kadgim-light-blue) 0%, #ffffff 100%);
    position: relative;
}

.kadgim-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../logo/kagim.jpg') no-repeat center;
    background-size: 120px;
    opacity: 0.03;
    z-index: 1;
}

.kadgim-section .container {
    position: relative;
    z-index: 2;
}

.kadgim-highlight {
    color: var(--kadgim-primary);
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(30, 58, 138, 0.1);
}

.feature-box {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 25px rgba(46, 90, 168, 0.1);
    border-left: 4px solid var(--kadgim-primary);
    transition: all 0.3s ease;
}

.feature-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 35px rgba(46, 90, 168, 0.15);
}

.feature-box i {
    color: var(--kadgim-primary);
    margin-bottom: 1rem;
}

.stats-counter {
    color: var(--kadgim-primary);
    font-size: 3rem;
    font-weight: 700;
    display: block;
}

.stats-label {
    color: var(--kadgim-gray);
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Améliorations Bootstrap 5 */
.navbar-brand {
    transition: all 0.3s ease;
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Animations personnalisées */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.animate-fade-in-left {
    animation: fadeInLeft 0.6s ease-out;
}

.animate-fade-in-right {
    animation: fadeInRight 0.6s ease-out;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

/* Améliorations des composants Bootstrap */
.carousel-control-prev,
.carousel-control-next {
    transition: all 0.3s ease;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    transform: scale(1.1);
}

.carousel-indicators button {
    transition: all 0.3s ease;
}

.carousel-indicators button:hover {
    transform: scale(1.2);
}

/* Responsive améliorations */
@media (max-width: 768px) {
    .navbar-brand span {
        display: none;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .stats-counter {
        font-size: 2.5rem;
    }
    
    .feature-box {
        padding: 1.5rem;
    }
}

@media (max-width: 576px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .stats-counter {
        font-size: 2rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
}
