:root {
    --bg-black: #08080a;
    --bg-dark-1: #111115;
    --bg-dark-2: #1a1a20;
    --primary-red: #ff2a4b;
    --accent-orange: #ff6a00;
    --mc-color: #2bcf5e;
    --admin-color: #9d2bcf;
    --text-white: #ffffff;
    --text-gray: #9e9ea7;
    --border-color: rgba(255, 106, 0, 0.15);
    --gradient-brand: linear-gradient(135deg, #ff2a4b 0%, #ff6a00 100%);
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; scroll-behavior: smooth; }
body { background-color: var(--bg-black); color: var(--text-white); font-family: var(--font-body); line-height: 1.6; overflow-x: hidden; }
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 900; text-transform: uppercase; letter-spacing: 1px; }
.gradient-text { background: var(--gradient-brand); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

.navbar {
    position: fixed; top: 0; left: 0; width: 100%; display: flex; justify-content: space-between; align-items: center;
    padding: 15px 5%; background-color: rgba(8, 8, 10, 0.95); backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 42, 75, 0.2); z-index: 1000;
}
.logo { font-family: var(--font-heading); font-size: 1.6rem; font-weight: 900; letter-spacing: 2px; cursor: pointer; }
.logo-accent { color: var(--primary-red); }
.nav-links { display: flex; list-style: none; gap: 20px; }
.nav-links a { color: var(--text-gray); text-decoration: none; font-weight: 600; transition: color 0.3s; cursor: pointer; }
.nav-links a:hover, .nav-links a.active { color: var(--accent-orange); }

.nav-actions { display: flex; gap: 15px; align-items: center; }
.btn-icon { background: var(--bg-dark-2); border: 1px solid var(--border-color); color: var(--text-white); padding: 8px 15px; border-radius: 8px; cursor: pointer; font-weight: 600; transition: 0.3s; }
.btn-icon:hover { border-color: var(--primary-red); }
.cart-count { background: var(--gradient-brand); color: var(--text-white); font-size: 0.75rem; padding: 2px 6px; border-radius: 50%; }

.btn-primary { display: inline-block; padding: 12px 24px; background: var(--gradient-brand); color: var(--text-white); text-decoration: none; font-family: var(--font-heading); font-size: 0.9rem; font-weight: 700; border-radius: 8px; border: none; cursor: pointer; text-align: center; transition: 0.3s; }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(255, 106, 0, 0.4); }

.btn-secondary { background: var(--bg-dark-2); border: 1px solid rgba(255,255,255,0.2); color: white; padding: 12px 24px; border-radius: 8px; font-weight: bold; cursor: pointer; transition: 0.3s; }
.btn-secondary:hover { border-color: white; background: rgba(255,255,255,0.1); }

.page-section { display: none; padding: 100px 5% 40px; max-width: 1400px; margin: 0 auto; min-height: 80vh; animation: fadeIn 0.5s ease-in-out; }
.page-section.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.section-header { text-align: center; margin-bottom: 50px; }
.section-header h2 { font-size: 2.8rem; margin-bottom: 15px; }
.section-header p { color: var(--text-gray); font-size: 1.1rem; max-width: 650px; margin: 0 auto; }

.badge-popular { background: var(--gradient-brand); color: white; font-size: 0.7rem; font-weight: bold; padding: 4px 12px; border-radius: 20px; text-transform: uppercase; display: inline-block; margin-bottom: 10px; }

/* HERO & ACCUEIL */
.hero { position: relative; min-height: 75vh; display: flex; align-items: center; justify-content: center; text-align: center; padding-top: 80px; background: radial-gradient(circle at center, rgba(255, 42, 75, 0.25) 0%, rgba(8, 8, 10, 1) 75%), url('https://images.unsplash.com/photo-1627398246399-659f776d6545?q=80&w=2000&auto=format&fit=crop') center/cover; background-blend-mode: overlay; }
.hero-content { max-width: 850px; z-index: 2; padding: 40px; background: rgba(8,8,10,0.75); border-radius: 20px; backdrop-filter: blur(12px); border: 1px solid rgba(255,106,0,0.2); }
.hero h1 { font-size: 4.2rem; margin-bottom: 20px; text-shadow: 0 5px 15px rgba(0,0,0,0.6); line-height: 1.1; }
.hero p { font-size: 1.25rem; color: #ddd; margin-bottom: 35px; line-height: 1.7; }
.hero-buttons { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }

.main-container { max-width: 1400px; margin: 0 auto; padding: 50px 5%; }

/* SECTIONS NOUVEAUTÉS & POSTS */
.home-section-title { font-size: 2rem; margin-bottom: 25px; display: flex; align-items: center; gap: 15px; border-bottom: 2px solid rgba(255,255,255,0.05); padding-bottom: 10px; }

.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 25px; margin-bottom: 60px; }
.news-card { background: var(--bg-dark-1); border: 1px solid var(--border-color); border-radius: 12px; overflow: hidden; transition: 0.3s; }
.news-card:hover { transform: translateY(-5px); border-color: var(--primary-red); }
.news-img { width: 100%; height: 180px; object-fit: cover; }
.news-body { padding: 20px; }
.news-date { font-size: 0.8rem; color: var(--accent-orange); font-weight: bold; margin-bottom: 5px; }
.news-title { font-size: 1.2rem; margin-bottom: 10px; }
.news-desc { font-size: 0.9rem; color: var(--text-gray); }

