/* --- VARIABLES DE COULEURS ET POLICES --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');
:root {
    --main-purple: #9b59b6;
    --dark-bg: #121212;
    --card-bg: #1e1e1e; /* Utilisé pour le fond du container du modal */
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --discord-blue: #5865F2;
    --status-purple: #9b59b6;
    --star-yellow: #f1c40f;
    --status-green: #2ecc71;
    --border-color: rgba(255, 255, 255, 0.1); 
}
html { scroll-behavior: smooth; }
body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    background-color: var(--dark-bg);
    color: var(--text-primary);
    overflow-x: hidden;
    background: linear-gradient(-45deg, #ee7752, #8e44ad, #23a6d5, #23d5ab);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
    position: relative;
}
@keyframes gradient { 0% {background-position: 0% 50%;} 50% {background-position: 100% 50%;} 100% {background-position: 0% 50%;} }
.overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(0, 0, 0, 0.9); z-index: 1; }
.content-wrapper { position: relative; z-index: 2; display: flex; flex-direction: column; min-height: 100vh; }
main { flex-grow: 1; }
.page-section { padding: 0 50px; display: none; }
#home-page { display: block; }

/* --- HEADER ET NAVIGATION --- */
header { display: flex; justify-content: space-between; align-items: center; padding: 20px 50px; background-color: transparent; }
.logo a { font-size: 24px; font-weight: 700; color: var(--text-primary); display: flex; align-items: center; text-decoration: none; }
.logo-icon { display: inline-block; background-color: var(--main-purple); color: var(--card-bg); width: 28px; height: 28px; text-align: center; line-height: 28px; border-radius: 5px; font-style: italic; font-weight: 800; margin-right: 8px; }
nav { display: flex; align-items: center; gap: 20px; }
nav a { color: var(--text-primary); text-decoration: none; font-weight: 500; transition: color .3s ease; }
nav a:hover { color: var(--main-purple); }
.header-right { display: flex; align-items: center; gap: 15px; }
.cart-icon { position: relative; cursor: pointer; }
.cart-count { position: absolute; top: -8px; right: -8px; background-color: var(--main-purple); color: var(--text-primary); border-radius: 50%; padding: 2px 6px; font-size: 12px; font-weight: 700; display: none; }

.header-btn { padding: 8px 15px; border-radius: 5px; color: var(--text-primary); font-weight: 600; cursor: pointer; border: none; font-family: 'Poppins', sans-serif; display: flex; align-items: center; gap: 8px; text-decoration: none; }
#lang-switch-btn { background-color: transparent; border: 1px solid var(--main-purple); padding: 6px 12px; }
#email-login-btn { background-color: var(--main-purple); }
#discord-header-login-btn { background-color: var(--discord-blue); }
#discord-header-login-btn svg { width: 20px; height: 20px; fill: white; }

/* --- MENU PROFIL --- */
.user-profile-container { position: relative; }
.user-display-toggle { cursor: pointer; display: flex; align-items: center; }
.user-pseudo { background-color: var(--card-bg); padding: 8px 15px; border-radius: 5px; font-weight: 600; }
.user-avatar { width: 32px; height: 32px; border-radius: 50%; }
.profile-dropdown { display: none; position: absolute; top: 120%; right: 0; background-color: var(--card-bg); min-width: 160px; box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); z-index: 1003; border-radius: 8px; overflow: hidden; }
.profile-dropdown.show { display: block; }
.profile-dropdown a { color: var(--text-secondary); padding: 12px 16px; text-decoration: none; display: block; font-size: 14px; font-weight: 500; }
.profile-dropdown a:hover { background-color: var(--main-purple); color: var(--text-primary); }

/* --- MODALS (Connexion, Profil, Edit, Verify Email, Forgot Password) --- */
.modal-overlay { 
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    background-color: rgba(0,0,0,0.7); display: none; justify-content: center; align-items: center; 
    z-index: 1001; 
}
.modal-content { 
    background: var(--card-bg); padding: 30px; border-radius: 10px; text-align: center; 
    position: relative; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}
/* Style général pour le bouton de fermeture */
.modal-content .close-btn {
    position: absolute; top: 15px; right: 20px; font-size: 28px; 
    color: var(--text-secondary); cursor: pointer; line-height: 1; 
    transition: color 0.3s ease;
}
.modal-content .close-btn:hover { color: var(--text-primary); }

.modal-content.login { width: 400px; }
.modal-content.profile { width: 550px; }
.modal-content.edit { width: 380px; }
.modal-content.verify-email { width: 450px; } 
.modal-content.forgot-password-content { width: 400px; }

