/* --- GLOBAL --- */
body {
    margin: 0; font-family: 'Poppins', sans-serif;
    color: #333; min-height: 100vh; display: flex; flex-direction: column;
    
    /* FOND PAR DÉFAUT : LE BAOBAB */
    background-image: url('fond_baobab.jpg'); 
    background-size: cover; background-position: center; background-attachment: fixed;
}

/* CLASSE SPÉCIALE POUR L'ACCUEIL */
body.page-accueil {
    background-image: url('fond_accueil.jpg');
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
}

/* CLASSE SPÉCIALE POUR BIBLIOGRAPHIE */
body.page-biblio {
    background-image: url('fond_biblio.jpg');
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
}

/* CLASSE SPÉCIALE POUR contact */
body.page-contact {
    background-image: url('fond_contact.jpg');
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
}

/* CLASSE SPÉCIALE POUR apropos */
body.page-apropos {
    background-image: url('fond_apropos.jpg');
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
}

/* --- LE "VRAI" OR (Effet Métallique Oblique + Ombre Grise) --- */
/* Appliqué au Logo, aux Titres Ethnies (Index) et au Niveau (Profil) */
.text-gold-3d, 
.header-username,
.vitrine-col h4, 
.level-name {
    /* Dégradé Oblique (45deg) : Foncé - Or - Eclat Blanc - Or - Foncé */
    background: linear-gradient(
        45deg, 
        #B8860B 0%,   
        #FFD700 25%,  
        #FFF8E1 50%,  
        #FFD700 75%,  
        #B8860B 100%  
    );
    
    /* Incrustation */
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #FFD700;
    
    text-transform: uppercase;
    font-weight: 900;
    
    /* Ombre portée grise nette + flou doré */
    filter: drop-shadow(1px 1px 0px #555) drop-shadow(0px 0px 2px rgba(255, 215, 0, 0.5));
}

/* Ajustements de taille spécifiques */
.header-username { font-family: 'Playfair Display', serif; margin: 0; font-size: 1.6em; letter-spacing: 1px; text-align: center; } 
.vitrine-col h4 { margin-bottom: 15px; font-size: 1.5em; } /* Titres Ethnies */
.level-name { font-size: 1.6em; display: block; margin: 5px 0 10px; } /* Niveau Profil */


/* --- LA CARTE PRINCIPALE (Transparence) --- */
.glass-card {
    background: rgba(255, 255, 255, 0.45); /* Opacité 0.45 */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 25px;
    padding: 40px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    
    /* Texte par défaut avec petit halo */
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.9);
}

/* --- FORCAGE DE LA LISIBILITÉ (NOIR + HALO BLANC) --- */
/* Rétabli pour tous les textes dans les cadres */
.private-email, 
.email-note, 
.privacy-toggle, 
.block-label,
.cash-condition,
.book-desc, 
.book-meta,
.glass-card p,
.vitrine-col ul li a { /* Ajout des mots de l'index ici */
    color: #000000 !important; /* Noir Encre */
    font-weight: 700 !important; /* Gras */
    
    /* Double halo blanc puissant */
    text-shadow: 0 0 5px #ffffff, 0 0 2px #ffffff; 
}

/* Exception pour les badges colorés (PDF/Public) */
.pdf-badge, .public-domain-badge {
    text-shadow: none !important;
    color: white !important;
}

/* --- LISTES DE MOTS (INDEX) --- */
.vitrine-col ul { list-style: none; padding: 0; margin: 0; }
.vitrine-col ul li { margin-bottom: 8px; }

/* Style des liens (déjà géré par le bloc Lisibilité ci-dessus pour la couleur) */
.vitrine-col ul li a {
    text-decoration: none;
    font-size: 1.05em;
    transition: color 0.2s ease;
    display: inline-block;
}

/* AU SURVOL : Bordeaux sans bouger */
.vitrine-col ul li a:hover {
    color: #7B1F37 !important; /* Force le bordeaux */
    text-decoration: none;
    transform: none; 
}


