/* --- VARIABLES & COULEURS --- */
:root {
    --primary-light: #B0C4DE;
    --primary-dark: #8A98B0;
    --accent-pink: #FED2D1;
    --accent-purple: #DBC8EB;
    --text-dark: #4A4E69;
    --text-light: #ffffff;
    
    --glass-bg: rgba(240, 240, 240, 0.90);
    
    --border-color: rgba(200, 210, 220, 0.5);
    --shadow-light: 0 4px 15px rgba(0,0,0,0.08);
    --shadow-hover: 0 8px 25px rgba(0,0,0,0.12);
    
    --block-bg: #F0F0F0;
    --card-bg: #FFFFFF; /* Nouvelle variable pour le fond blanc des cartes */
}

/* --- RESET & GLOBAL --- */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--text-dark);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    background-color: #f4f4f4; 
}

h1, h2, h3 { font-family: 'Playfair Display', serif; }

body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url('background-infinity-nikki.png') no-repeat center center / cover;
    opacity: 0.3;
    z-index: -2;
}

/* --- STRUCTURE --- */
.container { max-width: 1100px; margin: 40px auto; padding: 0 20px; }

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 20px;
    border-bottom: 2px solid rgba(255,255,255,0.5);
    padding-bottom: 10px;
}

.section-header h2 { color: var(--text-dark); margin: 0; }

.see-all-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.2s;
}
.see-all-link:hover { color: var(--accent-purple); }

/* --- CARTE DE NEWS --- */
.news-card {
    background: var(--block-bg);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-light);
    border: 1px solid rgba(255,255,255,0.5);
    transition: transform 0.3s;
    margin-bottom: 50px;
}
.news-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }

.card-image {
    height: 350px;
    background: var(--primary-light);
    overflow: hidden;
}
.card-image img { width: 100%; height: 100%; object-fit: cover; }

.card-content { padding: 30px; }

.tag {
    background: var(--accent-pink);
    color: #5e3b4d;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}

.card-link-container { margin-top: 20px; border-top: 1px solid rgba(0,0,0,0.05); padding-top: 15px; }

.read-more-btn {
    text-decoration: none;
    color: var(--accent-purple);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.read-more-btn:hover { text-decoration: underline; }

/* --- SECTION STYLISTES --- */
.stylists-section { margin-top: 50px; }

.atlas-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }

.atlas-card {
    background: rgba(240, 240, 240, 0.95);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.5);
    box-shadow: var(--shadow-light);
    position: relative;
    transition: transform 0.3s;
}
.atlas-card:hover { transform: translateY(-5px); }

