/* Variables pour gérer facilement tes couleurs */
:root {
    --primary-color: #6EADA3;
    --primary-dark: #517f78;
    --bg-light: #f8fbfb;
    --text-main: #333333;
    --text-light: #666666;
    --card-bg: #ffffff;
    --shadow-soft: 0 8px 25px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 15px 35px rgba(110, 173, 163, 0.2);
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-light);
    color: var(--text-main);
    font-family: 'Roboto', sans-serif;
    font-size: 17px;
    margin: 0;
    padding: 0;
}

/* ================= HEADER ================= */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 65px;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px); /* Effet moderne de flou */
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    box-sizing: border-box;
    padding: 0 40px;
}

header h2 {
    color: var(--primary-dark);
    font-weight: 700;
    margin: 0;
}

header nav a {
    text-decoration: none;
    color: var(--text-main);
    margin: 0 15px;
    font-weight: 500;
    transition: var(--transition);
}

header nav a:hover {
    color: var(--primary-color);
}

/* ================= SECTION HERO (TOP) ================= */
#Top {
    height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(81, 127, 120, 0.6)), url('img/developpement-web.jpg') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

#Top-content {
    color: white;
}

#Top-content h1 {
    font-size: 3.5em;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

#Top-content p {
    font-size: 1.5em;
    font-weight: 300;
}

/* ================= SECTIONS GÉNÉRALES ================= */
.info {
    max-width: 1100px;
    margin: 80px auto;
    padding: 0 20px;
}

section h2 {
    text-align: center;
    font-size: 2.2em;
    color: var(--primary-dark);
    margin-bottom: 10px;
}

hr {
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    border: none;
    border-radius: 2px;
    margin: 0 auto 40px auto;
}

/* ================= À PROPOS ================= */
.about-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    background: var(--card-bg);
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
}

.about-text p {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 15px;
}

#avatar {
    width: 100%;
    max-width: 300px;
    border-radius: 50%;
    border: 5px solid var(--primary-color);
    box-shadow: var(--shadow-soft);
}

/* ================= COMPÉTENCES ================= */
.conteneur-imageCompetences {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 20px;
    justify-content: center; /* Centre les éléments s'il n'y en a pas assez pour remplir la ligne */
}
.imageCompetence {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 15px;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: var(--transition);
}

.imageCompetence:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.imageCompetence img {
    max-width: 60px;
    margin-bottom: 15px;
}

.imageCompetence p {
    margin: 0;
    font-weight: 500;
}

/* ================= PROJETS & FORMATIONS ================= */
#cont-Projet, #cont-Formation {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    display: block;
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    height: 250px;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
    position: relative;
}

.card img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Empêche l'image de s'écraser */
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.card:hover img {
    transform: scale(1.05); /* Petit zoom sympa au survol */
}

/* Tooltip Formation */
.hover-text-container {
    cursor: pointer;
}

.hover-text {
    visibility: hidden;
    width: 80%;
    background-color: var(--primary-dark);
    color: white;
    text-align: center;
    border-radius: 6px;
    padding: 10px;
    position: absolute;
    z-index: 10;
    bottom: 20px;
    left: 10%;
    opacity: 0;
    transition: var(--transition);
}

.hover-text-container:hover .hover-text {
    visibility: visible;
    opacity: 1;
}

/* ================= CONTACT ================= */
.contact-links {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.contact-links img {
    max-width: 60px;
    transition: var(--transition);
}

.contact-links img:hover {
    transform: scale(1.2);
}

/* ================= FOOTER ================= */
footer {
    background-color: var(--primary-dark);
    color: white;
    text-align: center;
    padding: 20px 0;
    margin-top: 50px;
}

footer p {
    margin: 0;
    font-size: 0.9em;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        height: auto;
        padding: 15px;
        position: relative; /* Retire le header fixé sur mobile pour gagner de la place */
    }

    header nav {
        margin-top: 10px;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    header nav a {
        margin: 5px;
    }

    #Top-content h1 {
        font-size: 2.5em;
    }

    .about-content {
        flex-direction: column-reverse;
        padding: 20px;
    }

    #avatar {
        max-width: 200px;
    }

    .card {
        height: 200px;
    }
}