body, html {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #e0e0e0;
    line-height: 1.6;
    background-color: #121212;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background-color: #1e1e1e;
    border-right: 1px solid #333333;
    padding: 2.5rem 1.5rem;
    box-sizing: border-box;
    text-align: center;
    overflow-y: auto;
}

.profile-pic {
    width: 140px;
    height: 140px;
    background-color: #2c2c2c;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9e9e9e;
    font-size: 0.9rem;
}

.sidebar-name {
    font-size: 1.5rem;
    margin: 0 0 0.5rem 0;
    color: #ffffff;
}

.sidebar-title {
    font-size: 0.9rem;
    color: #9e9e9e;
    margin-bottom: 2rem;
}

.nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-links li {
    margin-bottom: 0.8rem;
}

.nav-links a {
    text-decoration: none;
    color: #82b1ff;
}

.nav-links a:hover {
    text-decoration: underline;
}

.content {
    margin-left: 280px;
    padding: 3rem 4rem;
    max-width: 900px;
    position: relative; /* Context required for absolute transition placement */
}

h2 {
    font-weight: 400;
    border-bottom: 1px solid #333333;
    padding-bottom: 0.5rem;
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
    color: #ffffff;
}

section {
    margin-bottom: 3rem;
}

.tabs-container {
    margin-top: 2rem;
    border: 1px solid #333333;
    border-radius: 8px;
    overflow: hidden;
}

.tab-buttons {
    display: flex;
    background-color: #1e1e1e;
    border-bottom: 1px solid #333333;
}

.tab-btn {
    flex: 1;
    padding: 1rem;
    border: none;
    background: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    color: #e0e0e0;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.tab-btn:hover {
    background-color: #2c2c2c;
}

.tab-btn.active {
    background-color: #121212;
    color: #82b1ff;
    border-bottom: 2px solid #82b1ff;
}

.tab-content {
    padding: 2rem;
    background-color: #121212;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

.tab-panel h3 {
    margin-top: 0;
    color: #ffffff;
}

.tab-panel h4 {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: #e0e0e0;
}

.email-link {
    color: inherit;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: opacity 0.2s ease;
}

.email-link:hover {
    opacity: 0.7;
}

.section-3 {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    font-family: sans-serif;
}

.clearfix {
    display: flow-root;
}

.cert-link {
    display: inline-block;
    position: relative;
    transition: transform 0.2s ease;
    text-decoration: none;
}

.cert-link.right {
    float: right;
    margin: 0 0 10px 15px;
}

/* Effet de zoom au survol */
.cert-link:hover {
    transform: scale(1.05);
}

/* Indicateur de texte au survol */
.cert-link::after {
    content: "Click for real size";
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: #ffffff;
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none; /* Empêche le texte de bloquer le clic */
}

.cert-link:hover::after {
    opacity: 1;
}

.inline-cert {
    display: block;
    width: 150px;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    background-color: #ffffff;
}

/* Hide all sections by default without layout displacement */
.content section {
    display: none;
}

/* Display only the targeted section active state */
.content section.active-section {
    display: block;
}

/* Presentation Cadre Styling */
.intro-cadre {
    background-color: #1e1e1e;
    border: 1px solid #333333;
    border-left: 4px solid #82b1ff;
    border-radius: 4px;
    padding: 2rem;
    margin-top: 1rem;
    margin-bottom: 2rem;
}

.intro-cadre p {
    margin-top: 0;
    margin-bottom: 1.25rem;
    color: #e0e0e0;
}

.intro-cadre p:last-child {
    margin-bottom: 0;
}

/* Alignement sur une grille à 3 colonnes pour la section Philosophie */
.tab-buttons.grid-three {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background-color: #1e1e1e;
    border-bottom: 1px solid #333333;
}

/* Gestion des bordures internes de l'interface à trois boutons */
.tab-buttons.grid-three .tab-btn:nth-child(1),
.tab-buttons.grid-three .tab-btn:nth-child(2) {
    border-right: 1px solid #333333;
}

/* Style de l'état actif avec ombre interne */
.tab-buttons.grid-three .tab-btn.active {
    background-color: #121212;
    color: #82b1ff;
    border-bottom: 1px solid #333333;
    box-shadow: inset 0 -2px 0 0 #82b1ff;
}

/* Style spécifique pour le li de contact */
.nav-links .nav-contact-item {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #333333;
}

/* Ajustement cosmétique du lien e-mail dans la barre latérale */
.nav-links .nav-contact-item a {
    font-size: 0.85rem;
    font-style: italic;
    color: #9e9e9e;
}

/* Changement d'état au survol pour conserver l'interactivité */
.nav-links .nav-contact-item a:hover {
    color: #82b1ff;
    text-decoration: none;
}

/* Mise en forme de la section Services */
.services-intro-text p {
    line-height: 1.4;
    margin-top: 0;
    margin-bottom: 0.75rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
    margin-bottom: 2rem;
}

.feature-card {
    background-color: #1e1e1e;
    border: 1px solid #333333;
    border-radius: 8px;
    padding: 1.25rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.feature-card:hover {
    transform: translateY(-2px);
    border-color: #82b1ff;
    box-shadow: 0 4px 12px rgba(130, 177, 255, 0.15);
}

.feature-card h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    color: #ffffff;
    font-weight: 600;
}

.feature-card p {
    font-size: 0.88rem;
    font-style: italic;
    line-height: 1.5;
    margin-top: 0;
    margin-bottom: 0;
    color: #b0b0b0;
}

/* Conteneur principal du service */
.service-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
    background-color: #121212;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.service-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.service-title {
    margin-top: 0;
    margin-bottom: 16px;
    color: #e5e5e5;
    font-size: 1.4rem;
}

