@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Rubik:wght@400;500;600;700&display=swap');

:root {
    --bg:          #12151b;
    --bg-soft:     #181c24;
    --panel:       #20252e;
    --panel-light: #2a303c;
    --border-dark: #0a0c10;
    --border-light:#3a4152;
    --emerald:     #3abf7b;
    --emerald-dark:#268c58;
    --gold:        #e3b341;
    --torch:       #ff9142;
    --text:        #e7e9ee;
    --text-dim:    #9aa1b0;
    --danger:      #e05a5a;

    --font-display: 'Press Start 2P', monospace;
    --font-body: 'Rubik', system-ui, sans-serif;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    background-image:
        radial-gradient(circle at 20% 10%, rgba(58,191,123,0.06), transparent 40%),
        radial-gradient(circle at 80% 60%, rgba(255,145,66,0.05), transparent 45%);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.5;
}

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

.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ---------- Barre de navigation ---------- */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    background: var(--bg-soft);
    border-bottom: 3px solid var(--border-dark);
}
.navbar .logo {
    font-family: var(--font-display);
    font-size: 14px;
    color: var(--emerald);
    letter-spacing: 1px;
}
.navbar .logo span { color: var(--gold); }
.nav-links { display: flex; gap: 22px; align-items: center; font-weight: 500; }
.nav-links a:hover { color: var(--emerald); }
.nav-cta {
    background: var(--emerald);
    color: #0d1410;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 700;
}
.nav-cta:hover { background: var(--emerald-dark); color: #fff; }

/* ---------- Hero ---------- */
.hero {
    padding: 72px 24px 48px;
    text-align: center;
}
.hero-eyebrow {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 10px;
    color: var(--gold);
    background: rgba(227,179,65,0.1);
    border: 1px solid rgba(227,179,65,0.35);
    padding: 6px 12px;
    border-radius: 4px;
    margin-bottom: 20px;
}
.hero h1 {
    font-family: var(--font-display);
    font-size: 26px;
    line-height: 1.6;
    margin: 0 0 16px;
    text-shadow: 3px 3px 0 var(--border-dark);
}
.hero h1 em { font-style: normal; color: var(--emerald); }
.hero p { color: var(--text-dim); max-width: 560px; margin: 0 auto; font-size: 16px; }

/* ---------- Grille de produits : slots d'inventaire ---------- */
.section-title {
    font-family: var(--font-display);
    font-size: 14px;
    color: var(--text);
    margin: 48px 0 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.section-title::after {
    content: '';
    flex: 1;
    height: 2px;
    background: var(--border-light);
    opacity: 0.4;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 18px;
    margin-bottom: 40px;
}

.slot {
    background: var(--panel);
    border-radius: 6px;
    padding: 20px;
    position: relative;
    box-shadow:
        inset 2px 2px 0 var(--border-light),
        inset -2px -2px 0 var(--border-dark);
    transition: transform .15s ease, box-shadow .15s ease;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.slot:hover {
    transform: translateY(-4px);
    box-shadow:
        inset 2px 2px 0 var(--border-light),
        inset -2px -2px 0 var(--border-dark),
        0 0 0 2px var(--torch),
        0 8px 20px rgba(255,145,66,0.15);
}
.slot-icon {
    width: 56px; height: 56px;
    border-radius: 4px;
    background: var(--panel-light);
    display: flex; align-items: center; justify-content: center;
    font-size: 26px;
    box-shadow: inset 0 0 0 2px var(--border-dark);
}
.slot-tag {
    position: absolute; top: 14px; right: 14px;
    font-family: var(--font-display);
    font-size: 8px;
    padding: 5px 8px;
    border-radius: 3px;
    background: rgba(58,191,123,0.15);
    color: var(--emerald);
    border: 1px solid rgba(58,191,123,0.4);
}
.slot-tag.item { background: rgba(227,179,65,0.15); color: var(--gold); border-color: rgba(227,179,65,0.4); }
.slot h3 { margin: 0; font-size: 17px; }
.slot p { margin: 0; color: var(--text-dim); font-size: 13.5px; flex: 1; }

.price-gem {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    color: var(--emerald);
}
.price-gem::before {
    content: '';
    width: 10px; height: 10px;
    background: var(--emerald);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

.btn {
    display: inline-block;
    text-align: center;
    padding: 10px 16px;
    border-radius: 4px;
    border: none;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 14px;
}
.btn-primary { background: var(--emerald); color: #0d1410; }
.btn-primary:hover { background: var(--emerald-dark); color: #fff; }
.btn-outline { background: transparent; border: 2px solid var(--border-light); color: var(--text); }
.btn-outline:hover { border-color: var(--torch); color: var(--torch); }
.btn-danger { background: var(--danger); color: #2b0d0d; }
.btn-block { width: 100%; }

/* ---------- Formulaires ---------- */
.form-panel {
    max-width: 420px;
    margin: 60px auto;
    background: var(--panel);
    border-radius: 8px;
    padding: 32px;
    box-shadow: inset 2px 2px 0 var(--border-light), inset -2px -2px 0 var(--border-dark);
}
.form-panel h2 { font-family: var(--font-display); font-size: 16px; margin-bottom: 24px; }
.field { margin-bottom: 16px; }
.field label { display: block; margin-bottom: 6px; font-size: 13px; color: var(--text-dim); }
.field input, .field select, .field textarea {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-soft);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 14px;
}
.field input:focus, .field select:focus, .field textarea:focus {
    outline: none;
    border-color: var(--emerald);
    box-shadow: 0 0 0 3px rgba(58,191,123,0.2);
}
.alert {
    padding: 12px 14px;
    border-radius: 4px;
    margin-bottom: 16px;
    font-size: 14px;
}
.alert-error { background: rgba(224,90,90,0.12); border: 1px solid rgba(224,90,90,0.4); color: #ff9c9c; }
.alert-success { background: rgba(58,191,123,0.12); border: 1px solid rgba(58,191,123,0.4); color: var(--emerald); }

/* ---------- Hotbar (panier) ---------- */
.hotbar {
    position: fixed;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    background: var(--bg-soft);
    padding: 8px;
    border-radius: 8px;
    border: 2px solid var(--border-dark);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    z-index: 50;
}
.hotbar-slot {
    width: 42px; height: 42px;
    background: var(--panel);
    border-radius: 4px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
    box-shadow: inset 1px 1px 0 var(--border-light), inset -1px -1px 0 var(--border-dark);
    position: relative;
}
.hotbar-count {
    position: absolute; bottom: -4px; right: -4px;
    background: var(--gold); color: #241a00;
    font-size: 10px; font-weight: 700;
    border-radius: 50%; width: 18px; height: 18px;
    display: flex; align-items: center; justify-content: center;
}
.hotbar-cart-link {
    display: flex; align-items: center; gap: 10px;
    padding: 0 14px 0 4px;
    color: var(--emerald);
    font-weight: 700;
    font-size: 13px;
}

/* ---------- Panier / commande ---------- */
.cart-line {
    display: flex; align-items: center; justify-content: space-between;
    background: var(--panel);
    padding: 14px 18px;
    border-radius: 6px;
    margin-bottom: 10px;
    box-shadow: inset 1px 1px 0 var(--border-light), inset -1px -1px 0 var(--border-dark);
}
.cart-total {
    display: flex; justify-content: space-between;
    font-family: var(--font-display);
    font-size: 14px;
    padding: 20px 0;
    border-top: 2px solid var(--border-light);
    margin-top: 10px;
}

/* ---------- Tableaux (admin) ---------- */
table { width: 100%; border-collapse: collapse; background: var(--panel); border-radius: 6px; overflow: hidden; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border-light); font-size: 14px; }
th { background: var(--panel-light); font-family: var(--font-display); font-size: 10px; color: var(--text-dim); }
.badge { padding: 3px 8px; border-radius: 3px; font-size: 11px; font-weight: 700; }
.badge-pending { background: rgba(227,179,65,0.15); color: var(--gold); }
.badge-paid { background: rgba(58,191,123,0.15); color: var(--emerald); }
.badge-delivered { background: rgba(58,191,123,0.3); color: var(--emerald); }
.badge-failed { background: rgba(224,90,90,0.15); color: var(--danger); }

footer { text-align: center; padding: 40px 24px 100px; color: var(--text-dim); font-size: 13px; }

@media (prefers-reduced-motion: reduce) {
    .slot { transition: none; }
}
