/* ========================================= */
/* --- 1. VARIABLES & THEMES --- */
/* ========================================= */

:root {
    /* --- PALETTE DE BASE (Mode Clair) --- */
    --primary-light: #B0C4DE;
    --primary-dark: #8A98B0;
    --accent-pink: #FED2D1;
    --accent-purple: #DBC8EB;
    
    /* Textes */
    --text-dark: #4A4E69;       /* Texte principal */
    --text-light: #ffffff;      /* Texte sur fond foncé */
    --text-muted: #666666;      /* Sous-titres, dates, descriptions */
    --text-contrast: #5e3b4d;   /* Pour le texte sur les badges roses/violets */

    /* Fonds */
    --bg-body: #f4f4f4;
    --glass-bg: rgba(240, 240, 240, 0.90);
    --block-bg: #F0F0F0;
    --card-bg: #FFFFFF;
    --input-bg: rgba(255, 255, 255, 0.5);
    
    /* Bordures & Ombres */
    --border-color: rgba(200, 210, 220, 0.5);
    --border-light: rgba(255, 255, 255, 0.5); /* Bordures subtiles */
    --shadow-light: 0 4px 15px rgba(0,0,0,0.08);
    --shadow-hover: 0 8px 25px rgba(0,0,0,0.12);

    /* Image de fond : opacité */
    --bg-img-opacity: 0.3;
}

/* --- MODE SOMBRE (S'active via JS) --- */
[data-theme="dark"] {
    /* On garde les accents pastels mais on ajuste les fonds */
    --primary-light: #3A4B61;
    --primary-dark: #8A98B0;
    
    --accent-pink: #FED2D1; 
    --accent-purple: #9D84B5; 

    /* Textes inversés */
    --text-dark: #E0E1DD;      /* Blanc cassé pour le texte principal */
    --text-light: #1A1B26;     
    --text-muted: #A0A0A0;     /* Gris clair pour la lisibilité */
    --text-contrast: #2D2D2D;  /* Texte foncé sur badges clairs */

    /* Fonds Sombres */
    --bg-body: #12141D;        /* Bleu nuit très profond */
    --glass-bg: rgba(30, 32, 45, 0.95);
    --block-bg: #1E202E;       
    --card-bg: #262837;        
    --input-bg: rgba(0, 0, 0, 0.3);

    /* Bordures ajustées */
    --border-color: rgba(255, 255, 255, 0.1);
    --border-light: rgba(255, 255, 255, 0.08);

    /* Ombres plus marquées */
    --shadow-light: 0 4px 15px rgba(0,0,0,0.4);
    --shadow-hover: 0 8px 25px rgba(0,0,0,0.6);

    /* Image de fond plus discrète */
    --bg-img-opacity: 0.15;
}

/* ========================================= */
/* --- 2. 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: var(--bg-body);
    transition: background-color 0.3s ease, color 0.3s ease; /* Transition douce */
}

h1, h2, h3 { font-family: 'Playfair Display', serif; }

body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url('/assets/img/background-infinity-nikki.png') no-repeat center center / cover;
    opacity: var(--bg-img-opacity);
    z-index: -2;
    transition: opacity 0.3s ease;
}

/* ========================================= */
/* --- 3. 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 var(--border-light);
    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 var(--border-light);
    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: var(--text-contrast);
    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 var(--border-color); 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: var(--glass-bg);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid var(--border-light);
    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: var(--text-muted);
    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 var(--border-light);
    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: var(--text-muted); 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: var(--text-muted); 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: var(--text-muted); 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); /* Update color */
    border: 2px solid transparent; transition: 0.3s; box-shadow: var(--shadow-light); 
}
/* Override pour le bouton en dark mode */
[data-theme="dark"] .view-btn { background: var(--block-bg); }

.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 var(--border-color); }
.main-search-input { border: none; padding: 10px 15px; border-radius: 30px; outline: none; font-family: inherit; width: 200px; background: var(--input-bg); color: var(--text-dark); }
.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 var(--border-color); 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: var(--text-muted); }
.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 var(--border-color); color: var(--text-dark); 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: var(--glass-bg); border-radius: 15px; overflow: hidden; box-shadow: var(--shadow-light); transition: 0.3s; border: 1px solid var(--border-light); 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: var(--text-contrast); }
.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; 
    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: var(--primary-light); transform: translateY(-2px); }

.limit-selector { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; color: var(--text-muted); background: var(--glass-bg); 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 var(--border-light); }
.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: var(--text-muted); }
.btn-back-list:hover { color: var(--accent-purple); }