/* --- HEADER TRICOLORE --- */
.tricolor-header {
    display: flex; height: 120px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    position: sticky; top: 0; z-index: 1000;
    background: #7B1F37;
}
.header-section {
    position: relative; display: flex; flex-direction: column;
    justify-content: center; padding: 0 20px; height: 100%;
    box-sizing: border-box; flex-shrink: 0;
}
.section-green-logo { width: 28%; background: #007E33; clip-path: polygon(0 0, 100% 0, 85% 100%, 0% 100%); z-index: 3; align-items: center; }
.header-logo { height: 90px; object-fit: contain; filter: drop-shadow(0px 0px 8px rgba(255,255,255,0.6)); margin-right: 15%; }

.section-white-identity { width: 45%; background: white; margin-left: -5%; padding-left: 6%; clip-path: polygon(15% 0, 100% 0, 85% 100%, 0% 100%); z-index: 2; color: #333; align-items: center; }

.user-tag { color: #7B1F37; font-size: 0.85em; font-weight: 600; font-style: italic; }

.btn-dual-green { margin-top: 5px; background: #007E33; border: 2px solid #D4AF37; border-radius: 30px; padding: 6px 10px; display: flex; gap: 10px; align-items: center; justify-content: center; box-shadow: 0 3px 6px rgba(0,0,0,0.2); width: 95%; margin-left: auto; margin-right: -25px; position: relative; z-index: 10; }
.btn-dual-link { color: white; text-decoration: none; font-size: 0.75em; font-weight: bold; text-transform: uppercase; transition: 0.3s; }
.btn-dual-link:hover { color: #D4AF37; }
.separator { color: #D4AF37; opacity: 0.5; }

.section-red-actions { width: 32%; background: #7B1F37; margin-left: -5%; clip-path: polygon(15% 0, 100% 0, 100% 100%, 0% 100%); z-index: 1; align-items: flex-end; padding-right: 30px; justify-content: center; }
.link-home-text { color: white; text-decoration: none; font-weight: 800; font-size: 0.9em; text-transform: uppercase; text-shadow: 0 1px 3px rgba(0,0,0,0.3); transition: 0.3s; margin-right: 10px; display: block; }
.link-home-text:hover { color: #D4AF37; transform: translateX(-2px); }
.red-zone-top { margin-bottom: 8px; margin-right: 5px; }
.red-zone-bottom { display: flex; gap: 8px; }
.btn-white-pill { background: white; color: #7B1F37; padding: 6px 12px; border-radius: 20px; text-decoration: none; font-size: 0.75em; font-weight: bold; box-shadow: 0 2px 4px rgba(0,0,0,0.2); transition: 0.2s; display: block; text-align: center; }
.btn-white-pill:hover { transform: translateY(-2px); color: #D4AF37; }

/* --- LAYOUT GLOBAL --- */
.main-layout { display: flex; justify-content: center; align-items: flex-start; gap: 30px; padding: 40px 20px; max-width: 1400px; margin: 0 auto; flex-grow: 1; }
.ad-sidebar { width: 160px; flex-shrink: 0; display: flex; flex-direction: column; gap: 30px; position: sticky; top: 140px; }
.ad-placeholder { background: rgba(255,255,255,0.9); border: 1px solid #ddd; min-height: 150px; width: 100%; display: flex; align-items: center; justify-content: center; font-size: 0.9em; color: #777; font-weight: bold; box-shadow: 0 5px 15px rgba(0,0,0,0.05); border-radius: 10px; overflow: hidden; }
.profile-container { flex-grow: 1; max-width: 750px; }

/* --- ÉLÉMENTS DU PROFIL --- */
.profile-top-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 40px; position: relative; }
.top-block { text-align: center; width: 140px; padding: 15px; background: rgba(255,255,255,0.5); border-radius: 15px; box-shadow: 0 5px 15px rgba(0,0,0,0.05); }

/* Labels Résident/Niveau (Couleur conservée mais lisibilité renforcée) */
.origin-block .block-label { color: #007E33 !important; text-shadow: 0 1px 1px white; } 
.mini-map-stack { display: flex; justify-content: center; gap: 5px; }
.map-badge { width: 40px; height: 40px; background: white; border: 1px solid #ddd; border-radius: 5px; display: flex; align-items: center; justify-content: center; font-size: 1.2em; cursor: pointer; } 

.level-block .block-label { color: #7B1F37 !important; text-shadow: 0 1px 1px white; }

.level-bar { width: 100%; height: 10px; background: rgba(0,0,0,0.1); border-radius: 5px; overflow: hidden; }
.level-progress { height: 100%; background: linear-gradient(90deg, #D4AF37, #FFD700); }
.avatar-center-block { flex-grow: 1; display: flex; justify-content: center; margin-top: -20px; }
.avatar-container { position: relative; }
.main-avatar { width: 160px; height: 160px; border-radius: 50%; border: 5px solid white; box-shadow: 0 10px 25px rgba(0,0,0,0.2); object-fit: cover; }
.edit-photo { position: absolute; bottom: 10px; right: 10px; background: #333; color: white; border: none; border-radius: 50%; width: 35px; height: 35px; cursor: pointer; box-shadow: 0 2px 5px rgba(0,0,0,0.3); }

.profile-details { text-align: center; margin-bottom: 40px; }

/* Bio */
.bio-container { background: rgba(255, 248, 225, 0.8); padding: 15px 25px; border-radius: 15px; display: inline-block; border-left: 4px solid #D4AF37; margin-bottom: 25px; position: relative; box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
.quote-icon { font-size: 3em; color: #D4AF37; position: absolute; top: -10px; left: 10px; opacity: 0.3; }
.bio-text { font-style: italic; font-weight: 500; color: #5D4037; font-size: 1.1em; position: relative; z-index: 1; }
.edit-pen { font-size: 0.8em; cursor: pointer; margin-left: 10px; opacity: 0.6; }

/* Switch */
.privacy-toggle { display: flex; align-items: center; justify-content: center; gap: 15px; font-size: 0.95em; margin-bottom: 20px;}
.switch { position: relative; display: inline-block; width: 40px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; transition: .4s; border-radius: 34px; }
.slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .slider { background-color: #007E33; }
input:checked + .slider:before { transform: translateX(16px); }

/* STATS */
.stats-dashboard { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; margin-bottom: 30px; }
.stat-item { background: rgba(255,255,255,0.8); border: 1px solid rgba(255,255,255,0.5); padding: 20px; border-radius: 15px; text-align: center; box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
.highlight-gold { background: linear-gradient(135deg, rgba(255, 248, 225, 0.9), rgba(255, 236, 179, 0.9)); border: 1px solid #D4AF37; transform: scale(1.05); }
.stat-num { display: block; font-size: 1.8em; font-weight: 800; color: #333; }
.highlight-gold .stat-num { color: #D4AF37; }
.stat-lbl { font-size: 0.8em; text-transform: uppercase; color: #777; font-weight: bold; letter-spacing: 0.5px; }
.btn-cashout-small { display: block; margin: 10px auto 0; background: white; color: #007E33; border: 1px solid #007E33; padding: 5px 12px; border-radius: 15px; font-size: 0.7em; font-weight: bold; cursor: pointer; transition: 0.2s; }
.btn-cashout-small:hover { background: #007E33; color: white; }

/* CULTURE & MUR */
.culture-link-box { background: linear-gradient(90deg, #7B1F37, #9c2a4b); color: white; padding: 20px; border-radius: 15px; text-align: center; margin-bottom: 40px; font-size: 1em; box-shadow: 0 10px 20px rgba(123, 31, 55, 0.3); }
.culture-link-box a { color: #FFD700; font-weight: bold; text-decoration: none; margin-left: 15px; display: inline-block; margin-top: 10px; }
.wall-section h3 { margin-top: 0; border-bottom: 2px solid rgba(0,0,0,0.1); padding-bottom: 15px; color: #333; font-size: 1.3em; }
.wall-input textarea { width: 100%; border: 1px solid #ddd; border-radius: 15px; padding: 15px; font-family: inherit; margin-bottom: 15px; box-sizing: border-box; background: rgba(255,255,255,0.9); resize: vertical; height: 80px; }
.wall-actions { display: flex; justify-content: flex-end; gap: 15px; margin-bottom: 30px; }
.wall-actions select { padding: 8px 15px; border-radius: 20px; border: 1px solid #ddd; background: white; cursor: pointer; }
.wall-actions button { background: #333; color: white; border: none; padding: 8px 25px; border-radius: 20px; cursor: pointer; font-weight: bold; transition: 0.2s; }
.wall-msg { background: rgba(255,255,255,0.7); padding: 20px; border-radius: 15px; margin-bottom: 20px; box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
.msg-head { margin-bottom: 10px; }
.msg-head strong { color: #007E33; font-size: 1em; }
.msg-head small { color: #999; font-size: 0.85em; margin-left: 10px; }
.wall-msg p { font-size: 1em; color: #555; line-height: 1.5; margin: 0 0 15px; }
.msg-footer { font-size: 0.85em; color: #777; display: flex; gap: 20px; }
.load-more { background: white; border: 1px solid #ddd; width: 100%; color: #555; cursor: pointer; padding: 15px; border-radius: 15px; font-weight: bold; transition: 0.2s; }
.load-more:hover { background: #f9f9f9; color: #333; }

/* FOOTER */
.footer-nav { background: #111; padding: 25px 0; border-top: 3px solid #D4AF37; margin-top: auto; }
.footer-content { max-width: 1000px; margin: 0 auto; text-align: center; }
.footer-line-primary { margin-bottom: 15px; display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; align-items: center; }
.footer-link-main { color: white; text-decoration: none; font-weight: 700; font-size: 0.95em; text-transform: uppercase; transition: 0.3s; }
.footer-link-main:hover { color: #D4AF37; }
.footer-link-main.active { color: #D4AF37; border-bottom: 1px solid #D4AF37; }
.footer-line-legal { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; align-items: center; font-size: 0.75em; color: #888; }
.footer-link-legal { color: #aaa; text-decoration: none; transition: 0.3s; }
.footer-link-legal:hover { color: white; }
.footer-sep { color: #D4AF37; font-weight: normal; margin: 0 5px; opacity: 0.7; }

/* =============================================
   📱 VERSION MOBILE (RESPONSIVE) - V6
   ============================================= */

@media screen and (max-width: 900px) {

    /* --- 1. HEADER (En-tête) --- */
    .tricolor-header {
        height: auto;
        flex-direction: column;
        width: 100%;
        position: relative;
    }

    .header-section {
        width: 100%;
        padding: 10px 0;
        text-align: center;
        margin: 0 !important;
        clip-path: none !important;
    }

    .section-green-logo { order: 1; border-bottom: 2px solid #D4AF37; padding-bottom: 5px; }
    .section-white-identity { order: 2; padding: 15px 0; }
    .section-red-actions { order: 3; flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 10px; padding-bottom: 15px; }

    .header-logo { height: 60px; margin: 0 auto; }
    .btn-dual-green { width: 90%; margin: 10px auto 0; }


    /* --- 2. ORGANISATION GÉNÉRALE --- */
    .main-layout {
        display: flex;
        flex-direction: column;
        padding: 10px 0;
        gap: 20px;
    }

    .profile-container {
        order: 1;
        width: 95%;
        margin: 0 auto;
    }

    /* --- 3. LES PUBS : STYLE ÉPURÉ & BAS DE PAGE --- */
    .ad-sidebar {
        order: 2;
        width: 100%;
        display: flex;
        justify-content: center;
        margin-top: 20px;
        background: transparent !important;
        padding: 0 !important;
        box-shadow: none !important;
        border: none !important;
    }

    .left-ad, .right-ad { 
        width: 100%;
        display: flex; 
        justify-content: center;
        margin-bottom: 10px;
    }

    /* On cache toutes les pubs SAUF la première */
    .ad-placeholder:nth-child(n+2) {
        display: none !important;
    }

    .ad-placeholder {
        width: auto !important;
        max-width: 90%;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .ad-placeholder img {
        height: auto !important;
        max-height: 200px;
        border-radius: 10px;
        box-shadow: 0 5px 15px rgba(0,0,0,0.3) !important;
        display: block;
    }


    /* --- 4. LE PROFIL --- */
    .glass-card { padding: 20px 10px; }

    .profile-top-row {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 15px;
        margin-bottom: 20px;
    }

    .avatar-center-block {
        order: 1 !important;
        margin: 0 0 15px 0;
        width: 100%;
        display: flex; justify-content: center;
    }
    .main-avatar { width: 130px; height: 130px; border: 4px solid white; }

    .top-block.origin-block { order: 2 !important; width: 80%; max-width: 280px; }
    .top-block.level-block { order: 3 !important; width: 80%; max-width: 280px; }

    .level-name { font-size: 1.4em; }
    .bio-container { width: 100%; box-sizing: border-box; }
    
    .stats-dashboard { grid-template-columns: 1fr; gap: 15px; }
    
    .footer-nav { padding: 20px 0; }
    .footer-content { width: 100%; padding: 0 10px; box-sizing: border-box; }
    .footer-link-main, .footer-link-legal { display: block; padding: 8px 0; border-bottom: 1px solid #333; }
    .footer-sep { display: none; }
}