/* Badges */
.badge {
    position: absolute; top: 15px; left: 15px;
    padding: 5px 12px; border-radius: 15px;
    color: white;
    font-size: 0.8rem; font-weight: bold;
    text-transform: uppercase;
    z-index: 10;
}
.badge-new { background: #6366f1; }
.badge-pop { background: #f43f5e; }

/* Contenu carte styliste */
.stylist-card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px;
    text-align: center;
}

.big-avatar {
    width: 100px; height: 100px;
    border-radius: 50%;
    border: 4px solid var(--accent-pink);
    margin-bottom: 15px;
    object-fit: cover;
}

.stylist-title {
    font-size: 0.9rem;
    color: var(--accent-purple);
    font-weight: 600;
    margin-top: 5px;
}

.atlas-stats {
    display: flex; align-items: center; gap: 5px;
    color: #d48bbd; font-weight: bold;
    margin-top: 10px;
}
.mini-star { width: 14px; height: auto; }

.profile-link { text-decoration: none; color: var(--text-dark); transition: 0.3s; }
.profile-link:hover { color: var(--accent-pink); }

.empty-message {
    text-align: center;
    padding: 40px;
    background: var(--block-bg);
    border-radius: 15px;
    color: #888;
    font-style: italic;
}

@media (max-width: 768px) {
    .container { margin: 20px auto; padding: 0 10px; }
    .section-header { flex-direction: column; align-items: flex-start; gap: 10px; padding-bottom: 5px; }
    .section-header h2 { font-size: 1.5rem; }
    .news-card { margin-bottom: 30px; }
    .card-image { height: 250px; }
    .card-content { padding: 20px; }
    .card-content h2 { font-size: 1.5rem; }
    .atlas-grid { grid-template-columns: 1fr; gap: 20px; }
    .stylist-card-content { padding: 20px; }
    .big-avatar { width: 80px; height: 80px; }
    .badge { top: 10px; left: 10px; font-size: 0.7rem; }
}

/* --- PAGE NEWS --- */
.page-header {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    padding: 40px; border-radius: 20px; border: 1px solid rgba(255,255,255,0.5);
    box-shadow: var(--shadow-light);
    text-align: center; margin-bottom: 50px;
}
.page-header h1 { font-size: 2.5rem; margin-bottom: 10px; color: var(--text-dark); }
.page-header p { color: #666; font-size: 1.1rem; }

.news-list { display: flex; flex-direction: column; gap: 40px; }
.news-page-card { display: flex; flex-direction: column; }
.news-page-card .card-image img { transition: transform 0.5s; }
.news-page-card:hover .card-image img { transform: scale(1.05); }
.card-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.date { font-size: 0.85rem; color: #888; font-weight: 500; }
.news-title { font-size: 1.8rem; margin: 0 0 15px 0; color: var(--text-dark); }
.news-text { font-size: 1rem; line-height: 1.6; color: #555; margin-bottom: 20px; }

@media (max-width: 768px) {
    .page-header h1 { font-size: 2rem; }
}

/* --- GALERIE & TENUES --- */
.gallery-container { max-width: 1400px; margin: 40px auto; padding: 0 20px; }
.top-bar-controls { display: flex; justify-content: center; align-items: center; gap: 20px; margin-bottom: 30px; flex-wrap: wrap; }
.view-tabs { display: flex; gap: 10px; }
.view-btn { text-decoration: none; padding: 12px 20px; border-radius: 30px; font-weight: 700; background: rgba(240, 240, 240, 0.8); color: var(--text-dark); border: 2px solid transparent; transition: 0.3s; box-shadow: var(--shadow-light); }
.view-btn:hover { transform: translateY(-3px); background: var(--block-bg); }
.view-btn.active { background: var(--accent-purple); color: white; border-color: var(--accent-purple); box-shadow: 0 5px 15px rgba(219, 200, 235, 0.6); }

.main-search-form { display: flex; background: var(--block-bg); border-radius: 30px; padding: 5px; box-shadow: var(--shadow-light); border: 1px solid rgba(0,0,0,0.1); }
.main-search-input { border: none; padding: 10px 15px; border-radius: 30px; outline: none; font-family: inherit; width: 200px; background: rgba(255,255,255,0.5); }
.main-search-btn { background: var(--accent-purple); color: white; border: none; padding: 0 20px; border-radius: 30px; font-weight: bold; cursor: pointer; transition:0.3s; }
.main-search-btn:hover { background: #c4a6d9; }

.page-layout { display: grid; grid-template-columns: 1fr 300px; gap: 30px; align-items: start; transition: all 0.3s ease; }
.page-layout.full-width { grid-template-columns: 1fr 0px; gap: 0; }
.sidebar-container { position: sticky; top: 110px; width: 300px; transition: all 0.3s ease; overflow: hidden; opacity: 1; }
.page-layout.full-width .sidebar-container { width: 0; opacity: 0; }

.sidebar-filters { background: var(--block-bg); border-radius: 15px; padding: 25px; box-shadow: var(--shadow-light); }
.sidebar-header { display: flex; justify-content: space-between; margin-bottom: 20px; border-bottom: 1px solid rgba(0,0,0,0.05); padding-bottom: 10px; }
.filter-section { margin-bottom: 20px; }
.filter-section h4 { font-size: 0.9rem; text-transform: uppercase; color: #d48bbd; margin-bottom: 10px; }
.filter-option { display: flex; align-items: center; margin-bottom: 5px; font-size: 0.9rem; cursor: pointer; color: #666; }
.filter-option input { margin-right: 10px; accent-color: var(--accent-purple); }
.label-list { max-height: 250px; overflow-y: auto; }
.btn-filter-submit { width: 100%; background: var(--text-dark); color: white; border: none; padding: 10px; border-radius: 20px; font-weight: bold; cursor: pointer; margin-top: 20px; }
.filter-toggle-btn { background: var(--block-bg); border: 1px solid rgba(0,0,0,0.1); padding: 8px 15px; border-radius: 20px; cursor: pointer; font-weight: bold; display: flex; align-items: center; gap: 8px; margin-left: auto; box-shadow: var(--shadow-light); }

.outfit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 25px; }
.outfit-card { background: rgba(240, 240, 240, 0.95); border-radius: 15px; overflow: hidden; box-shadow: var(--shadow-light); transition: 0.3s; border: 1px solid rgba(255,255,255,0.3); position: relative; display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.outfit-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }

.image-wrapper { position: relative; height: 300px; background: #e0dcd5; }
.outfit-image { width: 100%; height: 100%; object-fit: contain; }
.card-overlay { position: absolute; bottom: 0; left: 0; width: 100%; padding: 8px; display: flex; justify-content: space-between; align-items: flex-end; pointer-events: none; }
.tags-left, .tags-right { display: flex; flex-direction: column; gap: 4px; }
.tags-right { align-items: flex-end; }
.card-tag { padding: 3px 8px; border-radius: 8px; font-size: 0.7rem; font-weight: 700; color: white; text-transform: uppercase; box-shadow: 0 2px 4px rgba(0,0,0,0.3); }
.tag-style { background: var(--accent-pink); color: #5e3b4d; }
.tag-label { background: rgba(74, 78, 105, 0.9); }
.tag-evo { background: linear-gradient(45deg, #FFD700, #FFA500); color: black; }
.tag-emb { background: linear-gradient(45deg, #E0AAFF, #7B2CBF); }
.source-badge { position: absolute; top: 10px; left: 10px; background: rgba(0,0,0,0.6); color: #fff; padding: 2px 8px; border-radius: 4px; font-size: 0.7rem; font-weight: 600; pointer-events: none; }

.outfit-details { padding: 12px; text-align: center; position: relative; }
.outfit-name { font-weight: 700; color: var(--text-dark); margin-bottom: 2px; font-size: 0.95rem; }
.outfit-type { font-size: 0.8rem; color: #888; font-style: italic; display: flex; align-items:center; justify-content:center; gap:5px; margin-bottom: 5px; }
.type-mini-icon { width: 20px; height: 20px; object-fit: contain; vertical-align: middle; }
.quality-stars { color: #FFD700; letter-spacing: 1px; font-size: 0.9rem; }

.check-form { position: absolute; top: 10px; right: 10px; z-index: 10; }
.btn-check { width: 30px; height: 30px; border-radius: 50%; border: 2px solid white; background: #eee; color: transparent; cursor: pointer; box-shadow: 0 2px 5px rgba(0,0,0,0.2); font-size: 1.2rem; display: flex; align-items: center; justify-content: center; transition: 0.2s; }
.btn-check:hover { transform: scale(1.1); }
.btn-check.owned { background: #4ade80; color: white; border-color: #4ade80; }

.pagination-container { display: flex; flex-direction: column; align-items: center; margin-top: 40px; gap: 20px; }
.pagination { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.page-link { 
    padding: 8px 14px; 
    background: var(--block-bg); 
    border-radius: 8px; 
    text-decoration: none; 
    color: var(--text-dark); 
    font-weight: bold; 
    box-shadow: var(--shadow-light); 
    transition: 0.3s; 
    border: 1px solid transparent; 
    /* Assure que les liens sont bien alignés si le flex parent le demande */
    display: inline-flex; 
    align-items: center; 
    justify-content: center;
}
.page-link.active { background: var(--accent-purple); color: white; border-color: var(--accent-purple); cursor: default; }
.page-link:hover:not(.active) { background: #e7e7e7; transform: translateY(-2px); }
.limit-selector { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; color: #666; background: rgba(240, 240, 240, 0.8); padding: 5px 15px; border-radius: 20px; }
.limit-btn { text-decoration: none; color: inherit; padding: 2px 8px; border-radius: 4px; font-weight: bold; transition: 0.2s; }
.limit-btn:hover { background: rgba(0,0,0,0.1); }
.limit-btn.active { color: var(--accent-purple); border-bottom: 2px solid var(--accent-purple); }

.set-header { display: flex; gap: 30px; background: var(--block-bg); border-radius: 20px; padding: 30px; margin-bottom: 40px; box-shadow: var(--shadow-light); align-items: center; }
.set-big-img { width: 250px; height: auto; border-radius: 15px; border: 2px solid rgba(255,255,255,0.5); }
.set-info h2 { margin-top: 0; font-size: 2rem; color: var(--text-dark); }
.btn-back-list { display: inline-block; margin-bottom: 20px; text-decoration: none; font-weight: bold; color: #666; }
.btn-back-list:hover { color: var(--accent-purple); }

#scrollToTopBtn { position: fixed; bottom: 30px; right: 30px; z-index: 100; width: 50px; height: 50px; border-radius: 50%; background: var(--accent-purple); color: white; border: none; box-shadow: 0 4px 15px rgba(0,0,0,0.2); cursor: pointer; font-size: 1.5rem; display: none; align-items: center; justify-content: center; transition: all 0.3s ease; }
#scrollToTopBtn:hover { transform: translateY(-5px); background: #c4a6d9; }

@media (max-width: 992px) { .page-layout { grid-template-columns: 1fr; } .sidebar-container { width: 100%; position: static; margin-bottom: 30px; } .filter-toggle-btn { display: none; } .set-header { flex-direction: column; text-align: center; } }

/* --- MENTIONS LÉGALES --- */
.legal-page { max-width: 800px; margin: 40px auto; padding: 40px; background: rgba(240, 240, 240, 0.95); border-radius: 20px; box-shadow: var(--shadow-light); }
.legal-page h1 { text-align: center; margin-bottom: 30px; color: var(--text-dark); }
.legal-page h2 { margin-top: 25px; margin-bottom: 10px; font-size: 1.3rem; color: #7B2CBF; }
.legal-page p { line-height: 1.6; }
@media (max-width: 768px) { .legal-page { margin: 20px 10px; padding: 20px; } }

/* ========================================================== */
/* --- PAGE PROFIL (profil.php) - MISE À JOUR SIDEBAR --- */
/* ========================================================== */

/* Conteneur principal */
.profile-container { max-width: 1200px; margin: 40px auto; padding: 0 20px; }
header .brand img, .brand img { height: 50px !important; width: auto !important; display: block; }

/* 1. EN-TÊTE COMPACT */
.profile-header { 
    background: rgba(240, 240, 240, 0.95); 
    border-radius: 20px; 
    padding: 20px 40px; 
    display: flex; 
    align-items: center; 
    gap: 30px; 
    box-shadow: var(--shadow-light); 
    border: 1px solid rgba(255,255,255,0.5); 
    flex-wrap: wrap; 
    grid-column: 1 / -1; /* Prend toute la largeur */
}

.avatar-container { 
    width: 100px; height: 100px; border-radius: 50%; border: 4px solid var(--accent-pink); 
    padding: 4px; background: var(--block-bg); flex-shrink: 0; position: relative; overflow: hidden; 
}
.avatar-container img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.avatar-overlay { 
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(0, 0, 0, 0.6); border-radius: 50%; display: flex; 
    flex-direction: column; justify-content: center; align-items: center; 
    opacity: 0; transition: opacity 0.3s ease; cursor: pointer; color: white; 
    font-weight: 600; font-size: 0.9rem; 
}
.avatar-container:hover .avatar-overlay { opacity: 1; }
.camera-icon { font-size: 1.5rem; margin-bottom: 5px; }

.user-info { flex-grow: 1; min-width: 250px; max-width: 600px; }
.user-pseudo { font-size: 2rem; margin-bottom: 5px; color: var(--text-dark); display: flex; align-items: center; word-break: break-all; }
.official-tick { height: 0.6em; margin-left: 10px; width: auto !important; }
.user-title { display: inline-block; background: var(--accent-purple); color: white; padding: 5px 15px; border-radius: 15px; font-size: 0.8rem; font-weight: 600; font-style: italic; margin-bottom: 10px; }
.role-badge { 
    display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; 
    border-radius: 12px; color: white; font-size: 0.75rem; font-weight: 700; 
    text-transform: uppercase; letter-spacing: 0.5px; vertical-align: middle; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.15); 
}
.user-bio { margin-top: 10px; color: #666; font-size: 0.9rem; line-height: 1.5; word-wrap: break-word; }
.bio-empty { color: #aaa; font-style: italic; font-weight: 500; }

.profile-actions { margin-top: 15px; display: flex; gap: 10px; flex-wrap: wrap; }
.btn-action-form { margin: 0; } 
.btn-friend, .btn-msg, .btn-report { 
    padding: 8px 16px; border-radius: 20px; font-size: 0.9rem; font-weight: 600; 
    cursor: pointer; border: 1px solid; transition: 0.3s; 
}
.btn-friend { background: var(--block-bg); color: var(--text-dark); border-color: var(--text-dark); }
.btn-friend:hover { background: var(--primary-light); color: white; border-color: transparent; }
.btn-remove-friend, .btn-cancel-friend { background: var(--block-bg); color: var(--danger-color); border-color: var(--danger-color); }
.btn-remove-friend:hover, .btn-cancel-friend:hover { background: var(--danger-color); color: white; }
.btn-accept-friend { background: var(--accent-pink); color: #5e3b4d; border: none; }
.btn-accept-friend:hover { background: #ffc2c0; }
.btn-msg { background: var(--text-dark); color: white; border: none; text-decoration: none; display: inline-block; }
.btn-report { background: transparent; color: #888; border-color: #ddd; font-size: 0.8rem; }

.header-right { 
    display: flex; flex-direction: column; align-items: flex-end; gap: 10px; min-width: 180px; 
    margin-left: auto;
}
.user-stats { display: flex; align-items: center; background: rgba(255, 255, 255, 0.6); padding: 10px 20px; border-radius: 15px; border: 1px solid var(--accent-pink); }
.stat-icon { width: 30px; height: 30px; object-fit: contain; margin-right: 10px; }
.stat-number { font-size: 1.4rem; font-weight: bold; color: #d48bbd; }
.stat-label { font-size: 0.8rem; color: #888; margin-left: 5px; text-transform: uppercase; }
.btn-star { background: linear-gradient(45deg, #ff9a9e 0%, #fecfef 99%); color: white; border: none; padding: 10px 20px; border-radius: 25px; cursor: pointer; font-weight: 700; display: flex; align-items: center; gap: 8px; transition: 0.3s; }
.btn-star:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(255, 154, 158, 0.4); }
.btn-star.liked { background: var(--block-bg); color: #d48bbd; border: 2px solid #d48bbd; }
.btn-star img { height: 18px !important; width: 18px !important; object-fit: contain; margin-right: 5px; }

/* 2. GRID LAYOUT (Sidebar + Contenu) */
.profile-main-wrapper {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
    margin-top: 30px;
}

/* Sidebar Navigation */
.profile-tabs { 
    grid-column: 1 / 2;
    flex-direction: column; 
    gap: 1px;
    margin-top: 0; 
    padding: 0;
    position: sticky;
    top: 110px;
    background: var(--block-bg);
    border-radius: 15px;
    box-shadow: var(--shadow-light);
    border: 1px solid rgba(0,0,0,0.05);
    overflow: hidden; 
}

.profile-tabs .tab-btn, .profile-tabs .tab-link { 
    width: 100%; 
    background: transparent; 
    border-radius: 0; 
    border-bottom: 1px solid rgba(0,0,0,0.05); 
    padding: 15px 20px;
    text-align: left;
    transition: background 0.3s, color 0.3s;
    flex-shrink: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    display: block; 
    border: none; /* Reset bouton */
    cursor: pointer;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    text-decoration: none;
    font-family: inherit;
}
.profile-tabs .tab-btn:last-child, .profile-tabs .tab-link:last-child { border-bottom: none; }
.profile-tabs .tab-btn:hover, .profile-tabs .tab-link:hover {
    background: rgba(219, 200, 235, 0.2); 
    color: var(--accent-purple);
}
/* COULEUR ACTIVE MODIFIÉE : #FED2D1 */
.profile-tabs .tab-btn.active, .profile-tabs .tab-link.active { 
    background: var(--accent-pink); /* #FED2D1 */
    color: #5e3b4d; /* Couleur texte plus foncée pour le contraste */
    border-left: 5px solid var(--accent-purple); 
    border-bottom: 1px solid var(--accent-pink);
}

/* Contenu Principal */
.tab-content { 
    grid-column: 2 / 3;
    background: var(--block-bg); 
    border-radius: 15px; 
    padding: 30px;
    box-shadow: var(--shadow-light);
    min-height: 500px;
    display: none;
}
.tab-content.active { display: block; }

/* 3. ELEMENTS INTERNES DU PROFIL AVEC FOND BLANC */
.outfit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }
.outfit-item { 
    border-radius: 15px; overflow: hidden; box-shadow: 0 4px 10px rgba(0,0,0,0.08); 
    background: var(--card-bg); /* #FFFFFF */ 
    text-align: center; border: 1px solid rgba(0,0,0,0.05); transition: 0.3s;
}
.outfit-item:hover { transform: translateY(-5px); }
.outfit-item img { width: 100%; height: 250px; object-fit: contain; background: #e0dcd5; }
.item-info { padding: 10px; }
.item-name { display: block; font-weight: bold; margin-bottom: 5px; font-size: 0.95rem; }
.item-type { font-size: 0.8rem; color: #888; font-style: italic; }
.progress-bar { width: 100%; height: 6px; background: rgba(255,255,255,0.5); border-radius: 3px; margin-top: 8px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--accent-purple); border-radius: 3px; }
.progress-text { font-size: 0.75rem; color: #666; font-weight: bold; margin-top: 3px; display: block; }

/* MOMO AVEC FOND IMPOSE ET STATS BLANCHES */
.momo-profile { text-align: center; max-width: 600px; margin: 0 auto; }
.momo-container-visual {
    background: url('momo/aprem.png') no-repeat center center / cover;
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 20px;
    box-shadow: inset 0 0 30px rgba(0,0,0,0.2);
}
.momo-img-large { width: 150px; height: auto; filter: drop-shadow(0 5px 15px rgba(0,0,0,0.3)); transition: 0.3s; }
.momo-img-large:hover { transform: scale(1.05); }

/* Bloc Stats Momo Blanc */
.momo-stats-box {
    background: var(--card-bg); /* #FFFFFF */
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    margin-top: -20px; /* Chevauchement léger */
    position: relative;
    z-index: 2;
    border: 1px solid rgba(0,0,0,0.05);
}

.momo-level-bar { width: 100%; height: 20px; background: #e0dcd5; border-radius: 10px; overflow: hidden; margin-top: 15px; position: relative; border: 1px solid #ddd; }
.momo-fill { height: 100%; background: linear-gradient(90deg, #9b59b6, #8e44ad); width: 0%; }
.momo-stats-row { display: flex; justify-content: space-between; margin-top: 5px; font-weight: bold; color: #555; }
.momo-currencies { display: flex; justify-content: center; gap: 20px; margin-top: 10px; }
.momo-currency { font-size: 1.2rem; font-weight: bold; display: flex; align-items: center; gap: 5px; }
.bling-color { color: #f1c40f; }
.diamond-color { color: #2ecc71; }

.friend-list-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.friend-card { 
    display: flex; align-items: center; gap: 15px; 
    background: var(--card-bg); /* #FFFFFF */ 
    border: 1px solid rgba(0,0,0,0.05); border-radius: 15px; padding: 15px; text-decoration: none; color: inherit; transition: 0.3s; 
}
.friend-card:hover { transform: translateY(-3px); box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.friend-card img { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; }

.group-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.group-card-mini { 
    display: block; text-decoration: none; color: inherit; 
    background: var(--card-bg); /* #FFFFFF */ 
    border-radius: 10px; border: 1px solid rgba(0,0,0,0.05); overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.05); transition: 0.3s; position: relative; 
}
.group-card-mini:hover { transform: translateY(-3px); border-color: var(--accent-purple); }
.mini-cover { height: 80px; width: 100%; object-fit: cover; background: var(--primary-light); }
.mini-info { padding: 10px; }
.mini-info h4 { margin: 0; font-size: 0.95rem; }
.mini-info span { font-size: 0.75rem; color: #888; }
.badge-chef { position: absolute; top: 5px; right: 5px; background: var(--accent-purple); color: white; font-size: 0.6rem; padding: 2px 6px; border-radius: 5px; font-weight: bold; }

.account-settings { max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; gap: 30px; }
.settings-card { background: var(--card-bg); /* #FFFFFF */ border-radius: 15px; padding: 25px; box-shadow: 0 5px 15px rgba(0,0,0,0.03); border: 1px solid rgba(0,0,0,0.05); }
.settings-header { border-bottom: 2px solid var(--primary-light); padding-bottom: 10px; margin-bottom: 20px; font-size: 1.2rem; font-weight: 700; color: var(--text-dark); display: flex; align-items: center; gap: 10px; }
.settings-form { display: grid; gap: 15px; }
.form-row label { display: block; margin-bottom: 5px; font-weight: 600; font-size: 0.9rem; color: #666; }
.form-row input, .form-row select, .form-row textarea { width: 100%; padding: 10px; border: 1px solid rgba(0,0,0,0.1); border-radius: 8px; font-family: inherit; transition: 0.3s; background: rgba(255,255,255,0.5); }
.btn-save { background: var(--accent-pink); color: #5e3b4d; border: none; padding: 10px 25px; font-weight: bold; border-radius: 20px; cursor: pointer; transition: 0.3s; justify-self: start; margin-top: 10px; }
.btn-save:hover { background: #ffc2c0; transform: translateY(-2px); }
.btn-danger { background: var(--text-dark); color: white; border: none; padding: 10px 25px; font-weight: bold; border-radius: 20px; cursor: pointer; transition: 0.3s; justify-self: start; margin-top: 10px; }
.btn-danger:hover { background: var(--primary-dark); }

.title-selection { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 15px; }
.title-option { position: relative; }
.title-option input { display: none; }
.title-label { display: block; padding: 15px; background: rgba(255,255,255,0.5); border: 2px solid rgba(0,0,0,0.05); border-radius: 10px; text-align: center; cursor: pointer; font-weight: 600; transition: 0.2s; color: #666; }
/* COULEUR SELECTION TITRE : #FED2D1 */
.title-option input:checked + .title-label { 
    border-color: var(--accent-purple); 
    background: var(--accent-pink); /* #FED2D1 */
    color: #5e3b4d; 
    box-shadow: 0 4px 10px rgba(219, 200, 235, 0.4); 
}
.title-label:hover { background: #fff; border-color: #ddd; }

.alert-success { background: #d4edda; color: #155724; padding: 10px; border-radius: 5px; margin-bottom: 20px; text-align: center; }
.alert-error { background: #f8d7da; color: #721c24; padding: 10px; border-radius: 5px; margin-bottom: 20px; text-align: center; }

/* 4. RESPONSIVE MOBILE */
@media (max-width: 992px) {
    .profile-header { flex-direction: column; align-items: center; text-align: center; padding: 30px 20px; }
    .user-info { min-width: 100%; }
    .header-right { min-width: 100%; margin-top: 20px; align-items: center; }
    .user-pseudo { justify-content: center; }
    .profile-actions { justify-content: center; }
    
    .profile-main-wrapper { grid-template-columns: 1fr; gap: 20px; }
    
    /* Retour au menu horizontal */
    .profile-tabs { grid-column: 1 / -1; position: static; flex-direction: row; overflow-x: auto; padding-bottom: 5px; border-radius: 15px; white-space: nowrap; }
    .profile-tabs::-webkit-scrollbar { height: 4px; }
    .profile-tabs::-webkit-scrollbar-thumb { background: var(--primary-light); border-radius: 4px; }
    .profile-tabs .tab-btn, .profile-tabs .tab-link { border-bottom: none; border-right: 1px solid rgba(0,0,0,0.05); flex-shrink: 0; border-left: none; }
    .profile-tabs .tab-btn.active, .profile-tabs .tab-link.active { border-bottom: 3px solid var(--accent-pink); border-left: none; }
    .tab-content { grid-column: 1 / -1; }
    .settings-form { grid-template-columns: 1fr; }
    .settings-form > div[style] { display: block !important; }
}

/* --- APP MOMO --- */
.app-layout { display: grid; grid-template-columns: 280px 1fr 100px; gap: 20px; max-width: 1400px; margin: 40px auto; padding: 0 20px; align-items: start; }
.nav-menu { display: flex; flex-direction: column; gap: 15px; position: sticky; top: 20px; grid-column: 3 / 4; }
.history-panel { background: var(--block-bg); border-radius: 15px; padding: 20px; box-shadow: 0 5px 15px rgba(0,0,0,0.05); height: 600px; display: flex; flex-direction: column; font-size: 0.9rem; overflow: hidden; grid-column: 1 / 2; }
@media (max-width: 900px) {
    .app-layout { grid-template-columns: 1fr; gap: 15px; }
    main { grid-column: 1 / -1; order: 2; }
    .history-panel { height: 200px; order: 3; grid-column: 1 / -1; }
    .nav-menu { flex-direction: row; order: 1; position: relative; top: 0; justify-content: space-between; gap: 5px; grid-column: 1 / -1; overflow-x: auto; }
}

/* --- HEADER & NAV --- */
header { background: var(--glass-bg); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border-color); position: sticky; top: 0; z-index: 1000; box-shadow: var(--shadow-light); width: 100%; height: 90px; }
.nav-container { max-width: 1400px; margin: 0 auto; padding: 0 20px; height: 100%; display: flex; align-items: center; justify-content: space-between; flex-wrap: nowrap; }
.brand img { height: 50px !important; width: auto !important; display: block; }
.main-menu { display: flex; gap: 15px; list-style: none; height: 100%; align-items: center; margin: 0 20px; padding: 0; flex-grow: 1; justify-content: center; }
.menu-item { position: relative; height: 100%; display: flex; align-items: center; }
.menu-link { text-decoration: none; color: var(--text-dark); font-weight: 600; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.5px; padding: 10px 15px; border-radius: 30px; transition: all 0.3s ease; white-space: nowrap; }
.menu-item:hover .menu-link, .menu-link:hover { background-color: var(--accent-pink); color: #5e3b4d; }
@media (max-width: 992px) { header { height: auto; padding: 10px 0; } .nav-container { flex-wrap: wrap; height: auto; justify-content: center; gap: 15px; } .main-menu { order: 3; width: 100%; justify-content: center; flex-wrap: wrap; } .auth-buttons { margin-left: auto; } }
/* --- BOUTON SCROLL TO TOP --- */
#scrollToTopBtn {
    position: fixed;
    bottom: 30px; 
    right: 30px; 
    z-index: 1000;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    /* Utilisation de vos variables de couleur */
    background: var(--accent-purple);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    cursor: pointer;
    font-size: 1.5rem;
    display: none; /* Le bouton est caché par défaut */
    align-items: center; 
    justify-content: center;
    transition: all 0.3s ease;
    line-height: 0; /* Aide au centrage du texte/symbole */
}

#scrollToTopBtn:hover {
    transform: translateY(-5px) scale(1.1);
    opacity: 0.9;
}