/*
 * Fichier: style.css
 * Description: Feuille de style principale pour le portfolio de Brindel Ndengue.
 *              Ce fichier contient toutes les règles CSS pour la mise en page, la typographie,
 *              les couleurs, les animations et la responsivité du site.
 * Auteur: Brindel Ndengue (adapté et enrichi par l'IA)
 * Date: 15 Février 2026
 * Version: 2.0.0 (Améliorations significatives)
 */

/*
 * TABLE DES MATIÈRES CSS
 * ----------------------
 * 1. Variables CSS & Reset de base
 * 2. Typographie & Éléments de base
 * 3. Utilitaires & Classes générales
 * 4. Animations & Effets visuels
 * 5. Layout général & Conteneurs
 * 6. Composants spécifiques:
 *    6.1. Bulles d'arrière-plan
 *    6.2. Barre de navigation (Navbar)
 *    6.3. Section Hero (Accueil)
 *    6.4. Section À propos (About)
 *    6.5. Section Compétences (Skills)
 *    6.6. Section Parcours & Expériences (Experiences)
 *    6.7. Section Projets (Projects)
 *    6.8. Section Engagements (Engagements)
 *    6.9. Section Contact (Contact)
 *    6.10. Pied de page (Footer)
 * 7. Thèmes (Clair/Sombre)
 * 8. Responsivité (Media Queries)
 * 9. Accessibilité
 */

/* ========================================================================== */
/* 1. Variables CSS & Reset de base                                           */
/* ========================================================================== */

:root {
    /* Couleurs principales */
    --primary-color: #007bff; /* Bleu vif pour les accents */
    --secondary-color: #6c757d; /* Gris secondaire */
    --accent-color: #28a745; /* Vert pour les succès/actions positives */
    --danger-color: #dc3545; /* Rouge pour les erreurs/alertes */

    /* Couleurs du thème clair */
    --light-bg-color: #ffffff; /* Arrière-plan clair */
    --light-text-color: #343a40; /* Texte sombre */
    --light-heading-color: #212529; /* Titres plus sombres */
    --light-card-bg: #f8f9fa; /* Arrière-plan des cartes */
    --light-border-color: #e9ecef; /* Bordures légères */
    --light-shadow-color: rgba(0, 0, 0, 0.08);
    --light-link-hover: #0056b3;
    --light-input-bg: #ffffff;
    --light-input-border: #ced4da;

    /* Couleurs du thème sombre */
    --dark-bg-color: #1a1a2e; /* Arrière-plan sombre profond */
    --dark-text-color: #e0e0e0; /* Texte clair */
    --dark-heading-color: #f8f9fa; /* Titres clairs */
    --dark-card-bg: #2e2e4a; /* Arrière-plan des cartes sombres */
    --dark-border-color: #444466; /* Bordures sombres */
    --dark-shadow-color: rgba(0, 0, 0, 0.3);
    --dark-link-hover: #66b3ff;
    --dark-input-bg: #2e2e4a;
    --dark-input-border: #444466;

    /* Couleurs spécifiques aux bulles */
    --bubble-color-1: rgba(0, 123, 255, 0.1);
    --bubble-color-2: rgba(40, 167, 69, 0.1);
    --bubble-color-3: rgba(108, 117, 125, 0.1);

    /* Espacement */
    --spacing-unit: 1rem;
    --section-padding: 6rem 0;

    /* Rayons de bordure */
    --border-radius-sm: 0.25rem;
    --border-radius-md: 0.5rem;
    --border-radius-lg: 1rem;

    /* Transitions */
    --transition-speed: 0.3s ease-in-out;

    /* Z-index */
    --z-index-navbar: 1000;
    --z-index-modal: 2000;
    --z-index-bubble: -1;
}

/* Reset CSS minimaliste pour une base propre */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-text-size-adjust: 100%; /* Empêche le zoom de texte sur iOS */
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--light-text-color);
    background-color: var(--light-bg-color);
    transition: background-color var(--transition-speed), color var(--transition-speed);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden; /* Empêche le défilement horizontal */
}

/* ========================================================================== */
/* 2. Typographie & Éléments de base                                          */
/* ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    color: var(--light-heading-color);
    line-height: 1.2;
    margin-bottom: 1rem;
    transition: color var(--transition-speed);
}

h1 {
    font-size: 3.5rem;
    font-weight: 800;
}

h2 {
    font-size: 2.8rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    margin: 1rem auto 0;
    border-radius: 2px;
}

h3 {
    font-size: 2rem;
    font-weight: 600;
}

h4 {
    font-size: 1.5rem;
    font-weight: 600;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-speed);
}

a:hover {
    color: var(--light-link-hover);
    text-decoration: underline;
}

ul {
    list-style: none;
    margin-bottom: 1rem;
}

ul li {
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1.5rem;
}

ul li::before {
    content: '•'; /* Utilisation d'un puce simple */
    color: var(--primary-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

strong {
    font-weight: 600;
}

blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--secondary-color);
}

blockquote footer {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--light-text-color);
}