.modal-content h2 { margin-top: 0; margin-bottom: 25px; }
.modal-content input, .modal-content #review-product-select { 
    width: 100%; padding: 10px; margin-bottom: 15px; 
    background: var(--dark-bg); border: 1px solid var(--border-color); border-radius: 5px; 
    color: white; box-sizing: border-box; font-family: 'Poppins', sans-serif; font-size: 14px;
}
.modal-content button { 
    padding: 12px; border: none; border-radius: 5px; font-weight: 600; cursor: pointer; 
    background-color: var(--main-purple); color: white; transition: background-color 0.3s ease; 
}
.modal-content button:hover { background-color: #8a35c2; }
#edit-form button, #register-form button, #verify-email-form button, #request-password-reset-form button, #perform-password-reset-form button { width: 100%; }
.modal-links { display: flex; justify-content: space-between; font-size: 12px; margin-top: 15px; }
#register-view { display: none; }
.profile-field { display: flex; align-items: center; justify-content: space-between; text-align: left; padding: 20px 0; border-bottom: 1px solid var(--border-color); }
.profile-field:last-child { border-bottom: none; }
.profile-info { display: flex; align-items: baseline; flex-grow: 1; }
.profile-field-label { font-weight: 500; color: var(--text-secondary); width: 140px; flex-shrink: 0; }
.profile-field-value { display: flex; align-items: center; gap: 10px; font-weight: 600; }
#toggle-password-visibility { cursor: pointer; background: none; border: none; padding: 0; display: flex; align-items: center; font-size: 18px; margin-left: 10px; }
.change-btn { background-color: var(--main-purple); color: white; border: none; padding: 8px 18px; border-radius: 5px; cursor: pointer; font-size: 14px; font-weight: 600; }
.modal-content.verify-email p { color: var(--text-secondary); margin-bottom: 20px; }
.modal-content.verify-email #verify-email-address { font-weight: 600; color: var(--main-purple); }
.forgot-password-link { 
    display: block; margin-top: 10px; color: var(--main-purple); text-decoration: none; font-size: 0.9em;
}
.forgot-password-link:hover { text-decoration: underline; }

/* --- PAGE D'ACCUEIL : Sections principales --- */
.hero { text-align: center; padding: 150px 20px; }
.hero h1 { font-size: 64px; margin: 0; font-weight: 700; line-height: 1.2; }
.hero h1 span { color: var(--main-purple); }
.hero p { font-size: 18px; color: var(--text-secondary); max-width: 600px; margin: 20px auto 40px; }

/* --- PAGE D'ACCUEIL : Statistiques (Ajustements "sans fond") --- */
.stats-section {
    text-align: center;
    padding: 80px 0;
    position: relative; 
    margin-bottom: 50px;
    background-color: transparent; /* Fond transparent */
    border-radius: 0; 
    margin-left: 0; 
    margin-right: 0;
    box-shadow: none; /* Pas d'ombre */
}

.stats-section h2 {
    font-size: 38px; 
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.stats-section .subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 50px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.stats-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.stat-card {
    background-color: transparent; /* Fond des cartes stats transparent */
    border: none; /* Pas de bordure */
    border-radius: 0; /* Pas de coins arrondis */
    padding: 0; /* Pas de padding spécifique à la carte */
    text-align: center;
    min-width: 200px; 
    flex: 1; 
    max-width: 300px; 
    box-shadow: none; /* Pas d'ombre */
}

.stat-value {
    font-size: 42px; 
    font-weight: 700;
    color: var(--main-purple); 
    display: block;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 15px;
    color: var(--text-secondary);
    font-weight: 500;
}


/* --- PAGE D'ACCUEIL : Avis (Complètement retirée du HTML, mais styles gardés pour la page dédiée) --- */
.reviews-section-home { /* Cette section n'est plus dans index.html, mais le style est gardé si elle était remise */
    display: none; /* Pour s'assurer qu'elle est masquée si elle existe encore par erreur */
}

/* --- SECTION BEST SELLERS --- */
.best-seller-section { padding: 120px 0; text-align: center; }
.section-title { display: inline-block; color: var(--main-purple); background-color: rgba(155, 89, 182, 0.1); padding: 5px 15px; border-radius: 5px; font-weight: 600; margin-bottom: 15px; }
.best-seller-section h2 { font-size: 36px; margin-bottom: 10px; }
.best-seller-section .section-subtitle { color: var(--text-secondary); margin-bottom: 50px; }
.products-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; }

/* --- CARTE PRODUIT --- */
.product-card { background-color: transparent; transition: transform .3s ease; cursor: pointer; text-align: center; }
.product-card:hover { transform: translateY(-10px); }
.product-card img { width: 100%; height: 250px; object-fit: contain; margin-bottom: 15px; }
.product-info { padding: 0 10px; }
.product-card h3 { font-size: 20px; margin: 0 0 10px 0; color: var(--text-primary); font-weight: 600; }
.product-card-desc { font-size: 14px; color: var(--text-secondary); margin: 0; }

/* --- PAGE PRODUIT --- */
.product-page-layout { display: flex; justify-content: space-between; gap: 50px; padding: 80px 0; align-items: flex-start; }
.product-main-content { width: 60%; }
.product-hero-image { width: 100%; height: auto; object-fit: cover; border-radius: 15px; margin-bottom: 40px; }
.product-full-description h2 { font-size: 24px; border-bottom: 2px solid var(--main-purple); padding-bottom: 10px; margin-bottom: 20px; }
.product-purchase-box { width: 35%; position: sticky; top: 100px; background-color: rgba(30, 30, 30, 0.7); backdrop-filter: blur(10px); border: 1px solid var(--border-color); border-radius: 15px; padding: 30px; height: fit-content; }
.product-title-header { display: flex; align-items: center; gap: 15px; margin-bottom: 15px; }
.product-title-header h1 { margin: 0; font-size: 28px; }
.product-average-rating { font-size: 20px; color: var(--star-yellow); }
.product-purchase-box .price { font-size: 24px; color: var(--main-purple); font-weight: 700; margin: 15px 0; }
.variant-box { background: var(--dark-bg); border: 2px solid #333; border-radius: 8px; padding: 15px; margin-bottom: 10px; cursor: pointer; font-weight: 600; transition: border-color .3s; }
.variant-box.selected { border-color: var(--main-purple); }
.add-to-cart-btn { background-color: var(--main-purple); color: white; border: none; padding: 15px; width: 100%; border-radius: 5px; font-size: 16px; font-weight: 600; cursor: pointer; margin-top: 20px; }
.addons-checkbox-container { margin-top: 15px; display: flex; flex-direction: column; gap: 10px; }
.addon-item { display: flex; align-items: center; gap: 10px; background: var(--dark-bg); padding: 12px; border-radius: 8px; border: 2px solid #333; }
.addon-item label { font-weight: 600; cursor: pointer; }
.addon-item input[type="checkbox"] { width: 18px; height: 18px; cursor: pointer; }

/* --- PAGE AVIS --- */
.reviews-container { text-align: center; padding: 80px 0; }
.reviews-container h1 { font-size: 48px; }
#add-review-btn { background-color: var(--main-purple); color: white; border: none; padding: 12px 25px; border-radius: 5px; font-weight: 600; cursor: pointer; margin-bottom: 30px; }
#review-form { display: none; max-width: 600px; margin: 0 auto 50px; background-color: transparent; border: 1px solid var(--border-color); padding: 30px; border-radius: 10px; }
#review-form textarea { width: 100%; height: 100px; background-color: var(--dark-bg); border: 1px solid var(--border-color); color: white; padding: 10px; box-sizing: border-box; border-radius: 5px; margin-bottom: 15px;}
.star-rating { font-size: 30px; cursor: pointer; color: #555; }
.star-rating .star:hover, .star-rating .star.selected { color: var(--star-yellow); }
.reviews-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; text-align: left; margin-top: 30px; }
.review-card { background-color: transparent; border: 1px solid var(--border-color); border-radius: 10px; padding: 25px; }
.review-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid #333;}
.review-card-header .product-name { font-weight: 600; font-size: 18px; }
.review-card .star-rating { font-size: 18px; }

/* --- PAGE STATUS --- */
.status-container { text-align: center; padding: 80px 0; }
.status-container h1 { font-size: 48px; }
.status-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; }
.status-card { background-color: transparent; text-align: center; }
.status-card img { width: 100%; height: 250px; object-fit: contain; margin-bottom: 15px; }
.status-card h3 { font-size: 20px; margin: 0 0 10px 0; color: var(--text-primary); font-weight: 600; }
.status-info { display: flex; justify-content: center; align-items: center; gap: 10px; font-weight: 600; font-size: 18px; }
.status-dot { width: 12px; height: 12px; border-radius: 50%; }
.status-dot.green { background-color: var(--status-green); }
.status-dot.red { background-color: #e74c3c; }   
.status-dot.purple { background-color: #9b59b6; } 

/* --- PANIER --- */
.cart-flyout { position: fixed; top: 0; right: -400px; width: 350px; height: 100%; background-color: var(--card-bg); z-index: 1002; transition: right .3s ease; box-shadow: -5px 0 15px rgba(0,0,0,0.5); display: flex; flex-direction: column; }
.cart-flyout.active { right: 0; }
.cart-header, .cart-footer { padding: 20px; border-bottom: 1px solid var(--border-color); }
.cart-footer { border-top: 1px solid var(--border-color); border-bottom: none; }
.cart-items { flex-grow: 1; overflow-y: auto; padding: 20px; }
.cart-item { display: flex; gap: 15px; margin-bottom: 15px; align-items: center; }
.cart-item img { width: 70px; height: 70px; object-fit: cover; border-radius: 5px; }
.cart-item-info { flex-grow: 1; }
.cart-item.product-item { flex-wrap: wrap; }
.cart-item.product-item .cart-item-info { width: calc(100% - 85px); }
.cart-item.addon-item { padding-left: 20px; }
.cart-item.addon-item .cart-item-info { font-size: 12px; color: var(--text-secondary); }
.remove-item-btn { background: none; border: none; color: #aaa; font-size: 20px; cursor: pointer; }
.cart-total { display: flex; justify-content: space-between; font-size: 18px; font-weight: 700; margin-bottom: 15px; }
.checkout-btn { width: 100%; padding: 12px; border: none; border-radius: 5px; background: var(--main-purple); color: white; font-weight: 600; cursor: pointer; }
.promo-code-area {
    display: flex;
    gap: 10px;
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
}

#promo-code-input {
    flex-grow: 1; 
    padding: 10px;
    background-color: var(--dark-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 14px;
}

#apply-promo-btn {
    padding: 10px 15px;
    background-color: #555;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
}

#apply-promo-btn:hover {
    background-color: #666;
}

/* Styles pour l'affichage du total avec réduction */
#cart-total-display {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 5px 15px;
}

#cart-total-display .discount {
    color: #ef4444; 
}

#cart-total-display .final-total {
    font-weight: bold;
    font-size: 1.1em;
    border-top: 1px solid var(--border-color);
    margin-top: 5px;
    padding-top: 5px;
}

