@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&display=swap');

/* ============ THÈME DASHBOARD (clair, sidebar sombre conservée) ============
   Redéfinit les variables de style.css (:root, pensées pour le site public
   sombre) UNIQUEMENT dans le périmètre du dashboard (.dash-body) — le site
   public/marketing n'est jamais affecté, dashboard.css n'y étant jamais
   chargé. --gold reste piloté par le propriétaire (voir --gold en style
   inline sur <body>, alimenté par platforms.admin_accent_color) : tout le
   reste de ce fichier utilise color-mix(in srgb, var(--gold) X%, transparent)
   plutôt que des teintes figées, pour qu'un changement de couleur d'accent
   se propage correctement partout sans dépendre d'une valeur RGB fixe. */
.dash-body {
    --bg:#f4f5f7; --panel:#ffffff; --panel-2:#f4f5f7; --border:#e5e7eb;
    --text:#12141c; --text-dim:#6b7280;
}

/* ============ SHELL ============ */
.dash-body { display: flex; min-height: 100vh; }

.sidebar {
    width: 240px;
    flex-shrink: 0;
    background: #12141c;
    border-right: 1px solid #22252f;
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1rem;
    position: sticky;
    top: 0;
    height: 100vh;
    /* Le menu (5 sections + logout) peut dépasser 100vh sur les écrans bas
       (petits laptops, mobile en paysage) — sans overflow-y, ce contenu
       débordait simplement hors de la sidebar sans aucun moyen d'y accéder
       (le défilement de la page ne fait rien puisque la sidebar est en
       position sticky/fixed, indépendante de la hauteur du contenu principal).
       overflow-y:auto rend la sidebar défilable en interne dans ce cas. */
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #363b49 transparent;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: #363b49; border-radius: 3px; }
.platform-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 0.45rem; padding: 0 0.5rem 1.5rem; }
.platform-brand-name { font-family: 'Space Grotesk', 'Inter', sans-serif; font-size: 1.1rem; font-weight: 700; color: #fff; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.badge-admin { display: inline-block; font-size: 0.62rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: var(--gold); background: color-mix(in srgb, var(--gold) 18%, transparent); border: 1px solid color-mix(in srgb, var(--gold) 35%, transparent); padding: 0.15rem 0.5rem; border-radius: 999px; }

.sidebar-nav { flex: 1; display: flex; flex-direction: column; gap: 0.2rem; }
.nav-section-label { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: #5a6274; padding: 0.9rem 0.75rem 0.4rem; font-family: 'Courier New', monospace; }
.sidebar-nav .nav-section:first-child .nav-section-label { padding-top: 0; }
.nav-link {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.65rem 0.75rem; border-radius: 8px;
    border-left: 3px solid transparent;
    color: #9099ab; text-decoration: none; font-size: 0.9rem; font-weight: 500;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.nav-link i { width: 18px; text-align: center; }
.nav-link:hover { background: rgba(255,255,255,0.06); color: #fff; }
.nav-link.active { background: color-mix(in srgb, var(--gold) 16%, transparent); color: var(--gold); font-weight: 700; border-left-color: var(--gold); }
.nav-logout-link { color: #ff8a97; margin-top: 1rem; }

.sidebar-toggle {
    display: none;
    position: fixed; top: 1rem; left: 1rem; z-index: 50;
    background: #12141c; border: 1px solid #22252f; color: #fff;
    width: 42px; height: 42px; border-radius: 10px; cursor: pointer;
}

.dash-shell { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.dash-topbar {
    display: flex; align-items: center; justify-content: space-between;
    /* flex-wrap + row-gap: sur les viewports assez larges les items tiennent
       sur une ligne (aucun effet visible) ; en dessous d'environ 660px la
       rangée topbar-right (devise, solde, cloche, avatar) ne tient plus à
       côté du titre et passait auparavant hors écran au lieu de descendre
       à la ligne — d'où la coupure de texte constatée sur mobile/fenêtre
       étroite. */
    flex-wrap: wrap; row-gap: 0.75rem;
    padding: 1.25rem 2rem; border-bottom: 1px solid var(--border);
    position: sticky; top: 0; background: var(--bg); z-index: 10;
}
.topbar-title h1 { margin: 0; font-size: 1.3rem; font-family: 'Space Grotesk', 'Inter', sans-serif; font-weight: 700; }
.topbar-platform { font-size: 0.8rem; color: var(--text-dim); }
.topbar-right { display: flex; align-items: center; flex-wrap: wrap; gap: 0.75rem; row-gap: 0.6rem; }
.currency-rate-hint { font-size: 0.72rem; color: var(--text-dim); white-space: nowrap; }
.currency-toggle { display: flex; background: var(--panel-2); border: 1px solid var(--border); border-radius: 999px; padding: 3px; gap: 2px; }
.currency-toggle button { border: none; background: transparent; color: var(--text-dim); font-size: 0.78rem; font-weight: 700; padding: 0.4rem 0.9rem; border-radius: 999px; cursor: pointer; font-family: inherit; transition: background 0.15s, color 0.15s; }
.currency-toggle button.active { background: var(--gold); color: #fff; }
.wallet-chip {
    display: flex; align-items: center; gap: 0.5rem;
    background: color-mix(in srgb, var(--gold) 10%, transparent); border: 1px solid color-mix(in srgb, var(--gold) 25%, transparent);
    color: var(--gold); font-weight: 700; font-size: 0.85rem;
    padding: 0.5rem 0.9rem; border-radius: 999px;
}
.wallet-chip.negative {
    background: rgba(239, 68, 68, 0.12); border-color: rgba(239, 68, 68, 0.4); color: #ef4444;
    animation: walletChipPulse 2s ease-in-out infinite;
}
@keyframes walletChipPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.35); }
    50% { box-shadow: 0 0 0 5px rgba(239, 68, 68, 0); }
}
.topbar-bell { position: relative; color: var(--text-dim); font-size: 1.1rem; cursor: pointer; }
.bell-dot { position: absolute; top: -2px; right: -2px; width: 8px; height: 8px; background: #ef4444; border-radius: 50%; }
.notif-dropdown {
    position: absolute; top: 32px; right: -10px; width: 300px; max-height: 380px;
    background: var(--panel-2); border: 1px solid var(--border); border-radius: 12px;
    overflow: hidden; box-shadow: 0 12px 36px rgba(0,0,0,0.4); z-index: 100;
}
.notif-dropdown-head { display: flex; justify-content: space-between; align-items: center; padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); font-weight: 700; font-size: 0.85rem; color: var(--text); }
.notif-dropdown-head button { background: none; border: none; color: var(--gold); font-size: 0.75rem; cursor: pointer; font-weight: 600; }
.notif-dropdown-list { max-height: 320px; overflow-y: auto; }
.notif-item { padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); cursor: default; }
.notif-item:last-child { border-bottom: none; }
.notif-item.unread { background: color-mix(in srgb, var(--gold) 6%, transparent); }
.notif-item-title { font-weight: 700; font-size: 0.85rem; color: var(--text); margin-bottom: 0.2rem; }
.notif-item-msg { font-size: 0.8rem; color: var(--text-dim); line-height: 1.4; margin-bottom: 0.3rem; }
.notif-item-date { font-size: 0.7rem; color: var(--text-dim); }
.topbar-user { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; font-weight: 600; }
.user-avatar {
    width: 32px; height: 32px; border-radius: 50%; background: var(--gold); color: #fff;
    display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.85rem;
}

.dash-main { padding: 2rem; max-width: 1400px; width: 100%; margin: 0 auto; }

/* ============ CARD ACCENT (shared premium top line) ============ */
.stat-card, .card, .var-card, .action-card, .service-card, .order-modal, .preview-panel, .plan-card {
    position: relative;
    box-shadow: 0 1px 3px rgba(16,24,40,0.04);
}
.stat-card::before, .card::before, .var-card::before, .action-card::before, .service-card::before, .plan-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--gold) 50%, transparent), transparent);
    border-radius: 12px 12px 0 0;
}