/* ========================================================================== */
/* 3. Utilitaires & Classes générales                                        */
/* ========================================================================== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-unit);
}

.section {
    padding: var(--section-padding);
    position: relative;
    z-index: 1;
}

.btn-main, .btn-sub, .btn-cv-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.8rem;
    border-radius: var(--border-radius-md);
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-speed);
    white-space: nowrap;
    border: 2px solid transparent;
}

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

.btn-main:hover {
    background-color: var(--light-link-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.btn-sub {
    background-color: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-sub:hover {
    background-color: var(--primary-color);
    color: var(--light-bg-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
}

.btn-cv-nav {
    background-color: var(--accent-color);
    color: var(--light-bg-color);
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    margin-left: 1rem;
}

.btn-cv-nav:hover {
    background-color: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.btn-main i, .btn-sub i, .btn-cv-nav i {
    margin-left: 0.5rem;
}

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.appear {
    opacity: 1;
    transform: translateY(0);
}

.badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.badge {
    background-color: var(--primary-color);
    color: var(--light-bg-color);
    padding: 0.3rem 0.8rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
}

.badges-soft {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.8rem;
}

.badges-soft span {
    background-color: var(--secondary-color);
    color: var(--light-bg-color);
    padding: 0.25rem 0.7rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.75rem;
    font-weight: 400;
    white-space: nowrap;
}

/* ========================================================================== */
/* 4. Animations & Effets visuels                                             */
/* ========================================================================== */

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

@keyframes bubble-anim {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(-1000px) scale(0);
        opacity: 0;
    }
}

/* ========================================================================== */
/* 5. Layout général & Conteneurs                                             */
/* ========================================================================== */

#main-content {
    padding-top: 80px; /* Pour compenser la barre de navigation fixe */
}

/* ========================================================================== */
/* 6. Composants spécifiques                                                  */
/* ========================================================================== */

/* 6.1. Bulles d'arrière-plan */
.bubbles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: var(--z-index-bubble);
    pointer-events: none;
}

.bubble {
    position: absolute;
    background-color: var(--bubble-color-1);
    border-radius: 50%;
    animation: bubble-anim 15s infinite ease-in forwards;
    opacity: 0;
}

.bubble:nth-child(2n) { background-color: var(--bubble-color-2); }
.bubble:nth-child(3n) { background-color: var(--bubble-color-3); }

.bubble:nth-child(1) { width: 40px; height: 40px; left: 10%; animation-duration: 12s; animation-delay: 0s; }
.bubble:nth-child(2) { width: 60px; height: 60px; left: 20%; animation-duration: 15s; animation-delay: 2s; }
.bubble:nth-child(3) { width: 30px; height: 30px; left: 25%; animation-duration: 10s; animation-delay: 4s; }
.bubble:nth-child(4) { width: 80px; height: 80px; left: 40%; animation-duration: 18s; animation-delay: 0s; }
.bubble:nth-child(5) { width: 50px; height: 50px; left: 50%; animation-duration: 13s; animation-delay: 3s; }
.bubble:nth-child(6) { width: 70px; height: 70px; left: 65%; animation-duration: 16s; animation-delay: 1s; }
.bubble:nth-child(7) { width: 45px; height: 45px; left: 70%; animation-duration: 11s; animation-delay: 5s; }
.bubble:nth-child(8) { width: 90px; height: 90px; left: 80%; animation-duration: 19s; animation-delay: 2s; }
.bubble:nth-child(9) { width: 35px; height: 35px; left: 90%; animation-duration: 14s; animation-delay: 4s; }
.bubble:nth-child(10) { width: 55px; height: 55px; left: 5%; animation-duration: 17s; animation-delay: 1s; }
.bubble:nth-child(11) { width: 65px; height: 65px; left: 15%; animation-duration: 13s; animation-delay: 3s; }
.bubble:nth-child(12) { width: 75px; height: 75px; left: 30%; animation-duration: 16s; animation-delay: 0s; }
.bubble:nth-child(13) { width: 25px; height: 25px; left: 45%; animation-duration: 10s; animation-delay: 5s; }
.bubble:nth-child(14) { width: 85px; height: 85px; left: 55%; animation-duration: 18s; animation-delay: 2s; }
.bubble:nth-child(15) { width: 40px; height: 40px; left: 75%; animation-duration: 12s; animation-delay: 4s; }
.bubble:nth-child(16) { width: 60px; height: 60px; left: 85%; animation-duration: 15s; animation-delay: 1s; }
.bubble:nth-child(17) { width: 30px; height: 30px; left: 95%; animation-duration: 11s; animation-delay: 3s; }
.bubble:nth-child(18) { width: 70px; height: 70px; left: 12%; animation-duration: 14s; animation-delay: 0s; }
.bubble:nth-child(19) { width: 50px; height: 50px; left: 28%; animation-duration: 17s; animation-delay: 2s; }
.bubble:nth-child(20) { width: 80px; height: 80px; left: 60%; animation-duration: 19s; animation-delay: 4s; }

/* 6.2. Barre de navigation (Navbar) */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--light-bg-color);
    box-shadow: 0 2px 10px var(--light-shadow-color);
    z-index: var(--z-index-navbar);
    transition: background-color var(--transition-speed), box-shadow var(--transition-speed);
    padding: 1rem 0;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-family: 'Poppins', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-speed);
}

.logo-dot {
    color: var(--accent-color);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-link {
    color: var(--light-text-color);
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width var(--transition-speed);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none; /* Caché par défaut sur desktop */
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--light-text-color);
    cursor: pointer;
    transition: color var(--transition-speed);
}

.theme-btn {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--light-text-color);
    cursor: pointer;
    margin-left: 1rem;
    transition: color var(--transition-speed);
}

.theme-btn:hover {
    color: var(--primary-color);
}

/* 6.3. Section Hero (Accueil) */
.section-hero {
    background-color: var(--light-card-bg);
    padding: 10rem 0 6rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: background-color var(--transition-speed);
}

