/* --- Variables & Reset --- */
:root {
    --primary-color: #0D47A1; /* Bleu corporate */
    --dark-color: #212529;      /* Texte principal */
    --light-color: #f8f9fa;     /* Fond */
    --white-color: #ffffff;
    --font-family: 'Poppins', sans-serif;
    --transition-speed: 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    background-color: var(--light-color);
    color: var(--dark-color);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Header & Navigation --- */
.header {
    background-color: var(--white-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem; /* Espace entre l'image et le texte */
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-logo img {
    height: 40px; /* Ajustez la hauteur de votre logo */
}

.nav-menu {
    display: flex;
    flex-grow: 1; /* Permet au menu de prendre l'espace disponible */
    justify-content: center; /* Centre les liens dans l'espace alloué */
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--dark-color);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--transition-speed);
}

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

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--dark-color);
    transition: all var(--transition-speed);
}

/* --- Sections Générales --- */
section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 50px;
}

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    max-width: 600px;
    margin: -30px auto 50px auto;
}

/* --- Hero Section --- */
.hero {
    background-color: var(--white-color);
    text-align: center;
    padding: 100px 0;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 2rem auto;
}

.cta-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white-color);
    padding: 12px 24px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background-color var(--transition-speed), transform var(--transition-speed);
}

.cta-button:hover {
    background-color: #0b3a82;
    transform: translateY(-2px);
}

/* --- Section À Propos --- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-text p {
    margin-bottom: 1.5rem;
}

.mission-box {
    background-color: #eef2ff; /* Equivalent de from-blue-50 to-indigo-50 */
    padding: 25px;
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
    margin-top: 2rem;
}

.mission-box h3 {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.about-image img {
    width: 100%;
    max-width: 450px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    margin: 0 auto;
    display: block;
}

/* --- Section Pôles (Onglets) --- */
.poles-section {
    background-color: var(--white-color);
}

.poles-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.tabs-with-arrows {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-bottom: 1px solid #ddd;
    position: relative;
}

.pole-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    border-bottom: none; /* La bordure est maintenant sur le parent .tabs-with-arrows */
}

.nav-arrow {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 10px;
    transition: color 0.3s, transform 0.3s;
}