.service-description {
    margin-bottom: 20px;
    color: #a3a3a3;
    line-height: 1.6;
}

/* Zone de commentaire personnel avec nuance légère */
.service-commentary {
    background-color: #161b18; /* Nuance subtile (ici un gris-vert très doux, ajustable) */
    border-left: 4px solid #3b6b4c; /* Ligne d'accentuation pour ancrer le bloc */
    border-radius: 0 6px 6px 0;
    padding: 16px 20px;
    margin-bottom: 20px;
}

.service-commentary h4 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 1rem;
    color: #2c4a35;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.service-commentary p {
    margin: 0;
    color: #62b078;
    font-style: italic;
    line-height: 1.5;
}

/* Style des tags */
.service-tags {
    display: none;
    flex-wrap: wrap;
    gap: 8px;
}

.card-toggle-input:checked ~ .service-tags {
    display: flex;
}

.tag {
    font-size: 0.85rem;
    color: #4a7c59;
    background-color: #eef4f0;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.tag:hover {
    background-color: #4a7c59;
    color: #ffffff;
}

/* Conteneur du menu - Format glissière par défaut (Mobile) */
.hashtag-menu-container {
    display: flex;
    flex-wrap: nowrap; /* Empêche le retour à la ligne automatique */
    overflow-x: auto;  /* Active le défilement horizontal si ça dépasse */
    -webkit-overflow-scrolling: touch; /* Défilement fluide et naturel sur iOS */
    gap: 8px;
    padding: 12px 4px;
    margin-bottom: 24px;
    border-bottom: 1px solid #262626;
    
    /* Masquer la barre de défilement pour un rendu plus propre */
    scrollbar-width: none; /* Firefox */
}

.hashtag-menu-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

/* Style de base des boutons et cases à cocher de filtrage (Chips plats compacts) */
.menu-tag-btn,
.filter-checkbox-container {
    flex: 0 0 auto;
    font-size: 0.82rem;
    color: #a3a3a3;
    background-color: #1a1a1a;
    border: 1px solid transparent;
    padding: 4px 10px;
    border-radius: 15px;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
}

.menu-tag-btn:hover,
.filter-checkbox-container:hover {
    background-color: #262626;
    color: #ffffff;
}

/* État "allumé" quand sélectionné */
.menu-tag-btn.active,
.filter-checkbox-container.active {
    background-color: #1c2420;
    color: #62b078;
}

/* Masquage complet de l'input checkbox natif pour l'option 1 */
.filter-checkbox-container input[type="checkbox"] {
    display: none;
}