.posts-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 25px; margin-bottom: 60px; }
.post-card { background: var(--bg-dark-2); border-left: 4px solid var(--primary-red); border-radius: 8px; padding: 25px; display: flex; flex-direction: column; justify-content: space-between; }
.post-author { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; }
.post-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--gradient-brand); display: flex; align-items: center; justify-content: center; font-weight: bold; }
.post-meta { font-size: 0.85rem; }
.post-meta .name { font-weight: bold; color: white; }
.post-meta .time { color: var(--text-gray); }
.post-content { color: #ddd; font-size: 0.95rem; line-height: 1.6; margin-bottom: 15px; }
.post-tag { align-self: flex-start; background: rgba(255,42,75,0.15); color: var(--primary-red); padding: 4px 10px; border-radius: 15px; font-size: 0.75rem; font-weight: bold; }

.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-top: 20px; }
.feature-card { background: var(--bg-dark-1); padding: 35px 25px; border-radius: 12px; border: 1px solid var(--border-color); text-align: center; transition: 0.3s; }
.feature-card:hover { transform: translateY(-10px); border-color: var(--primary-red); box-shadow: 0 15px 35px rgba(255,42,75,0.2); }
.feature-icon { font-size: 2.8rem; margin-bottom: 15px; display: inline-block; }

/* STUDIO PAGE */
.studio-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin: 40px 0; }
.studio-card { background: var(--bg-dark-1); border: 1px solid rgba(255,255,255,0.08); border-radius: 12px; padding: 30px; text-align: center; }
.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 30px; }
.team-member { background: var(--bg-dark-2); padding: 20px; border-radius: 10px; text-align: center; border: 1px solid rgba(255,255,255,0.05); }
.team-avatar { width: 80px; height: 80px; border-radius: 50%; background: var(--gradient-brand); display: flex; align-items: center; justify-content: center; font-size: 2rem; margin: 0 auto 15px; }

/* SERVEUR & STATUT */
.server-presentation { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; margin-bottom: 60px; }
.server-img { width: 100%; border-radius: 15px; border: 1px solid rgba(255,255,255,0.1); box-shadow: 0 20px 40px rgba(0,0,0,0.5); }
.server-features-list { list-style: none; margin-top: 20px; }
.server-features-list li { margin-bottom: 18px; padding-left: 35px; position: relative; font-size: 1.05rem; color: #ddd; }
.server-features-list li::before { content: "⚔️"; position: absolute; left: 0; font-size: 1.2rem; }

.classes-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin: 40px 0; }
.class-card { background: var(--bg-dark-1); border: 1px solid rgba(255,255,255,0.08); border-radius: 10px; padding: 20px; text-align: center; transition: 0.3s; }
.class-card:hover { border-color: var(--accent-orange); transform: translateY(-5px); }
.class-icon { font-size: 2.2rem; margin-bottom: 10px; }

.status-container { max-width: 850px; margin: 0 auto; background: var(--bg-dark-1); border-radius: 15px; border: 1px solid rgba(255,255,255,0.08); padding: 40px; }
.status-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 20px; margin-bottom: 30px; }
.status-indicator { display: flex; align-items: center; gap: 10px; font-size: 1.2rem; font-weight: bold; color: var(--mc-color); }
.pulsing-dot { width: 15px; height: 15px; background-color: var(--mc-color); border-radius: 50%; box-shadow: 0 0 10px var(--mc-color); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(43,207,94,0.7); } 70% { box-shadow: 0 0 0 15px rgba(43,207,94,0); } 100% { box-shadow: 0 0 0 0 rgba(43,207,94,0); } }

.status-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; text-align: center; }
.stat-box { background: var(--bg-dark-2); padding: 20px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.05); }
.stat-value { font-size: 2.5rem; font-family: var(--font-heading); color: var(--text-white); margin: 10px 0; }
.stat-label { color: var(--text-gray); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; }

/* BOUTIQUE */
.shop-tabs { display: flex; justify-content: center; gap: 15px; margin-bottom: 35px; }
.shop-tab-btn { background: var(--bg-dark-1); border: 1px solid var(--border-color); color: var(--text-white); padding: 10px 25px; border-radius: 20px; font-weight: bold; cursor: pointer; transition: 0.3s; }
.shop-tab-btn.active, .shop-tab-btn:hover { background: var(--gradient-brand); border-color: transparent; }