.pole-tab {
    padding: 12px 25px;
    cursor: pointer;
    border: none;
    background-color: transparent;
    font-size: 1rem;
    font-weight: 600;
    color: #555;
    border-bottom: 3px solid transparent;
    transition: color 0.3s, border-color 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-arrow:hover {
    color: #0b3a82;
    transform: scale(1.1);
}

.pole-tab:hover {
    color: var(--primary-color);
}

.pole-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.pole-content {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
    background-color: #fdfdff;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #eef2ff;
}

.pole-content.active {
    display: block;
}

.pole-content h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.pole-content p {
    margin-bottom: 1.5rem;
}

.pole-content ul {
    list-style: none;
    padding-left: 0;
}

.pole-content ul li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.pole-content ul li .fa-check-circle {
    color: #28a745; /* Vert succès */
    margin-top: 4px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Section Méthode (Timeline) --- */
.approach-section {
    background-color: #f8f9fa;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 3px;
    background-color: var(--primary-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1.5px;
    opacity: 0.3;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.timeline-item.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.timeline-item:nth-child(odd) { left: 0; }
.timeline-item:nth-child(even) { left: 50%; }

.timeline-icon {
    position: absolute;
    width: 50px;
    height: 50px;
    line-height: 50px;
    font-size: 1.5rem;
    text-align: center;
    background-color: white;
    border: 3px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
    box-shadow: 0 0 0 4px white;
}

.timeline-item:nth-child(odd) .timeline-icon { right: -25px; }
.timeline-item:nth-child(even) .timeline-icon { left: -25px; }

.timeline-content {
    padding: 20px 30px;
    background-color: var(--white-color);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    position: relative;
}

.timeline-content h3 {
    font-size: 1.4rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* --- Contact Section --- */
.contact-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 50px;
    align-items: flex-start;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: var(--font-family);
}

#form-status {
    margin-top: 1rem;
    margin-bottom: 1rem;
    font-weight: 600;
    min-height: 1.2em; /* Empêche le saut de layout */
}

.contact-info .address {
    margin-bottom: 2rem;
}

.contact-info h4 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

/* --- Section Réalisations --- */
.realisations-section {
    background-color: var(--white-color);
}

.project-card {
    display: grid;
    grid-template-columns: 1.3fr 1fr; /* Image plus grande */
    gap: 50px;
    align-items: center;
    /* Les styles suivants sont déplacés ou gérés par le conteneur .pole-content */
    /* background-color: var(--white-color); */
    /* border-radius: 12px; */
    /* padding: 40px; */
    /* margin-bottom: 50px; */
    /* box-shadow: 0 8px 25px rgba(0,0,0,0.07); */
    /* transition: transform 0.3s ease, box-shadow 0.3s ease; */
}

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

.project-card-reverse {
    grid-template-columns: 1fr 1.3fr; /* Image plus grande */
}

.project-card-reverse .project-image {
    order: 2;
}

.project-card-reverse .project-content {
    order: 1;
}

.project-image img {
    width: 100%;
    border-radius: 8px;
    object-fit: cover;
    aspect-ratio: 16 / 10;
}

/* Classe spécifique pour les images qui ne doivent pas être rognées */
.project-image.fit-contain {
    background-color: #f8f9fa; /* Fond subtil pour le letterboxing */
    border-radius: 8px;
}
.project-image.fit-contain img {
    object-fit: contain;
}

.project-content h3 {
    font-size: 1.6rem; /* Légèrement réduit pour compacter */
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.project-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 2rem; /* Plus d'espace avant la grille de détails */
    color: var(--dark-color);
    opacity: 0.9;
}

.project-content h5 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.project-content p {
    margin-bottom: 0; /* Géré par le gap de la grille */
    font-size: 0.9rem; /* Texte plus compact */
    line-height: 1.5;
}

.project-details-grid {
    display: grid;
    grid-template-columns: 1fr; /* Une colonne par défaut */
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Si la largeur le permet, passer à 3 colonnes */
@media (min-width: 992px) {
    .project-details-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.project-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.project-keywords span {
    background-color: #eef2ff;
    color: var(--primary-color);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* --- Footer --- */
.footer {
    background-color: var(--dark-color);
    color: var(--light-color);
    text-align: center;
    padding: 20px 0;
}

/* --- Animations --- */
.animated-section {
    opacity: 0; /* L'opacité est gérée par item pour la timeline */
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animated-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Responsive (Mobile-First) --- */
@media(max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--white-color);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-item {
        padding: 1.5rem 0;
    }

    .hamburger {
        display: block;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .expertises-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-image {
        order: -1; /* Met l'image en premier sur mobile */
    }

    /* Responsive pour la timeline */
    .timeline::after {
        left: 25px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 15px;
    }

    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even) {
        left: 0;
    }

    .timeline-icon,
    .timeline-item:nth-child(odd) .timeline-icon,
    .timeline-item:nth-child(even) .timeline-icon {
        left: 0;
    }

    .project-card,
    .project-card-reverse {
        grid-template-columns: 1fr;
        padding: 25px;
        gap: 30px;
    }

    .project-card-reverse .project-image {
        order: -1; /* Image toujours en haut sur mobile */
    }
}

* --- Page de listing des articles (/blog/index.html) --- */

.blog-listing-section {
    padding: 80px 0;
    background-color: #f8f9fa; /* Fond légèrement différent pour distinguer la section */
}

.article-list {
    display: grid;
    /* Crée une grille responsive qui s'adapte à la taille de l'écran */
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.article-card {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

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

.article-card-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Permet au contenu de prendre tout l'espace vertical disponible */
}

.article-card-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.article-card-excerpt {
    font-size: 0.95rem;
    line-height: 1.6;
    flex-grow: 1; /* Pousse le lien "Lire la suite" vers le bas */
    margin-bottom: 20px;
}

.article-card-link {
    font-weight: 600;
    color: var(--accent-color);
    text-decoration: none;
    align-self: flex-start; /* Aligne le lien à gauche */
}

.article-card-link i {
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.article-card:hover .article-card-link i {
    transform: translateX(5px);
}


/* --- Page de l'article (/blog/modernisation-application-legacy.html) --- */

.article-page {
    padding: 80px 0;
}

.article-page .container {
    max-width: 800px; /* Contenu plus étroit pour une meilleure lisibilité */
}

.article-header {
    text-align: center;
    margin-bottom: 40px;
    border-bottom: 1px solid #eee;
    padding-bottom: 30px;
}

.article-header h1 {
    font-size: 2.5rem;
    line-height: 1.2;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.article-intro {
    font-size: 1.1rem;
    color: #555;
    line-height: 1.7;
}

.article-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #333;
}

.article-content h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-top: 50px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-color);
}

.article-content h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-top: 40px;
    margin-bottom: 15px;
}

.article-content p {
    margin-bottom: 20px;
}

.article-content ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 25px;
}

.article-content ul li {
    padding-left: 25px;
    position: relative;
    margin-bottom: 15px;
}

.article-content ul li::before {
    content: '\f058'; /* Icône "check-circle" de Font Awesome */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--accent-color);
    position: absolute;
    left: 0;
    top: 2px;
}

.article-content strong {
    color: var(--primary-color);
}

/* Bloc d'appel à l'action (CTA) à la fin de l'article */
.cta-block {
    background-color: #f8f9fa;
    border-left: 5px solid var(--accent-color);
    padding: 30px;
    margin-top: 50px;
    border-radius: 0 8px 8px 0;
}

.cta-block h3 {
    margin-top: 0;
    border-bottom: none;
}

.cta-final {
    font-size: 1.2rem;
    text-align: center;
    margin-top: 25px;
    margin-bottom: 15px;
}

.cta-block .cta-button {
    display: block;
    width: 100%;
    text-align: center;
    margin-top: 20px;
}

/* Style pour le bouton "Contact" dans la barre de navigation */
.cta-button-nav {
    background-color: var(--primary-color);
    color: var(--white-color) !important; /* !important pour surcharger la couleur du nav-link */
    padding: 8px 16px;
    border-radius: 5px;
    transition: background-color var(--transition-speed), transform var(--transition-speed);
}
.cta-button-nav:hover {
    background-color: #0b3a82;
    transform: translateY(-2px);
}