@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@400;500;600&display=swap');

:root {
    
    --bg-main: #0d0d12;
    --bg-glass: rgba(22, 22, 30, 0.5);
    --bg-glass-hover: rgba(35, 35, 45, 0.8);
    --text-main: #ffffff;
    --text-dim: #a1a1aa;
    --border: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(255, 255, 255, 0.2);
    --shadow-color: rgba(0,0,0,0.6);
    --bg-radial-1: rgba(255, 176, 0, 0.06);
    --bg-radial-2: rgba(255, 255, 255, 0.03);

    --primary: #ffb000; 
    --primary-glow: rgba(255, 176, 0, 0.3);
    --secondary: #ffcd4d;
    
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-pill: 9999px;
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

html.light-theme {
    --bg-main: #f8fafc;
    --bg-glass: rgba(255, 255, 255, 0.85);
    --bg-glass-hover: rgba(255, 255, 255, 1);
    --text-main: #334155;
    --text-dim: #64748b;
    --border: rgba(0, 0, 0, 0.08);
    --border-highlight: rgba(0, 0, 0, 0.15);
    --shadow-color: rgba(0,0,0,0.05);
    --bg-radial-1: rgba(255, 176, 0, 0.08);
    --bg-radial-2: rgba(0, 0, 0, 0.02);
    
    background-color: #f8fafc;
    background-blend-mode: normal;
    background-image: 
        linear-gradient(rgba(248, 250, 252, 0.92), rgba(248, 250, 252, 0.98)),
        url('/img/bg_custom.jpg');
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
    zoom: 0.8; /* Réduit l'échelle globale du site à 80% (inclut les marges, images, etc.) */
    background-color: #3a1a00; 
    background-image: 
        linear-gradient(rgba(15, 10, 5, 0.85), rgba(15, 10, 5, 0.95)),
        url('/img/bg_custom.jpg');
    background-blend-mode: normal, luminosity;
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    min-height: 125vh;
    transition: background-color 0.5s ease;
}

body {
    display: flex;
    flex-direction: column;
    color: var(--text-main);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    min-height: 125vh;
}

main {
    flex: 1;
    animation: pageEnter 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    opacity: 0;
}

@keyframes pageEnter {
    0% { opacity: 0; transform: translateY(15px) scale(0.98); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

main.page-leave {
    animation: pageLeave 0.3s ease forwards;
}

@keyframes pageLeave {
    0% { opacity: 1; transform: translateY(0) scale(1); }
    100% { opacity: 0; transform: translateY(-15px) scale(0.98); }
}

.particles {
    position: fixed;
    top: -50px; bottom: -50px; left: -50px; right: -50px;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}
.particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    opacity: 0;
    box-shadow: 0 0 15px var(--primary), 0 0 30px var(--primary-glow);
    animation: floatUp 15s infinite linear, pulse 4s infinite ease-in-out;
}
@keyframes floatUp {
    0% { transform: translateY(110vh) scale(0) translateX(0) rotate(0deg); opacity: 0; }
    15% { opacity: 0.6; }
    50% { opacity: 0.8; transform: translateY(50vh) scale(1.2) translateX(-20px) rotate(180deg); }
    85% { opacity: 0.6; }
    100% { transform: translateY(-10vh) scale(0) translateX(15px) rotate(360deg); opacity: 0; }
}
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 15px var(--primary), 0 0 30px var(--primary-glow); transform: scale(1); }
    50% { box-shadow: 0 0 25px var(--primary), 0 0 50px var(--primary); background: #ff8533; transform: scale(1.1); }
}

a { text-decoration: none; color: inherit; }

.glass {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.text-gradient {
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
}

.navbar {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    max-width: 1300px;
    height: 70px;
    border-radius: var(--radius-pill);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    z-index: 1000;
    box-shadow: 0 10px 30px -10px var(--shadow-color);
}

.navbar-brand {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.navbar-brand i { color: var(--primary); }

.navbar-nav { display: flex; gap: 5px; list-style: none; }
.nav-link {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    padding: 8px 20px;
    border-radius: var(--radius-pill);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-dim);
}
.nav-link:hover, .nav-link.active {
    color: var(--text-main);
    background: var(--border);
}

/* User Dropdown Menu */
.user-dropdown {
    position: relative;
    display: inline-block;
}
.user-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    color: var(--text-main);
    font-family: var(--font-heading);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}
.user-dropdown-btn:hover, .user-dropdown.active .user-dropdown-btn {
    background: var(--border);
}
.dropdown-menu {
    position: absolute;
    top: 120%;
    right: 0;
    width: 200px;
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 10px 0;
    display: none;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    z-index: 1000;
    animation: popIn 0.2s ease forwards;
    transform-origin: top right;
}
.user-dropdown.active .dropdown-menu {
    display: flex;
}
.dropdown-item {
    padding: 10px 20px;
    color: var(--text-dim);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    font-weight: 500;
}
.dropdown-item:hover {
    color: var(--text-main);
    background: rgba(255,255,255,0.05);
}
.dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 8px 0;
}


