:root {
    --gradient: linear-gradient(135deg, #ff5f6d, #ffc371, #a855f7);
    --purple: #7b2ff7;
    --pink: #ff2fb4;
    --orange: #ff8c42;
    --bg: #0d0d1a;
    --bg-card: #16162b;
    --text: #f2f2f7;
    --muted: #9a9ab0;
    --border: #26263f;
    --success: #22c55e;
    --error: #ef4444;
    --radius: 12px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 1.25rem; }

a { color: var(--pink); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.2; }
.muted { color: var(--muted); font-size: 0.9rem; }

/* Prime de fidélité (parrainage) */
.loyalty-card {
    display: flex;
    gap: 1.2rem;
    align-items: flex-start;
    background: linear-gradient(135deg, rgba(255,140,66,0.12), rgba(168,85,247,0.12));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin: 1rem 0;
}
.loyalty-badge {
    background: var(--gradient);
    color: #10091d;
    font-weight: 800;
    font-size: 1.3rem;
    padding: 0.6rem 1rem;
    border-radius: 12px;
    flex-shrink: 0;
    white-space: nowrap;
}
.loyalty-progress-bar {
    background: #0d0d1a;
    border-radius: 999px;
    height: 10px;
    overflow: hidden;
    border: 1px solid var(--border);
}
.loyalty-progress-fill {
    background: var(--gradient);
    height: 100%;
    transition: width 0.3s;
}
@media (max-width: 600px) {
    .loyalty-card { flex-direction: column; }
}

/* ============ CLIENT LAYOUT (sidebar) ============ */
.client-layout {
    display: flex;
    min-height: 100vh;
}

.client-sidebar {
    width: 240px;
    flex-shrink: 0;
    background: #ffffff;
    border-right: 1px solid #ececf4;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}

.client-sidebar-logo {
    padding: 1.3rem 1.2rem 1rem;
    border-bottom: 1px solid #ececf4;
}
.client-sidebar-logo img { height: 34px; }

.client-sidebar-balance {
    padding: 1rem 1.2rem;
    border-bottom: 1px solid #ececf4;
    display: flex;
    flex-direction: column;
}
.client-sidebar-balance strong { font-size: 1.2rem; color: #1a1a2e; }

.client-nav-list {
    display: flex;
    flex-direction: column;
    padding: 1rem 0.75rem;
    gap: 0.25rem;
    flex: 1;
}

.client-nav-link {
    display: block;
    padding: 0.65rem 0.9rem;
    border-radius: 8px;
    color: #4a4a63;
    font-weight: 600;
    font-size: 0.92rem;
}
.client-nav-link:hover {
    background: rgba(123,47,247,0.06);
    text-decoration: none;
    color: #1a1a2e;
}
.client-nav-link.active {
    background: var(--gradient);
    color: #10091d;
}

.client-sidebar-bottom {
    padding: 0.75rem;
    border-top: 1px solid #ececf4;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.client-logout { color: #dc2626; }
.client-logout:hover { color: #ef4444; }

.client-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: var(--bg);
}

.client-topbar {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.9rem 1.25rem;
    background: #ffffff;
    border-bottom: 1px solid #ececf4;
}
.client-sidebar-toggle {
    background: none;
    border: none;
    color: #1a1a2e;
    font-size: 1.4rem;
    cursor: pointer;
}
.client-topbar-balance { font-weight: 700; color: #1a1a2e; }

.client-main {
    flex: 1;
    padding: 2rem 2.25rem 3rem;
    max-width: 1200px;
    width: 100%;
}

@media (max-width: 900px) {
    .client-topbar { display: flex; }
    .client-sidebar {
        position: fixed;
        left: -260px;
        z-index: 100;
        transition: left 0.2s ease;
        box-shadow: 4px 0 20px rgba(0,0,0,0.15);
    }
    .client-sidebar.open { left: 0; }
    .client-main { padding: 1.25rem; }
}

/* ============ ADMIN LAYOUT (sidebar) ============ */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 240px;
    flex-shrink: 0;
    background: #ffffff;
    border-right: 1px solid #ececf4;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}

.admin-sidebar-logo {
    padding: 1.3rem 1.2rem 1rem;
    border-bottom: 1px solid #ececf4;
}
.admin-sidebar-logo img {
    height: 34px;
}

.admin-nav-list {
    display: flex;
    flex-direction: column;
    padding: 1rem 0.75rem;
    gap: 0.25rem;
    flex: 1;
}

.admin-nav-link {
    display: block;
    padding: 0.65rem 0.9rem;
    border-radius: 8px;
    color: #4a4a63;
    font-weight: 600;
    font-size: 0.92rem;
}
.admin-nav-link:hover {
    background: rgba(123,47,247,0.06);
    text-decoration: none;
    color: #1a1a2e;
}
.admin-nav-link.active {
    background: var(--gradient);
    color: #10091d;
    font-weight: 700;
}

.admin-sidebar-bottom {
    padding: 0.75rem;
    border-top: 1px solid #ececf4;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.admin-logout { color: #dc2626; }
.admin-logout:hover { color: #ef4444; }

.admin-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: var(--bg);
}

.admin-topbar {
    display: none;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1.25rem;
    background: #ffffff;
    border-bottom: 1px solid #ececf4;
}
.admin-sidebar-toggle {
    background: none;
    border: none;
    color: #1a1a2e;
    font-size: 1.4rem;
    cursor: pointer;
}
.admin-topbar-title { font-weight: 700; color: #1a1a2e; }

.admin-main {
    flex: 1;
    padding: 2rem 2.25rem 3rem;
    max-width: 1200px;
    width: 100%;
}

@media (max-width: 900px) {
    .admin-topbar { display: flex; }
    .admin-sidebar {
        position: fixed;
        left: -260px;
        z-index: 100;
        transition: left 0.2s ease;
        box-shadow: 4px 0 20px rgba(0,0,0,0.15);
    }
    .admin-sidebar.open { left: 0; }
    .admin-main { padding: 1.25rem; }
}

/* Header */
.site-header {
    background: #ffffff;
    border-bottom: 1px solid #ececf4;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1.25rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.logo img { height: 56px; display: block; }
nav { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
nav a { color: #1a1a2e; font-weight: 600; }
nav a:hover { color: var(--purple); }
.nav-toggle { display: none; background: none; border: none; color: #1a1a2e; font-size: 1.5rem; cursor: pointer; }

.wallet-pill {
    background: var(--gradient);
    color: #10091d;
    font-weight: 700;
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
    font-size: 0.85rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    border-radius: 999px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.95rem;
    transition: transform 0.15s ease, opacity 0.15s ease;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn-primary { background: var(--gradient); color: #10091d; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-ghost { background: transparent; color: #6b6b85; }
.site-header .btn-ghost { color: #6b6b85; }
.site-header .btn-ghost:hover { color: #1a1a2e; }
.btn-block { display: block; width: 100%; text-align: center; }
.btn-lg { padding: 0.85rem 1.8rem; font-size: 1.05rem; margin-right: 0.5rem; }
.btn-sm { padding: 0.35rem 0.8rem; font-size: 0.82rem; }

/* Hero */
.hero {
    text-align: center;
    padding: 4rem 1rem 3rem;
}
.hero h1 { font-size: 2.2rem; margin-bottom: 0.75rem; }
.hero p { color: var(--muted); max-width: 640px; margin: 0 auto 2rem; }

/* Cards & grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin: 1.5rem 0;
}
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
}
.service-card .badge {
    display: inline-block;
    background: rgba(255,255,255,0.08);
    color: var(--muted);
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    margin-bottom: 0.5rem;
}
.service-card .price { font-size: 1.3rem; font-weight: 700; background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Réseaux sociaux supportés */
.networks-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2rem;
}
.network-pill {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 0.5rem 1.1rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.9rem;
}

.empty-state { text-align: center; grid-column: 1 / -1; }
.empty-state p { color: var(--muted); margin-bottom: 1rem; }

.section-cta { text-align: center; margin-top: 1.5rem; }

/* Pourquoi nous */
.feature-card { text-align: left; }
.feature-icon { font-size: 1.8rem; display: block; margin-bottom: 0.6rem; }

/* FAQ */
.faq { max-width: 760px; margin: 3rem auto; }
.faq-list { display: flex; flex-direction: column; gap: 0.75rem; }
.faq-list details {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.9rem 1.1rem;
}
.faq-list summary { cursor: pointer; font-weight: 600; }
.faq-list p { color: var(--muted); margin: 0.6rem 0 0; }

/* CTA final */
.final-cta {
    text-align: center;
    padding: 3rem 1rem;
    margin: 2rem 0;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}
.final-cta h2 { margin-bottom: 0.5rem; }
.final-cta p { margin-bottom: 1.5rem; }

.steps .step-number {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--gradient); color: #10091d; font-weight: 700;
    margin-bottom: 0.5rem;
}

.stats .stat-card { text-align: center; }
.stat-label { display: block; color: var(--muted); font-size: 0.85rem; margin-bottom: 0.4rem; }
.stat-value { display: block; font-size: 1.6rem; font-weight: 700; margin-bottom: 0.6rem; }

/* Forms */
.auth-container { max-width: 480px; margin: 2rem auto; }
.auth-form { display: flex; flex-direction: column; gap: 0.2rem; }
.auth-form label { margin-top: 0.8rem; font-size: 0.85rem; color: var(--muted); }
input, select, textarea {
    width: 100%;
    padding: 0.65rem 0.8rem;
    background: #0d0d1a;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.95rem;
    margin-top: 0.2rem;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--purple); }

.quick-amounts { display: flex; gap: 0.5rem; margin: 0.8rem 0; flex-wrap: wrap; }

.gateway-choice { display: flex; gap: 0.75rem; margin-top: 0.4rem; flex-wrap: wrap; }
.gateway-option {
    flex: 1;
    min-width: 160px;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: #0d0d1a;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.7rem 0.9rem;
    cursor: pointer;
    font-weight: 600;
}
.gateway-option input { width: auto; margin: 0; }
.gateway-option small { display: block; color: var(--muted); font-weight: 400; font-size: 0.78rem; }
.gateway-option:has(input:checked) { border-color: var(--purple); background: rgba(123,47,247,0.08); }

/* Alerts */
.alert { padding: 0.75rem 1rem; border-radius: 8px; margin: 1rem 0; }
.alert-success { background: rgba(34,197,94,0.12); border: 1px solid var(--success); color: #86efac; }
.alert-error { background: rgba(239,68,68,0.12); border: 1px solid var(--error); color: #fca5a5; }

/* Table */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.table th, .table td { padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--border); text-align: left; font-size: 0.9rem; white-space: nowrap; }
.table .truncate { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table th { color: var(--muted); font-weight: 600; }

.status { padding: 0.2rem 0.6rem; border-radius: 999px; font-size: 0.78rem; font-weight: 600; }
.status-completed { background: rgba(34,197,94,0.15); color: #86efac; }
.status-pending, .status-in-progress { background: rgba(251,191,36,0.15); color: #fde68a; }
.status-canceled, .status-partial { background: rgba(239,68,68,0.15); color: #fca5a5; }
.status-active { background: rgba(34,197,94,0.15); color: #86efac; }
.status-inactive { background: rgba(148,148,168,0.15); color: var(--muted); }

.admin-nav { display: flex; gap: 0.75rem; flex-wrap: wrap; margin: 1rem 0 2rem; }

/* Page de commande : onglets réseau + panneau description */
.network-tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 1.25rem 0;
}
.network-tab {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    white-space: nowrap;
}
.network-tab:hover { border-color: var(--purple); }
.network-tab.active { background: var(--gradient); color: #10091d; border-color: transparent; }

.order-layout {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 1.5rem;
    align-items: start;
}
@media (max-width: 800px) {
    .order-layout { grid-template-columns: 1fr; }
}

.order-description-card { position: sticky; top: 90px; }
.description-list {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.description-list li {
    font-size: 0.88rem;
    color: #d6d6e5;
    padding-bottom: 0.4rem;
    border-bottom: 1px dashed var(--border);
}
.description-badges {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-top: 0.8rem;
}
.description-badges .badge {
    background: rgba(255,255,255,0.06);
    color: var(--muted);
    font-size: 0.78rem;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
}
.description-badges .badge-ok { background: rgba(34,197,94,0.15); color: #86efac; }
.description-badges .badge-off { background: rgba(239,68,68,0.1); color: #fca5a5; }

/* Barre de recherche des services */
.services-toolbar {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin: 1.5rem 0 2rem;
}
.services-search-input {
    flex: 1;
    min-width: 240px;
}
.services-category-select {
    width: auto;
    min-width: 180px;
}

/* Pages légales */
.legal-page { max-width: 780px; margin: 2rem auto 4rem; }
.legal-page h2 { margin-top: 2rem; font-size: 1.25rem; color: var(--pink); }
.legal-page ul { color: var(--muted); padding-left: 1.2rem; }
.legal-page li { margin-bottom: 0.4rem; }
.legal-page p { color: #d6d6e5; }

/* Footer */
.site-footer {
    background: #ffffff;
    border-top: 1px solid #ececf4;
    margin-top: 3rem;
    padding: 2.5rem 0 1.5rem;
    color: #4a4a63;
    font-size: 0.88rem;
}
.site-footer .footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    text-align: left;
    margin-bottom: 1.5rem;
}
.site-footer .footer-logo img { height: 42px; margin-bottom: 0.6rem; }
.site-footer h4 { color: #1a1a2e; font-size: 0.95rem; margin: 0 0 0.6rem; }
.site-footer a { color: #4a4a63; }
.site-footer a:hover { color: var(--purple); }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.footer-bottom {
    border-top: 1px solid #ececf4;
    padding-top: 1.2rem;
    text-align: center;
    color: #8a8aa0;
    font-size: 0.8rem;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-toggle { display: block; }
    nav { display: none; width: 100%; flex-direction: column; align-items: flex-start; }
    nav.open { display: flex; }
    .header-inner { position: relative; }
}
