/* BASE :
   - empêche le layout de devenir trop étroit
   - évite les problèmes sur très petits écrans */
html, body {
    min-width: 300px;
    min-height: 100%;
    margin: 0;
}

/* STRUCTURE GLOBALE :
   organisation verticale (header + contenu + footer) */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* TITRES :
   légère augmentation de l'espacement pour améliorer la lisibilité */
h1, h2, h3 {
    letter-spacing: 0.5px;
}

/* HEADER / BANNIÈRE :
   - grid pour positionner logo / navigation
   - sticky pour rester visible au scroll */
.banniere-minimale {
    width: 100%;
    height: 5rem;
    background-image: url("../src/images/fond.jpg");
    background-size: cover;
    background-position: center;

    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    padding: 0 1.25rem;

    position: sticky;
    top: 0;
    border-bottom: 1px solid #6A5ACD;
}

/* LOGO :
   image carrée, recadrée proprement en cercle */
.logo-mini {
    width: 4.375rem;
    height: 4.375rem;
    max-width: 4rem;
    max-height: 4rem;
    object-fit: cover;
    border-radius: 50%;
    border: 1px solid #6A5ACD;
}

/* NAVIGATION :
   suppression des styles par défaut + mise en flex */
.top-nav > ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 2rem;
}

/* centrage du menu dans la grille */
.top-nav {
    justify-self: center;
}

/* alignement des items + retour à la ligne si manque de place */
.top-nav > ul {
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

/* nécessaire pour positionner le dropdown */
.top-nav li {
    position: relative;
}

/* LIENS PRINCIPAUX :
   zone cliquable agrandie */
.top-nav > ul > li > a {
    padding: 0.5rem 1rem;
    display: block;
    font-weight: 800;
}

/* DROPDOWN :
   caché par défaut, positionné sous le menu */
.dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;

    list-style: none;
    margin: 0;
    padding: 0.5rem 0;

    background: white;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);

    min-width: 200px;
    z-index: 999;
}

/* LIENS DU DROPDOWN :
   texte compact + empêche retour à la ligne */
.dropdown li a {
    display: block;
    padding: 0.5rem 1rem;
    white-space: nowrap;
    font-size: 0.8rem;
    font-weight: 900;
}

/* effet hover */
.dropdown li a:hover {
    background: #eee;
}

/* affichage du dropdown au survol */
.top-nav > ul > li:hover > .dropdown {
    display: block;
}

/* CONTENU PRINCIPAL :
   prend tout l'espace restant (footer en bas) */
.page-content {
    flex: 1;
}

/* HERO :
   section principale centrée et responsive */
#hero {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3.125rem;
    padding: 0.5rem 1.875rem;

    background: rgb(245, 244, 244);
    width: 100%;

    flex-wrap: wrap;
    min-height: 100vh;
}

/* navigation des boutons (CV / projets / diplômes) */
.hero-nav {
    display: flex;
    gap: 3.125rem;
}

/* boutons circulaires */
.btn {
    display: flex;
    justify-content: center;
    align-items: center;

    width: 6rem;
    height: 6rem;

    border-radius: 50%;
    background: #333;
    color: white;

    font-size: 1rem;
    font-weight: 600;
}

/* lien custom (surcharge du base.css) */
a.custom-lien {
    text-decoration: none;
    font-weight: 500;
    transition: color 2s ease;
}

/* couleurs au hover des boutons */
.btn.cv:hover { background: #2c9efbda; color: #666; }
.btn.projets:hover { background: #5FD9A6; color: #666; }
.btn.diplomes:hover { background: #ff9800; color: #666; }

/* texte intro limité pour lisibilité */
.intro {
    max-width: 31.25rem;
    font-size: 0.9rem;
    color: #555;
}

/* IMAGE :
   centrée et recadrée */
.image {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.image img {
    width: 11.25rem;
    height: 11.25rem;
    object-fit: cover;
    border-radius: 20%;
}

/* TEXTE HERO */
.hero-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* FOOTER :
   layout flexible + responsive */
footer {
    background: #f5f5f5;
    padding: 0.5rem 0;
}

.footer-inner {
    max-width: 56.25rem;
    margin: 0 auto;
    padding: 0 1.25rem;

    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.contact{
    display: flex;
    flex-direction: column;
    gap: 0.1rem;  
    align-items: center;
    margin: 0;
}

.contact p {
    margin: 0;
}


/* HERO REDUIT POUR MOBILE ET FOOTER PASSE EN COLONNE */
@media (max-width: 1000px) {
    
    #hero {
        flex-direction: column;
        min-height: auto;
        padding: 1rem 0.5rem;
        gap: 1rem;
        text-align: center;
    }

    .image img {
        width: 8rem;
        height: 8rem;
    }

    .hero-text {
        align-items: center;
        width: 100%;
    }

    .hero-text h1 {
        font-size: 2rem;
        line-height: 1.1;
        margin: 0.5rem 0;
    }

    .intro {
        max-width: 18rem;
        font-size: 0.9rem;
        line-height: 1.4;
    }

    .hero-nav {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .btn {
        width: 4rem;
        height: 4rem;
        font-size: 0.75rem;
    }
    .banniere-minimale {
        display: flex;
        flex-direction: column;
        height: auto;
        padding: 0.5rem;
        gap: 0.4rem;
    }

    .top-nav > ul {
        gap: 0.5rem;
    }

    .top-nav > ul > li > a {
        font-size: 0.8rem;
        padding: 0.3rem 0.5rem;
    }

    .footer-inner {
        flex-direction: column;
        gap: 0.5rem;
    }
    footer p,
    footer a {
        font-size: 0.75rem;
        line-height: 1.3;
    }
}