/* --- CONFIGURATION GLOBALE & VARIABLES --- */
:root {
    --primary-color: #0a2540; /* Bleu nuit profond */
    --secondary-color: #00d4ff; /* Cyan vibrant pour la data */
    --accent-color: #f0f4f8; /* Gris très clair pour le fond */
    --text-color: #334e68; /* Gris bleuté pour le texte */
    --white: #ffffff;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --radius: 12px;
    --transition: all 0.3s ease;
}

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

body {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    background-color: var(--accent-color);
    color: var(--text-color);
    font-size: 16px; /* Taille plus standard pro */
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* --- HEADER & NAVIGATION --- */
header {
    background-color: var(--white);
    padding: 15px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
}

nav ul {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 0;
}

nav ul li a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 600;
    padding: 10px 20px;
    font-size: 15px;
    border-radius: 50px;
    transition: var(--transition);
    position: relative;
}

nav ul li a:hover {
    color: var(--secondary-color);
    background-color: rgba(0, 212, 255, 0.05);
}

nav ul li a.active {
    background-color: var(--primary-color);
    color: var(--white);
    box-shadow: 0 4px 10px rgba(10, 37, 64, 0.3);
}

/* --- LAYOUT & SECTIONS --- */
section {
    padding: 120px 20px 60px; /* Padding top pour compenser le header fixe */
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

h1 {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 50px;
    position: relative;
}

h1::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--secondary-color);
    margin: 10px auto 0;
    border-radius: 2px;
}

h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 15px;
}

/* --- INDEX (ACCUEIL) --- */
.hero-content {
    text-align: center;
    background: var(--white);
    padding: 60px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.btn-cta {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 30px;
    background: linear-gradient(90deg, var(--primary-color), #163c61);
    color: var(--white);
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    transition: var(--transition);
}

.btn-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(10, 37, 64, 0.2);
}

/* --- A PROPOS (GRID) --- */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-top: 4px solid transparent;
}

.card:hover {
    transform: translateY(-5px);
    border-top: 4px solid var(--secondary-color);
}

.photo-container {
    text-align: center;
}

.photo-container img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 50%;
    border: 5px solid var(--white);
    box-shadow: var(--shadow);
}

/* --- COMPETENCES --- */
.ue-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.ue-item {
    background: var(--primary-color);
    color: var(--white);
    padding: 40px 20px;
    border-radius: var(--radius);
    cursor: pointer;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.ue-item::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1));
    opacity: 0;
    transition: var(--transition);
}

.ue-item:hover {
    transform: scale(1.03);
    box-shadow: 0 15px 30px rgba(10, 37, 64, 0.3);
}

.ue-item:hover::before { opacity: 1; }

.project-display {
    margin-top: 50px;
    text-align: center;
}

#project-image {
    max-width: 100%;
    max-height: 500px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid #ddd;
}

/* --- EXPERIENCE (TIMELINE) --- */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline-item {
    background: var(--white);
    padding: 20px 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 30px;
    position: relative;
    border-left: 5px solid var(--secondary-color);
}

.timeline-date {
    font-size: 0.9rem;
    color: #888;
    font-weight: 600;
    margin-bottom: 5px;
    display: block;
}

/* --- CV --- */
.cv-container {
    text-align: center;
}
.cv-image {
    max-width: 80%;
    box-shadow: var(--shadow);
    border-radius: var(--radius);
}

/* --- CONTACT & JEU --- */
.game-container {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.game-container button {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    padding: 12px 25px;
    border: none;
    border-radius: 50px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 15px;
    transition: var(--transition);
}

.game-container button:hover {
    background-color: #00b8e6;
    transform: scale(1.05);
}

.game-container input {
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 8px;
    width: 60%;
    margin-top: 10px;
}

.hidden { display: none; }

/* --- FOOTER --- */
footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 40px 0;
    margin-top: auto;
    text-align: center;
}

.footer-description { opacity: 0.8; margin-bottom: 20px; }

.footer-contacts {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.footer-contacts a {
    color: var(--white);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255,255,255,0.1);
    border-radius: 30px;
    transition: var(--transition);
}

.footer-contacts a:hover {
    background: var(--secondary-color);
    color: var(--primary-color);
}

.social-icon { width: 20px; height: 20px; filter: brightness(0) invert(1); } /* Rend les icônes blanches */

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    nav ul { flex-direction: column; align-items: center; gap: 15px; }
    .about-grid { grid-template-columns: 1fr; }
    .cv-image { max-width: 100%; }
}