/* Variables pour un changement de thème facile */
:root {
    --primary-color: #3f51b5; /* Bleu sombre */
    --secondary-color: #f4f4f4; /* Arrière-plan clair */
    --text-color: #333;
    --sidebar-width: 300px;
    --font-family: 'Helvetica Neue', Arial, sans-serif;
}

/* Base du corps de la page */
body {
    font-family: var(--font-family);
    margin: 0;
    padding: 0;
    display: flex;
    background-color: var(--secondary-color);
    color: var(--text-color);
}

/* Barre Latérale (Sidebar) */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background-color: white;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    padding: 30px 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Image de Profil */
.profile-img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    border: 4px solid var(--primary-color);
}

/* Navigation */
.main-nav {
    width: 100%;
    margin-top: 30px;
}

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

.main-nav a {
    display: block;
    padding: 15px 0;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: background-color 0.3s, color 0.3s;
    border-radius: 5px;
}

.main-nav a:hover,
.main-nav a.active { /* Vous pouvez utiliser JS pour ajouter 'active' */
    background-color: var(--primary-color);
    color: white;
}

.main-nav i {
    margin-right: 10px;
}

/* Liens Sociaux */
.social-links {
    margin-top: auto; /* Pousse les liens sociaux en bas */
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.social-links a {
    color: var(--text-color);
    font-size: 24px;
    margin: 0 10px;
    transition: color 0.3s;
}

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

/* Zone de Contenu Principale */
.content-area {
    margin-left: var(--sidebar-width); /* Décalage pour laisser la place à la barre latérale */
    flex-grow: 1;
    padding: 40px;
    box-sizing: border-box;
}

/* Mise en page des sections */
.section {
    background-color: white;
    padding: 40px;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    display: none; /* Cache toutes les sections par défaut */
    animation: fadeIn 0.5s ease-in-out;
}

.section.active {
    display: block; /* Affiche la section active */
}

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

h2 {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
    margin-bottom: 30px;
}

/* Bouton principal (Télécharger CV) */
.btn-primary {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    margin-top: 20px;
    transition: opacity 0.3s;
}

.btn-primary:hover {
    opacity: 0.9;
}

/* Timeline pour l'expérience */
.timeline {
    border-left: 2px solid #ddd;
    padding-left: 20px;
    margin-top: 20px;
}

.timeline-item {
    position: relative;
    margin-bottom: 25px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -27px;
    top: 5px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--primary-color);
}

.timeline h3 {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.2em;
}

.timeline .dates {
    color: #888;
    font-size: 0.9em;
    margin-top: 5px;
}

/* Grille pour les projets */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.project-card {
    border: 1px solid #ddd;
    padding: 20px;
    border-radius: 8px;
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.project-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
    margin-top: 10px;
    display: inline-block;
}

/* Tags de Compétences */
.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.skill-tag {
    background-color: var(--primary-color);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 500;
}

/* ------------------------------------------------------------------ */
/* --- Styles spécifiques pour la page de détail de projet (NON RESPONSIVE) --- */
/* ------------------------------------------------------------------ */

/* Général */
.project-detail-page {
    /* Supprime la barre latérale pour les pages de projet */
    display: block; 
    background-color: var(--secondary-color);
}

/* En-tête de la page projet */
.project-header {
    background-color: white;
    padding: 30px 50px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.project-header h1 {
    color: var(--primary-color);
    margin-top: 10px;
    font-size: 2em;
    border-bottom: none; 
}

.project-header .back-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
}

.project-header .back-link:hover {
    color: var(--primary-color);
}

/* Contenu du projet */
.project-content-area {
    width: 90%;
    max-width: 1000px;
    margin: 0 auto;
    padding-bottom: 50px;
}

.project-section {
    background-color: white;
    padding: 30px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.project-section h2 {
    color: var(--primary-color);
    border-bottom: 2px solid #eee;
    padding-bottom: 8px;
    margin-bottom: 20px;
}

.project-section h3 {
    color: var(--text-color);
    font-size: 1.3em;
    margin-top: 25px;
    margin-bottom: 10px;
}

.project-section ul {
    list-style: disc;
    margin-left: 20px;
}

/* Boutons supplémentaires pour le code/notebook */
.second-btn {
    background-color: #6c757d; 
    margin-left: 15px;
}

.second-btn:hover {
    background-color: #5a6268;
}

/* ------------------------------------------------------------------ */
/* --- Media Queries pour la responsivité (Adaptation aux écrans plus petits) --- */
/* ------------------------------------------------------------------ */

@media (max-width: 1000px) {
    /* Styles pour la page principale (index.html) */
    body {
        flex-direction: column;
    }

    .sidebar {
        position: static;
        width: 100%;
        height: auto;
        padding: 20px;
        flex-direction: row; 
        flex-wrap: wrap;
        justify-content: space-around;
    }
    
    .profile {
        width: 100%;
    }

    .main-nav {
        width: 100%;
        margin-top: 10px;
        order: 3; 
    }
    
    .main-nav ul {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .main-nav li {
        margin: 5px 10px;
    }

    .main-nav a {
        padding: 8px 15px;
    }

    .content-area {
        margin-left: 0;
        padding: 20px;
    }
    
    .social-links {
        margin-top: 15px;
        padding-top: 10px;
        order: 2; 
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 768px) {
    /* Styles spécifiques pour les pages de détail de projet (project1.html) sur mobile */
    .project-header {
        padding: 20px;
    }
    .project-content-area {
        width: 100%;
        padding: 0 15px;
    }
    .project-header h1 {
        font-size: 1.5em;
    }
}
