/*
========================================
    GLOBAL.CSS
    Styles communs à tout le site (Variables, Base, Navbar, Footer, Utilities)
========================================
*/

/* --- 1. Variables CSS globales --- */
:root {
    --couleur-principale: #2a3475; /* Bleu foncé */
    --couleur-principale-claire: #abcdec; /* Bleu ciel */
    --couleur-secondaire: #dd4347; /* Rouge/Corail */
    --couleur-secondaire-claire: #f7a09a; /* Rose clair */
    --couleur-tertiaire: #333333; /* Gris foncé pour le texte */
    --transition-rapide: 0.3s ease-in-out;
}

/* --- 2. Styles de Base & Utilities --- */

body {
    margin: 0;
    font-family: "Inter", sans-serif;
    overflow-x: hidden;
    color: var(--couleur-tertiaire);
}

section {
    padding: 80px 0;
    box-sizing: border-box;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* --- Typographie Générale --- */
h1, h2, h3 {
    color: var(--couleur-principale);
    line-height: 1.2;
}
h2 {
    font-size: clamp(28px, 4vw, 40px);
    margin-bottom: 25px;
    text-align: center;
}
.highlight-title {
    font-family: 'Caveat', cursive;
    font-size: 1.1em;
    font-weight: 700;
    color: var(--couleur-secondaire);
}
.text-center {
    text-align: center;
}

/* --- Boutons --- */
.btn-primary, .btn-secondary, .btn-primary-ghost {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-rapide);
    margin: 5px;
    text-align: center;
}
.btn-primary {
    background-color: var(--couleur-secondaire);
    color: white;
    border: 2px solid var(--couleur-secondaire);
}
.btn-primary:hover {
    background-color: #c93b3e;
    border-color: #c93b3e;
}
.btn-secondary {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}
.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
}
.btn-primary-ghost {
    background-color: transparent;
    color: var(--couleur-principale);
    border: 2px solid var(--couleur-principale);
}
.btn-primary-ghost:hover {
    background-color: var(--couleur-principale);
    color: white;
}


/* ========================================
   3. BARRE DE NAVIGATION (NAVBAR)
   ======================================== */

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    width: 100%;
    height: 90px;
    top: 0;
    left: 0;
    padding: 0 30px;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    z-index: 100;
    box-sizing: border-box;
}

.navbar.transparent {
    background-color: transparent;
}

.navbar.scrolled {
    background-color: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.logo {
    font-size: 24px;
    height: 60px;
}

.logo img {
    height: 100%;
    transition: opacity 0.3s ease;
}

.navbar.scrolled .logo img.bleu,
.logo img.blanc {
    display: block;
}

.navbar.scrolled .logo img.blanc,
.logo img.bleu {
    display: none;
}

.nav-links {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
    align-items: center;
    gap: 5px;
}

.nav-links a {
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    display: block;
    transition: all var(--transition-rapide);
    border-radius: 5px;
}

.navbar.scrolled .nav-links a {
    color: var(--couleur-principale);
}

.nav-links a:hover,
.nav-links a.active {
    background-color: rgba(255, 255, 255, 0.2);
}

.navbar.scrolled .nav-links a:hover,
.navbar.scrolled .nav-links a.active {
    background-color: var(--couleur-principale);
    color: white;
}

.menu-icon {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 24px;
    cursor: pointer;
}

.menu-icon div {
    width: 30px;
    height: 3px;
    background-color: white;
    transition: all 0.3s ease;
}

.navbar.scrolled .menu-icon div {
    background-color: var(--couleur-principale);
}

.menu-icon.open div:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}

.menu-icon.open div:nth-child(2) {
    opacity: 0;
}

.menu-icon.open div:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

/* --- 4. En-tête de Page Commun (pour toutes les pages de contenu, sauf accueil) --- */

.page-header {
    background: linear-gradient(to right, var(--couleur-principale), #5560a6);    
    color: white;
    padding: 120px 0 50px 0; /* Espace pour la navbar fixe */
    text-align: center;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.page-header h1 {
    font-size: clamp(32px, 5vw, 60px);
    margin-bottom: 10px;
    color: white;
}
.page-header .highlight-title {
    color: var(--couleur-secondaire-claire);
    font-family: 'Caveat', cursive;
}
.page-header p {
    font-size: 1.2em;
    font-weight: 300;
    margin-bottom: 20px;
}

/* ========================================
   5. FOOTER
   ======================================== */

.main-footer {
    background-color: var(--couleur-principale);
    color: white;
    padding-top: 50px;
}
.footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 30px;
    padding: 0 5%;
    max-width: 1200px;
    margin: 0 auto 30px auto;
}
.footer-logo-info, .footer-links-group, .footer-mentions {
    flex: 1 1 200px;
}
.footer-logo-info img {
    height: 50px;
    margin-bottom: 15px;
}
.footer-logo-info p {
    font-size: 0.9em;
    opacity: 0.8;
}
.footer-links-group h3, .footer-mentions h3 {
    color: white;
    border-bottom: 2px solid var(--couleur-secondaire);
    padding-bottom: 5px;
    margin-bottom: 15px;
    font-size: 1.1em;
}
.footer-links-group ul, .footer-mentions ul {
    list-style: none;
    padding: 0;
}
.footer-links-group ul li, .footer-mentions ul li {
    margin-bottom: 8px;
}
.footer-links-group a, .footer-mentions a {
    color: white;
    text-decoration: none;
    font-size: 0.9em;
    opacity: 0.8;
    transition: opacity var(--transition-rapide);
}
.footer-links-group a:hover, .footer-mentions a:hover {
    opacity: 1;
    text-decoration: underline;
}
.footer-links-group i {
    margin-right: 8px;
    color: var(--couleur-secondaire);
}
.social-icons {
    margin-top: 20px;
    display: flex;
    gap: 15px;
}
.social-icons a {
    color: white;
    font-size: 1.5em;
    transition: color var(--transition-rapide);
}
.social-icons a:hover {
    color: var(--couleur-secondaire);
}
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    padding: 15px 0;
    font-size: 0.8em;
    opacity: 0.6;
}


/* ========================================
   6. RESPONSIVITÉ COMMUNE
   ======================================== */

@media (max-width: 768px) {
    /* Navbar responsive */
    .nav-links {
        display: none;
        flex-direction: column;
        width: calc(100% - 60px);
        background-color: var(--couleur-principale);
        position: absolute;
        top: 90px;
        left: 30px;
        margin: 0;
        border-radius: 10px;
        padding: 10px 0;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    }
    .nav-links.active {
        display: flex;
    }
    .navbar.scrolled .nav-links a {
        color: white;
    }
    .navbar.scrolled .nav-links a:hover,
    .navbar.scrolled .nav-links a.active {
        background-color: var(--couleur-secondaire);
        color: white;
    }
    .menu-icon {
        display: flex;
    }

    /* Page Header */
    .page-header {
        padding: 100px 0 40px 0;
    }

    /* Footer */
    .footer-container {
        flex-direction: column;
        padding: 0 30px;
    }
    .footer-logo-info {
        text-align: center;
    }
    .footer-logo-info img {
        margin: 0 auto 15px auto;
    }
    .social-icons {
        justify-content: center;
    }
}