.hero-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.hero-photo-container {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    padding: 5px; /* Bordure colorée */
    animation: float 3s ease-in-out infinite;
    box-shadow: 0 0 0 8px rgba(0, 123, 255, 0.1);
}

.photo-frame {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: var(--light-bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: background-color var(--transition-speed);
}

.profile-pic-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: var(--light-border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    font-weight: 700;
    color: var(--primary-color);
    content: 'BN'; /* Initiales */
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

.hero-identity .name {
    font-size: 3.8rem;
    font-weight: 800;
    color: var(--light-heading-color);
    margin-bottom: 0.5rem;
}

.main-title-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1.5rem;
}

.title-text {
    font-size: 2.2rem;
    font-weight: 600;
    color: var(--secondary-color);
    text-align: center;
    margin-bottom: 0.5rem;
}

.blue-separator {
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.hero-details .description {
    font-size: 1.2rem;
    color: var(--light-text-color);
    margin-bottom: 1.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hiring-tag {
    background-color: var(--accent-color);
    color: var(--light-bg-color);
    padding: 0.5rem 1.5rem;
    border-radius: var(--border-radius-md);
    font-weight: 600;
    display: inline-block;
    margin-bottom: 2rem;
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.2);
}

.hero-btns {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-bottom: 3rem;
}

.hero-counters {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
}

.stat-box {
    background-color: var(--light-card-bg);
    border: 1px solid var(--light-border-color);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem 2rem;
    text-align: center;
    box-shadow: 0 4px 15px var(--light-shadow-color);
    transition: all var(--transition-speed);
}

.stat-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px var(--light-shadow-color);
}

.stat-box .count {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    display: block;
    margin-bottom: 0.5rem;
}

.stat-box .label {
    font-size: 1rem;
    color: var(--secondary-color);
}

.stat-box.accent {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.stat-box.accent .sub-label,
.stat-box.accent .year {
    color: var(--light-bg-color);
}

.stat-box.accent .sub-label {
    font-size: 0.9rem;
    font-weight: 500;
    display: block;
    margin-bottom: 0.2rem;
}

.stat-box.accent .year {
    font-size: 2.5rem;
    font-weight: 700;
}

/* 6.4. Section À propos (About) */
.section#about p {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    text-align: justify;
}

.section#about ul {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 2rem;
    list-style: disc;
}

.section#about ul li::before {
    content: none; /* Supprime la puce personnalisée pour les listes de cette section */
}

.section#about ul li {
    padding-left: 0;
    margin-bottom: 0.8rem;
}

.highlight {
    font-weight: 600;
    color: var(--primary-color);
    background-color: rgba(0, 123, 255, 0.05);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-sm);
    display: inline-block;
    margin-top: 1rem;
}

.details-section {
    margin-top: 3rem;
    padding: 2rem;
    background-color: var(--light-card-bg);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 2px 10px var(--light-shadow-color);
    transition: background-color var(--transition-speed), box-shadow var(--transition-speed);
}

.details-section h5 {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--light-border-color);
    padding-bottom: 0.5rem;
}

/* 6.5. Section Compétences (Skills) */
.intro-section {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 1.1rem;
    color: var(--secondary-color);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-category {
    background-color: var(--light-card-bg);
    border: 1px solid var(--light-border-color);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    box-shadow: 0 4px 15px var(--light-shadow-color);
    transition: all var(--transition-speed);
}

.skill-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px var(--light-shadow-color);
}

.skill-category h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    border-bottom: 2px solid var(--light-border-color);
    padding-bottom: 0.8rem;
}

.skill-category h3 i {
    font-size: 1.5rem;
    color: var(--accent-color);
}

.skill-category ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.skill-category ul li {
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
    color: var(--light-text-color);
    position: relative;
    padding-left: 1.5rem;
}

.skill-category ul li::before {
    content: '›'; /* Puce personnalisée pour les compétences */
    color: var(--primary-color);
    position: absolute;
    left: 0;
    font-weight: bold;
    font-size: 1.2rem;
    line-height: 1;
}

.skill-category ul li strong {
    color: var(--light-heading-color);
}

/* 6.6. Section Parcours & Expériences (Experiences) */
.timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--light-border-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
    transition: background-color var(--transition-speed);
}

.timeline-item {
    padding: 1rem 0;
    position: relative;
    width: 50%;
}

.timeline-item:nth-child(odd) {
    left: 0;
    padding-right: 3rem;
    text-align: right;
}

.timeline-item:nth-child(even) {
    left: 50%;
    padding-left: 3rem;
    text-align: left;
}