/* ============ STAT CARDS ============ */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat-card {
    background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 1.25rem;
    display: flex; align-items: center; gap: 1rem; overflow: hidden;
}
.stat-card .icon { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
.stat-card .value { font-family: 'Space Grotesk', 'Inter', sans-serif; font-size: 1.35rem; font-weight: 700; line-height: 1.2; }
.stat-card .label { font-size: 0.8rem; color: var(--text-dim); }
.icon-gold { background: color-mix(in srgb, var(--gold) 12%, transparent); color: var(--gold); }
.icon-green { background: rgba(16,185,129,0.12); color: #10b981; }
.icon-blue { background: rgba(59,130,246,0.12); color: #3b82f6; }
.icon-purple { background: rgba(99,102,241,0.12); color: #6366f1; }
.icon-orange { background: rgba(245,158,11,0.12); color: #f59e0b; }
.icon-red { background: rgba(239,68,68,0.12); color: #ef4444; }
.icon-pink { background: rgba(236,72,153,0.12); color: #ec4899; }
.icon-whatsapp { background: rgba(37,211,102,0.12); color: #25D366; }

/* ============ CARD / PANEL ============ */
.card { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 1.5rem; margin-bottom: 1.5rem; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; flex-wrap: wrap; gap: 0.75rem; }

/* ============ VARIABLES (Mes variables) ============ */
.var-card { display: flex; gap: 1.25rem; background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 1.5rem; margin-bottom: 1.25rem; transition: border-color 0.2s; overflow: hidden; }
.var-card:focus-within, .var-card:hover { border-color: color-mix(in srgb, var(--gold) 40%, transparent); }
.var-card-icon { width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; flex-shrink: 0; }
.var-card-body { flex: 1; min-width: 0; }
.var-card-body h3 { margin: 0 0 0.4rem; font-size: 1.05rem; color: var(--text); font-family: 'Space Grotesk', 'Inter', sans-serif; font-weight: 700; }
.var-card-desc { color: var(--text-dim); font-size: 0.85rem; margin: 0 0 1.1rem; line-height: 1.5; }
.var-card-control { position: relative; max-width: 340px; }
.var-card-control input, .var-card-control select {
    width: 100%; box-sizing: border-box; background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px;
    padding: 0.75rem 1rem; font-size: 1rem; font-weight: 700; color: var(--text); font-family: inherit;
}
.var-card-control input:focus, .var-card-control select:focus { outline: none; border-color: var(--gold); }
.var-card-control input[type="number"] { padding-right: 3.2rem; }
.var-card-suffix { position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); color: var(--text-dim); font-weight: 700; font-size: 0.82rem; pointer-events: none; }
.var-card-hint { font-size: 0.78rem; color: var(--text-dim); margin: 0.7rem 0 0; }
@media (max-width: 600px) {
    .var-card { flex-direction: column; }
    .var-card-control { max-width: none; }
}
.card-head h2 { margin: 0; font-size: 1.05rem; font-family: 'Space Grotesk', 'Inter', sans-serif; font-weight: 700; }
.card-head .hint { font-size: 0.8rem; color: var(--text-dim); }

/* ============ ACTION GRID ============ */
.action-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.action-card {
    background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 1.25rem;
    text-decoration: none; color: var(--text); transition: border-color 0.2s, transform 0.2s;
    display: flex; flex-direction: column; gap: 0.5rem; overflow: hidden;
}
.action-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.action-card i.main-icon { font-size: 1.3rem; color: var(--gold); }
.action-card .title { font-weight: 700; }
.action-card .desc { font-size: 0.8rem; color: var(--text-dim); }

/* ============ TABLE ============ */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; }
table.data-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
table.data-table th {
    text-align: left; color: var(--text-dim); font-weight: 600; font-size: 0.78rem;
    text-transform: uppercase; letter-spacing: 0.03em; padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--border);
}
table.data-table td { padding: 0.85rem 0.9rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.data-table tr:last-child td { border-bottom: none; }
table.data-table tr:hover td { background: var(--panel-2); }
.cell-sub { display: block; font-size: 0.78rem; color: var(--text-dim); margin-top: 2px; }

/* ============ BADGES ============ */
.badge { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.25rem 0.65rem; border-radius: 999px; font-size: 0.75rem; font-weight: 700; }
.badge-success { background: rgba(16,185,129,0.14); color: #34d399; }
.badge-warning { background: rgba(245,158,11,0.14); color: #fbbf24; }
.badge-danger { background: rgba(239,68,68,0.14); color: #f87171; }
.badge-info { background: rgba(59,130,246,0.14); color: #60a5fa; }
.badge-muted { background: rgba(154,159,174,0.14); color: var(--text-dim); }
.badge-gold { background: color-mix(in srgb, var(--gold) 14%, transparent); color: var(--gold); }

/* ============ FILTER BAR ============ */
.filter-bar { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.filter-bar input, .filter-bar select {
    background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px;
    padding: 0.6rem 0.9rem; color: var(--text); font-family: inherit; font-size: 0.88rem;
}
.filter-bar input { flex: 1; min-width: 180px; }
.filter-bar input:focus, .filter-bar select:focus { outline: none; border-color: var(--gold); }

/* ============ SERVICES ============ */
.service-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; }
.service-card { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 1.25rem; overflow: hidden; }
.service-card.inactive { opacity: 0.55; }
.service-card .plat-tag { font-size: 0.75rem; color: var(--text-dim); margin-bottom: 0.3rem; }
.service-card h3 { margin: 0 0 0.75rem; font-size: 1rem; font-family: 'Space Grotesk', 'Inter', sans-serif; font-weight: 700; }
.service-cost { font-size: 0.8rem; color: var(--text-dim); margin-bottom: 0.75rem; }
.service-card label { display: block; font-size: 0.75rem; color: var(--text-dim); margin-bottom: 0.3rem; }
.service-card input[type="number"] {
    width: 100%; background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px;
    padding: 0.5rem 0.75rem; color: var(--text); font-family: inherit; margin-bottom: 0.6rem;
}
.service-benefit { font-size: 0.85rem; font-weight: 700; margin-bottom: 0.9rem; }
.service-benefit.positive { color: #34d399; }
.service-benefit.negative { color: #f87171; }
.service-actions { display: flex; gap: 0.5rem; }
.btn-mini { flex: 1; padding: 0.55rem; border-radius: 999px; border: 1px solid var(--border); background: transparent; color: var(--text); font-weight: 600; font-size: 0.82rem; cursor: pointer; text-align: center; }
.btn-mini.primary { background: var(--gold); color: #fff; border-color: var(--gold); }
.btn-mini.danger { color: #f87171; border-color: rgba(239,68,68,0.3); }
.btn-mini.blocked, .btn-mini.blocked:disabled { background: #ef4444; color: #fff; border-color: #ef4444; opacity: 1; }
.btn-mini:disabled { cursor: not-allowed; opacity: 0.7; }

.plan-usage-bar { height: 6px; border-radius: 99px; background: var(--panel-2); overflow: hidden; margin-top: 0.6rem; }
.plan-usage-fill { height: 100%; background: var(--gold); border-radius: 99px; transition: width 0.3s; }
.plan-usage-fill.full { background: #f87171; }

.service-tabs { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.tab-btn { display: flex; align-items: center; gap: 0.4rem; padding: 0.5rem 1rem; border-radius: 999px; border: 1px solid var(--border); background: var(--panel-2); color: var(--text-dim); font-size: 0.82rem; font-weight: 600; cursor: pointer; transition: all 0.15s; font-family: inherit; }
.tab-btn:hover { color: var(--text); border-color: var(--gold); }
.tab-btn.active { background: var(--gold); color: #fff; border-color: var(--gold); }
.tab-btn .tab-count { font-size: 0.7rem; opacity: 0.75; }

.service-card-head { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.6rem; }
.service-card-head h3 { margin: 0; }
.net-icon { width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 0.95rem; flex-shrink: 0; color: #fff; }
.net-icon.net-facebook { background: #1877f2; }
.net-icon.net-instagram { background: linear-gradient(135deg,#f58529,#dd2a7b,#8134af); }
.net-icon.net-youtube { background: #ff0000; }
.net-icon.net-tiktok { background: #111; }
.net-icon.net-twitter { background: #000; }
.net-icon.net-telegram { background: #26A5E4; }
.net-icon.net-whatsapp { background: #25D366; }
.net-icon.net-spotify { background: #1DB954; }
.net-icon.net-linkedin { background: #0A66C2; }
.net-icon.net-snapchat { background: #FFFC00; color: #000; }
.net-icon.net-discord { background: #5865F2; }
.net-icon.net-twitch { background: #9146FF; }
.net-icon.net-soundcloud { background: #FF5500; }
.net-icon.net-threads { background: #000; }
.net-icon.net-pinterest { background: #E60023; }
.net-icon.net-other { background: var(--gold); color: #fff; }

.service-metrics { display: flex; gap: 0.6rem; margin: 0.75rem 0; }
.service-metric { flex: 1; background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; padding: 0.5rem 0.6rem; text-align: center; }
.service-metric .sm-label { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--text-dim); margin-bottom: 0.15rem; }
.service-metric .sm-val { font-size: 0.82rem; font-weight: 700; color: var(--text); }

/* ============ TOAST ============ */
.toast {
    position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%) translateY(120%);
    background: #10b981; color: #fff; padding: 0.75rem 1.5rem; border-radius: 50px; font-size: 0.85rem; font-weight: 600;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3); transition: transform 0.3s ease; z-index: 200; display: flex; align-items: center; gap: 0.5rem;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ============ ORDER DETAIL MODAL ============ */
.order-modal-overlay {
    display: none; position: fixed; inset: 0; z-index: 300; align-items: center; justify-content: center;
    background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); padding: 1rem;
}
.order-modal-overlay.show { display: flex; }
.order-modal { background: var(--panel); border: 1px solid var(--border); border-radius: 16px; width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
.order-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--panel); }
.order-modal-head h3 { margin: 0 0 0.3rem; font-size: 1.05rem; color: var(--text); font-family: 'Space Grotesk', 'Inter', sans-serif; font-weight: 700; }
.order-modal-ref { font-size: 0.75rem; color: var(--gold); font-weight: 700; background: color-mix(in srgb, var(--gold) 12%, transparent); padding: 0.15rem 0.55rem; border-radius: 10px; }
.order-modal-close { background: var(--panel-2); border: 1px solid var(--border); color: var(--text-dim); width: 32px; height: 32px; border-radius: 8px; cursor: pointer; flex-shrink: 0; }
.order-modal-close:hover { color: var(--text); border-color: var(--gold); }
.order-modal-body { padding: 1.5rem; }
.order-modal-status-row { margin-bottom: 1.25rem; display: flex; flex-direction: column; gap: 0.5rem; }
.om-status-line { display: flex; align-items: center; gap: 0.6rem; }
.om-status-label { font-size: 0.72rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.03em; min-width: 105px; }
.order-modal-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
.omg-item { display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; }
.omg-label { font-size: 0.72rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.03em; display: flex; align-items: center; gap: 0.4rem; }
.omg-value { font-size: 0.9rem; color: var(--text); font-weight: 600; word-break: break-word; }
.order-modal-calc { background: var(--panel-2); border: 1px solid var(--border); border-radius: 12px; padding: 1.1rem 1.25rem; }
.order-modal-calc h4 { margin: 0 0 0.9rem; font-size: 0.88rem; color: var(--text); display: flex; align-items: center; gap: 0.5rem; }
.omc-row { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; padding: 0.65rem 0; border-bottom: 1px solid rgba(255,255,255,0.04); }
.omc-row:last-of-type { border-bottom: none; }
.omc-left { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.omc-icon { width: 32px; height: 32px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; flex-shrink: 0; background: rgba(154,159,174,0.12); color: var(--text-dim); }
.omc-icon.minus { background: rgba(239,68,68,0.12); color: #ef4444; }
.omc-icon.total { background: rgba(16,185,129,0.12); color: #10b981; }
.omc-icon.partner { background: rgba(139,92,246,0.12); color: #8b5cf6; }
.omc-icon.net { background: color-mix(in srgb, var(--gold) 12%, transparent); color: var(--gold); }
.omc-label { font-size: 0.86rem; font-weight: 600; color: var(--text); }
.omc-sub { font-size: 0.74rem; color: var(--text-dim); margin-top: 1px; }
.omc-row strong { color: var(--text); font-weight: 700; font-size: 0.95rem; flex-shrink: 0; white-space: nowrap; }
.omc-row strong.omc-minus { color: #ef4444; }
.omc-row.total { background: rgba(16,185,129,0.06); margin: 0.4rem -1.25rem; padding: 0.75rem 1.25rem; border-bottom: none; border-radius: 8px; }
.omc-row.total strong { color: #10b981; font-size: 1.05rem; }
.omc-row.total.net { background: color-mix(in srgb, var(--gold) 6%, transparent); }
.omc-row.total.net strong { color: var(--gold); }
.omc-note { font-size: 0.76rem; color: var(--text-dim); margin: 1rem 0 0; line-height: 1.5; padding-top: 0.85rem; border-top: 1px solid var(--border); }
@media (max-width: 480px) {
    .omc-sub { display: none; }
}
@media (max-width: 480px) {
    .order-modal-grid { grid-template-columns: 1fr; }
}
.toast.error { background: #ef4444; }

/* ============ PROGRESS ============ */
.progress-row { margin-bottom: 0.9rem; }
.progress-row .row-label { display: flex; justify-content: space-between; font-size: 0.82rem; margin-bottom: 0.35rem; }
.progress-track { height: 8px; background: var(--panel-2); border-radius: 4px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 4px; }

/* ============ SETTINGS ============ */
.settings-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.5rem; align-items: start; }
.tabs { display: flex; gap: 0.4rem; margin-bottom: 1.5rem; flex-wrap: wrap; border-bottom: 1px solid var(--border); }
.tab-btn { background: none; border: none; color: var(--text-dim); padding: 0.7rem 1rem; font-weight: 600; font-size: 0.88rem; cursor: pointer; border-bottom: 2px solid transparent; }
.tab-btn.active { color: var(--gold); border-color: var(--gold); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.form-row { margin-bottom: 1.1rem; }
.form-row label { display: block; font-size: 0.85rem; color: var(--text-dim); margin-bottom: 0.4rem; }
.form-row input, .form-row textarea, .form-row select {
    width: 100%; background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px;
    padding: 0.7rem; color: var(--text); font-family: inherit; font-size: 0.92rem;
}
.form-row textarea { min-height: 90px; resize: vertical; }
.form-row.mono textarea { font-family: 'Courier New', monospace; font-size: 0.85rem; }
.theme-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; margin-bottom: 1.25rem; }
.theme-swatch { border-radius: 10px; padding: 0.75rem; text-align: center; cursor: pointer; border: 2px solid transparent; }
.theme-swatch.selected { border-color: var(--gold); }
.theme-swatch .dot { width: 100%; height: 32px; border-radius: 6px; margin-bottom: 0.4rem; }
.theme-swatch span { font-size: 0.72rem; color: var(--text-dim); }
.color-row { display: flex; gap: 0.75rem; }
.color-row .form-row { flex: 1; }
.lock-note { font-size: 0.75rem; color: var(--gold); margin-top: 0.3rem; }

.preview-panel { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; position: sticky; top: 90px; }
.preview-header { padding: 2rem 1.25rem; text-align: center; color: #fff; }
.preview-logo { width: 56px; height: 56px; border-radius: 50%; background: rgba(255,255,255,0.2); display: flex; align-items: center; justify-content: center; margin: 0 auto 0.75rem; font-weight: 800; font-size: 1.3rem; }
.preview-name { font-weight: 700; font-size: 1.1rem; font-family: 'Space Grotesk', 'Inter', sans-serif; }
.preview-desc { font-size: 0.8rem; opacity: 0.85; margin-top: 0.4rem; }
.preview-cta { display: inline-block; margin-top: 1rem; padding: 0.6rem 1.4rem; border-radius: 999px; font-weight: 700; font-size: 0.85rem; }
.preview-body { padding: 1.25rem; }
.preview-body .hint-title { font-size: 0.75rem; color: var(--text-dim); text-transform: uppercase; margin-bottom: 0.5rem; }

/* ============ PLANS ============ */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; }
.plan-card { background: var(--panel); border: 2px solid var(--border); border-radius: 14px; padding: 1.5rem; text-align: center; cursor: pointer; transition: box-shadow 0.15s; overflow: hidden; }
.plan-card.current { border-color: #10b981; }
.plan-card.recommended { border-color: var(--gold); }
.plan-card.selected { box-shadow: 0 0 0 2px var(--gold); }
.plan-badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); padding: 0.25rem 0.9rem; border-radius: 999px; font-size: 0.7rem; font-weight: 800; white-space: nowrap; }
.plan-icon { font-size: 1.8rem; margin-bottom: 0.5rem; }
.plan-name { font-weight: 700; font-size: 1.05rem; margin-bottom: 0.5rem; font-family: 'Space Grotesk', 'Inter', sans-serif; }
.plan-price { font-size: 1.6rem; font-weight: 700; margin-bottom: 1rem; font-family: 'Space Grotesk', 'Inter', sans-serif; }
.plan-price small { font-size: 0.7rem; font-weight: 400; color: var(--text-dim); }
.plan-features { list-style: none; padding: 0; margin: 0 0 1.25rem; text-align: left; font-size: 0.85rem; color: var(--text-dim); display: flex; flex-direction: column; gap: 0.5rem; }
.plan-features i { width: 16px; }
.plan-features .yes i { color: #34d399; }
.plan-features .no i { color: #f87171; }
.plan-btn { width: 100%; padding: 0.75rem; border-radius: 999px; border: none; font-weight: 700; cursor: pointer; }
.plan-btn.disabled { background: var(--panel-2); color: var(--text-dim); cursor: not-allowed; }

/* ============ WITHDRAWALS ============ */
.method-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 0.75rem; margin-bottom: 1.25rem; }
.method-option { border: 2px solid var(--border); border-radius: 10px; padding: 1rem 0.5rem; text-align: center; cursor: pointer; }
.method-option.selected { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 6%, transparent); }
.method-option i { font-size: 1.3rem; margin-bottom: 0.4rem; color: var(--gold); }
.method-option span { display: block; font-size: 0.78rem; }

/* ============ MISC ============ */
.chart-placeholder { height: 220px; display: flex; align-items: flex-end; gap: 0.6rem; padding: 1rem 0.5rem; }
.chart-bar { flex: 1; background: linear-gradient(180deg, var(--gold), color-mix(in srgb, var(--gold) 20%, transparent)); border-radius: 4px 4px 0 0; position: relative; }
.chart-bar span { position: absolute; bottom: -22px; left: 0; right: 0; text-align: center; font-size: 0.68rem; color: var(--text-dim); }
.upgrade-lock { position: relative; }
.upgrade-lock::after {
    content: ''; position: absolute; inset: 0; backdrop-filter: blur(3px); background: rgba(11,13,18,0.55);
    border-radius: 12px; display: flex; align-items: center; justify-content: center;
}
.upgrade-lock-badge {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 2;
    background: var(--panel); border: 1px solid var(--gold); color: var(--gold); padding: 0.6rem 1.1rem;
    border-radius: 50px; font-size: 0.8rem; font-weight: 700; white-space: nowrap;
}

@media (max-width: 960px) {
    .settings-layout { grid-template-columns: 1fr; }
    .preview-panel { position: static; }
}
@media (max-width: 780px) {
    .sidebar { position: fixed; left: -260px; z-index: 40; transition: left 0.25s; box-shadow: 0 0 40px rgba(0,0,0,0.5); }
    .sidebar.open { left: 0; }
    .sidebar-toggle { display: flex; align-items: center; justify-content: center; }
    .dash-topbar { padding: 1rem 1rem 1rem 4.5rem; }
    .dash-main { padding: 1.25rem; }
}
/* En dessous de 480px, même une fois repliée à la ligne, la rangée
   topbar-right (taux de change + toggle FC/USD + solde + cloche + user) reste
   trop large pour tenir sur une seule ligne — le taux de change est déjà
   redondant avec le toggle FC/USD juste à côté, et le nom d'utilisateur fait
   double emploi avec l'avatar, donc les deux passent en display:none plutôt
   que de continuer à wrapper indéfiniment. */
@media (max-width: 480px) {
    .currency-rate-hint { display: none; }
    .topbar-user span { display: none; }
    .wallet-chip-label { display: none; }
}

/* ============ AI ASSISTANT WIDGET ============ */
.ai-assistant { position: fixed; right: 1.5rem; bottom: 1.5rem; z-index: 200; }
.ai-assistant-toggle {
    width: 56px; height: 56px; border-radius: 50%; background: var(--gold); color: #fff; border: none;
    font-size: 1.3rem; cursor: pointer; box-shadow: 0 6px 24px color-mix(in srgb, var(--gold) 35%, transparent);
    display: flex; align-items: center; justify-content: center; transition: transform 0.15s;
}
.ai-assistant-toggle:hover { transform: scale(1.06); }
.ai-assistant-panel {
    position: absolute; right: 0; bottom: 68px; width: 320px; max-height: 440px;
    background: var(--panel-2); border: 1px solid var(--border); border-radius: 14px;
    flex-direction: column; overflow: hidden; box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}
.ai-assistant-head {
    display: flex; align-items: center; justify-content: space-between; padding: 0.85rem 1rem;
    background: var(--panel); border-bottom: 1px solid var(--border); font-weight: 700; color: var(--text); font-size: 0.9rem;
}
.ai-assistant-head button { background: none; border: none; color: var(--text-dim); cursor: pointer; font-size: 1rem; }
.ai-assistant-messages { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: 0.6rem; min-height: 220px; max-height: 320px; }
.ai-msg { padding: 0.6rem 0.85rem; border-radius: 10px; font-size: 0.85rem; line-height: 1.45; max-width: 88%; white-space: pre-wrap; }
.ai-msg-bot { background: var(--panel); color: var(--text); align-self: flex-start; border: 1px solid var(--border); }
.ai-msg a { color: var(--gold); word-break: break-all; }
.ai-msg-user { background: var(--gold); color: #fff; align-self: flex-end; font-weight: 600; }
.ai-msg-typing { padding: 0.5rem 0.85rem; }
.ai-whatsapp-btn {
    align-self: flex-start; display: inline-flex; align-items: center; gap: 0.4rem; text-decoration: none;
    background: #25D366; color: #fff; font-weight: 700; font-size: 0.82rem; padding: 0.5rem 0.9rem; border-radius: 50px;
    margin-top: -0.2rem;
}
.ai-whatsapp-btn:hover { filter: brightness(0.95); }
.ai-redirect-btn {
    align-self: flex-start; display: inline-flex; align-items: center; gap: 0.4rem; text-decoration: none;
    background: var(--gold); color: #fff; font-weight: 700; font-size: 0.82rem; padding: 0.5rem 0.9rem; border-radius: 50px;
    margin-top: -0.2rem;
}
.ai-redirect-btn:hover { filter: brightness(0.95); }
.ai-assistant-form { display: flex; gap: 0.5rem; padding: 0.75rem; border-top: 1px solid var(--border); }
.ai-assistant-form input {
    flex: 1; background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 0.6rem 0.75rem;
    color: var(--text); font-size: 0.85rem; font-family: inherit;
}
.ai-assistant-form input:focus { outline: none; border-color: var(--gold); }
.ai-assistant-form button { background: var(--gold); color: #fff; border: none; border-radius: 8px; width: 38px; cursor: pointer; }
.ai-assistant-panel.expanded {
    position: fixed; inset: 0; right: 0; bottom: 0; width: 100vw; height: 100vh;
    max-height: 100vh; border-radius: 0; z-index: 9999;
}
.ai-assistant-panel.expanded .ai-assistant-messages { max-height: none; }
@media (max-width: 480px) {
    .ai-assistant { right: 1rem; bottom: 1rem; }
    .ai-assistant-panel { width: calc(100vw - 2rem); right: -0.5rem; }
}

/* ============ GREETING / GRANDES TUILES (page d'accueil du dashboard) ============ */
.dash-greeting { margin-bottom: 1.5rem; }
.dash-greeting h1 { margin: 0 0 0.3rem; font-family: 'Space Grotesk', 'Inter', sans-serif; font-size: 1.5rem; font-weight: 700; }
.dash-greeting p { margin: 0; color: var(--text-dim); font-size: 0.9rem; }

.dash-hero { position: relative; overflow: hidden; background: var(--panel); border: 1px solid var(--border); border-radius: 16px; padding: 1.75rem 2rem; margin-bottom: 1.25rem; text-align: center; box-shadow: 0 1px 3px rgba(16,24,40,0.04); }
.dash-hero-live { display: flex; align-items: center; justify-content: center; gap: 0.5rem; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-dim); margin-bottom: 0.75rem; }
.dash-hero-live .live-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; animation: live-pulse 2s infinite; }
@keyframes live-pulse { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,0.45); } 70% { box-shadow: 0 0 0 8px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }
.dhm-val { font-family: 'Space Grotesk', 'Inter', sans-serif; font-size: 2.75rem; font-weight: 700; color: var(--text); line-height: 1.1; }
.dhm-val.money { color: #16a34a; }
.dhm-label { font-size: 0.85rem; color: var(--text-dim); margin-top: 0.4rem; }
@media (max-width: 720px) { .dhm-val { font-size: 2.1rem; } }