@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: var(--glass-bg); 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; color: var(--text-muted); }
@media (max-width: 768px) { .legal-page { margin: 20px 10px; padding: 20px; } }

/* ========================================================== */
/* --- PAGE PROFIL (profil.php) --- */
/* ========================================================== */

/* 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: var(--glass-bg); 
    border-radius: 20px; 
    padding: 20px 40px; 
    display: flex; 
    align-items: center; 
    gap: 30px; 
    box-shadow: var(--shadow-light); 
    border: 1px solid var(--border-light); 
    flex-wrap: wrap; 
    grid-column: 1 / -1; 
}

.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: var(--text-muted); font-size: 0.9rem; line-height: 1.5; word-wrap: break-word; }
.bio-empty { color: var(--text-muted); 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: var(--text-contrast); 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); }
/* Ajustement user-stats pour le dark mode */
[data-theme="dark"] .user-stats { background: rgba(30, 32, 45, 0.6); }

.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 */
.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 var(--border-color);
    overflow: hidden; 
}

.profile-tabs .tab-btn, .profile-tabs .tab-link { 
    width: 100%; 
    background: transparent; 
    border-radius: 0; 
    border-bottom: 1px solid var(--border-color); 
    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;
    cursor: pointer;
    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);
}
.profile-tabs .tab-btn.active, .profile-tabs .tab-link.active { 
    background: var(--accent-pink); 
    color: var(--text-contrast); 
    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 */
.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); 
    text-align: center; border: 1px solid var(--border-color); 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; color: var(--text-dark); }
.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: var(--text-muted); font-weight: bold; margin-top: 3px; display: block; }

/* MOMO */
.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); }

.momo-stats-box {
    background: var(--card-bg); 
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    margin-top: -20px; 
    position: relative;
    z-index: 2;
    border: 1px solid var(--border-color);
}

.momo-level-bar { width: 100%; height: 20px; background: var(--block-bg); border-radius: 10px; overflow: hidden; margin-top: 15px; position: relative; border: 1px solid var(--border-color); }
.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: var(--text-muted); }
.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; color: var(--text-dark); }
.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); 
    border: 1px solid var(--border-color); 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); 
    border-radius: 10px; border: 1px solid var(--border-color); 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; color: var(--text-dark); }
.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); border-radius: 15px; padding: 25px; box-shadow: 0 5px 15px rgba(0,0,0,0.03); border: 1px solid var(--border-color); }
.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: var(--text-muted); }
.form-row input, .form-row select, .form-row textarea { width: 100%; padding: 10px; border: 1px solid var(--border-color); border-radius: 8px; font-family: inherit; transition: 0.3s; background: var(--input-bg); color: var(--text-dark); }
.btn-save { background: var(--accent-pink); color: var(--text-contrast); 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: var(--input-bg); border: 2px solid var(--border-color); border-radius: 10px; text-align: center; cursor: pointer; font-weight: 600; transition: 0.2s; color: var(--text-muted); }

.title-option input:checked + .title-label { 
    border-color: var(--accent-purple); 
    background: var(--accent-pink); 
    color: var(--text-contrast); 
    box-shadow: 0 4px 10px rgba(219, 200, 235, 0.4); 
}
.title-label:hover { background: var(--card-bg); 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; }
    
    .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 var(--border-color); 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; }
.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: var(--text-contrast); }

@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%;
    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;
    line-height: 0;
}

#scrollToTopBtn:hover {
    transform: translateY(-5px) scale(1.1);
    opacity: 0.9;
}

/* --- BOUTON THEME (à ajouter dans ton HTML) --- */
.theme-btn {
    background: var(--block-bg);
    color: var(--text-dark);
    border: 1px solid var(--border-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
    box-shadow: var(--shadow-light);
    margin-left: 10px; /* Espace si placé à côté d'autres boutons */
}
.theme-btn:hover {
    transform: scale(1.1);
    background: var(--accent-purple);
    color: white;
}
/* --- STYLES AVATAR ET CADRES --- */

/* 1. Le conteneur principal */
.avatar-wrapper-standard {
    position: relative;
    width: 150px;       
    height: 150px;
    margin: 0 auto;     
    border-radius: 50%; 
    z-index: 0;
}

/* 2. L'image de l'utilisateur (Avatar) */
.user-img-standard {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;  
    border-radius: 50%; 
    z-index: 1;         
}

/* 3. L'image du cadre (Frame) */
.frame-img-standard {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 2;         
    pointer-events: none; 
    
    transform: scale(1.42); 
    transform-origin: center center; 
}

.icon-star-mini { width: 14px; height: 14px; object-fit: contain; display: inline-block; vertical-align: middle; margin-bottom: 2px; }

/* AJOUT DE CETTE CLASSE POUR CORRIGER LA TAILLE */
.icon-star { width: 18px; height: 18px; object-fit: contain; display: inline-block; vertical-align: sub; margin-right: 4px; }
/* --- HERO SECTION --- */
.groups-hero {
    position: relative;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    background: url('/assets/img/background-groups-hero.jpg') center/cover; /* Ajoute une belle image ici */
    margin-bottom: -50px;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2), var(--bg-body));
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 20px;
}

