/* style.css - Style "Clean & Élégant" avec menu réductible, footer corrigé et animations améliorées */

/* Variables CSS */
:root {
    --primary-color: #3f51b5; /* Bleu Indigo Profond */
    --secondary-color: #5c6bc0; /* Bleu Indigo plus clair */
    --dark-text-color: #212121; /* Gris très foncé pour le texte principal et le footer */
    --light-text-color: #616161; /* Gris moyen pour le texte secondaire */
    --bg-color-light: #f8f9fa; /* Fond très clair, presque blanc */
    --bg-color-medium: #ffffff; /* Blanc pur pour les cartes/sections et texte clair du footer */
    --border-color: #e0e0e0; /* Gris clair pour les bordures */
    --shadow-color: rgba(0, 0, 0, 0.08); /* Ombre douce */

    --font-heading: 'Montserrat', sans-serif; /* Police moderne pour les titres */
    --font-body: 'Lato', sans-serif; /* Police très lisible pour le corps */
}

/* Importation des nouvelles polices (déplacée ici pour une meilleure gestion) */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&family=Lato:wght@300;400;700&display=swap');


/* Réinitialisation de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    line-height: 1.7;
    color: var(--light-text-color);
    background-color: var(--bg-color-light);
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased; /* Meilleur rendu du texte sur WebKit */
    -moz-osx-font-smoothing: grayscale; /* Meilleur rendu du texte sur Firefox */
}

.container {
    max-width: 1100px; /* Légèrement plus étroit pour un look plus compact */
    margin: 0 auto;
    padding: 0 25px;
}

/* Typographie */
h1, h2, h3 {
    font-family: var(--font-heading);
    color: var(--dark-text-color);
    margin-bottom: 1rem;
    line-height: 1.25;
}

h1 {
    font-size: 3.2rem;
    font-weight: 700;
    color: var(--dark-text-color);
    transition: font-size 0.3s ease; /* Transition pour le H1 */
}

h2 {
    font-size: 2.6rem;
    text-align: center;
    margin-bottom: 3.5rem;
    position: relative;
    font-weight: 600;
    color: var(--dark-text-color);
}

h2::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -15px;
    transform: translateX(-50%);
    width: 70px; /* Plus court et plus élégant */
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

h3 {
    font-size: 1.9rem;
    color: var(--dark-text-color);
    font-weight: 600;
}

p {
    margin-bottom: 1.2rem;
    font-size: 1.05rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease, transform 0.2s ease;
}

a:hover {
    color: var(--secondary-color);
    transform: translateY(-1px);
}

ul {
    list-style: none;
}

/* Header */
header {
    background-color: var(--bg-color-medium);
    padding: 1.5rem 0; /* Padding initial */
    text-align: center;
    box-shadow: 0 2px 10px var(--shadow-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    transition: padding 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease; /* Transition pour le header */
}

/* Styles quand le header est scrollé */
header.scrolled {
    padding: 0.8rem 0; /* Padding réduit */
    background-color: rgba(255, 255, 255, 0.95); /* Légèrement transparent pour un effet subtil */
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.1); /* Ombre plus légère */
}

header h1 {
    font-size: 3.2rem; /* Taille initiale du H1 */
    transition: font-size 0.3s ease;
}

header.scrolled h1 {
    font-size: 2.5rem; /* Taille réduite du H1 */
}

header .subtitle {
    font-family: var(--font-body);
    font-size: 1.2rem;
    color: var(--light-text-color);
    margin-top: 0.4rem;
    margin-bottom: 1.2rem;
    font-weight: 400;
    transition: font-size 0.3s ease, margin 0.3s ease; /* Transition pour le subtitle */
}
header.scrolled .subtitle {
    font-size: 0.9rem; /* Taille réduite du subtitle */
    margin-top: 0.2rem;
    margin-bottom: 0.8rem;
}


header nav ul {
    display: flex;
    justify-content: center;
    gap: 20px; /* Espacement équilibré */
    margin-top: 1.2rem;
    transition: margin-top 0.3s ease; /* Transition pour le margin-top de la nav */
}