.timeline-icon {
    width: 40px;
    height: 40px;
    position: absolute;
    top: 1.5rem;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: var(--light-bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 0 0 3px var(--light-bg-color), 0 0 0 6px var(--primary-color);
    transition: background-color var(--transition-speed), box-shadow var(--transition-speed);
}

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

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

.timeline-content {
    background-color: var(--light-card-bg);
    padding: 1.5rem;
    border-radius: var(--border-radius-md);
    box-shadow: 0 2px 10px var(--light-shadow-color);
    transition: background-color var(--transition-speed), box-shadow var(--transition-speed);
}

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

.timeline-date {
    color: var(--secondary-color);
    font-size: 0.9rem;
    display: block;
    margin-bottom: 1rem;
}

.timeline-content p {
    font-size: 0.95rem;
    margin-bottom: 0.8rem;
}

.timeline-content h4 {
    font-size: 1.1rem;
    color: var(--light-heading-color);
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
}

.timeline-content ul {
    list-style: disc;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.timeline-content ul li {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    padding-left: 0;
}

.timeline-content ul li::before {
    content: none;
}

.timeline-note {
    font-style: italic;
    font-size: 0.85rem;
    color: var(--secondary-color);
    margin-top: 1rem;
    border-top: 1px dashed var(--light-border-color);
    padding-top: 0.8rem;
}

/* 6.7. Section Projets (Projects) */
.intro-projects {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 1.1rem;
    color: var(--secondary-color);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.projects-accordion {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.project-item {
    background-color: var(--light-card-bg);
    border: 1px solid var(--light-border-color);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 4px 15px var(--light-shadow-color);
    overflow: hidden;
    transition: all var(--transition-speed);
}

.project-item:hover {
    box-shadow: 0 8px 20px var(--light-shadow-color);
}

.project-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    cursor: pointer;
    background-color: var(--light-card-bg);
    border-bottom: 1px solid var(--light-border-color);
    transition: background-color var(--transition-speed), border-color var(--transition-speed);
}

.project-header:hover {
    background-color: rgba(var(--primary-color-rgb), 0.05);
}

.project-header h4 {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.3rem;
    flex-basis: 100%;
    margin-bottom: 0.5rem;
}

.project-header p {
    margin: 0;
    color: var(--light-text-color);
    font-size: 0.95rem;
    flex-basis: 100%;
    margin-bottom: 1rem;
}

.project-header .badges {
    margin-top: 0;
    flex-grow: 1;
}

.project-header .arrow {
    font-size: 1.2rem;
    color: var(--secondary-color);
    transition: transform var(--transition-speed);
}

.project-header[aria-expanded="true"] .arrow {
    transform: rotate(180deg);
}

.project-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out;
    padding: 0 2rem;
}

.project-details.expanded {
    max-height: 2000px; /* Valeur suffisamment grande pour contenir le contenu */
    padding: 1.5rem 2rem;
}

.project-details .details-section {
    background-color: transparent;
    box-shadow: none;
    border: none;
    padding: 1.5rem 0;
    border-bottom: 1px dashed var(--light-border-color);
    margin-top: 0;
}

.project-details .details-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.project-details .details-section h5 {
    font-size: 1.1rem;
    color: var(--light-heading-color);
    margin-bottom: 0.8rem;
    border-bottom: none;
    padding-bottom: 0;
}

.project-details .details-section ul {
    list-style: disc;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.project-details .details-section ul li {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    padding-left: 0;
}

.project-details .details-section ul li::before {
    content: none;
}

.skills-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.skills-badges span {
    background-color: var(--secondary-color);
    color: var(--light-bg-color);
    padding: 0.3rem 0.8rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
}

/* 6.8. Section Engagements (Engagements) */
.engagements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.engagement-card {
    background-color: var(--light-card-bg);
    border: 1px solid var(--light-border-color);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 4px 15px var(--light-shadow-color);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transition: all var(--transition-speed);
}

.engagement-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px var(--light-shadow-color);
}

.engagement-photo-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: var(--light-border-color);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary-color);
    content: '👥'; /* Icône générique */
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

.engagement-card:nth-child(1) .engagement-photo-placeholder { content: '🚴'; }
.engagement-card:nth-child(2) .engagement-photo-placeholder { content: '🍎'; }
.engagement-card:nth-child(3) .engagement-photo-placeholder { content: '🎤'; }
.engagement-card:nth-child(4) .engagement-photo-placeholder { content: '🚲'; }
.engagement-card:nth-child(5) .engagement-photo-placeholder { content: '📚'; }

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

.engagement-content .periode {
    color: var(--secondary-color);
    font-size: 0.9rem;
    display: block;
    margin-bottom: 1rem;
}

.engagement-content p {
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.engagement-content .soft-skills {
    font-style: italic;
    font-size: 0.85rem;
    color: var(--secondary-color);
    margin-top: 0.5rem;
}

.engagements-conclusion {
    text-align: center;
    margin-top: 4rem;
    font-size: 1.1rem;
    color: var(--light-text-color);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    padding: 2rem;
    background-color: var(--light-card-bg);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 2px 10px var(--light-shadow-color);
}

/* 6.9. Section Contact (Contact) */
.section#contact .lead {
    text-align: center;
    font-size: 1.2rem;
    margin-bottom: 3rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    color: var(--light-text-color);
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
}

.contact-info-column {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-method {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    background-color: var(--light-card-bg);
    padding: 1.5rem;
    border-radius: var(--border-radius-md);
    box-shadow: 0 2px 8px var(--light-shadow-color);
    transition: all var(--transition-speed);
}

.contact-method:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px var(--light-shadow-color);
}

.contact-method i {
    font-size: 2rem;
    color: var(--primary-color);
    flex-shrink: 0;
}

.contact-method h4 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--light-heading-color);
}

.contact-method p {
    margin: 0.3rem 0 0;
    font-size: 1rem;
}

.contact-method p a {
    color: var(--light-text-color);
    text-decoration: none;
}

.contact-method p a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.contact-method small {
    font-size: 0.8rem;
    color: var(--secondary-color);
}

.contact-availability {
    background-color: var(--light-card-bg);
    padding: 1.5rem;
    border-radius: var(--border-radius-md);
    box-shadow: 0 2px 8px var(--light-shadow-color);
    transition: all var(--transition-speed);
}

.contact-availability h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--light-border-color);
    padding-bottom: 0.5rem;
}

.contact-availability ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.contact-availability ul li {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    color: var(--light-text-color);
    position: relative;
    padding-left: 1.5rem;
}