.theme-toggle {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-main);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}
.theme-toggle:hover { background: var(--border-highlight); transform: rotate(15deg); }

.btn {
    font-family: var(--font-heading);
    font-weight: 600;
    padding: 10px 22px;
    border-radius: var(--radius-pill);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    font-size: 0.95rem;
}
.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px var(--primary-glow);
}
.btn-primary:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 10px 25px var(--primary-glow);
    background: var(--secondary);
    filter: brightness(1.1);
}
.btn-outline {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-highlight);
}
.btn-outline:hover {
    background: var(--border);
    border-color: var(--text-main);
}
.btn-huge { padding: 18px 30px; font-size: 1.1rem; }

.hero {
    padding: 200px 20px 100px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}
.hero h1 {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 5vw, 5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -1px;
}
.hero p {
    font-size: 1.25rem;
    color: var(--text-dim);
    max-width: 600px;
    margin-bottom: 40px;
}
.floating-element {
    animation: floating 4s ease-in-out infinite;
}
@keyframes floating {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

.container { max-width: 1250px; margin: 0 auto; padding: 0 20px; }
.section-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    padding-bottom: 50px;
}
.product-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}
.product-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    padding: 2px;
    background: linear-gradient(135deg, var(--border-highlight), rgba(255,255,255,0));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.product-card:hover {
    transform: translateY(-15px) scale(1.03);
    box-shadow: 0 30px 60px rgba(0,0,0,0.4), 0 0 30px var(--primary-glow);
    background: var(--bg-glass-hover);
}
.product-card:hover::before {
    background: linear-gradient(45deg, var(--primary), var(--secondary), var(--primary));
    background-size: 200% 200%;
    animation: borderGlow 3s ease infinite;
    opacity: 1;
}
@keyframes borderGlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

div:where(.swal2-container) div:where(.swal2-popup) {
    border-radius: var(--radius-lg) !important;
    border: 1px solid var(--border-highlight) !important;
    box-shadow: 0 20px 40px var(--shadow-color) !important;
}
div:where(.swal2-container) button:where(.swal2-styled) {
    border-radius: var(--radius-sm) !important;
    font-weight: 600 !important;
}

.product-img-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16/10;
    overflow: hidden;
}
.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.product-card:hover .product-img { transform: scale(1.1); }

.product-category-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    color: white;
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid rgba(255,255,255,0.2);
}

.product-content { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.product-title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 10px;
    display: block;
}
.product-meta {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: auto; padding-top: 15px;
}
.product-price { font-family: var(--font-heading); font-size: 1.6rem; font-weight: 800; color: var(--text-main); }

.product-action-btn {
    width: 45px; height: 45px; border-radius: 50%;
    background: var(--border); color: var(--text-main);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; transition: all 0.3s ease;
    border: 1px solid var(--border-highlight);
}
.product-card:hover .product-action-btn {
    background: var(--primary); color: white; border-color: var(--primary);
}

.detail-hero {
    margin-top: 110px; border-radius: var(--radius-lg); overflow: hidden;
    position: relative; padding: 60px; display: flex; gap: 40px; align-items: flex-end;
}
.detail-hero-bg {
    position: absolute; inset: 0; background-size: cover; background-position: center;
    filter: blur(20px) brightness(0.2); z-index: -1; transform: scale(1.1);
}
body.light-theme .detail-hero-bg { filter: blur(20px) brightness(0.8); }

.detail-icon {
    width: 150px; height: 150px; border-radius: var(--radius-md);
    box-shadow: 0 20px 40px rgba(0,0,0,0.8); border: 2px solid rgba(255,255,255,0.2);
    object-fit: cover;
}
.detail-title {
    font-family: var(--font-heading); font-size: 3rem; font-weight: 800;
    margin-bottom: 10px; line-height: 1.1; color: white; 
}
.detail-stats { display: flex; gap: 20px; color: rgba(255,255,255,0.8); font-size: 1.1rem; }
.detail-stats span { display: flex; align-items: center; gap: 8px; }

