:root {
    --primary: #2563EB; /* Bleu vif */
    --secondary: #1E3A8A; /* Bleu marine */
    --accent: #F97316; /* Orange vif */
    --neutral: #FFFFFF; /* Blanc pur */
    --text: #1F2937; /* Noir doux */
    --gray: #F3F4F6; /* Gris clair */
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    background-color: var(--neutral);
    color: var(--text);
    line-height: 1.6;
    margin: 0;
    scroll-behavior: smooth;
}

/* Header */
.header {
    background: linear-gradient(90deg, var(--secondary), #162C6D); /* Changé en dégradé bleu foncé */
    transition: background 0.3s ease;
    padding: 1rem 0;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.header a {
    color: var(--neutral);
    font-weight: 700;
    letter-spacing: 0.5px;
    transition: color 0.3s ease, transform 0.3s ease, text-shadow 0.3s ease;
}

.header a:hover,
.header a:active {
    color: var(--accent); /* Orange au survol et clic */
    transform: scale(1.1);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Ajustement du logo */
.logo {
    margin-left: -20px; /* Restauré la marge négative originale */
}

/* Modale de recherche */
.search-modal {
    transition: opacity 0.3s ease;
}

.search-modal.hidden {
    opacity: 0;
    pointer-events: none;
}

.search-input {
    background: var(--neutral);
    border: 1px solid var(--gray);
    transition: border-color 0.3s ease;
}

.search-input:focus {
    border-color: var(--accent);
}

.search-button {
    background: var(--accent);
    border: none;
    transition: background 0.3s ease;
}

.search-button:hover {
    background: #E65C00;
}

/* Menu (affichage normal) */
#nav-menu {
    display: none;
}

@media (min-width: 769px) {
    #nav-menu {
        display: flex !important;
        background: none !important; /* S'assurer que le conteneur parent n'applique pas de fond qui interfère */
    }
}

/* Affichage du sous-menu en mode normal avec JavaScript */
#services-menu {
    background: var(--secondary); /* Bleu marine opaque */
    opacity: 1; /* Garantir l'opacité complète */
    color: var(--neutral);
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border: 2px solid var(--accent); /* Bordure orange ajoutée */
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 10;
    padding: 0.5rem 0;
    width: 200px; /* Ajustement pour éviter le débordement */
}

#services-menu a {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--neutral);
    transition: background 0.3s ease, color 0.3s ease;
    word-break: break-word; /* Permet au texte de se couper si trop long */
    white-space: normal; /* Permet le retour à la ligne */
}

#services-menu a:hover,
#services-menu a:active {
    background: var(--accent); /* Orange au survol et clic */
    color: var(--neutral);
    border-radius: 0.3rem;
}

/* Navigation Drawer (mode responsive) */
#nav-drawer {
    background: linear-gradient(180deg, var(--secondary), #162C6D);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.4);
}

#nav-drawer a {
    color: var(--neutral);
    font-size: 1.1rem;
    transition: background 0.3s ease, transform 0.3s ease;
}

#nav-drawer a:hover,
#nav-drawer a:active {
    background: var(--accent); /* Orange au survol et clic */
    transform: scale(1.02);
}

/* Affichage du sous-menu dans le drawer avec JavaScript */
#services-drawer-menu {
    background: var(--secondary);
    padding-left: 1rem;
    border: 2px solid var(--accent); /* Bordure orange ajoutée */
}

#services-drawer-menu a {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--neutral);
    transition: background 0.3s ease, color 0.3s ease;
    word-break: break-word; /* Permet au texte de se couper si trop long */
    white-space: normal; /* Permet le retour à la ligne */
}

#services-drawer-menu a:hover,
#services-drawer-menu a:active {
    background: var(--accent); /* Orange au survol et clic */
    color: var(--neutral);
}

#drawer-overlay {
    transition: opacity 0.3s ease;
}

#drawer-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Style pour la langue sélectionnée */
.language-link.active-language {
    background: var(--primary);
    border-radius: 0.3rem;
    padding: 0.2rem 0.5rem;
    color: var(--neutral);
}

.language-link.active-language:hover,
.language-link.active-language:active {
    color: var(--neutral);
    transform: none;
    text-shadow: none;
}