/* ==========================================================================
   EFFET DE PLIEMENT DYNAMIQUE "READ MORE" EN CSS PUR
   ========================================================================== */

/* 1. Conteneur ajustable qui cache le texte dépassant 150px par défaut */
.card-fold-content {
    max-height: 150px; /* Hauteur de repliement de base */
    overflow: hidden;  /* Masque le surplus */
    transition: max-height 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); /* Animation fluide */
    position: relative;
}

/* 2. Effet d'ombrage fondu en bas de carte */
.card-fold-fade {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px; /* Profondeur du fondu */
    background: linear-gradient(to bottom, rgba(18, 18, 18, 0), #121212); 
    pointer-events: none; /* Laisse passer le clic à travers le dégradé */
    transition: opacity 0.3s ease;
}

/* 3. Masquage de la case à cocher technique */
.card-toggle-input {
    display: none !important;
}

/* 4. Bouton "(more)" stylisé */
.card-toggle-label {
    display: inline-block;
    margin-top: 12px;
    margin-bottom: 16px;
    color: #60a5fa; /* Bleu clair d'accentuation pour votre thème sombre */
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
    user-select: none;
}

.card-toggle-label:hover {
    text-decoration: underline;
}

/* ==========================================================================
   CONTRÔLE DES ÉTATS (OUVERT / FERMÉ)
   ========================================================================== */

/* Dépliement de la carte lorsqu'on coche */
.card-toggle-input:checked ~ .card-fold-content {
    max-height: 2000px; /* Permet d'ouvrir n'importe quel long texte */
}

/* Disparition du dégradé blanc/gris lors du dépliement */
.card-toggle-input:checked ~ .card-fold-content .card-fold-fade {
    opacity: 0;
    pointer-events: none;
}

/* Changement automatique du texte du bouton sans une seule ligne de JS */
.card-toggle-label::after {
    content: " (more) ▼";
}

.card-toggle-input:checked ~ .card-toggle-label::after {
    content: " (less) ▲";
}

/* Comportement sur Grand Écran (PC) */
@media (min-width: 768px) {
    .hashtag-menu-container {
        flex-wrap: wrap;       /* Repasse en mode grille classique si tu as de la place */
        overflow-x: visible;   /* Plus besoin de glisser sur PC */
        padding: 16px 0;
    }
}

/* Animation de fondu et léger glissement */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Version responsive pour les écrans mobiles */
/* Sélecteur de Langue (Dropdown) */
.lang-selector-container {
    position: absolute;
    top: 2rem;
    right: 2.5rem;
    z-index: 1000;
}

.lang-select {
    background-color: #1e1e1e;
    color: #a3a3a3;
    border: 1px solid #333333;
    border-radius: 6px;
    padding: 0.4rem 2rem 0.4rem 0.8rem;
    font-size: 0.82rem;
    outline: none;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a3a3a3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.6rem center;
    background-size: 0.8rem;
}

.lang-select:hover {
    border-color: #82b1ff;
    color: #ffffff;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
}

.lang-select option {
    background-color: #1e1e1e;
    color: #ffffff;
}

.lang-select option:disabled {
    color: #555555;
    background-color: #121212;
}

/* Bannière d'avertissement de traduction automatique */
.translation-notice {
    background-color: #24211a;
    border-left: 4px solid #d9a75d;
    color: #e0d0b8;
    padding: 0.8rem 1.2rem;
    border-radius: 4px;
    margin-bottom: 2rem;
    font-size: 0.88rem;
    line-height: 1.5;
}

@media (max-width: 768px) {
    /* Force la sidebar à reprendre une place normale dans le flux de la page */
    .sidebar {
        position: relative !important;
        width: 100% !important;
        height: auto !important;
        border-right: none;
        border-bottom: 1px solid #333333;
        padding: 1.5rem;
        
        /* Configuration de la grille mobile */
        display: grid;
        grid-template-columns: 80px 1fr;
        grid-template-areas: 
            "pic name"
            "pic title"
            "nav nav";
        gap: 0.25rem 1rem;
        text-align: left;
    }

    .profile-pic {
        grid-area: pic;
        margin: 0;
        width: 80px;
        height: 80px;
    }

    .sidebar-name {
        grid-area: name;
        font-size: 1.3rem;
        margin: 0;
        align-self: end;
    }

    .sidebar-title {
        grid-area: title;
        font-size: 0.85rem;
        margin: 0;
        align-self: start;
    }

    /* Alignement horizontal des liens de navigation */
    .nav-links {
        grid-area: nav;
        width: 100%;
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.8rem;
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid #333333;
    }

    .nav-links li {
        margin: 0;
    }

    /* Annulation des espacements bureau pour le lien de contact */
    .nav-links .nav-contact-item {
        margin-top: 0;
        padding-top: 0;
        border-top: none;
    }

    /* Le contenu principal se place désormais naturellement sous la sidebar */
    .content {
        margin-left: 0 !important;
        padding: 1.5rem;
    }

    /* Conservation de la mise en page des onglets responsives */
    .tab-buttons.grid-three {
        display: flex;
        flex-direction: column;
    }

    .tab-btn {
        border-bottom: 1px solid #333333;
        border-right: none !important;
        text-align: left;
    }

    .tab-buttons.grid-three .tab-btn.active {
        box-shadow: none;
        border-bottom: 1px solid #333333;
        border-left: 4px solid #82b1ff;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .lang-selector-container {
        position: static;
        display: flex;
        justify-content: flex-end;
        margin-bottom: 1rem;
        padding-right: 0.5rem;
    }
}

/* ==========================================================================
   News Carousel Styling
   ========================================================================== */
.news-carousel-container {
    background-color: #1e1e1e;
    border: 1px solid #333333;
    border-radius: 6px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
}

.news-carousel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    border-bottom: 1px solid #2a2a2a;
    padding-bottom: 0.75rem;
}