.catalog-container { padding-top: 130px; }
.catalog-layout { display: grid; grid-template-columns: 300px 1fr; gap: 40px; }
@media (max-width: 900px) { .catalog-layout { grid-template-columns: 1fr; } }
.sidebar-glass {
    background: var(--bg-glass); backdrop-filter: blur(12px);
    border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 25px; position: sticky; top: 120px;
}
.sidebar-title { font-family: var(--font-heading); font-size: 1.2rem; margin-bottom: 15px; color: var(--text-dim); }
.cat-link {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 15px; border-radius: var(--radius-md); margin-bottom: 5px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); font-weight: 500;
    border-left: 0px solid transparent;
}
.cat-link:hover, .cat-link.active { 
    background: rgba(255, 255, 255, 0.05); 
    color: var(--text-main); 
    padding-left: 20px;
    border-left: 3px solid var(--primary);
}
.cat-link.active i { color: var(--primary); }

.filter-badge {
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 176, 0, 0.2);
    background: rgba(255, 176, 0, 0.05);
}
.filter-badge:hover {
    background: rgba(255, 176, 0, 0.15);
    color: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
}
.filter-badge i {
    color: var(--text-dim);
    transition: color 0.3s ease;
}
.filter-badge:hover i {
    color: var(--primary);
}

.detail-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
    margin-top: 40px;
}
@media (max-width: 900px) {
    .detail-layout { grid-template-columns: 1fr; }
    .detail-hero { flex-direction: column; align-items: center; text-align: center; padding: 40px 20px; }
}

.tab-content { display: none; animation: popIn 0.4s ease forwards; }
.tab-content.active { display: block; }
.tab-btn { flex: 1; border: none; cursor: pointer; text-align: center; }
.tab-btn.active { background: var(--primary); color: white; }
.tab-btn:not(.active) { background: transparent; border: 1px solid transparent; }
.tab-btn:not(.active):hover { background: var(--border); }

.content-box {
    background: var(--bg-glass); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 30px; margin-bottom: 20px;
}
.purchase-card { text-align: center; position: sticky; top: 120px; }
.price-display { font-family: var(--font-heading); font-size: 3.5rem; font-weight: 800; margin-bottom: 20px; }

.main-footer {
    background-color: var(--bg-glass);
    border-top: 1px solid var(--border);
    padding: 60px 0 20px;
    margin-top: auto;
    backdrop-filter: blur(10px);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

@media (max-width: 768px) {
    .footer-grid { grid-template-columns: 1fr; }
}

.footer-col h3 {
    font-family: var(--font-heading);
    color: var(--text-main);
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul a {
    color: var(--text-dim);
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
}
.footer-col ul a i { color: var(--primary); width: 15px; text-align: center; }
.footer-col ul a:hover { color: var(--text-main); }

.footer-socials { display: flex; gap: 15px; }
.social-link {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--border);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-main);
    transition: all 0.3s;
    font-size: 1.2rem;
}
.social-link:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    color: var(--text-dim);
    font-size: 0.9rem;
}

.mojang-disclaimer {
    margin-top: 10px;
    font-size: 0.75rem;
    opacity: 0.7;
}

input[type="range"] {
    -webkit-appearance: none;
    background: var(--border);
    height: 6px;
    border-radius: var(--radius-pill);
    outline: none;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px; height: 20px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px var(--primary-glow);
}

.auth-card {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-highlight);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    padding: 50px 40px;
    position: relative;
    overflow: hidden;
}
.auth-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
}
.auth-input {
    width: 100%;
    padding: 16px 20px;
    border-radius: var(--radius-md);
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}
.auth-input:focus {
    background: rgba(0, 0, 0, 0.4);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.review-stars {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 5px;
}
.review-stars input {
    display: none;
}
.review-stars label {
    font-size: 2rem;
    color: var(--border);
    cursor: pointer;
    transition: color 0.2s;
}
.review-stars input:checked ~ label,
.review-stars label:hover,
.review-stars label:hover ~ label {
    color: #fbbf24;
}
.review-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 15px;
}
.review-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    align-items: center;
}

@keyframes popIn {
    0% { opacity: 0; transform: scale(0.95) translateY(10px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}
.animate-pop { animation: popIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; }
