﻿:root {
    --brand-primary: #BC70A4;
    --brand-secondary: #BFD641;
    --surface-hero: #F6F1F6; /* teinte mauve très légère pour le bandeau haut */
    --surface-card: #F9F6FB; /* teinte douce pour le panneau principal */
    --surface-tabs: #F2EEF5; /* fond des onglets */
    --surface-item: #F7F4F8; /* cartes dans les carrousels */
    --surface-chip: #F2F4F8; /* puces/petites pastilles */
    --surface-info: #F4F6FA; /* panneau infos utilisateur */
    --text-main: #222;
    --text-muted: #666;
}

/* HERO allégé (plus de dégradé, fond doux teinté) */
.user-space-hero {
    background: var(--surface-hero);
    border-radius: 22px;
    margin: 24px auto 0 auto;
    text-align: center;
    padding: 36px 0 48px 0;
    box-shadow: 0 8px 24px -10px rgba(0,0,0,0.12);
    position: relative;
    max-width: 900px;
}

.user-avatar-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.user-avatar-img {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 4px 18px rgba(0,0,0,0.08);
    border: 4px solid #fff; /* on garde blanc ici pour faire ressortir l’avatar */
    background: #fff;
}

.user-hello {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-main);
    margin-top: 10px;
}

/* Carte principale: fond teinté (plus de blanc pur) */
.user-space-card {
    background: var(--surface-card);
    border-radius: 26px;
    margin: -48px auto 54px auto;
    max-width: 1050px;
    padding: 36px 32px 32px 32px;
    box-shadow: 0 10px 30px -14px rgba(0,0,0,0.18), 0 2px 10px rgba(0,0,0,0.06);
    min-height: 600px;
    position: relative;
}

    /* Tabs: surface douce, pas de dégradé */
    .user-space-card .nav-tabs {
        background: var(--surface-tabs);
        border-radius: 12px;
        border: none !important;
        margin-bottom: 18px;
        padding: 0.5rem 1rem;
    }

    .user-space-card .nav-link {
        font-weight: 600;
        color: var(--text-main);
        border-radius: 8px;
        background: #F8F6FA; /* légèrement teinté, remplace le blanc */
        border: 1px solid rgba(0,0,0,0.06);
        margin-right: 8px;
        transition: background .15s, color .15s, border-color .15s, box-shadow .15s;
    }

        .user-space-card .nav-link:hover {
            background: #FBF8FD;
            box-shadow: 0 4px 12px rgba(0,0,0,.08);
            border-color: rgba(0,0,0,0.12);
        }

        /* Actif: aplat de la couleur primaire (sans dégradé) */
        .user-space-card .nav-link.active {
            background: var(--brand-primary);
            color: #fff;
            border-color: var(--brand-primary);
            box-shadow: 0 4px 14px rgba(188,112,164,0.25);
        }

/* Carrousel */
.gin-carousel-container {
    margin: 30px 0 20px 0;
    padding: 0 8px;
}

.gin-carousel {
    display: flex;
    gap: 28px;
    overflow-x: auto;
    padding-bottom: 12px;
    scrollbar-width: thin;
    scrollbar-color: var(--brand-primary) #eee;
}

    .gin-carousel::-webkit-scrollbar {
        height: 10px;
    }

    .gin-carousel::-webkit-scrollbar-track {
        background: #eee;
        border-radius: 8px;
    }

    .gin-carousel::-webkit-scrollbar-thumb {
        background: var(--brand-primary);
        border-radius: 8px;
    }

/* Cartes du carrousel: fond teinté (plus de blanc pur), ombre légère */
.gin-carousel-card {
    background: var(--surface-item);
    border-radius: 18px;
    min-width: 210px;
    max-width: 230px;
    box-shadow: 0 2px 14px rgba(0,0,0,0.08), 0 1.5px 6px rgba(0,0,0,0.04);
    padding: 18px 14px 18px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    transition: transform .15s, box-shadow .15s;
}

    .gin-carousel-card:hover {
        box-shadow: 0 10px 26px -12px rgba(0,0,0,0.18);
        transform: translateY(-3px) scale(1.02);
    }