header.scrolled nav ul {
    margin-top: 0.8rem; /* Margin-top réduit */
}

header nav a {
    color: var(--dark-text-color);
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 1rem; /* Taille de police initiale */
    padding: 0.6rem 1.1rem;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, font-size 0.3s ease, padding 0.3s ease; /* Transition pour les liens */
    position: relative;
    overflow: hidden;
}

header.scrolled nav a {
    font-size: 0.85rem; /* Taille de police réduite */
    padding: 0.4rem 0.8rem; /* Padding réduit */
}


header nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%; /* Centré */
    transform: translateX(-50%) scaleX(0); /* Commence caché au centre */
    width: 80%; /* Largeur de la barre */
    height: 3px;
    background-color: var(--primary-color);
    transition: transform 0.3s ease-out;
    border-radius: 2px;
}
header nav a:hover {
    color: var(--primary-color);
    background-color: rgba(63, 81, 181, 0.08); /* Léger fond au survol */
    box-shadow: 0 3px 10px rgba(63, 81, 181, 0.1); /* Ombre discrète */
}

header nav a:hover::after {
    transform: translateX(-50%) scaleX(1); /* Se déploie depuis le centre */
}

/* Section Héro (À Propos) */
.hero {
    /* Nouvelle image de fond avec dégradé subtil */
    background: linear-gradient(to bottom, rgba(248, 249, 250, 0.95), rgba(255, 255, 255, 0.95)), url('https://source.unsplash.com/random/1920x1080/?tech,network,abstract') no-repeat center center/cover;
    background-attachment: fixed;
    padding: 9rem 0;
    text-align: center;
    color: var(--dark-text-color);
    position: relative;
    overflow: hidden;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.profile-pic {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-color);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.profile-pic:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.intro-text h2 {
    font-size: 3rem;
    margin-bottom: 1.2rem;
    color: var(--dark-text-color);
    font-weight: 700;
}
.intro-text p {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--light-text-color);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Sections générales */
main section { /* Cible les sections à l'intérieur de main */
    padding: 6.5rem 0;
    background-color: var(--bg-color-medium);
    border-bottom: 1px solid var(--border-color);
}

main section:last-of-type {
    border-bottom: none;
}

/* Section Compétences */
.skills-section {
    background-color: var(--bg-color-light); /* Lighter background for contrast */
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
    margin-top: 4rem;
}

.skill-card {
    background-color: var(--bg-color-medium);
    border-radius: 8px;
    padding: 2.8rem;
    box-shadow: 0 4px 15px var(--shadow-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-left-color 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    border-left: 5px solid var(--border-color); /* Ligne élégante à gauche */
}

.skill-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    border-left-color: var(--primary-color); /* Accentuation au survol */
}

.skill-card h3 {
    margin-bottom: 1.2rem;
    color: var(--dark-text-color);
    position: relative;
    padding-bottom: 0.6rem;
}
.skill-card h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 2px;
    background-color: var(--secondary-color);
    border-radius: 1px;
}

.skill-card ul {
    list-style: none;
    padding-left: 0;
    color: var(--light-text-color);
    font-size: 1rem;
}

.skill-card ul li {
    margin-bottom: 0.8rem;
    position: relative;
    padding-left: 25px;
    line-height: 1.5;
}

.skill-card ul li::before {
    content: '•'; /* Puce simple et élégante */
    color: var(--primary-color);
    position: absolute;
    left: 0;
    top: 0;
    font-size: 1.2em;
    line-height: 1;
}


/* NOUVEAUX STYLES POUR LA SECTION EXPÉRIENCES */
.experiences-section {
    background-color: var(--bg-color-medium); /* Fond blanc pour cette section */
}

.experiences-grid {
    display: flex;
    flex-direction: column; /* Les expériences s'empilent verticalement */
    gap: 2.5rem; /* Espacement entre les cartes d'expérience */
    margin-top: 4rem;
}

.experience-card {
    background-color: var(--bg-color-medium); /* Fond blanc */
    border-radius: 8px;
    padding: 2.5rem;
    box-shadow: 0 4px 15px var(--shadow-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-left-color 0.3s ease;
    border-left: 5px solid var(--border-color); /* Ligne élégante à gauche */
}

.experience-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    border-left-color: var(--primary-color); /* Accentuation au survol */
}

