/* ============================================================
   NightMinute — Design system
   Thème sombre, néon, effets de profondeur (tilt 3D léger)
   ============================================================ */

:root {
    --bg-void: #05050a;
    --bg-surface: #0f0f1a;
    --bg-elevated: #161625;
    --border-subtle: rgba(255,255,255,0.08);

    --accent-violet: #8b5cf6;
    --accent-cyan: #22d3ee;
    --accent-pink: #ec4899;
    --accent-gradient: linear-gradient(135deg, var(--accent-violet), var(--accent-cyan));

    --text-primary: #f4f4f8;
    --text-muted: #9a9ab0;

    --success: #34d399;
    --warning: #fbbf24;
    --danger: #f87171;

    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 8px;

    --shadow-glow: 0 8px 40px rgba(139, 92, 246, 0.25);
    --shadow-card: 0 10px 30px rgba(0,0,0,0.4);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: radial-gradient(ellipse at top, #12081f 0%, var(--bg-void) 55%);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.55;
}

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

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

/* ---------- Navbar ---------- */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-subtle);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(5,5,10,0.7);
}

.brand {
    font-weight: 800;
    font-size: 1.4rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -0.02em;
}

.nav-links { display: flex; gap: 22px; align-items: center; }
.nav-links a { color: var(--text-muted); font-weight: 500; font-size: 0.95rem; transition: color .2s; }
.nav-links a:hover { color: var(--text-primary); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.btn-primary { background: var(--accent-gradient); color: #fff; box-shadow: var(--shadow-glow); }
.btn-primary:hover { transform: translateY(-2px); }
.btn-outline { background: transparent; border: 1px solid var(--border-subtle); color: var(--text-primary); }
.btn-outline:hover { border-color: var(--accent-violet); }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ---------- Cards with 3D tilt ---------- */
.card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow-card);
}

.tilt-card {
    perspective: 1000px;
}
.tilt-card-inner {
    transform-style: preserve-3d;
    transition: transform .25s ease-out, box-shadow .25s ease-out;
    will-change: transform;
}
.tilt-card:hover .tilt-card-inner {
    box-shadow: var(--shadow-glow);
}

.shop-card {
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    cursor: pointer;
}
.shop-card img, .shop-card .placeholder-logo {
    width: 100%; height: 150px; object-fit: cover;
    background: linear-gradient(135deg, #1e1b3a, #2d1836);
}
.shop-card .shop-body { padding: 16px; }
.shop-card h3 { margin: 0 0 6px; font-size: 1.05rem; }
.shop-card p { margin: 0; color: var(--text-muted); font-size: 0.85rem; }
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    background: rgba(139,92,246,0.15);
    color: var(--accent-violet);
    margin-top: 8px;
}

/* ---------- Hero ---------- */
.hero {
    text-align: center;
    padding: 90px 24px 60px;
    position: relative;
}
.hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
}
.hero .highlight {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero p { color: var(--text-muted); font-size: 1.1rem; max-width: 560px; margin: 0 auto 30px; }

.search-bar {
    display: flex;
    max-width: 480px;
    margin: 0 auto;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 999px;
    padding: 6px;
}
.search-bar input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    padding: 12px 18px;
    font-size: 0.95rem;
}
.search-bar input:focus { outline: none; }
.search-bar button {
    border-radius: 999px;
}

/* ---------- Grid ---------- */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; margin-bottom: 6px; font-size: 0.85rem; color: var(--text-muted); font-weight: 600; }
input, select, textarea {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent-violet); }
.auth-box { max-width: 420px; margin: 60px auto; padding: 32px; }

/* ---------- Layout dashboard ---------- */
.dashboard {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: calc(100vh - 65px);
}
.sidebar {
    border-right: 1px solid var(--border-subtle);
    padding: 24px 14px;
}
.sidebar a {
    display: block;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.92rem;
    margin-bottom: 4px;
}
.sidebar a.active, .sidebar a:hover { background: var(--bg-elevated); color: var(--text-primary); }
.main-content { padding: 32px; }

.stat-card { text-align: center; }
.stat-card .value { font-size: 2rem; font-weight: 800; background: var(--accent-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-card .label { color: var(--text-muted); font-size: 0.85rem; margin-top: 4px; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border-subtle); font-size: 0.9rem; }
th { color: var(--text-muted); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; }

.status-pill { padding: 4px 12px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; }
.status-pending { background: rgba(251,191,36,0.15); color: var(--warning); }
.status-accepted, .status-preparing { background: rgba(34,211,238,0.15); color: var(--accent-cyan); }
.status-ready, .status-awaiting_deliverer, .status-out_for_delivery { background: rgba(139,92,246,0.15); color: var(--accent-violet); }
.status-completed { background: rgba(52,211,153,0.15); color: var(--success); }
.status-cancelled { background: rgba(248,113,113,0.15); color: var(--danger); }

.alert { padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 18px; font-size: 0.9rem; }
.alert-success { background: rgba(52,211,153,0.12); color: var(--success); border: 1px solid rgba(52,211,153,0.3); }
.alert-error { background: rgba(248,113,113,0.12); color: var(--danger); border: 1px solid rgba(248,113,113,0.3); }

.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }

footer { text-align: center; padding: 30px; color: var(--text-muted); font-size: 0.85rem; border-top: 1px solid var(--border-subtle); margin-top: 60px; }

@media (max-width: 768px) {
    .dashboard { grid-template-columns: 1fr; }
    .sidebar { display: flex; overflow-x: auto; border-right: none; border-bottom: 1px solid var(--border-subtle); padding: 12px; }
    .sidebar a { white-space: nowrap; }
}