/* --- PAGE PAIEMENT --- */
.checkout-container { max-width: 800px; margin: 80px auto; background-color: rgba(30, 30, 30, 0.7); backdrop-filter: blur(10px); border: 1px solid var(--border-color); padding: 40px; border-radius: 15px; }
.checkout-summary-item { display: flex; justify-content: space-between; align-items: center; padding: 15px 0; border-bottom: 1px solid var(--border-color); }
.checkout-summary-addon { padding-left: 30px; color: var(--text-secondary); font-size: 0.9em; }
.checkout-total { text-align: right; margin-top: 20px; font-size: 22px; font-weight: 700; }
#paypal-btn, #confirm-payment-btn { display: block; width: fit-content; margin: 40px auto 0; padding: 15px 30px; color: white; text-decoration: none; border-radius: 8px; font-weight: 600; cursor: pointer; border: none; font-family: 'Poppins', sans-serif;}
#paypal-btn { background-color: #0070ba; }
#confirm-payment-btn { background-color: var(--status-green); }

/* --- FOOTER --- */
footer { padding: 40px 50px 20px; text-align: center; color: var(--text-secondary); font-size: 14px; border-top: 1px solid var(--border-color); margin-top: 60px; }


/* --- NOTIFICATIONS PERSONNALISÉES (TOAST) --- */
.notification-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: all;
}

