:root {
    --primary-gradient: linear-gradient(135deg, #FF6B6B, #FFB700);
    --secondary-gradient: linear-gradient(135deg, #45B7D1, #4666FF);
    --accent-gradient: linear-gradient(135deg, #FF6B6B, #FFE66D);
    --surface-gradient-dark: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    --surface-gradient-light: linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.9));
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.05);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-primary: 'Space Grotesk', system-ui, -apple-system, sans-serif;
}

/* Thème sombre (par défaut) */
body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: #0A0A0F;
    font-family: var(--font-primary);
    color: #fff;
    line-height: 1.6;
    letter-spacing: -0.02em;
    transition: all 0.3s ease;
}

/* Regrouper tous les styles du thème clair */
.theme-light {
    background: #e6e9ef;
    color: #333;
}

.theme-light .stat-card,
.theme-light .menu-card,
.theme-light .jewelry-collection {
    background: var(--surface-gradient-light);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.theme-light .stat-content h3,
.theme-light .menu-card p,
.theme-light .logout-link,
.theme-light .jewelry-logo {
    color: rgba(0, 0, 0, 0.7);
}

.dashboard {
    max-width: 1200px;
    margin: 0 auto;
}

.header {
    position: relative;
    background: var(--primary-gradient);
    border-radius: 24px;
    padding: 3rem;
    margin-bottom: 2.5rem;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    filter: blur(80px);
}

.header h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
    position: relative;
    line-height: 1.3;
    background: linear-gradient(to right, #fff, rgba(255, 255, 255, 0.7));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    font-weight: 300;
}

.stat-card {
    background: var(--surface-gradient-dark);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.stat-icon {
    background: var(--accent-gradient);
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon svg {
    width: 32px;
    height: 32px;
    stroke: #fff;
}

.stat-content h3 {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    font-weight: 500;
    margin: 0 0 0.25rem 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.menu-card {
    position: relative;
    border-radius: 20px;
    padding: 2rem;
    background: var(--surface-gradient-dark);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    text-decoration: none;
    color: #fff;
    overflow: hidden;
}

.menu-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--secondary-gradient);
    opacity: 0;
    z-index: -1;
}

.menu-card:hover {
    transform: translateY(-4px);
}

.menu-card:hover::after {
    opacity: 0.1;
}

.icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: var(--accent-gradient);
    border-radius: 16px;
    margin-bottom: 1.5rem;
}

.icon-wrapper svg {
    width: 28px;
    height: 28px;
    stroke: #fff;
    stroke-width: 2;
}

.menu-card h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.menu-card p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    font-weight: 300;
}

.logout-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 1rem;
    margin-top: 1rem;
}

.logout-link svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-width: 2;
}

.logout-link:hover {
    color: #fff;
}

/* Styles pour la collection de bijoux */
.jewelry-collection {
    background: var(--surface-gradient-dark);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 3rem;
    margin: 2.5rem 0rem;
    position: relative;
    overflow: hidden;
    /* Suppression de max-width pour permettre plus de flexibilité */
}

.jewelry-collection::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--secondary-gradient);
    opacity: 0;
    z-index: -1;
}

.jewelry-collection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