/* Cadre d’image: on garde blanc pour mettre en valeur les visuels */
.gin-carousel-img-frame {
    background: #fff;
    border-radius: 12px;
    padding: 8px;
    margin-bottom: 12px;
    width: 110px;
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gin-carousel-img {
    max-width: 90px;
    max-height: 90px;
    object-fit: contain;
    border-radius: 8px;
    background: #fff;
}

.gin-carousel-title {
    font-size: 1.05rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 4px;
    color: var(--brand-primary);
}

.gin-carousel-rating {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-bottom: 2px;
    color: darkgoldenrod;
    font-size: 1.1rem;
}

/* Pastille quantité (bar): aplat sans dégradé */
.gin-carousel-bar-qty .pill {
    background: var(--brand-primary);
    color: #fff;
    font-weight: 600;
    padding: 4px 14px;
    border-radius: 24px;
    font-size: 0.85rem;
    margin-bottom: 3px;
}

.gin-carousel-actions {
    margin-top: 8px;
    display: flex;
    gap: 10px;
    width: 100%;
    justify-content: center;
}

.empty-list-msg {
    color: var(--brand-primary);
    text-align: center;
    font-size: 1.1rem;
    padding: 32px 0;
}

/* Panneau infos (bas de page): fond uni doux (plus de blanc et plus de dégradé) */
.user-info-panel {
    margin-top: 44px;
    background: var(--surface-info);
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 18px;
    box-shadow: 0 1.5px 8px rgba(0,0,0,0.05);
    padding: 28px 32px 24px 32px;
}

@media (max-width: 900px) {
    .user-space-hero, .user-space-card {
        max-width: 99vw;
        padding: 20px 2vw;
    }

    .user-info-panel {
        padding: 16px 2vw;
    }
}
/* Accent de contour uniquement pour les cartes du UserProfile */
.user-space-card .gin-carousel-card {
    /* Liseré coloré par gin, sans impacter les autres pages */
    border: 2px solid transparent;
    background: linear-gradient(#fff, #fff) padding-box, linear-gradient(90deg, var(--gin-primary, #BC70A4), var(--gin-secondary, #BFD641)) border-box;
    border-radius: 18px; /* doit rester aligné avec la card */
}

    /* Survol: léger renfort du liseré + ombre subtile */
    .user-space-card .gin-carousel-card:hover {
        border-width: 3px;
        box-shadow: 0 10px 26px -12px rgba(0,0,0,0.18);
        transform: translateY(-3px) scale(1.02);
    }

    /* Optionnel: focus visible clavier */
    .user-space-card .gin-carousel-card:focus-within {
        box-shadow: 0 0 0 3px rgba(188,112,164,0.25);
    }

/* === Badges de rang et "ma note" pour l'onglet Top 10 (scopé UserProfile) === */
.user-space-card .gin-carousel-card {
    position: relative; /* déjà présent mais on le rappelle */
}

.user-space-card .rank-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid #BC70A4; /* défaut brand */
    color: #BC70A4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
    z-index: 2;
}

/* Or, Argent, Bronze */
.user-space-card .rank-1 {
    border-color: #D4AF37;
    color: #D4AF37;
}

.user-space-card .rank-2 {
    border-color: #C0C0C0;
    color: #C0C0C0;
}

.user-space-card .rank-3 {
    border-color: #CD7F32;
    color: #CD7F32;
}

.user-space-card .my-rating-pill {
    margin-top: 6px;
    background: #F2F4F8;
    border: 1px solid rgba(0,0,0,0.06);
    color: #222;
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.8rem;
}

/* === Badges rang + "ma note" pour l’onglet Top 10 (UserProfile only) === */
.user-space-card .gin-carousel-card {
    position: relative;
}

.user-space-card .rank-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid #BC70A4;
    color: #BC70A4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
    z-index: 2;
}

.user-space-card .rank-1 {
    border-color: #D4AF37;
    color: #D4AF37;
}

.user-space-card .rank-2 {
    border-color: #C0C0C0;
    color: #C0C0C0;
}

.user-space-card .rank-3 {
    border-color: #CD7F32;
    color: #CD7F32;
}

.user-space-card .my-rating-pill {
    margin-top: 6px;
    background: #F2F4F8;
    border: 1px solid rgba(0,0,0,0.06);
    color: #222;
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.8rem;
}