/* ==========================================================================
   HEADER DU PROFIL (Bannière & Avatar)
   ========================================================================== */
.profile-card {
    background: var(--card);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border);
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.profile-cover {
    height: 140px;
    width: 100%;
}

.profile-info {
    padding: 0 30px 30px;
    margin-top: -60px;
    text-align: center;
}

.avatar-xl {
    width: 120px;
    height: 120px;
    border-radius: 25px;
    border: 6px solid #1e293b;
    object-fit: cover;
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    background: #1e293b;
}

.profile-main-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 15px 0 5px;
}

.user-bio {
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 20px;
    font-size: 0.95rem;
    line-height: 1.6;
}

.profile-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    border-top: 1px solid var(--border);
    padding-top: 20px;
}

.profile-stats span {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.profile-stats strong {
    color: #fff;
    display: block;
    font-size: 1.2rem;
}

/* ==========================================================================
   SYSTÈME D'ONGLETS (TABS)
   ========================================================================== */
.tabs-container {
    width: 100%;
}

.tabs-header {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 25px;
    border-bottom: 1px solid var(--border);
}

.tab-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 15px 25px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: var(--accent);
}

.tab-btn.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.tab-content {
    display: none; /* Masqué par défaut */
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.4s ease-out;
}

/* ==========================================================================
   GRILLE DES CRÉATIONS
   ========================================================================== */
.creations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.creation-card-modern {
    background: var(--card);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.creation-card-modern:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
    box-shadow: 0 15px 30px rgba(0, 212, 255, 0.1);
}

.creation-card-modern img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-bottom: 1px solid var(--border);
}

.creation-info {
    padding: 20px;
}

.creation-info h3 {
    margin: 0 0 10px;
    font-size: 1.15rem;
    color: #fff;
}

.view-btn {
    display: inline-block;
    margin-top: 15px;
    color: var(--accent);
    text-decoration: none;
    font-weight: bold;
    font-size: 0.85rem;
    text-transform: uppercase;
}

/* ==========================================================================
   LISTE DES QUESTIONS
   ========================================================================== */
.question-mini-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 15px;
    transition: transform 0.2s ease;
}

.question-mini-card:hover {
    transform: translateX(10px);
}

.q-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: bold;
    font-size: 0.85rem;
    display: inline-block;
    margin-top: 10px;
}

/* ==========================================================================
   ANIMATIONS & DIVERS
   ========================================================================== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.empty-msg {
    text-align: center;
    color: var(--text-muted);
    padding: 50px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 15px;
    grid-column: 1 / -1;
}


/* =============================================================
   STYLE DU BOUTON MODIFIER LE PROFIL
   ============================================================= */
.edit-profile-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 212, 255, 0.1);
    color: var(--accent);
    border: 1px solid rgba(0, 212, 255, 0.3);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(4px);
}

.edit-profile-btn:hover {
    background: var(--accent);
    color: #0f172a;
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 212, 255, 0.3);
}

.edit-profile-btn:active {
    transform: translateY(0);
}

/* Optionnel : Animation de l'icône si tu en as une */
.edit-profile-btn i {
    font-size: 0.9rem;
    transition: transform 0.4s ease;
}

.edit-profile-btn:hover i {
    transform: rotate(90deg);
}

/* Ajustement pour le header du profil */
.profile-main-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 10px;
    flex-wrap: wrap;
}


/* =============================================================
   ACTIONS DU PROFIL (Boutons Follow, Message, Edit)
   ============================================================= */

.profile-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 15px;
    justify-content: center; /* Aligné au centre pour correspondre à ton info de profil */
}

/* Base commune pour les boutons à hauteur fixe */
.follow-btn, .edit-profile-btn, .msg-btn {
    height: 42px; /* Hauteur identique pour tous */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-decoration: none;
    backdrop-filter: blur(4px);
}

