/* ==========================================================================
   DÉCLARATION DE LA POLICE LOCALE POPPINS
   ========================================================================== */
/* On déclare les polices locales que nous avons stockées dans le dossier /assets/fonts/ */

/* poppins-regular - latin */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400; /* 400 correspond à "regular" */
  src: url('../fonts/poppins-v24-latin-regular.woff2') format('woff2'); 
}

/* poppins-700 - latin */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 700; /* 700 correspond à "bold" (gras) */
  src: url('../fonts/poppins-v24-latin-700.woff2') format('woff2');
}


/* ==========================================================================
   STYLE GÉNÉRAL DU CORPS DE LA PAGE & STICKY FOOTER
   ========================================================================== */
body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    font-family: 'Poppins', sans-serif;
    overflow: hidden;
    overflow-x: hidden; 
    color: white; 
}

/* Applique un fond noir et active le Sticky Footer sur les pages qui défilent */
body:not(.home) {
    background-color:black;
    overflow: auto;
    /* Activation du mécanisme Flexbox pour coller le footer en bas */
    display: flex;
    flex-direction: column;
    min-height: 100vh; 
}

/* AJOUT CLÉ : Le contenu principal doit grandir pour pousser le footer en bas */
main.content-area {
    flex-grow: 1;
    padding-top: 80px; /* MODIFIÉ : Réduit l'espace entre le header et le contenu */
}

/* ==========================================================================
   SLIDER EN ARRIÈRE-PLAN (Page d'accueil)
   ========================================================================== */

.slider-container {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -1;
}
.slide {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}
.slide.active {
    opacity: 1;
}


/* ==========================================================================
   CONTENU PRINCIPAL CENTRÉ (Page d'accueil)
   ========================================================================== */

.content-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    height: 100vh;
    padding: 20px;
    box-sizing: border-box;
    background-color: rgba(0, 0, 0, 0.5);
}

.content-container h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 5px; /* Marge très petite (5px) pour séparer du sous-titre */
}

/* Style pour le paragraphe */
.content-container p {
    font-size: 1.2rem;
    font-weight: 400;
    max-width: 600px;
    margin-top: 0;
    margin-bottom: 15px; /* Marge réduite pour rapprocher du bouton Portfolio */
}

.portfolio-button {
    background-color: transparent;
    border-radius: 20px;
    border: 2px solid white;
    color: white;
    padding: 5px 15px;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 700;
    transition: background-color 0.3s, color 0.3s;
}

.portfolio-button:hover {
    background-color: white;
    color: black;
}

/* Style de l'image ajoutée au-dessus du titre */
.content-container .hero-logo {
    width: 100px; 
    height: auto;
    margin-bottom: 5px; /* Marge très réduite pour rapprocher du titre */
}


/* ==========================================================================
   ÉLÉMENTS FIXES (LOGO EN BAS ET FOOTER) - GLOBAUX
   ========================================================================== */

/* Conteneur du logo en bas à droite (Fixe UNIQUEMENT sur la page d'accueil via PHP) */
.logo-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99;
}

.logo-container img {
    width: 30px;
    height: auto;
}

/* 1. FOOTER PAR DÉFAUT (Pour les pages qui défilent) */
.site-footer {
    text-align: center;
    padding: 20px; 
    font-size: 0.9rem;
    width: 100%;
}

/* 2. FOOTER FIXE (Pour la page d'accueil avec slider) */
body.home .site-footer {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99;
    padding: 0; /* Pas de padding pour le footer fixe */
    width: auto;
}

/* ==========================================================================
   STYLE DU HEADER FIXE (CENTRALISÉ) - DESKTOP
   ========================================================================== */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 99;
    background-color: black; 
    padding: 5px 20px 5px 20px; /* PADDING ASYMÉTRIQUE 35px haut, 15px bas */
    box-sizing: border-box;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%; 
}

/* 1. Colonne de Navigation (Gauche) */
.header-left {
    flex: 1;
    text-align: left;
}

.header-left a {
    color: white;
    text-decoration: none;
    margin-right: 25px;
    font-size: 18px;
    font-weight: 500;
    position: relative;
    padding-bottom: 5px;
}

/* 2. Logo (Centre) */
.header-center {
    flex: 1;
    text-align: center;
}