.hero-subtitle {
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-pink);
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: 4rem;
    margin: 10px 0 20px;
    text-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.hero-description {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 30px;
    line-height: 1.6;
}

/* BOUTON CRÉER (BIEN EN AVANT) */
.btn-hero-primary {
    display: inline-block;
    background: var(--accent-purple);
    color: white;
    padding: 18px 40px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 10px 25px rgba(219, 200, 235, 0.4);
    transition: 0.3s;
    margin: 10px;
}

.btn-hero-primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(219, 200, 235, 0.6);
    background: white;
    color: var(--accent-purple);
}

.btn-hero-secondary {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: white;
    padding: 18px 40px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: 0.3s;
}

/* --- RECHERCHE MEGA --- */
.mega-search-bar {
    background: var(--card-bg);
    padding: 10px;
    border-radius: 50px;
    display: flex;
    gap: 10px;
    box-shadow: var(--shadow-light);
    transform: translateY(-50%);
    z-index: 10;
    position: relative;
    border: 1px solid var(--border-light);
}

.input-wrapper {
    flex-grow: 1;
    display: flex;
    align-items: center;
    padding-left: 20px;
}

.input-wrapper input {
    border: none;
    background: transparent;
    width: 100%;
    padding: 10px;
    font-size: 1rem;
    color: var(--text-dark);
    outline: none;
}

.mega-search-bar select {
    border: none;
    background: var(--bg-body);
    padding: 0 20px;
    border-radius: 30px;
    font-weight: 600;
    color: var(--text-dark);
}

.btn-search-submit {
    background: var(--text-dark);
    color: white;
    border: none;
    padding: 0 30px;
    border-radius: 30px;
    font-weight: 700;
    cursor: pointer;
}

/* --- GRILLE & CARTES --- */
.modern-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 60px;
}

.section-header-modern {
    margin-bottom: 30px;
}

.section-header-modern h2 {
    font-size: 2rem;
    color: var(--text-dark);
    position: relative;
    display: inline-block;
}

.section-header-modern h2::after {
    content: '';
    position: absolute;
    bottom: -8px; left: 0;
    width: 50px; height: 4px;
    background: var(--accent-pink);
    border-radius: 2px;
}

.new-group-card {
    background: var(--card-bg);
    border-radius: 24px;
    overflow: hidden;
    text-decoration: none;
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-light);
}

.new-group-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.card-banner {
    height: 160px;
    position: relative;
    overflow: hidden;
}

.card-banner img {
    width: 100%; height: 100%; object-fit: cover;
    transition: 0.5s;
}

.new-group-card:hover .card-banner img { transform: scale(1.1); }

.type-badge {
    position: absolute;
    top: 15px; right: 15px;
    background: rgba(255, 255, 255, 0.9);
    padding: 5px 12px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-contrast);
}

.card-body { padding: 20px; }

.group-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    color: var(--text-dark);
    margin: 0 0 15px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.member-count { font-size: 0.85rem; color: var(--text-muted); }
.member-count b { color: var(--accent-purple); }

.btn-view-arrow {
    width: 30px; height: 30px;
    background: var(--block-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--accent-purple);
    font-weight: bold;
}

/* --- DARK MODE ADJUSTMENTS --- */
[data-theme="dark"] .mega-search-bar { background: var(--block-bg); }
[data-theme="dark"] .hero-overlay { background: linear-gradient(to bottom, rgba(0,0,0,0.5), var(--bg-body)); }
[data-theme="dark"] .type-badge { background: var(--accent-purple); color: white; }

/* Responsive */
@media (max-width: 768px) {
    .hero-title { font-size: 2.5rem; }
    .mega-search-bar {
        flex-direction: column;
        border-radius: 20px;
        transform: none;
        margin-bottom: 40px;
    }
    .mega-search-bar select, .btn-search-submit { padding: 15px; }
}