.news-carousel-heading {
    margin: 0;
    font-size: 1.15rem;
    color: #ffffff;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.news-carousel-viewall {
    color: #82b1ff;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: color 0.2s ease;
}

.news-carousel-viewall:hover {
    color: #b3d1ff;
    text-decoration: underline;
}

.news-carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.news-carousel-track {
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    padding: 0.25rem 0 0.75rem 0;
    scrollbar-width: none;
}

.news-carousel-track::-webkit-scrollbar {
    display: none;
}

.news-card {
    flex: 0 0 100%;
    scroll-snap-align: start;
    background: #141414;
    border: 1px solid #2d2d2d;
    border-radius: 6px;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.2s ease, border-color 0.2s ease;
    display: flex;
    flex-direction: row;
    align-items: center;
}

.news-card:hover {
    transform: translateY(-2px);
    border-color: #82b1ff;
}

.news-card-img-container {
    position: relative;
    width: 200px;
    min-width: 200px;
    height: 140px;
    overflow: hidden;
    background-color: #0a0a0a;
    flex-shrink: 0;
}

.news-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.news-card-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background-color: rgba(130, 177, 255, 0.95);
    color: #121212;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.news-card-content {
    padding: 1rem 1.25rem;
    flex: 1;
}

@media (max-width: 600px) {
    .news-card {
        flex-direction: column;
        align-items: stretch;
    }
    .news-card-img-container {
        width: 100%;
        min-width: 100%;
        height: 140px;
    }
}

.news-card-date {
    font-size: 0.8rem;
    color: #a0a0a0;
    display: block;
    margin-bottom: 0.35rem;
}

.news-card-title {
    margin: 0 0 0.35rem 0;
    font-size: 1.15rem;
    color: #ffffff;
    font-weight: 600;
    line-height: 1.3;
}

.news-card-subtitle {
    margin: 0;
    font-size: 0.9rem;
    color: #b0bec5;
    line-height: 1.4;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(30, 30, 30, 0.9);
    color: #ffffff;
    border: 1px solid #444444;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 5;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.carousel-btn:hover {
    background: #82b1ff;
    color: #121212;
    border-color: #82b1ff;
}

.prev-btn {
    left: -18px;
}

.next-btn {
    right: -18px;
}

.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 0.75rem;
}

.indicator-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #444444;
    cursor: pointer;
    transition: background-color 0.2s ease, width 0.2s ease;
}

.indicator-dot.active {
    background-color: #82b1ff;
    width: 18px;
    border-radius: 4px;
}