@media (max-width: 768px) {
    #services-menu {
        position: static;
        width: 100%;
        box-shadow: none;
        background: var(--secondary);
        padding: 0.5rem 0;
        border: 2px solid var(--accent); /* Bordure orange ajoutée */
    }
    #services-menu a {
        padding: 0.75rem 1rem; /* Réduit le padding horizontal pour éviter le débordement */
        color: var(--neutral);
        text-align: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
        font-size: 1rem;
        word-break: break-word; /* Ajouté pour gérer le débordement */
        white-space: normal; /* Permet le retour à la ligne */
    }
    #services-menu a:last-child {
        border-bottom: none;
    }
    #services-menu a:hover,
    #services-menu a:active {
        background: var(--accent); /* Orange au survol et clic */
        color: var(--neutral);
    }
}

/* Hero Section */
.hero {
    position: relative;
    height: 90vh;
    overflow: hidden;
    background: var(--gray);
}

.hero-slider {
    display: flex;
    width: 300%;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

.hero-slide {
    width: 33.333%;
    height: 100%;
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.7), rgba(249, 115, 22, 0.5));
}

.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--neutral);
    z-index: 10;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 1rem;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    text-shadow: 3px 3px 8px rgba(0, 0, 0, 0.5);
    letter-spacing: 1px;
}

.hero-content p {
    font-size: 1.5rem;
    margin-bottom: 2.5rem;
    font-weight: 500;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    padding: 1rem 2rem;
    background: var(--primary);
    color: var(--neutral);
    font-weight: 700;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    background: #1E40AF;
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.5);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 2px solid var(--accent);
    color: var(--accent);
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-secondary:hover {
    background: var(--accent);
    color: var(--neutral);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.hero-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(37, 99, 235, 0.8);
    color: var(--neutral);
    padding: 1rem;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: background 0.3s;
    z-index: 20;
}

.hero-nav.prev {
    left: 1.5rem;
}

.hero-nav.next {
    right: 1.5rem;
}

.hero-nav:hover {
    background: var(--accent);
}

/* À Propos */
.about {
    padding: 4rem 1rem;
    background: var(--neutral);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.about h2 {
    color: var(--primary);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
}

/* Services Section */
.services {
    padding: 6rem 1rem;
    background: linear-gradient(180deg, var(--neutral), var(--gray));
}

.section-title {
    font-size: 3rem;
    font-weight: 900;
    text-align: center;
    margin-bottom: 4rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
}

.service-card {
    background: var(--neutral);
    padding: 2.5rem;
    border-radius: 1rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.service-card i {
    font-size: 3.5rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.service-card h3 {
    font-size: 1.75rem;
    font-weight: 800;
    margin: 1rem 0;
    color: var(--primary);
}

.service-card p {
    color: var(--text);
    margin-bottom: 1.5rem;
}

/* Articles Section */
.articles {
    padding: 6rem 1rem;
    background: var(--gray);
}

.article-card {
    background: var(--neutral);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.article-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 0.75rem;
}

.article-card h3 {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 1rem 0;
    color: var(--primary);
}

.article-card p {
    color: var(--text);
    margin-bottom: 1rem;
}

/* Projects Section */
.projects {
    padding: 6rem 1rem;
    background: linear-gradient(180deg, var(--gray), var(--neutral));
}

.project-card {
    background: var(--neutral);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.project-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 0.75rem;
}

.project-card h3 {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 1rem 0;
    color: var(--primary);
}

.project-card p {
    color: var(--text);
    margin-bottom: 1rem;
}

/* Footer */
footer {
    background: var(--secondary);
    color: var(--neutral);
    padding: 2rem 1rem;
}

footer a {
    color: var(--neutral);
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--accent);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 1.5s ease-out;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hero {
        height: 60vh;
    }
    .hero-content h1 {
        font-size: 2rem;
    }
    .hero-content p {
        font-size: 1rem;
    }
    .section-title {
        font-size: 2rem;
    }
    .service-card, .article-card, .project-card {
        padding: 1.5rem;
    }
    .grid {
        grid-template-columns: 1fr;
    }
    .hero-nav {
        padding: 0.5rem;
    }
}

@media (min-width: 641px) and (max-width: 768px) {
    .hero {
        height: 70vh;
    }
    .hero-content h1 {
        font-size: 2.5rem;
    }
    .hero-content p {
        font-size: 1.2rem;
    }
    .grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 1024px) {
    .grid {
        grid-template-columns: 1fr 1fr 1fr;
    }
}