.contact-availability ul li::before {
    content: '•';
    color: var(--accent-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.testimonials-section {
    background-color: var(--light-card-bg);
    padding: 1.5rem;
    border-radius: var(--border-radius-md);
    box-shadow: 0 2px 8px var(--light-shadow-color);
    transition: all var(--transition-speed);
}

.testimonials-section h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--light-border-color);
    padding-bottom: 0.5rem;
}

.testimonial-card {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border-left: 4px solid var(--accent-color);
    background-color: rgba(40, 167, 69, 0.05);
    border-radius: var(--border-radius-sm);
}

.testimonial-card:last-child {
    margin-bottom: 0;
}

.testimonial-text {
    font-style: italic;
    margin-bottom: 0.5rem;
    color: var(--light-text-color);
}

.testimonial-author {
    font-size: 0.9rem;
    text-align: right;
    color: var(--secondary-color);
}

.contact-form-column {
    background-color: var(--light-card-bg);
    padding: 2.5rem;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 8px 25px var(--light-shadow-color);
    transition: background-color var(--transition-speed), box-shadow var(--transition-speed);
}

.contact-form-column h3 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.contact-form .form-row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

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

.contact-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--light-heading-color);
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--light-input-border);
    border-radius: var(--border-radius-sm);
    background-color: var(--light-input-bg);
    color: var(--light-text-color);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: border-color var(--transition-speed), background-color var(--transition-speed);
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

.contact-form textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-form .required {
    color: var(--danger-color);
    margin-left: 0.2rem;
}

.contact-form .error-message {
    color: var(--danger-color);
    font-size: 0.85rem;
    margin-top: 0.5rem;
    display: none; /* Caché par défaut, affiché par JS */
}

.contact-form input.invalid, .contact-form select.invalid, .contact-form textarea.invalid {
    border-color: var(--danger-color);
}

.form-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 2rem;
}

.form-feedback {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: var(--border-radius-sm);
    text-align: center;
    font-weight: 600;
    display: none; /* Caché par défaut, affiché par JS */
}

.form-feedback.success {
    background-color: rgba(40, 167, 69, 0.1);
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
}