.site-branding a {
    color: white; 
    font-size: 1.8rem;
    font-weight: 700;
    text-decoration: none;
}
.site-branding img { /* Style de l'image logo */
    width: 60px; /* Taille réduite du logo sur desktop */
    height: auto;
}


/* 3. Colonne de Réseaux Sociaux (Droite) */
.header-right {
    flex: 1;
    text-align: right;
    display: flex; 
    justify-content: flex-end; 
    align-items: center;
}

/* Règle CLÉ pour le masquage des doublons sur DESKTOP */
.main-header .header-socials.mobile-only {
    display: none !important; 
}

.header-right a {
    color: white;
    font-size: 1.2rem;
    margin-left: 15px;
    text-decoration: none !important; /* CORRECTION : Supprime le soulignement des icônes */
    transition: opacity 0.3s;
}

.header-right a:hover {
    opacity: 0.7;
}

/* Style du bouton Hamburger */
.menu-toggle {
    display: none; /* CACHÉ par défaut sur grand écran */
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 100;
}
.menu-toggle .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: white;
    transition: all 0.3s ease-in-out;
}


/* ==========================================================================
   STYLE DE LIEN ACTIF (Trait blanc)
   ========================================================================== */

/* Le style du trait lui-même */
.header-left a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0; /* Par défaut, le trait est invisible */
    height: 2px;
    background-color: white;
    transition: width 0.3s ease-in-out; /* Animation douce */
}

/* 1. Trait visible sur le lien ACTIF */
.header-left a.active-link::after {
    width: 100%; /* Le trait apparaît sur 100% de la largeur du lien */
}

/* 2. OPTIONNEL : Trait visible au survol */
.header-left a:not(.active-link):hover::after {
    width: 100%;
}


/* ==========================================================================
   ADAPTATION POUR LES MOBILES (RESPONSIVE DESIGN)
   ========================================================================== */

@media (max-width: 768px) {
    /* --- HEADER MOBILE --- */
    
    .main-header {
        padding: 15px 20px;
        position: fixed;
    }

    .header-inner {
        flex-direction: row; 
        justify-content: space-between;
        align-items: center;
    }
    
    /* 1. Menu Hamburger (Gauche) */
    .menu-toggle {
        display: block; 
        order: 1; 
    }

    /* 2. Logo (Centre) */
    .header-center {
        text-align: center;
        flex-grow: 1; 
        order: 2; 
    }
    .site-branding img {
        width: 60px; /* Taille de logo sur mobile */
    }

    /* 3. Réseaux Sociaux (Droite) */
    .header-right {
        order: 3;
        flex: none; 
    }
    
    /* Règle CLÉ pour le masquage des doublons sur MOBILE */
    .header-socials.desktop-only {
        display: none !important; /* Cache les icônes desktop sur mobile */
    }

    /* La navigation déroulante (le menu qui s'ouvre) */
    .main-navigation {
        display: flex; 
        max-height: 0; 
        visibility: hidden; 
        overflow: hidden; 
        transition: all 0.4s ease-in-out; 

        position: absolute;
        top: 100%; /* Le menu s'ouvre sous le header */
        left: 0;
        width: 100%;
        min-height: 100vh;
        background-color: rgba(0, 0, 0, 0.95);
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.5);
        flex-direction: column;
        align-items: center;
        padding: 0;
        box-sizing: border-box;
    }

    /* Quand la classe 'toggled' est ajoutée par JS, on affiche le menu */
    .main-navigation.toggled {
        max-height: 100vh; 
        visibility: visible;
        padding: 20px 0;
    }

    .main-navigation a {
        padding: 15px 0;
        display: block;
        font-size: 1.5rem;
    }

    /* Affiche la version MOBILE des réseaux sociaux DANS le menu déroulant */
    .main-navigation .header-socials.mobile-only {
        display: flex; 
        justify-content: center;
        margin-top: 20px;
    }


    /* --- CONTENU & FOOTER MOBILE --- */

    .content-container h1 {
        font-size: 2rem;
    }
    .content-container p {
        font-size: 1rem;
    }
    .logo-container {
        bottom: 10px; right: 10px;
    }
    .logo-container img {
        width: 30px;
    }
    .site-footer {
        bottom: 10px;
        width: 90%;
        font-size: 0.8rem;
    }
}
