/* ================================================================= */
/* IMPORT FONT (NÉCESSITE UN LIEN DANS VOTRE HTML)            */
/* ================================================================= */
/* Recommandé : Ajoutez <link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&display=swap" rel="stylesheet"> à votre <head> */

/* ================================================================= */
/* GLOBAL & TYPOGRAPHY                                        */
/* ================================================================= */
:root {
    --bg-color: #FFFFFF;         /* Fond blanc */
    --surface-color: #F8F9FA;    /* Gris très clair pour les surfaces */
    --accent-color: #007BFF;     /* Bleu vif pour l'accentuation principale */
    --secondary-accent-color: #E83E8C; /* Rose pour les accents secondaires */
    --text-color: #212529;       /* Texte noir/gris foncé */
    --text-secondary: #6C757D;   /* Texte secondaire/gris */
}

body {
    font-family: 'Montserrat', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.7;
    scroll-behavior: smooth;
}

/* Sélection de texte */
::selection {
    background: var(--secondary-accent-color);
    color: var(--bg-color);
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease-in-out;
    font-weight: 600;
}

a:hover {
    color: #0056b3; /* Un bleu plus foncé au survol */
}

/* ================================================================= */
/* HEADER & NAVIGATION                                        */
/* ================================================================= */
header {
    background: var(--bg-color);
    padding: 1.5rem 0;
    text-align: center;
    border-bottom: 1px solid #DEE2E6; /* Ligne de séparation subtile */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

header h1 {
    margin: 0;
    font-size: 2.2rem;
    color: var(--accent-color);
    font-weight: 700;
}

nav {
    margin-top: 1rem;
}

nav a {
    color: var(--text-color);
    margin: 0 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    position: relative;
    padding-bottom: 8px;
    font-size: 0.9rem;
}

nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: 0;
    left: 50%;
    background: linear-gradient(90deg, var(--accent-color), var(--secondary-accent-color));
    transition: width 0.3s ease-in-out, left 0.3s ease-in-out;
    border-radius: 2px;
}

nav a:hover::after {
    width: 100%;
    left: 0;
}

/* ================================================================= */
/* SECTIONS & TITRES                                          */
/* ================================================================= */
section {
    padding: 5rem 2rem;
    max-width: 1000px;
    margin: auto;
}

section h1, section h2 {
    color: var(--text-color);
    font-size: 2.5rem;
    font-weight: 700;
    text-align: left;
    margin-bottom: 2rem;
    padding-bottom: 0.8rem;
    position: relative;
}

section h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color), var(--secondary-accent-color));
    margin-top: 10px;
    border-radius: 2px;
}

.profile p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Styles pour les listes */
.skills ul, .education ul, .experience ul {
    list-style: none;
    padding-left: 0;
}

.skills li, .education li, .experience li {
    background-color: var(--surface-color);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    border-left: 4px solid var(--accent-color); /* Bordure bleue */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

/* ================================================================= */
/* LISTES IMBRIQUÉES DANS FORMATION/EXPÉRIENCE */
/* ================================================================= */

.experience li ul,
.education li ul {
    list-style-type: '✓'; /* Icône de coche */
    padding-left: 20px;
    margin-top: 15px;
}

.experience li ul li,
.education li ul li {
    background-color: transparent;
    border-left: none;
    border-radius: 0;
    padding: 5px 0;
    margin-bottom: 5px;
    color: var(--text-secondary);
    padding-left: 10px;
    box-shadow: none;
}

.experience li ul li::marker,
.education li ul li::marker {
    color: var(--accent-color);
    font-weight: bold;
}

/* ================================================================= */
/* TIMELINE (EXPERIENCE)                                      */
/* ================================================================= */

.experience .timeline {
    position: relative;
    padding-left: 3rem;
    margin-left: 0.5rem;
    list-style: none;
}

/* The vertical line */
.experience .timeline::before {
    content: '';
    position: absolute;
    left: 1.5rem; /* Center of the padding */
    transform: translateX(-50%);
    top: 0;
    bottom: 20px;
    width: 4px;
    background: linear-gradient(to bottom, var(--accent-color), var(--secondary-accent-color));
    border-radius: 2px;
}

.experience .timeline > li {
    position: relative;
    border-left: none; /* Override default border */
    margin-bottom: 30px;
}

/* The dot on the timeline */
.experience .timeline > li::before {
    content: '';
    position: absolute;
    left: -1.5rem; /* Match the line's position relative to LI */
    transform: translate(-50%, 0);
    top: 25px;
    width: 14px;
    height: 14px;
    background: var(--bg-color);
    border: 3px solid var(--accent-color);
    border-radius: 50%;
    z-index: 2;
    box-shadow: 0 0 0 4px var(--bg-color); /* Cutout effect */
}

/* ================================================================= */
/* TIMELINE (FORMATIONS)                                      */
/* ================================================================= */

.education .timeline {
    position: relative;
    padding-left: 3rem;
    margin-left: 0.5rem;
    list-style: none;
}

/* The vertical line */
.education .timeline::before {
    content: '';
    position: absolute;
    left: 1.5rem; /* Center of the padding */
    transform: translateX(-50%);
    top: 0;
    bottom: 20px;
    width: 4px;
    background: linear-gradient(to bottom, var(--accent-color), var(--secondary-accent-color));
    border-radius: 2px;
}

.education .timeline > li {
    position: relative;
    border-left: none; /* Override default border */
    margin-bottom: 30px;
}

/* The dot on the timeline */
.education .timeline > li::before {
    content: '';
    position: absolute;
    left: -1.5rem; /* Match the line's position relative to LI */
    transform: translate(-50%, 0);
    top: 25px;
    width: 14px;
    height: 14px;
    background: var(--bg-color);
    border: 3px solid var(--accent-color);
    border-radius: 50%;
    z-index: 2;
    box-shadow: 0 0 0 4px var(--bg-color); /* Cutout effect */
}

/* ================================================================= */
/* TIMELINE (FORMATIONS)                                      */
/* ================================================================= */

.skills .timeline {
    position: relative;
    padding-left: 3rem;
    margin-left: 0.5rem;
    list-style: none;
}

/* The vertical line */
.skills .timeline::before {
    content: '';
    position: absolute;
    left: 1.5rem; /* Center of the padding */
    transform: translateX(-50%);
    top: 0;
    bottom: 20px;
    width: 4px;
    background: linear-gradient(to bottom, var(--accent-color), var(--secondary-accent-color));
    border-radius: 2px;
}

.skills .timeline > li {
    position: relative;
    border-left: none; /* Override default border */
    margin-bottom: 30px;
}

/* The dot on the timeline */
.skills .timeline > li::before {
    content: '';
    position: absolute;
    left: -1.5rem; /* Match the line's position relative to LI */
    transform: translate(-50%, 0);
    top: 25px;
    width: 14px;
    height: 14px;
    background: var(--bg-color);
    border: 3px solid var(--accent-color);
    border-radius: 50%;
    z-index: 2;
    box-shadow: 0 0 0 4px var(--bg-color); /* Cutout effect */
}

/* ================================================================= */
/* PROJECTS (MES JEUX)                                        */
/* ================================================================= */

.projects h1 {
    text-align: center;
    color: var(--text-color);
}

.games-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 35px;
    padding: 20px 0;
}

