/* =========================================
   1. BASE ET TYPOGRAPHIE
   ========================================= */
body {
    font-family: 'Poppins', sans-serif;
    background-color: #121214; 
    color: #ffffff; 
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh; 
}

main {
    flex: 1; 
}

/* =========================================
   2. BARRE DE NAVIGATION
   ========================================= */
.navbar {
    background-color: #1a1a1e;
    padding: 15px 20px;
    border-bottom: 1px solid #333;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.nav-logo {
    color: #00adb5; 
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-logo:hover {
    color: white;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 25px;
    margin: 0;
    padding: 0;
}

.nav-links li a {
    color: #e0e0e0;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.nav-links li a:hover {
    color: #00adb5;
}

/* Adaptation de la barre de navigation pour les téléphones */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column; /* Force les éléments à s'empiler à la verticale */
        gap: 15px; /* Ajoute un peu d'espace entre le logo et les liens */
    }

    .nav-links {
        justify-content: center; /* Centre les liens */
        flex-wrap: wrap; /* Permet aux liens de passer à la ligne sur de très petits écrans */
        gap: 15px; /* Réduit légèrement l'espacement entre les liens sur mobile */
    }
}

/* =========================================
   3. ACCUEIL : HERO ET A PROPOS
   ========================================= */
.hero {
    background: linear-gradient(135deg, #1a1a1e 0%, #082025 100%);
    padding: 120px 20px;
    text-align: center;
    border-bottom: 1px solid #222;
}

.hero-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.1rem;
    color: #b0b0b0;
    max-width: 600px;
    margin: 0 auto 30px auto;
}

.quick-about {
    padding: 80px 20px;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.quick-about h2 {
    font-weight: 700;
    margin-bottom: 20px;
    color: #00adb5; 
}

.quick-about p {
    font-size: 1.1rem;
    color: #cccccc;
    line-height: 1.6;
}

/* =========================================
   4. BOUTONS
   ========================================= */
.btn-brand, .btn-hero {
    background-color: #00adb5;
    color: white;
    font-weight: 600;
    padding: 12px 28px;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    display: inline-block;
}

.btn-brand:hover, .btn-hero:hover {
    background-color: #008c95;
    color: white;
    transform: translateY(-2px);
}

/* =========================================
   5. PAGE PROJETS
   ========================================= */
.project-card {
    background-color: #1a1a1e;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #333;
}

.project-card:hover {
    transform: translateY(-8px); 
    border-color: #00adb5 !important; 
    box-shadow: 0 10px 20px rgba(0, 173, 181, 0.2); 
}

.object-fit-cover {
    object-fit: cover;
}

/* =========================================
   6. PIED DE PAGE
   ========================================= */
.footer {
    background-color: #0d0d0f;
    color: #666;
    text-align: center;
    padding: 25px 20px;
    margin-top: auto;
    border-top: 1px solid #222;
    font-size: 0.9rem;
}

/* =========================================
   7. PARCOURS (Level Map)
   ========================================= */
.level-map {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 0;
}

/* La ligne centrale du chemin */
.level-map::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 6px;
    background: #333;
    transform: translateX(-50%);
    border-radius: 3px;
    z-index: 1;
}

/* Conteneur d'un niveau */
.level-node {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 80px;
    position: relative;
    z-index: 2;
    width: 100%;
}

/* Inverser l'ordre pour mettre la carte à gauche une fois sur deux */
.level-node.left {
    flex-direction: row-reverse;
}

/* Le rond du niveau (Point de sauvegarde) */
.level-marker {
    width: 70px;
    height: 70px;
    background-color: #1a1a1e;
    border: 4px solid #333;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    transition: all 0.4s ease;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

/* Effet "Niveau sélectionné" au survol */
.level-node:hover .level-marker {
    border-color: #00adb5;
    background-color: #00adb5;
    box-shadow: 0 0 25px rgba(0, 173, 181, 0.8);
    transform: translateX(-50%) scale(1.15);
}

/* Conteneur de la carte de texte */
.level-content {
    width: 42%;
    position: relative;
}

/* Adaptation pour les téléphones (Design vertical simple) */
@media (max-width: 768px) {
    .level-map::before {
        left: 40px;
    }
    .level-marker {
        left: 40px;
    }
    .level-node, .level-node.left {
        flex-direction: column;
        align-items: flex-start;
        padding-left: 100px;
        margin-bottom: 50px;
    }
    .level-content {
        width: 100%;
    }
}

/* 1. Le connecteur passe en arrière-plan avec z-index: -1 */
.level-node::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 8%; 
    height: 4px;
    background-color: #333;
    z-index: -1; /* <-- C'est ici la magie, le trait passe derrière */
    transition: all 0.4s ease;
}

.level-node:not(.left)::after {
    left: 42%;
}
.level-node.left::after {
    right: 42%;
}

.level-node:hover::after {
    background-color: #00adb5;
    box-shadow: 0 0 15px rgba(0, 173, 181, 0.6);
}

@media (max-width: 768px) {
    .level-node::after {
        display: none;
    }
}

/* =========================================
   8. COMPETENCES (Statistiques du joueur)
   ========================================= */
/* Grille pour afficher les cartes côte à côte sur grand écran */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Espacement entre chaque compétence */
.skill-item {
    margin-bottom: 25px;
}

/* Conteneur du texte (Nom de la compétence + Niveau) */
.skill-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-weight: 600;
    color: #e0e0e0;
}

.skill-level-text {
    color: #00adb5; /* Ton bleu cyan habituel */
    font-size: 0.9rem;
    font-family: monospace; /* Donne un petit côté "code/terminal" au niveau */
}

/* Le fond noir de la jauge */
.skill-bar-container {
    width: 100%;
    height: 12px;
    background-color: #121214; /* Couleur de fond de ton site */
    border: 1px solid #333;
    border-radius: 6px;
    overflow: hidden; /* Empêche le remplissage de déborder des coins arrondis */
}

/* Le remplissage bleu de la jauge */
.skill-bar-fill {
    height: 100%;
    background-color: #00adb5;
    border-radius: 6px;
    box-shadow: 0 0 10px rgba(0, 173, 181, 0.4); /* Effet lumineux */
    position: relative;
    /* Animation stylée au chargement de la page */
    animation: fillBar 1.2s ease-out forwards;
    transform-origin: left;
}

/* Petit reflet de lumière sur le haut de la jauge pour le volume */
.skill-bar-fill::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 50%;
    background: rgba(255, 255, 255, 0.15);
}

/* L'animation qui fait grandir la barre de 0 à sa taille finale */
@keyframes fillBar {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

/* =========================================
   Ajustement des images/logos dans les compétences 
   pour matcher la taille de FontAwesome
   ========================================= */
.skill-name img {
    width: 1.25em;        /* Largeur équivalente à une icône FontAwesome standard */
    height: 1.25em;       /* Hauteur équivalente */
    object-fit: contain;  /* Empêche l'image de s'écraser ou se déformer */
    vertical-align: -0.125em; /* Aligne l'image parfaitement avec le texte, comme le fait FontAwesome */
}

/* Optionnel : Harmoniser l'espacement pour toutes les icônes (images ou FontAwesome) */
.skill-name i, 
.skill-name img {
    margin-right: 8px;
}