/* ==========================================================
   BIRDIENET - HEADER, ARCHITECTURE ACCUEIL & LOGIN
   ========================================================== */

.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    z-index: 9999;
    box-shadow: 0 3px 12px rgba(0,0,0,.08);
}

main {
    padding-top: 90px;
}

.main-header .container {
    width: 100%;
    max-width: 100% !important;
    height: 70px;
    padding: 0 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.logo img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.brand-name {
    font-size: 20px;
    font-weight: 700;
    text-decoration: none;
    color: var(--green);
}

.brand-name span {
    color: var(--gold);
}

/* MENU HEADER - LIGNE UNIQUE, PETITE POLICE, MAJUSCULES */
.main-nav {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: nowrap; /* Interdit les retours à la ligne */
}

.main-nav a {
    position: relative;
    padding: 8px 10px;
    text-decoration: none;
    color: #333;
    font-size: 11px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    transition: .3s ease;
}

.main-nav a::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 2px;
    width: 0;
    height: 2px;
    background: #2E7D32;
    border-radius: 10px;
    transform: translateX(-50%);
    transition: .35s ease;
}

.main-nav a:hover {
    color: #2E7D32;
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 80%;
}

.main-nav a.active {
    color: #2E7D32;
}

/* ZONE DROITE : ICÔNES DE NOTIFICATIONS, MESSAGES & PROFIL */
.header-right-actions, .header-user-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

/* Style des icônes Cloche et Enveloppe */
.icon-badge-container {
    position: relative;
    cursor: pointer;
    font-size: 16px;
    color: #555;
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.icon-badge-container:hover {
    color: #1b5e20;
}

/* Rond vert et chiffre blanc pour les badges */
.notification-badge {
    position: absolute;
    top: -6px;
    right: -10px;
    background-color: #4caf50;
    color: #ffffff;
    font-size: 9px;
    font-weight: 700;
    height: 16px;
    min-width: 16px;
    padding: 0 3px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
    box-sizing: border-box;
}

/* Avatar et nom réduits à droite */
.header-user {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 15px;
    border-left: 1px solid #eee;
}

.header-user img, .header-user .avatar {
    width: 32px !important;
    height: 32px !important;
    border-radius: 50%;
    object-fit: cover;
}

.header-user span, .header-user .user-name {
    font-size: 11px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    color: #333;
    white-space: nowrap;
}

/* --- LE RESTE DE TON FICHIER (Home, Feed, Login, etc.) --- */

.page-home {
    background: var(--page-bg);
    padding-top: 20px;
}

.social-layout {
    display: grid;
    grid-template-columns: 270px minmax(0,1fr) 320px;
    gap: 30px;
    max-width: 1500px;
    margin: 30px auto;
    padding: 0 25px;
    align-items: start;
}

.sidebar, .right-sidebar {
    height: max-content;
}

.sidebar {
    position: static;
}

.right-sidebar {
    position: sticky;
    top: 85px;
    align-self: start;
}

.sidebar-box {
    background: white;
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.sidebar-box h3 {
    color: var(--green-dark);
    font-size: 17px;
    margin-bottom: 15px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 10px;
    transition: var(--transition);
}

.sidebar-link:hover {
    background: #f0f2f5;
}

.sidebar-link span {
    font-size: 20px;
}

.feed {
    min-width: 0;
    width: 100%;
}

.friend-online {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
}

.friend-online img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.online-dot {
    width: 12px;
    height: 12px;
    background: #31a24c;
    border-radius: 50%;
    border: 2px solid white;
    margin-left: -22px;
    margin-top: 30px;
}

/* LOGIN PAGE - VERSION BIRDIENET PREMIUM */
.login-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 100vh;
    gap: 80px;
}

.login-left {
    flex: 1;
    max-width: 600px;
}

.login-card {
    width: 450px;
    margin-left: auto;
    padding: 40px;
}

.hero-title {
    font-size: 50px;
    font-weight: 700;
    line-height: 1;
    color: white;
    margin-bottom: 10px;
}

.hero-green {
    font-size: 50px;
    font-weight: 700;
    color: #38b44a;
    margin-bottom: 35px;
}

.hero-script {
    font-family: 'Caveat', cursive;
    font-size: 48px;
    color: white;
    display: inline-block;
    position: relative;
}

.hero-script::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 100%;
    height: 8px;
    background: #39b54a;
    border-radius: 30px;
    transform: rotate(-2deg);
}
/* --- MENU HAMBURGER (MOBILE) --- */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 22px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1000;
}

.hamburger span {
    width: 100%;
    height: 3px;
    background-color: #2E7D32; /* Couleur verte de ton thème */
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Styles pour petits écrans (Téléphones) */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-links { /* Ou .main-nav selon le nom de votre conteneur de liens */
        position: fixed;
        top: 0;
        left: -100%; /* CHANGÉ : caché hors de l'écran à gauche par défaut */
        width: 75%;
        height: 100vh;
        background-color: #ffffff;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 30px;
        box-shadow: 5px 0 15px rgba(0,0,0,0.1); /* CHANGÉ : ombre portée vers la droite */
        transition: left 0.3s ease-in-out; /* CHANGÉ : transition sur 'left' */
        z-index: 999;
    }

    /* Classe active pour faire glisser le menu depuis la gauche */
    .nav-links.active {
        left: 0; /* CHANGÉ : vient se coller au bord gauche */
    }

    /* Animation du bouton hamburger en croix quand il est ouvert */
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
}
/* --- AJUSTEMENTS MOBILES COMPLÉMENTAIRES --- */
@media (max-width: 768px) {
    /* Forcer l'affichage du hamburger */
    .hamburger {
        display: flex;
        order: 3; /* S'assure qu'il est tout à droite */
    }

    /* Réduire l'espace général du header sur mobile */
    .main-header .container {
        padding: 0 15px;
    }

    /* Cacher le texte du nom de l'utilisateur sur smartphone pour gagner de la place */
    .header-user span, 
    .header-user .user-name {
        display: none !important;
    }

    /* Réduire la bordure et le padding de l'avatar seul */
    .header-user {
        border-left: none;
        padding-left: 0;
    }
}
/* --- CORRECTION DE LA PAGE ACCUEIL SUR MOBILE (Passage en une seule colonne) --- */
@media (max-width: 992px) {
    .social-layout {
        display: flex !important;
        flex-direction: column !important;
        gap: 20px !important;
        padding: 0 15px !important;
        margin: 15px auto !important;
    }

    /* Forcer chaque bloc à prendre toute la largeur disponible */
    .social-layout > * {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Optionnel : cacher les barres latérales si elles prennent trop de place, 
       ou les laisser s'empiler. Ici, elles vont s'empiler proprement. */
}
/* --- STYLE DE LA MASCOTTE POPUP --- */
.mascotte-popup {
    position: fixed;
    bottom: -150px; /* Cachée en bas par défaut */
    right: 20px;
    display: flex;
    align-items: flex-end;
    gap: 10px;
    z-index: 9999;
    pointer-events: none;
    transition: bottom 0.8s ease-in-out, opacity 0.5s ease-in-out;
    opacity: 0;
}

.mascotte-popup.visible {
    bottom: 20px;
    opacity: 1;
}

.mascotte-popup img {
    width: 85px;
    height: auto;
}

.bulle-texte {
    background: #ffffff;
    padding: 12px 16px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    font-size: 13px;
    font-weight: 500;
    color: #333;
    max-width: 210px;
    border-bottom-left-radius: 2px;
}