.jewelry-collection-header h3 {
    margin: 0;
    text-align: left;
    font-size: 2rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

.artifact-counter {
    background: linear-gradient(90deg, 
        #FF6B6B, 
        #FF8E53
    );
    color: #fff;
    font-family: 'Nunito', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    padding: 0.8rem 1.6rem;
    border-radius: 50px;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
    opacity: 0; /* Start hidden */
    transform: translateY(50px); /* Start out of view */
    animation: roll-in 1s ease forwards; /* Add roll-in animation */
}

.artifact-counter span {
    position: relative;
    z-index: 1;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    overflow: hidden;
    display: inline-block;
    animation: text-roll 1s ease forwards; /* Rolling effect for text */
}

.artifact-counter:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Animation: Rolling text */
@keyframes text-roll {
    0% {
        transform: translateY(100%);
        opacity: 0;
    }
    100% {
        transform: translateY(0%);
        opacity: 1;
    }
}

/* Animation: Counter roll-in */
@keyframes roll-in {
    0% {
        opacity: 0;
        transform: translateY(50px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


.jewelry-grid {
    display: grid;
    /* Réduction de la taille minimale pour permettre plus d'éléments */
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1.5rem;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.jewelry-logo {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    border-radius: 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.jewelry-logo::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--primary-gradient);
    opacity: 0;
    z-index: 0;
}

.jewelry-logo:hover {
    transform: translateY(-8px) scale(1.05);
    background: rgba(255, 255, 255, 0.05);
}

.jewelry-logo:hover::after {
    opacity: 0.1;
}

.jewelry-logo img {
    width: 70%;
    height: 70%;
    filter: grayscale(100%) opacity(0.3);
    position: relative;
    z-index: 1;
}

.jewelry-logo.owned {
    background: var(--surface-gradient-dark);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.jewelry-logo.owned::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--primary-gradient);
    opacity: 0.1;
    z-index: 0;
}

.jewelry-logo.owned img {
    filter: none;
    opacity: 1;
    transform: scale(1.1);
}

.jewelry-name {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 0.5rem;
}

.jewelry-logo:hover .jewelry-name {
    color: rgba(255, 255, 255, 0.9);
}

.jewelry-logo.owned .jewelry-name {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 600;
}

/* Styles spécifiques pour chaque artéfact */
.jewelry-logo.owned[data-artifact="larmedesoutien"] {
    background: rgba(255, 69, 0, 0.15); /* Version claire de #ff4500 */
    border-color: #ff8c6a;
}

.jewelry-logo.owned[data-artifact="lesliensdasteria"] {
    background: rgba(0, 119, 255, 0.15); /* Version claire de #0077ff */
    border-color: #80bfff;
}

.jewelry-logo.owned[data-artifact="medaillondachevement"] {
    background: rgba(255, 107, 43, 0.15); /* Version claire de #ff6b2b */
    border-color: #ffd700;
}

.jewelry-logo.owned[data-artifact="baguedengagement"] {
    background: rgba(0, 168, 204, 0.15); /* Version claire de #00a8cc */
    border-color: #7fdbff;
}

.jewelry-logo.owned[data-artifact="cledesouvenir"] {
    background: rgba(156, 123, 78, 0.15); /* Version claire de #9c7b4e */
    border-color: #d4af37;
}

.jewelry-logo.owned[data-artifact="braceletfamilial"] {
    background: rgba(76, 175, 80, 0.15); /* Version claire de #4caf50 */
    border-color: #81c784;
}

.jewelry-logo.owned[data-artifact="baguedamour"] {
    background: rgba(255, 51, 102, 0.15); /* Version claire de #ff3366 */
    border-color: #ff809f;
}

.jewelry-logo.owned[data-artifact="talismandegratitude"] {
    background: rgba(147, 0, 211, 0.15); /* Version claire de #9300d3 */
    border-color: #b459d3;
}

.jewelry-logo.owned[data-artifact="baguedereconciliation"] {
    background: rgba(147, 196, 228, 0.15); /* Version claire de #93c4e4 (bleu clair apaisant) */
    border-color: #93c4e4;
}

.jewelry-logo.owned:hover[data-artifact="baguedereconciliation"] {
    background: rgba(147, 196, 228, 0.25);
}

.jewelry-logo.owned:hover[data-artifact="talismandegratitude"] {
    background: rgba(147, 0, 211, 0.25);
}

.jewelry-logo.owned:hover[data-artifact="larmedesoutien"] {
    background: rgba(255, 69, 0, 0.25);
}

.jewelry-logo.owned:hover[data-artifact="lesliensdasteria"] {
    background: rgba(0, 119, 255, 0.25);
}

.jewelry-logo.owned:hover[data-artifact="medaillondachevement"] {
    background: rgba(255, 107, 43, 0.25);
}

.jewelry-logo.owned:hover[data-artifact="baguedengagement"] {
    background: rgba(0, 168, 204, 0.25);
}

.jewelry-logo.owned:hover[data-artifact="cledesouvenir"] {
    background: rgba(156, 123, 78, 0.25);
}

.jewelry-logo.owned:hover[data-artifact="braceletfamilial"] {
    background: rgba(76, 175, 80, 0.25);
}

.jewelry-logo.owned:hover[data-artifact="baguedamour"] {
    background: rgba(255, 51, 102, 0.25);
}

.jewelry-logo.owned {
    border-width: 2px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.jewelry-logo.owned::before {
    display: none; /* Supprime l'ancien effet de gradient */
}

@media (max-width: 768px) {
    .jewelry-collection {
        padding: 2rem;
    }
    
    .jewelry-grid {
        grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
        gap: 1.25rem;
    }

    .jewelry-logo {
        padding: 1rem;
    }

    .jewelry-logo img {
        width: 70%;
        height: 70%;
    }
}

@media (max-width: 480px) {
    .jewelry-collection h3 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .jewelry-grid {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .jewelry-collection {
        padding: 1.5rem;
    }
    
    .jewelry-grid {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 1rem;
    }

    .jewelry-logo {
        padding: 0.75rem;
    }

    .jewelry-logo img {
        width: 48px;
        height: 48px;
    }

    .jewelry-name {
        font-size: 0.75rem;
    }

    .header h1 {
        font-size: clamp(1.5rem, 4vw, 2.5rem);
    }
}

/* Regrouper les propriétés de transition communes */
.menu-card,
.jewelry-logo,
.jewelry-logo img,
.jewelry-name,
.info-title {
    transition: var(--transition);
}