.form-feedback.error {
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
    border: 1px solid var(--danger-color);
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--light-bg-color);
    padding: 1rem 2.5rem;
    border-radius: var(--border-radius-md);
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all var(--transition-speed);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-primary:hover {
    background-color: var(--light-link-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.btn-loading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-loading::before {
    content: '';
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #fff;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.contact-footer-note {
    text-align: center;
    margin-top: 3rem;
    font-size: 0.9rem;
    color: var(--secondary-color);
}

/* 6.10. Pied de page (Footer) */
.footer {
    background-color: var(--light-card-bg);
    color: var(--secondary-color);
    padding: 3rem 0;
    text-align: center;
    border-top: 1px solid var(--light-border-color);
    transition: background-color var(--transition-speed), border-color var(--transition-speed);
}

.footer p {
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.footer-links a {
    color: var(--secondary-color);
    margin: 0 0.8rem;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.social-links {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.social-links a {
    font-size: 1.5rem;
    color: var(--secondary-color);
    transition: color var(--transition-speed), transform var(--transition-speed);
}

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

/* ========================================================================== */
/* 7. Thèmes (Clair/Sombre)                                                   */
/* ========================================================================== */

body.dark-mode {
    color: var(--dark-text-color);
    background-color: var(--dark-bg-color);
}

body.dark-mode h1, body.dark-mode h2, body.dark-mode h3, body.dark-mode h4, body.dark-mode h5, body.dark-mode h6 {
    color: var(--dark-heading-color);
}

body.dark-mode .navbar {
    background-color: var(--dark-bg-color);
    box-shadow: 0 2px 10px var(--dark-shadow-color);
}

body.dark-mode .nav-link {
    color: var(--dark-text-color);
}

body.dark-mode .nav-toggle, body.dark-mode .theme-btn {
    color: var(--dark-text-color);
}

body.dark-mode .section-hero {
    background-color: var(--dark-card-bg);
}

body.dark-mode .photo-frame {
    background-color: var(--dark-bg-color);
}

body.dark-mode .profile-pic-placeholder {
    background-color: var(--dark-border-color);
    color: var(--primary-color);
}

body.dark-mode .hero-identity .name {
    color: var(--dark-heading-color);
}

body.dark-mode .title-text {
    color: var(--dark-text-color);
}

body.dark-mode .hero-details .description {
    color: var(--dark-text-color);
}

body.dark-mode .stat-box {
    background-color: var(--dark-card-bg);
    border-color: var(--dark-border-color);
    box-shadow: 0 4px 15px var(--dark-shadow-color);
}

body.dark-mode .stat-box.accent {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

body.dark-mode .stat-box .label {
    color: var(--dark-text-color);
}

body.dark-mode .details-section {
    background-color: var(--dark-card-bg);
    box-shadow: 0 2px 10px var(--dark-shadow-color);
}

body.dark-mode .details-section h5 {
    border-bottom-color: var(--dark-border-color);
}

body.dark-mode .skills-grid .skill-category {
    background-color: var(--dark-card-bg);
    border-color: var(--dark-border-color);
    box-shadow: 0 4px 15px var(--dark-shadow-color);
}

body.dark-mode .skill-category h3 {
    border-bottom-color: var(--dark-border-color);
}

body.dark-mode .skill-category ul li {
    color: var(--dark-text-color);
}

body.dark-mode .skill-category ul li strong {
    color: var(--dark-heading-color);
}

body.dark-mode .timeline::before {
    background-color: var(--dark-border-color);
}

body.dark-mode .timeline-icon {
    box-shadow: 0 0 0 3px var(--dark-bg-color), 0 0 0 6px var(--primary-color);
}

body.dark-mode .timeline-content {
    background-color: var(--dark-card-bg);
    box-shadow: 0 2px 10px var(--dark-shadow-color);
}

body.dark-mode .timeline-content h4 {
    color: var(--dark-heading-color);
}

body.dark-mode .timeline-note {
    border-top-color: var(--dark-border-color);
}

body.dark-mode .project-item {
    background-color: var(--dark-card-bg);
    border-color: var(--dark-border-color);
    box-shadow: 0 4px 15px var(--dark-shadow-color);
}

body.dark-mode .project-header {
    background-color: var(--dark-card-bg);
    border-bottom-color: var(--dark-border-color);
}

body.dark-mode .project-header:hover {
    background-color: rgba(var(--primary-color-rgb), 0.1);
}

body.dark-mode .project-header p {
    color: var(--dark-text-color);
}

body.dark-mode .project-details .details-section {
    border-bottom-color: var(--dark-border-color);
}

body.dark-mode .project-details .details-section h5 {
    color: var(--dark-heading-color);
}

body.dark-mode .project-item:hover {
    box-shadow: 0 8px 20px var(--dark-shadow-color);
}

body.dark-mode .engagement-card {
    background-color: var(--dark-card-bg);
    border-color: var(--dark-border-color);
    box-shadow: 0 4px 15px var(--dark-shadow-color);
}

body.dark-mode .engagement-photo-placeholder {
    background-color: var(--dark-border-color);
}

body.dark-mode .engagements-conclusion {
    background-color: var(--dark-card-bg);
    box-shadow: 0 2px 10px var(--dark-shadow-color);
    color: var(--dark-text-color);
}

body.dark-mode .section#contact .lead {
    color: var(--dark-text-color);
}

body.dark-mode .contact-method {
    background-color: var(--dark-card-bg);
    box-shadow: 0 2px 8px var(--dark-shadow-color);
}

body.dark-mode .contact-method h4 {
    color: var(--dark-heading-color);
}

body.dark-mode .contact-method p a {
    color: var(--dark-text-color);
}

body.dark-mode .contact-availability {
    background-color: var(--dark-card-bg);
    box-shadow: 0 2px 8px var(--dark-shadow-color);
}

body.dark-mode .contact-availability h4 {
    border-bottom-color: var(--dark-border-color);
}

body.dark-mode .contact-availability ul li {
    color: var(--dark-text-color);
}

body.dark-mode .testimonials-section {
    background-color: var(--dark-card-bg);
    box-shadow: 0 2px 8px var(--dark-shadow-color);
}

body.dark-mode .testimonials-section h4 {
    border-bottom-color: var(--dark-border-color);
}

body.dark-mode .testimonial-card {
    background-color: rgba(40, 167, 69, 0.15);
}

body.dark-mode .testimonial-text {
    color: var(--dark-text-color);
}

body.dark-mode .contact-form-column {
    background-color: var(--dark-card-bg);
    box-shadow: 0 8px 25px var(--dark-shadow-color);
}

body.dark-mode .contact-form label {
    color: var(--dark-heading-color);
}

body.dark-mode .contact-form input,
body.dark-mode .contact-form select,
body.dark-mode .contact-form textarea {
    border-color: var(--dark-input-border);
    background-color: var(--dark-input-bg);
    color: var(--dark-text-color);
}

body.dark-mode .footer {
    background-color: var(--dark-card-bg);
    border-top-color: var(--dark-border-color);
}

body.dark-mode .footer-links a, body.dark-mode .social-links a {
    color: var(--dark-text-color);
}

/* Pour le calcul de la couleur RGB pour le hover */
:root {
    --primary-color-rgb: 0, 123, 255;
}

/* ========================================================================== */
/* 8. Responsivité (Media Queries)                                            */
/* ========================================================================== */

/* Pour les écrans de taille moyenne (tablettes, petits ordinateurs portables) */
@media (max-width: 992px) {
    html {
        font-size: 15px;
    }

    .section {
        padding: 4rem 0;
    }

    h1 {
        font-size: 3rem;
    }

    h2 {
        font-size: 2.2rem;
        margin-bottom: 2.5rem;
    }

    h3 {
        font-size: 1.8rem;
    }

    .nav-links {
        gap: 1rem;
    }

    .btn-cv-nav {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .hero-wrapper {
        gap: 1.5rem;
    }

    .hero-photo-container {
        width: 150px;
        height: 150px;
    }

    .profile-pic-placeholder {
        font-size: 3rem;
    }

    .hero-identity .name {
        font-size: 3rem;
    }

    .title-text {
        font-size: 1.8rem;
    }

    .hero-details .description {
        font-size: 1.1rem;
    }

    .hero-btns {
        flex-direction: column;
        gap: 1rem;
    }

    .hero-counters {
        flex-direction: column;
        gap: 1.5rem;
    }

    .stat-box {
        padding: 1.2rem 1.5rem;
    }

    .stat-box .count, .stat-box.accent .year {
        font-size: 2rem;
    }

    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }

    .timeline::before {
        left: 20px; /* Déplace la ligne centrale vers la gauche */
    }

    .timeline-item {
        width: 100%;
        padding-left: 3rem;
        padding-right: 1rem;
        text-align: left;
    }

    .timeline-item:nth-child(odd) {
        padding-right: 1rem;
        text-align: left;
    }

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

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

    .project-header h4 {
        font-size: 1.2rem;
    }

    .project-header p {
        font-size: 0.9rem;
    }

    .project-details.expanded {
        padding: 1rem 1.5rem;
    }

    .engagements-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }

    .engagement-card {
        padding: 1.5rem;
    }

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

    .contact-form-column {
        padding: 2rem;
    }

    .contact-form .form-row {
        flex-direction: column;
        gap: 0;
    }
}

/* Pour les petits écrans (smartphones) */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

    .navbar {
        padding: 0.8rem 0;
    }

    .nav-links {
        display: none; /* Caché par défaut sur mobile */
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--light-bg-color);
        box-shadow: 0 8px 15px var(--light-shadow-color);
        padding: 1rem 0;
        border-top: 1px solid var(--light-border-color);
        transition: background-color var(--transition-speed), box-shadow var(--transition-speed);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-link {
        padding: 0.8rem 1rem;
        text-align: center;
        width: 100%;
    }

    .nav-link::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .nav-link:hover::after {
        width: 50%;
    }

    .btn-cv-nav {
        margin: 1rem auto 0;
        width: fit-content;
    }

    .nav-toggle {
        display: block;
    }

    .nav-content {
        padding: 0 1rem;
    }

    .hero-identity .name {
        font-size: 2.8rem;
    }

    .title-text {
        font-size: 1.5rem;
    }

    .hero-btns {
        flex-direction: column;
        gap: 1rem;
    }

    .hero-counters {
        flex-direction: column;
        gap: 1.5rem;
    }

    .stat-box {
        width: 80%;
        margin: 0 auto;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .timeline::before {
        left: 20px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 3rem;
        padding-right: 1rem;
        text-align: left;
    }

    .timeline-item:nth-child(odd) {
        padding-right: 1rem;
        text-align: left;
    }

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

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

    .project-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem 1.5rem;
    }

    .project-header h4 {
        font-size: 1.1rem;
        margin-bottom: 0.3rem;
    }

    .project-header p {
        font-size: 0.85rem;
        margin-bottom: 0.8rem;
    }

    .project-header .badges {
        margin-top: 0.5rem;
    }

    .project-header .arrow {
        position: absolute;
        right: 1.5rem;
        top: 1.5rem;
    }

    .project-details.expanded {
        padding: 1rem 1.5rem;
    }

    .engagements-grid {
        grid-template-columns: 1fr;
    }

    .engagement-card {
        padding: 1.5rem;
    }

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

    .contact-form-column {
        padding: 1.5rem;
    }

    .contact-form .form-row {
        flex-direction: column;
        gap: 0;
    }

    .footer-links {
        flex-direction: column;
        gap: 0.5rem;
    }

    .footer-links span {
        display: none;
    }
}

/* Pour les très petits écrans */
@media (max-width: 480px) {
    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    .hero-identity .name {
        font-size: 2.5rem;
    }

    .title-text {
        font-size: 1.3rem;
    }

    .hero-photo-container {
        width: 120px;
        height: 120px;
    }

    .profile-pic-placeholder {
        font-size: 2.5rem;
    }

    .stat-box {
        width: 95%;
    }

    .contact-form .form-row {
        flex-direction: column;
    }
}

/* ========================================================================== */
/* 9. Accessibilité                                                           */
/* ========================================================================== */

/* Focus visible pour la navigation au clavier */
:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: var(--border-radius-sm);
}

/* Masquer visuellement mais laisser accessible aux lecteurs d'écran */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Styles pour les liens de saut */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background-color: var(--primary-color);
    color: var(--light-bg-color);
    padding: 8px;
    z-index: 9999;
    transition: top 0.3s ease-in-out;
}

.skip-link:focus {
    top: 0;
}

/* Amélioration du contraste pour les éléments interactifs */
button:hover, a:hover, input[type="submit"]:hover {
    filter: brightness(1.1);
}

/* Ajout d'un outline pour les éléments de formulaire en focus */
input:focus, textarea:focus, select:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Styles pour les messages d'erreur de formulaire */
.error-message {
    color: var(--danger-color);
    font-size: 0.875em;
    margin-top: 0.25em;
}

/* Indicateur visuel pour les champs requis */
label .required {
    color: var(--danger-color);
    font-weight: bold;
}

/* Styles pour les icônes Font Awesome */
.fa-solid, .fa-brands {
    line-height: 1;
}

/* Ajustements pour le mode sombre pour les icônes */
body.dark-mode .fa-solid, body.dark-mode .fa-brands {
    color: var(--dark-text-color);
}

body.dark-mode .nav-toggle i, body.dark-mode .theme-btn i {
    color: var(--dark-text-color);
}

body.dark-mode .contact-method i {
    color: var(--primary-color);
}

body.dark-mode .skill-category h3 i {
    color: var(--accent-color);
}

body.dark-mode .timeline-icon i {
    color: var(--light-bg-color);
}

body.dark-mode .social-links a i {
    color: var(--dark-text-color);
}

/* Assurer que les icônes dans les boutons ont la bonne couleur */
.btn-main i, .btn-cv-nav i {
    color: inherit; /* Hérite de la couleur du texte du bouton */
}

.btn-sub i {
    color: var(--primary-color); /* Spécifique pour le bouton secondaire */
}

body.dark-mode .btn-sub i {
    color: var(--primary-color);
}

/* Styles pour les placeholders des images qui ont été supprimées */
.engagement-photo-placeholder::before {
    font-family: "Font Awesome 6 Free"; /* Assurez-vous que Font Awesome est chargé */
    font-weight: 900; /* Pour les icônes Solid */
    font-size: 2.5rem;
    color: var(--primary-color);
    content: "\f0c0"; /* Icône générique de groupe */
}

.engagement-card:nth-child(1) .engagement-photo-placeholder::before { content: "\f206"; } /* Icône de vélo */
.engagement-card:nth-child(2) .engagement-photo-placeholder::before { content: "\f5d1"; } /* Icône de panier */
.engagement-card:nth-child(3) .engagement-photo-placeholder::before { content: "\f130"; } /* Icône de microphone */
.engagement-card:nth-child(4) .engagement-photo-placeholder::before { content: "\f206"; } /* Icône de vélo */
.engagement-card:nth-child(5) .engagement-photo-placeholder::before { content: "\f518"; } /* Icône de livre */

/* Ajustement pour le placeholder de la photo de profil */
.profile-pic-placeholder::before {
    content: 'BN'; /* Initiales */
    font-family: 'Poppins', sans-serif;
    font-size: 4rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

body.dark-mode .profile-pic-placeholder::before {
    color: var(--primary-color);
}

/* Styles pour les liens de saut */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background-color: var(--primary-color);
    color: var(--light-bg-color);
    padding: 8px;
    z-index: 9999;
    transition: top 0.3s ease-in-out;
}

.skip-link:focus {
    top: 0;
}

/* Styles pour les messages d'erreur de formulaire */
.error-message {
    color: var(--danger-color);
    font-size: 0.875em;
    margin-top: 0.25em;
}

/* Indicateur visuel pour les champs requis */
label .required {
    color: var(--danger-color);
    font-weight: bold;
}

/* Styles pour les icônes Font Awesome */
.fa-solid, .fa-brands {
    line-height: 1;
}

/* Ajustements pour le mode sombre pour les icônes */
body.dark-mode .fa-solid, body.dark-mode .fa-brands {
    color: var(--dark-text-color);
}

body.dark-mode .nav-toggle i, body.dark-mode .theme-btn i {
    color: var(--dark-text-color);
}

body.dark-mode .contact-method i {
    color: var(--primary-color);
}

body.dark-mode .skill-category h3 i {
    color: var(--accent-color);
}

body.dark-mode .timeline-icon i {
    color: var(--light-bg-color);
}

body.dark-mode .social-links a i {
    color: var(--dark-text-color);
}

/* Assurer que les icônes dans les boutons ont la bonne couleur */
.btn-main i, .btn-cv-nav i {
    color: inherit; /* Hérite de la couleur du texte du bouton */
}

.btn-sub i {
    color: var(--primary-color); /* Spécifique pour le bouton secondaire */
}

body.dark-mode .btn-sub i {
    color: var(--primary-color);
}

/* Styles pour les placeholders des images qui ont été supprimées */
.engagement-photo-placeholder::before {
    font-family: "Font Awesome 6 Free"; /* Assurez-vous que Font Awesome est chargé */
    font-weight: 900; /* Pour les icônes Solid */
    font-size: 2.5rem;
    color: var(--primary-color);
    content: "\f0c0"; /* Icône générique de groupe */
}

.engagement-card:nth-child(1) .engagement-photo-placeholder::before { content: "\f206"; } /* Icône de vélo */
.engagement-card:nth-child(2) .engagement-photo-placeholder::before { content: "\f5d1"; } /* Icône de panier */
.engagement-card:nth-child(3) .engagement-photo-placeholder::before { content: "\f130"; } /* Icône de microphone */
.engagement-card:nth-child(4) .engagement-photo-placeholder::before { content: "\f206"; } /* Icône de vélo */
.engagement-card:nth-child(5) .engagement-photo-placeholder::before { content: "\f518"; } /* Icône de livre */

/* Ajustement pour le placeholder de la photo de profil */
.profile-pic-placeholder::before {
    content: 'BN'; /* Initiales */
    font-family: 'Poppins', sans-serif;
    font-size: 4rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

body.dark-mode .profile-pic-placeholder::before {
    color: var(--primary-color);
}

/* Hero photo – centrage parfait et visibilité améliorée */
.hero-photo-container {
    display: flex;
    justify-content: center;           /* Centre horizontalement */
    margin-bottom: 30px;               /* Espace sous la photo */
}

.photo-frame {
    width: 180px;                      /* Taille fixe pour cohérence */
    height: 180px;
    border-radius: 50%;                /* Rond parfait */
    overflow: hidden;                  /* Évite débordement */
    border: 5px solid #0d6efd;         /* Bordure bleue élégante */
    box-shadow: 0 10px 30px rgba(0, 123, 255, 0.4); /* Ombre douce */
    background: #fff;                  /* Fond blanc si photo transparente */
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;                    /* Centre supplémentaire */
}

.profile-pic {
    width: 100%;
    height: 100%;
    object-fit: cover;                 /* Remplit le cercle sans déformer */
    object-position: center;           /* Centre l'image dans le cadre */
    display: block;
}

/* Responsive – photo plus petite sur mobile */
@media (max-width: 768px) {
    .photo-frame {
        width: 140px;
        height: 140px;
        border-width: 4px;
    }
    
    .hero-photo-container {
        margin-bottom: 25px;
    }
}

@media (max-width: 480px) {
    .photo-frame {
        width: 120px;
        height: 120px;
    }
}