/* Variables */
:root {
    --primary-color: #0072c0;
    --secondary-color: #004a80;
    --text-color: #333;
    --light-gray: #f8f9fa;
    --transition: all 0.3s ease;
}

/* Base Styles */
body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-color);
    overflow-x: hidden;
}

/* Navbar */
.navbar {
    transition: var(--transition);
    padding: 1rem 0;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
}

.logo {
    height: 50px;
    width: auto;
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: var(--transition);
}

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

/* Hero Section */
.hero-section {
    padding-top: 80px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(0,72,192,0.3), rgba(0,114,192,0.2));
    z-index: 1;
}

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

/* Section Styles */
section {
    position: relative;
    overflow: hidden;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(to right, transparent, var(--primary-color), transparent);
    opacity: 0.1;
}

section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(to right, transparent, var(--primary-color), transparent);
    opacity: 0.1;
}

/* Section Title Styles */
.display-5 {
    position: relative;
    display: inline-block;
    margin-bottom: 2rem;
}

#apropos .display-5::after {
    display: none;
}

.display-5::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -10px;
    width: 100%;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
    transform: none;
}

/* Buttons */
.btn {
    padding: 0.8rem 1.5rem;
    font-weight: 500;
    border-radius: 8px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.1);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s ease;
    z-index: -1;
}

.btn:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.4s ease;
    z-index: -1;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.btn-light {
    background-color: white;
    color: var(--primary-color);
}

.btn-light:hover {
    background-color: var(--light-gray);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Cards */
.card {
    border-radius: 15px;
    transition: var(--transition);
    border: none;
    transform: translateY(0);
    transition: all 0.4s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.icon-box {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(0, 114, 192, 0.1);
    transition: var(--transition);
    transition: all 0.4s ease;
}

.card:hover .icon-box {
    transform: scale(1.1);
    background-color: #bbdefb;
    color: var(--primary-color);
}

/* Portfolio */
.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    margin-bottom: 30px;
}

.portfolio-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.portfolio-item img {
    transition: transform 0.4s ease;
    object-fit: cover;
    width: 100%;
    height: 300px;
    aspect-ratio: 16/9;
}

.portfolio-item:hover img {
    transform: scale(1.03);
}

.portfolio-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    padding: 20px;
    color: white;
    opacity: 0;
    transition: var(--transition);
    transform: translateY(100%);
    opacity: 0;
    transition: all 0.4s ease;
}

.portfolio-item:hover .portfolio-overlay {
    transform: translateY(0);
    opacity: 1;
}

/* Footer */
.footer-logo {
    height: 60px;
    width: auto;
}

footer a {
    text-decoration: none;
    transition: var(--transition);
}

footer a:hover {
    color: var(--primary-color) !important;
    opacity: 0.8;
}

footer .social-icons a {
    width: 35px;
    height: 35px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    transition: var(--transition);
}

footer .social-icons a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

/* Back to Top Button */
.back-to-top {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: var(--primary-color);
    color: white !important;
    border-radius: 50%;
    text-decoration: none;
    transition: var(--transition);
    margin-top: -2px;
}

.back-to-top:hover {
    background-color: var(--secondary-color);
    color: white !important;
    transform: translateY(-3px);
}

.back-to-top i {
    font-size: 1rem;
}

/* Responsive Design */
@media (max-width: 991.98px) {
    .navbar-nav {
        padding: 1rem 0;
    }
    
    .nav-link {
        padding: 0.5rem 0 !important;
    }
    
    .hero-section {
        padding-top: 100px;
        text-align: center;
    }
    
    .btn-group {
        justify-content: center;
    }
}

@media (max-width: 767.98px) {
    h1.display-4 {
        font-size: 2.5rem;
    }
    
    .contact-info {
        margin-bottom: 2rem;
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hero-section {
        min-height: 80vh;
        padding-top: 60px;
    }

    .display-5 {
        font-size: 2rem;
    }

    .lead {
        font-size: 1rem;
    }

    .navbar-brand img {
        height: 40px;
    }

    .btn {
        padding: 0.6rem 1.2rem;
    }

    .card {
        margin-bottom: 1rem;
    }

    .icon-box {
        width: 60px;
        height: 60px;
    }

    /* Espacement des boutons d'avis sur mobile */
    .text-center .btn {
        margin: 0.5rem;
        display: inline-block;
    }
}

/* Style des témoignages */
.card-body {
    position: relative;
    z-index: 1;
}

.card-body::before {
    content: '"';
    position: absolute;
    top: -20px;
    left: 20px;
    font-size: 4em;
    color: var(--primary-color);
    opacity: 0.1;
    z-index: -1;
}

[data-aos] {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}