.experience-card .experience-header {
    display: flex;
    flex-direction: column; /* Titre et entreprise empilés */
    margin-bottom: 0.8rem;
}

.experience-card h3 {
    font-size: 1.6rem; /* Taille du titre de poste */
    margin-bottom: 0.5rem;
    color: var(--dark-text-color);
}

.experience-card .company-info {
    font-size: 1.05rem;
    color: var(--light-text-color);
    margin-bottom: 0; /* Pas de marge en bas */
    font-weight: 500;
}

.experience-card .date-location {
    font-size: 0.95rem;
    color: var(--light-text-color);
    margin-bottom: 1.5rem; /* Espacement avant les compétences */
    font-weight: 400;
}

.experience-card .competences h4 {
    font-size: 0.95rem;
    color: var(--dark-text-color);
    margin-bottom: 0.5rem;
    font-weight: 600;
    display: inline; /* Pour que le "Compétences :" soit sur la même ligne que la liste */
    margin-right: 5px;
}

.experience-card .competences p {
    font-size: 0.95rem;
    color: var(--light-text-color);
    display: inline; /* Pour que la liste de compétences continue sur la même ligne */
    margin-bottom: 0;
}

/* FIN NOUVEAUX STYLES POUR LA SECTION EXPÉRIENCES */


/* Footer & Contact - CORRIGÉ */
footer {
    background-color: var(--dark-text-color); /* Fond très foncé */
    color: var(--bg-color-medium); /* Texte principal du footer en blanc */
    padding: 4.5rem 0;
    text-align: center;
    border-top: 1px solid var(--border-color); /* Bordure claire en haut */
}

footer #contact {
    margin-bottom: 3rem;
}

footer #contact h3 {
    color: var(--bg-color-medium); /* H3 du footer en blanc */
    margin-bottom: 2rem;
    font-size: 2.5rem;
    position: relative;
    font-weight: 600;
}

footer #contact h3::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -15px;
    transform: translateX(-50%);
    width: 70px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 2px;
}
.contact-info p {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--bg-color-light); /* Texte p du footer en gris très clair pour un bon contraste */
}

.contact-info strong {
    color: var(--bg-color-medium); /* Les labels "Email", "Localisation" en blanc */
}

.contact-info a {
    color: var(--primary-color); /* Liens en bleu */
    font-weight: 500;
}

.contact-info a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.social-links {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    gap: 25px;
}

.social-links img {
    width: 35px;
    height: 35px;
    transition: transform 0.3s ease, filter 0.3s ease;
}

/* ANIMATION DE SURVOL AMÉLIORÉE POUR LES LIENS SOCIAUX */
.social-links a:hover img {
    transform: translateY(-8px) scale(1.1); /* Se soulève et s'agrandit légèrement plus */
    /* Teinte l'icône en bleu primary-color ET ajoute une lueur de la même couleur */
    filter: brightness(0) saturate(100%) invert(18%) sepia(93%) saturate(3000%) hue-rotate(220deg) brightness(100%) contrast(100%) drop-shadow(0 0 12px var(--primary-color));
}