.game-card {
    background: var(--bg-color);
    border: 1px solid #E9ECEF;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.07);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.1);
}

.game-card h2 {
    color: var(--accent-color);
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.8rem;
    border-bottom: 1px solid #DEE2E6;
    padding-bottom: 10px;
}

.game-card h2::after {
    content: none;
}

.game-card p {
    color: var(--text-secondary);
    font-size: 1rem;
}

.game-card iframe {
    width: 100%;
    margin-top: 15px;
    border: 1px solid #DEE2E6;
    border-radius: 8px;
}

.more-link {
    text-align: center;
    margin-top: 60px;
    font-size: 1.2rem;
    font-weight: 600;
}


/* ================================================================= */
/* FOOTER & SOCIAL MEDIA                                      */
/* ================================================================= */
footer {
    background: var(--surface-color);
    color: var(--text-secondary);
    text-align: center;
    padding: 2rem 0;
    border-top: 1px solid #DEE2E6;
}

.social-media {
    display: flex;
    gap: 25px;
    justify-content: center;
    margin-top: 1rem;
}

.social-icon {
    font-size: 22px;
    color: var(--text-secondary);
    transition: transform 0.3s ease, color 0.3s ease;
}

.social-icon:hover {
    transform: scale(1.2);
    color: var(--accent-color);
}

.social-icon i {
    font-size: 28px;
}

/* Suppression des styles de fond spécifiques */
.twitter, .instagram, .linkedin, .github { background-color: transparent !important; }

/* ================================================================= */
/* UTILITAIRES & RESPONSIVE                                   */
/* ================================================================= */

code {
    background: #e9ecef;
    color: var(--secondary-accent-color);
    padding: 3px 7px;
    border-radius: 5px;
    font-family: "Courier New", Courier, monospace;
}

/* RESPONSIVE */
@media only screen and (max-width: 768px) {
    section {
        padding: 3.5rem 1rem;
    }
    
    header h1 {
        font-size: 1.8rem;
    }

    nav a {
        display: block;
        margin: 0.8rem 0;
        font-size: 1rem;
    }

    nav a::after {
        content: none;
    }

    .experience .timeline {
        padding-left: 2rem;
        margin-left: 0;
    }

    .experience .timeline::before {
        left: 1rem;
    }

    .experience .timeline > li::before {
        left: -1rem;
    }
}

/* Alternating background for sections */
section.alt-background {
    background-color: var(--surface-color);
}

/* ================================================================= */
/* MODÈLES 3D & IMAGES DE PRÉVISUALISATION                    */
/* ================================================================= */

model-viewer {
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.image-card .model-preview-img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    border-radius: 12px;
    margin-top: 15px;
}

.image-card h2 {
    color: var(--text-color);
    border-bottom: 1px solid #DEE2E6;
}

/* ================================================================= */
/* FULLSCREEN IMG                                             */
/* ================================================================= */
.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.95); /* Fond blanc semi-transparent */
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 99999;
}

#fullscreen-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.15);
}

.close {
    position: absolute;
    top: 25px;
    right: 45px;
    font-size: 45px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: var(--accent-color);
}