.grades-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 25px; margin-top: 20px; }
.grade-card { background: var(--bg-dark-2); border: 1px solid rgba(255,255,255,0.08); border-top: 4px solid var(--text-gray); border-radius: 12px; padding: 25px; text-align: center; display: flex; flex-direction: column; position: relative; transition: 0.3s; }
.grade-card:hover { transform: translateY(-7px); box-shadow: 0 15px 30px rgba(0,0,0,0.4); }
.grade-vip { border-top-color: #ffaa00; }
.grade-epic { border-top-color: #aa00aa; }
.grade-legend { border-top-color: #ff3355; border-color: rgba(255,51,85,0.3); }

.grade-card h4 { font-size: 1.6rem; margin-bottom: 10px; }
.grade-vip h4 { color: #ffaa00; }
.grade-epic h4 { color: #aa00aa; }
.grade-legend h4 { color: #ff3355; }

.grade-features { list-style: none; color: #ccc; font-size: 0.9rem; margin-bottom: 25px; text-align: left; flex-grow: 1; }
.grade-features li { margin-bottom: 12px; padding-left: 24px; position: relative; line-height: 1.4; }
.grade-features li::before { content: "✓"; position: absolute; left: 0; color: var(--mc-color); font-weight: bold; }

.items-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 20px; }
.item-card { background: var(--bg-dark-2); border: 1px solid rgba(255,255,255,0.08); border-radius: 10px; padding: 20px; text-align: center; }

/* PANEL ADMIN (page /admin/, protégée par Cloudflare Access) */
#admin-panel { padding: 20px; max-width: 1600px; margin: 0 auto; }
.admin-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--admin-color); padding-bottom: 20px; margin-bottom: 30px; flex-wrap: wrap; gap: 15px; }
.admin-title { color: var(--admin-color); display: flex; align-items: center; gap: 15px; }

.admin-grid { display: grid; grid-template-columns: 250px 1fr; gap: 30px; }
.admin-sidebar { background: var(--bg-dark-1); border-radius: 10px; padding: 20px; border: 1px solid rgba(255,255,255,0.05); align-self: start; }
.admin-menu { list-style: none; }
.admin-menu li { padding: 12px 15px; margin-bottom: 5px; border-radius: 6px; cursor: pointer; color: var(--text-gray); transition: 0.3s; }
.admin-menu li:hover, .admin-menu li.active { background: rgba(157, 43, 207, 0.1); color: var(--admin-color); font-weight: bold; }

.admin-content { background: var(--bg-dark-1); border-radius: 10px; padding: 30px; border: 1px solid rgba(255,255,255,0.05); }
.dashboard-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 30px; }
.dash-card { background: var(--bg-dark-2); padding: 20px; border-radius: 8px; border-left: 4px solid var(--admin-color); }
.dash-card h4 { font-size: 0.9rem; color: var(--text-gray); }
.dash-card .value { font-size: 2rem; font-family: var(--font-heading); margin-top: 10px; }

.admin-table { width: 100%; border-collapse: collapse; margin-top: 20px; }
.admin-table th, .admin-table td { padding: 15px; text-align: left; border-bottom: 1px solid rgba(255,255,255,0.05); }
.admin-table th { color: var(--text-gray); font-size: 0.9rem; text-transform: uppercase; }

.action-btn { background: rgba(255,255,255,0.1); border: none; color: white; padding: 5px 10px; border-radius: 4px; cursor: pointer; margin-right: 5px; }
.action-btn.edit { color: #3498db; } .action-btn.delete { color: #e74c3c; }

.admin-notice { background: rgba(157, 43, 207, 0.08); border: 1px solid rgba(157, 43, 207, 0.35); border-radius: 8px; padding: 15px 20px; margin-bottom: 25px; color: var(--text-gray); font-size: 0.9rem; }
.admin-notice b { color: var(--text-white); }

/* MODALS */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.85); backdrop-filter: blur(5px); z-index: 4000; justify-content: center; align-items: center; }
.modal-overlay.active { display: flex; }
.modal-content { background-color: var(--bg-dark-1); border: 1px solid var(--border-color); width: 90%; max-width: 500px; border-radius: 12px; padding: 30px; position: relative; }
.modal-close { position: absolute; top: 15px; right: 20px; background: none; border: none; color: var(--text-gray); font-size: 1.5rem; cursor: pointer; }

.form-group { margin-bottom: 15px; }
.form-group label { display: block; font-size: 0.85rem; color: var(--text-gray); margin-bottom: 5px; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 10px; background: var(--bg-dark-2); border: 1px solid rgba(255,255,255,0.1); color: white; border-radius: 6px; }
.google-btn-mock { background: white; color: black; display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 12px; border-radius: 6px; cursor: pointer; border: none; font-weight: bold; }

.cart-item { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.remove-btn { background: none; border: none; color: var(--primary-red); cursor: pointer; font-weight: bold; }
.cart-total { margin: 20px 0; font-size: 1.2rem; font-weight: bold; display: flex; justify-content: space-between; }

@media (max-width: 900px) {
    .features-grid, .news-grid, .posts-grid, .server-presentation, .status-stats, .grades-grid, .classes-grid, .items-grid, .studio-grid, .team-grid { grid-template-columns: 1fr; }
    .admin-grid { grid-template-columns: 1fr; }
    .dashboard-cards { grid-template-columns: 1fr; }
}