/* Bouton Suivre / Abonné */
.follow-btn {
    padding: 0 25px;
    border: 2px solid var(--profile-color, #00d4ff);
    background: transparent;
    color: var(--profile-color, #00d4ff);
}

.follow-btn.following {
    background: var(--profile-color, #00d4ff);
    color: #0f172a;
}

.follow-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 212, 255, 0.2);
}

/* Bouton Message (SVG) */
.msg-btn {
    width: 42px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--profile-color, #00d4ff);
}

.msg-btn svg {
    width: 20px;
    height: 20px;
}

.msg-btn:hover {
    background: var(--profile-color, #00d4ff);
    color: #0f172a;
    border-color: transparent;
    transform: translateY(-2px) rotate(-5deg);
}

/* Bouton Modifier le profil */
.edit-profile-btn {
    padding: 0 20px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border: 1px solid var(--border);
    gap: 8px;
}

.edit-profile-btn:hover {
    background: #fff;
    color: #0f172a;
    border-color: #fff;
    transform: translateY(-2px);
}

.edit-profile-btn svg {
    width: 18px;
    height: 18px;
    transition: transform 0.5s ease;
}

.edit-profile-btn:hover svg {
    transform: rotate(90deg);
}

.private-profile-msg {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 20px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
    margin-top: 30px;
    text-align: center;
}

.private-profile-msg svg {
    margin-bottom: 20px;
    color: var(--profile-color, #00d4ff);
    opacity: 0.6;
}

.private-profile-msg h3 {
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 10px;
}

.private-profile-msg p {
    color: var(--text-muted);
    font-size: 1rem;
}

.requests-container {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
}

.request-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.request-item:last-child { border-bottom: none; }

.btn-accept {
    background: #10b981;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

.btn-decline {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid #ef4444;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    margin-left: 8px;
}

.btn-accept:hover { background: #059669; transform: scale(1.05); }
.btn-decline:hover { background: #ef4444; color: white; }

/* État quand une demande est en attente */
.follow-btn.pending {
    background-color: #334155 !important; /* Gris ardoise */
    color: #94a3b8 !important;
    border: 1px solid #475569;
    cursor: not-allowed;
    opacity: 0.8;
}

/* État quand on est déjà abonné */
.follow-btn.following {
    background-color: transparent;
    border: 1px solid var(--profile-color);
    color: var(--profile-color);
}

/* =============================================================
   SYSTÈME DE NIVEAUX & XP (AJOUTS)
   ============================================================= */

/* Glow Wrapper autour de l'avatar */
.avatar-glow-wrapper {
    position: relative;
    display: inline-block;
    padding: 6px;
}

.glow-effect {
    position: absolute;
    inset: 0;
    background: var(--profile-color, #00d4ff);
    filter: blur(15px);
    opacity: 0.3;
    border-radius: 30px;
    z-index: 0;
}

.avatar-xl {
    position: relative;
    z-index: 1;
}

/* Badge de Rôle / Niveau */
.level-system {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.role-badge {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    padding: 5px 12px;
    border-radius: 20px;
    color: var(--profile-color);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.role-badge:hover {
    background: var(--profile-color);
    color: #0f172a;
}

/* Barre d'XP */
.xp-container {
    width: 180px;
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    position: relative;
    border: 1px solid var(--border);
}

.xp-bar {
    height: 100%;
    background: var(--profile-color);
    border-radius: 10px;
    box-shadow: 0 0 10px var(--profile-color);
    transition: width 0.5s ease-out;
}

.xp-text {
    display: block;
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 4px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.max-level-msg {
    font-size: 0.7rem;
    color: #10b981;
    font-weight: bold;
    letter-spacing: 1px;
}

/* Guide des Rangs */
.ranks-guide {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 15px;
    padding: 25px;
    margin-top: 40px;
}

.ranks-guide h4 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ranks-grid-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.rank-title {
    color: var(--accent);
    font-weight: bold;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.rank-list, .spec-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.rank-list li, .spec-list li {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    padding-left: 5px;
}

.current-rank {
    color: #fff !important;
    font-weight: bold;
    position: relative;
}

.active-spec {
    color: var(--profile-color) !important;
    font-weight: bold;
}

.stat-clickable {
    cursor: pointer;
    transition: color 0.2s ease;
}

.stat-clickable:hover strong {
    /* Une vague en haut et en bas avec la couleur du profil */
    text-decoration: underline overline wavy var(--profile-color);
    /* Optionnel : décoller un peu le trait du bas pour plus de lisibilité */
    text-underline-offset: 4px;
}
/* MODALE LISTE */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--card);
    width: 90%;
    max-width: 400px;
    border-radius: 20px;
    border: 1px solid var(--profile-color, #00d4ff);
    overflow: hidden;
    animation: modalSlide 0.3s ease-out;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
}

.user-item-modal {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    border-radius: 12px;
    transition: background 0.2s;
    text-decoration: none;
    color: #fff;
}

.user-item-modal:hover { background: rgba(255,255,255,0.05); }

.user-item-modal img {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: cover;
}

.close-modal {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}

@keyframes modalSlide {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}