/* Variables CSS pour les couleurs */
:root {
    --primary-color: #f97316;
    --secondary-color: #10b981;
    --accent-color: #2563eb;
    --dark-color: #1f2937;
    --light-color: #f8fafc;
    --text-dark: #374151;
    --text-muted: #6b7280;
}

/* Base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* Hero Section */
.hero-section {
    height: 100vh;
    background: linear-gradient(135deg, rgba(31, 41, 55, 0.8), rgba(17, 24, 39, 0.9)),
                url('https://images.pexels.com/photos/1396122/pexels-photo-1396122.jpeg?auto=compress&cs=tinysrgb&w=1920&h=1080&fit=crop') center/cover;
    display: flex;
    align-items: center;
    position: relative;
    border-radius: 0 0 50px 50px;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.1), rgba(16, 185, 129, 0.1));
    z-index: 1;
}

.hero-section .container-fluid {
    position: relative;
    z-index: 2;
}

/* Navigation sur hero */
.hero-nav-link {
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

/* Menu mobile - Icône et bordures orange */
.navbar-toggler {
    border-color: var(--primary-color) !important;
}

.navbar-toggler:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 0.25rem rgba(249, 115, 22, 0.25) !important;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23f97316' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

.hero-nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 50%;
    background: var(--primary-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

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

.hero-nav-link:hover {
    color: var(--primary-color) !important;
    transform: translateY(-2px);
}

/* Animations */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-up {
    animation: fadeUp 0.8s ease forwards;
    opacity: 0;
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.scroll-arrow {
    width: 24px;
    height: 24px;
    border: 2px solid white;
    border-top: none;
    border-right: none;
    transform: rotate(-45deg);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) rotate(-45deg);
    }
    40% {
        transform: translateY(-10px) rotate(-45deg);
    }
    60% {
        transform: translateY(-5px) rotate(-45deg);
    }
}

/* Buttons */
.btn {
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #fb923c);
    border: none;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(249, 115, 22, 0.4);
}

.btn-outline-light:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

/* Cards */
.project-card, .news-card, .completed-project {
    transition: all 0.3s ease;
    border-radius: 16px;
    overflow: hidden;
}

.project-card:hover, .news-card:hover, .completed-project:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.card-img-top {
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-card:hover .card-img-top,
.news-card:hover .card-img-top {
    transform: scale(1.05);
}

/* Badges */
.badge {
    font-size: 0.75rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 500;
}

/* Contact Section */
.contact-icon {
    width: 40px;
    height: 40px;
    background: rgba(249, 115, 22, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
}

.contact-item {
    padding: 1rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.contact-item:last-child {
    border-bottom: none;
}

/* Form Styles */
.form-control, .form-select {
    border-radius: 12px;
    border: 2px solid #e5e7eb;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

/* Footer */
footer {
    background: linear-gradient(135deg, #1f2937, #111827) !important;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
    color: white !important;
}

/* Back to top button */
#backToTop {
    width: 50px;
    height: 50px;
    border: none;
    transition: all 0.3s ease;
}

#backToTop:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(249, 115, 22, 0.4);
}

/* Navigation sticky styles */
#main-header {
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

/* Style spécial pour la page d'accueil avec hero plein écran */
.hero-page #main-header {
    background: transparent;
    box-shadow: none;
}

#main-header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

#main-header.scrolled #main-navbar {
    padding: 0.5rem 0 !important;
}

/* Changement de couleur du texte lors du scroll */
#main-header.scrolled .navbar-text {
    color: var(--text-dark) !important;
}

#main-header.scrolled .navbar-link {
    color: var(--text-dark) !important;
}

#main-header.scrolled .navbar-link:hover {
    color: var(--primary-color) !important;
}

/* Styles par défaut pour les liens de navigation */
.navbar-text {
    color: var(--text-dark);
    transition: color 0.3s ease;
}

.navbar-logo {
    font-size: 1.5rem;
    font-weight: bold;
    text-transform: uppercase;
}

.navbar-link {
    color: var(--text-dark) !important;
    transition: color 0.3s ease;
}

/* Style spécial pour la page d'accueil avec hero plein écran */
.hero-page .navbar-text {
    color: white;
}

.hero-page .navbar-link {
    color: white !important;
}

/* Utility classes */
.object-cover {
    object-fit: cover;
}

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

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

.text-light-emphasis {
    color: rgba(255, 255, 255, 0.75) !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-section {
        height: 100vh;
        border-radius: 0 0 30px 30px;
    }
    
    .display-3 {
        font-size: 2.5rem;
    }
    
    .hero-buttons .btn {
        display: block;
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .hero-buttons .btn:last-child {
        margin-bottom: 0;
    }
    
    .project-card:hover, .news-card:hover, .completed-project:hover {
        transform: none;
    }
    
    .card-img-top {
        height: 200px;
    }
}

@media (max-width: 576px) {
    .hero-section {
        border-radius: 0 0 20px 20px;
    }
    
    .display-5 {
        font-size: 2rem;
    }
    
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #ea580c;
}

/* Transitions globales pour une expérience fluide */
* {
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

/* Rating stars */
.rating .fas {
    font-size: 0.9rem;
}

/* Completed projects special styling */
.completed-project .card-body {
    padding: 2rem;
}

/* News cards special styling */
.news-card .card-body {
    padding: 1.5rem;
}

/* Hover effects pour les liens de navigation */
.navbar-nav .nav-link {
    position: relative;
    transition: all 0.3s ease;
}

/* Navigation hover effects */
#main-header .nav-link:hover {
    color: var(--primary-color) !important;
}

#main-header .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 50%;
    background: var(--primary-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

#main-header .nav-link:hover::after {
    width: 80%;
}

.hero-project {
    padding-top: 170px;
    padding-bottom: 80px;
    background-color: #f8fafc;
}