footer > p { /* Cible le paragraphe de copyright */
    margin-top: 3.5rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7); /* Copyright en blanc semi-transparent */
}
/* Media Queries pour la responsivité */
@media (max-width: 992px) {
    h1 {
        font-size: 2.8rem;
    }
    h2 {
        font-size: 2.2rem;
    }
    footer #contact h3 {
        font-size: 2.2rem;
    }
    .hero {
        padding: 7rem 0;
    }
    .intro-text h2 {
        font-size: 2.5rem;
    }
    .intro-text p {
        font-size: 1.1rem;
    }
    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 2.5rem;
    }
    .skill-card {
        padding: 2.2rem;
    }
    header nav ul {
        gap: 15px;
    }
    header nav a {
        font-size: 0.95rem;
        padding: 0.5rem 0.9rem;
    }
    .experience-card {
        padding: 2rem;
    }
    .experience-card h3 {
        font-size: 1.5rem;
    }
    .experience-card .company-info, .experience-card .date-location, .experience-card .competences p, .experience-card .competences h4 {
        font-size: 0.9rem;
    }

    /* Styles scrolled pour 992px */
    header.scrolled h1 {
        font-size: 2rem;
    }
    header.scrolled .subtitle {
        font-size: 0.8rem;
    }
    header.scrolled nav ul {
        margin-top: 0.6rem;
    }
    header.scrolled nav a {
        font-size: 0.8rem;
        padding: 0.3rem 0.7rem;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.3rem;
    }
    .subtitle {
        font-size: 1rem;
    }
    header nav ul {
        flex-direction: column; /* Le menu devient vertical sur les petits écrans */
        gap: 8px;
        margin-top: 1rem;
    }
    header nav a {
        padding: 0.4rem 0.7rem;
        font-size: 0.9rem;
    }
    header nav a::after {
        height: 2px;
    }
    .hero {
        padding: 5rem 0;
    }
    .profile-pic {
        width: 150px;
        height: 150px;
        border-width: 3px;
    }
    .intro-text h2 {
        font-size: 2rem;
    }
    .intro-text p {
        font-size: 1rem;
    }
    h2 {
        font-size: 1.9rem;
        margin-bottom: 2.5rem;
    }
    h2::after {
        bottom: -10px;
        width: 60px;
        height: 2px;
    }
    h3 {
        font-size: 1.7rem;
    }
    footer #contact h3 {
        font-size: 1.9rem;
        margin-bottom: 1.5rem;
    }
    footer #contact h3::after {
        bottom: -10px;
        width: 60px;
        height: 2px;
    }
    .social-links img {
        width: 30px;
        height: 30px;
    }
    main section {
        padding: 4.5rem 0;
    }
    .experience-card h3 {
        font-size: 1.4rem;
    }
    .experience-card .company-info, .experience-card .date-location, .experience-card .competences p, .experience-card .competences h4 {
        font-size: 0.85rem;
    }

    /* Styles scrolled pour 768px */
    header.scrolled h1 {
        font-size: 1.8rem;
    }
    header.scrolled .subtitle {
        font-size: 0.7rem;
    }
    header.scrolled nav ul {
        margin-top: 0.5rem;
        gap: 5px;
    }
    header.scrolled nav a {
        font-size: 0.75rem;
        padding: 0.2rem 0.6rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    h1 {
        font-size: 1.9rem;
    }
    .subtitle {
        font-size: 0.9rem;
    }
    h2 {
        font-size: 1.6rem;
    }
    footer #contact h3 {
        font-size: 1.6rem;
    }
    .intro-text h2 {
        font-size: 1.8rem;
    }
    .intro-text p {
        font-size: 0.95rem;
    }
    .skill-card {
        padding: 1.8rem;
    }
    .skill-card h3 {
        font-size: 1.4rem;
    }
    .skill-card ul li {
        font-size: 0.9rem;
        padding-left: 20px;
    }
    .contact-info p {
        font-size: 0.95rem;
    }
    .social-links {
        gap: 15px;
    }
    .social-links img {
        width: 25px;
        height: 25px;
    }
    .experience-card {
        padding: 1.5rem;
    }
    .experience-card h3 {
        font-size: 1.2rem;
    }
    .experience-card .company-info, .experience-card .date-location, .experience-card .competences p, .experience-card .competences h4 {
        font-size: 0.8rem;
    }
    .experience-card .competences h4 {
        display: block; /* Sur très petits écrans, les compétences peuvent revenir à la ligne */
        margin-bottom: 0.2rem;
    }
    .experience-card .competences p {
        display: block;
    }


    /* Styles scrolled pour 480px */
    header.scrolled h1 {
        font-size: 1.5rem;
    }
    header.scrolled .subtitle {
        display: none; /* Cache le sous-titre sur très petits écrans quand scrolled */
    }
    header.scrolled nav ul {
        margin-top: 0.3rem;
        gap: 3px;
    }
    header.scrolled nav a {
        font-size: 0.7rem;
        padding: 0.1rem 0.5rem;
    }
}
