/* * =============================================
 * CSS THÈME "INFORMATIQUE" (Dark Mode)
 * =============================================
*/

:root {
    --bg-dark: #0a0f18;       /* Fond bleu très sombre */
    --bg-card: #121a2a;       /* Fond des "cartes" */
    --text-primary: #e0e0e0;  /* Texte principal (gris clair) */
    --text-secondary: #a0a0a0;/* Texte secondaire (gris) */
    --accent-green: #39FF14;  /* Vert "Hacker" */
    --accent-blue: #00aaff;   /* Bleu électrique */
    --border-color: #2a3a5a;
}

/* Style de la barre de défilement (pour un look "tech") */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: var(--accent-blue);
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-green);
}

/* Initialisation */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth; /* Défilement fluide */
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Lato', sans-serif;
    line-height: 1.7;
}

/* Conteneur principal */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* * =============================================
 * HEADER & NAVIGATION
 * =============================================
*/
header {
    background-color: rgba(18, 26, 42, 0.85); /* Fond de carte semi-transparent */
    backdrop-filter: blur(10px); /* Effet de verre */
    border-bottom: 1px solid var(--border-color);
    padding: 20px 0;
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Fira Code', monospace;
    font-size: 1.5rem;
    color: var(--accent-green);
    text-decoration: none;
    /* Effet de lueur */
    text-shadow: 0 0 5px var(--accent-green);
}

nav ul {
    display: flex;
    list-style: none;
}

nav li {
    margin-left: 25px;
}

nav a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: bold;
    padding: 5px 0;
    position: relative;
    transition: color 0.3s;
}

/* Effet de "soulignement" au survol */
nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: var(--accent-green);
    bottom: 0;
    left: 0;
    transition: width 0.3s;
}
nav a:hover {
    color: var(--accent-green);
}
nav a:hover::after {
    width: 100%;
}

/* * =============================================
 * SECTION HÉROS (ACCUEIL)
 * =============================================
*/
#accueil {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 80vh;
    padding-top: 50px;
}

.hero-text {
    flex: 2;
}

.hero-text h1 {
    font-family: 'Fira Code', monospace;
    font-size: 3rem;
    color: #fff;
    margin-bottom: 10px;
}

/* Effet de "curseur qui tape" */
.hero-text .subtitle {
    font-size: 1.5rem;
    color: var(--accent-blue);
    font-family: 'Fira Code', monospace;
    border-right: 3px solid var(--accent-green); /* Le curseur */
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    animation: 
        typing 3.5s steps(40, end) forwards,
        blink-caret .75s step-end infinite;
}

/* Animations @keyframes pour l'effet "typing" */
@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}
@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: var(--accent-green); }
}


.hero-text p {
    font-size: 1.1rem;
    margin: 20px 0;
}

.cta-button {
    display: inline-block;
    background: transparent;
    color: var(--accent-green);
    border: 2px solid var(--accent-green);
    padding: 12px 25px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    transition: all 0.3s;
    margin-right: 15px;
}
.cta-button:hover {
    background: var(--accent-green);
    color: var(--bg-dark);
    box-shadow: 0 0 15px var(--accent-green);
}

.hero-pic {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-pic img {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--border-color);
    box-shadow: 0 0 20px rgba(0, 170, 255, 0.4);
}

/* * =============================================
 * SECTIONS GÉNÉRIQUES & CARTES
 * =============================================
*/
section {
    padding: 80px 0;
}

#accueil {
     border-bottom: 1px dashed var(--border-color);
}


h2.section-title {
    font-family: 'Fira Code', monospace;
    font-size: 2.5rem;
    color: var(--accent-blue);
    text-align: center;
    margin-bottom: 50px;
    text-transform: uppercase;
}
h2.section-title::after {
    content: '_';
    color: var(--accent-green);
    animation: blink-caret .75s step-end infinite;
}

/* Style des "Cartes" */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
    overflow: hidden; /* Empêche les enfants (l'image) de déborder */
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 20px rgba(57, 255, 20, 0.2);
    border-color: var(--accent-green);
}

.card h3 {
    color: var(--accent-green);
    font-family: 'Fira Code', monospace;
    margin-bottom: 5px;
}
.card-sub {
    color: var(--accent-blue);
    font-style: italic;
    margin-bottom: 15px;
}

/* * =============================================
 * SECTION COMPÉTENCES
 * =============================================
*/
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.skill-category {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 25px;
    border-radius: 8px;
}

.skill-category h3 {
    color: var(--accent-green);
    font-family: 'Fira Code', monospace;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.skill-category ul {
    list-style: none;
}
.skill-category li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 10px;
}
.skill-category li::before {
    content: '»'; 
    position: absolute;
    left: 0;
    top: -2px;
    color: var(--accent-green);
    font-weight: bold;
    font-size: 1.2rem;
}

/* * =============================================
 * FOOTER & CONTACT
 * =============================================
*/
#contact {
    text-align: center;
    border-top: 1px dashed var(--border-color);
}
#contact p {
    font-size: 1.1rem;
    margin-bottom: 30px;
}
#contact a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: color 0.3s;
}
#contact a:hover {
    color: var(--accent-green);
    text-decoration: underline;
}

footer {
    text-align: center;
    padding: 40px 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.hobbies {
    display: flex;
    justify-content: center;
    flex-wrap: wrap; /* Pour les petits écrans */
    gap: 15px; /* Espace entre les hobbies */
    margin-top: 10px;
}
.hobbies span {
    background: var(--border-color);
    color: var(--text-primary);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.9rem;
}

/* * =============================================
 * *** RÈGLE DÉFINITIVE POUR LES IMAGES PROJET ***
 * =============================================
*/
.card img {
    max-width: 100%;  /* L'image ne sera JAMAIS plus large que la carte */
    height: auto;       /* Garde le bon ratio hauteur/largeur */
    border-radius: 6px; 
    margin-top: 20px; 
    border: 1px solid var(--border-color);
    display: block; 
}


/* * =============================================
 * RESPONSIVE DESIGN (pour mobile)
 * =============================================
*/
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
    }
    nav {
        margin-top: 15px;
    }
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    nav li {
        margin: 5px 10px;
    }
    
    #accueil {
        flex-direction: column-reverse;
        text-align: center;
        padding: 40px 0;
    }
    .hero-text h1 {
        font-size: 2.5rem;
    }
    .hero-text .subtitle {
        font-size: 1.2rem;
        animation: none;
        border-right: none;
        white-space: normal;
        overflow: visible;
    }
    .hero-pic img {
        width: 200px;
        height: 200px;
        margin-bottom: 30px;
    }
    
    h2.section-title {
        font-size: 2rem;
    }
}