/* Variables modernes avec une palette de couleurs raffinée */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #3b82f6;
    --accent-color: #60a5fa;
    --text-color: #1e293b;
    --text-light: #64748b;
    --background-light: #f8fafc;
    --white: #ffffff;
    --card-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset et styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-color);
    line-height: 1.8;
    background-color: var(--background-light);
}

/* Header et Navigation */
.navbar {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.8) !important;
    padding: 1rem 0;
    transition: var(--transition);
}

.navbar.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.navbar-brand img {
    height: 45px;
    transition: var(--transition);
}

.nav-link {
    font-weight: 500;
    position: relative;
    padding: 0.5rem 1rem !important;
    transition: var(--transition);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 100%;
}

.language-selector .nav-link {
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.4rem 1rem !important;
    border-radius: 8px;
    transition: var(--transition);
}

.language-selector .nav-link.active {
    background: var(--primary-color);
    color: var(--white) !important;
}

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 70vh; /* Réduit de 100vh à 70vh */
    padding-top: 100px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    animation: fadeInUp 1s ease-out;
}

.profile-image {
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transition: var(--transition);
    animation: fadeIn 1.5s ease-out;
    max-width: 80%;
    margin-left: auto;
}

.profile-image:hover {
    transform: translateY(-10px) scale(1.02);
}

/* Sections */
.section-padding {
    padding: 120px 0;
}

/* Sections texte avec animation */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    position: relative;
    transition: var(--transition);
}

.section-title.text-center::after {
    display: none;
}

/* Animation pour Qui suis-je et Mon expertise */
.animate-section {
    position: relative;
    padding: 20px;
    transition: all 0.3s ease;
    border-radius: 15px;
}

.animate-section:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.animate-section .section-title {
    position: relative;
    display: inline-block;
}

.animate-section .section-title::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.animate-section:hover .section-title::after {
    width: 100%;
}

.animate-section p {
    transition: all 0.3s ease;
    opacity: 0.9;
}

.animate-section:hover p {
    opacity: 1;
    transform: translateY(2px);
}

/* Cards */
.service-card {
    background: var(--white);
    border-radius: 20px;
    padding: 2.5rem;
    height: 100%;
    transition: var(--transition);
    border: none;
    box-shadow: var(--card-shadow);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.service-card h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Contact Form */
.contact-form {
    background: var(--white);
    padding: 3rem;
    border-radius: 24px;
    box-shadow: var(--card-shadow);
}

.form-control {
    padding: 1rem;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    transition: var(--transition);
    font-size: 1rem;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    outline: none;
}

.btn-primary {
    background: var(--primary-color);
    border: none;
    padding: 1rem 2rem;
    font-weight: 600;
    border-radius: 12px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300%;
    height: 300%;
    background: var(--primary-dark);
    transition: var(--transition);
    transform: translate(-50%, -50%) scale(0);
    border-radius: 50%;
}

.btn-primary:hover::before {
    transform: translate(-50%, -50%) scale(1);
}

.btn-primary span {
    position: relative;
    z-index: 1;
}

/* Footer */
footer {
    background: var(--text-color);
    padding: 3rem 0;
}

footer a {
    color: rgba(255, 255, 255, 0.8) !important;
    transition: var(--transition);
}

footer a:hover {
    color: var(--white) !important;
    text-decoration: none;
    transform: translateX(5px);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        padding: 120px 0 60px;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .section-padding {
        padding: 80px 0;
    }

    .contact-form {
        padding: 2rem;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px; /* Ajoute un padding pour le défilement */
}

section {
    scroll-margin-top: 100px; /* Assure que les sections s'arrêtent au bon endroit */
}

/* Loading Animation */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--white);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: 0.5s;
}

.loading.fade-out {
    opacity: 0;
    visibility: hidden;
}