.notification-item {
    background-color: rgba(30, 30, 30, 0.95);
    color: var(--text-primary);
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
    opacity: 0; 
    transform: translateY(20px); 
    min-width: 250px;
    max-width: 350px;
    font-size: 14px;
    line-height: 1.4;
    pointer-events: all;
}

/* Styles spécifiques pour succès/erreur */
.notification-item.success {
    border-left: 5px solid var(--status-green);
}

.notification-item.error {
    border-left: 5px solid #e74c3c;
}

/* Définitions des animations */
@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(20px);
    }
}

/* --- NOUVEAU : Bannière de consentement aux cookies --- */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(30, 30, 30, 0.95);
    color: var(--text-primary);
    padding: 15px 20px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
    z-index: 9999; 
    display: flex;
    flex-wrap: wrap; 
    justify-content: space-between;
    align-items: center;
    gap: 15px; 
}

.cookie-banner p {
    margin: 0;
    flex-grow: 1;
    font-size: 14px;
    line-height: 1.4;
}

.cookie-banner p a {
    color: var(--main-purple);
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
}

.cookie-btn {
    padding: 8px 15px;
    border-radius: 5px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    background-color: var(--main-purple);
    color: white;
    transition: background-color 0.3s ease;
}

.cookie-btn.decline {
    background-color: var(--text-secondary); 
}

.cookie-btn:hover {
    filter: brightness(1.2); 
}
.cookie-btn.decline:hover {
    filter: brightness(1.2);
}