:root {
    --bg-body: #020617;
    --bg-sidebar: #020617;
    --bg-main: #020617;
    --bg-elevated: #030712;
    --bg-card: #020617;
    --border-subtle: #1f2937;
    --accent: #22c55e;
    --accent-soft: rgba(34, 197, 94, .16);
    --accent-blue: #38bdf8;
    --text-main: #e5e7eb;
    --text-muted: #9ca3af;
    --text-soft: #6b7280;
    --danger: #f97373;
    --radius-lg: 20px;
    --radius-md: 16px;
    --radius-sm: 999px;
    --shadow-soft: 0 20px 60px rgba(0, 0, 0, .6);
    --font-main: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Reset */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    font-family: var(--font-main);
    background: radial-gradient(circle at top, #020617 0, #020617 40%, #000 100%);
    color: var(--text-main);
}

/* Shell */

.dash-body {
    min-height: 100vh;
}

.dash-shell {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    min-height: 100vh;
}

/* Sidebar */

.dash-sidebar {
    background: radial-gradient(circle at top left, #020617 0, #020617 40%, #000 100%);
    border-right: 1px solid rgba(15, 23, 42, .9);
    padding: 18px 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}

.brand-logo {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, .45);
    background: radial-gradient(circle at top, rgba(34, 197, 94, .2), rgba(15, 23, 42, 1));
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-weight: 600;
    font-size: 15px;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.brand-tag {
    font-size: 12px;
    color: var(--text-soft);
}

.side-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 12px;
}

.side-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    font-size: 14px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 999px;
    border: 1px solid transparent;
    transition: all .15s ease;
}

.side-link:hover {
    background: rgba(15, 23, 42, .9);
    color: var(--text-main);
}

.side-link.is-active {
    border-color: rgba(148, 163, 184, .5);
    background: linear-gradient(145deg, rgba(15, 23, 42, 1), rgba(2, 6, 23, 1));
    color: var(--text-main);
}

.side-bottom {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
}

.side-mini-link {
    color: var(--accent);
    text-decoration: none;
}

.side-mini-link.muted {
    color: var(--text-soft);
}

.side-foot {
    margin-top: 6px;
    color: var(--text-soft);
}

/* Main area */

.dash-main {
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(circle at top left, rgba(56, 189, 248, .12), transparent 55%),
        radial-gradient(circle at bottom right, rgba(34, 197, 94, .12), transparent 55%),
        linear-gradient(145deg, #020617, #000);
}

/* Topbar */

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 26px 10px;
}

.top-title {
    margin: 0;
    font-size: 18px;
}

.top-sub {
    font-size: 13px;
    color: var(--text-soft);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-pill {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    border: 1px solid rgba(34, 197, 94, .4);
    background: rgba(22, 163, 74, .12);
    color: #bbf7d0;
}

/* Flash messages */

.flash-zone {
    padding: 0 26px;
}

.flash {
    margin-bottom: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 13px;
    border: 1px solid var(--border-subtle);
}

.flash-success {
    border-color: rgba(34, 197, 94, .5);
    background: rgba(22, 163, 74, .15);
}

.flash-danger {
    border-color: rgba(248, 113, 113, .7);
    background: rgba(248, 113, 113, .15);
}

.flash-info {
    border-color: rgba(59, 130, 246, .7);
    background: rgba(59, 130, 246, .15);
}

/* Content */

.dash-content {
    padding: 10px 26px 20px;
}

/* Footer */

.dash-footer {
    margin-top: auto;
    padding: 10px 26px 16px;
    font-size: 12px;
    color: var(--text-soft);
    border-top: 1px solid rgba(15, 23, 42, .9);
}

/* Grid helpers */

.grid {
    display: grid;
}

.grid-2-1 {
    grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.5fr);
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.gap-lg {
    gap: 20px;
}

.gap-md {
    gap: 16px;
}

/* Sections */

.section {
    margin-top: 26px;
}

.section-head {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
}

.section-head h2 {
    margin: 0;
    font-size: 16px;
}

.section-sub {
    font-size: 13px;
    color: var(--text-soft);
}

/* Cards */

.card {
    background: radial-gradient(circle at top left, rgba(51, 65, 85, .25), transparent 55%),
                linear-gradient(145deg, rgba(15, 23, 42, 1), rgba(2, 6, 23, 1));
    border-radius: var(--radius-lg);
    border: 1px solid rgba(15, 23, 42, 1);
    padding: 18px 18px 16px;
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(34, 197, 94, .16), transparent 55%);
    opacity: .8;
    pointer-events: none;
}

.card > * {
    position: relative;
}

/* Hero & status cards */

.hero-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.hero-header h2 {
    margin: 0 0 6px;
    font-size: 22px;
}

.hero-text {
    margin: 0;
    font-size: 14px;
    color: var(--text-muted);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.status-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.status-card h3 {
    margin: 0;
    font-size: 15px;
}

.metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.metric {
    padding: 8px 10px;
    border-radius: 14px;
    border: 1px solid rgba(30, 64, 175, .8);
    background: rgba(15, 23, 42, .95);
}

.metric-label {
    font-size: 11px;
    color: var(--text-soft);
}

.metric-value {
    display: block;
    font-size: 17px;
    font-weight: 600;
}

.metric-hint {
    font-size: 11px;
    color: var(--text-muted);
}

.status-visual {
    margin: 0;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(30, 64, 175, .6);
    background: #020617;
    font-size: 11px;
    color: var(--text-soft);
}

.status-img {
    width: 100%;
    display: block;
    object-fit: cover;
    max-height: 150px;
}

.status-visual figcaption {
    padding: 6px 9px;
}

/* Chips / tags */

.tag,
.card-chip,
.pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    border: 1px solid rgba(148, 163, 184, .5);
    background: rgba(15, 23, 42, .9);
    color: var(--text-muted);
}

.card-chip {
    margin-bottom: 6px;
    border-color: rgba(34, 197, 94, .7);
    background: rgba(22, 163, 74, .12);
    color: #bbf7d0;
}

.card-chip.muted {
    border-color: rgba(148, 163, 184, .5);
    background: rgba(15, 23, 42, .9);
    color: var(--text-soft);
}

/* Service cards */

.card-service h3 {
    margin: 0 0 6px;
    font-size: 14px;
}

.card-service p {
    margin: 0;
    font-size: 13px;
    color: var(--text-muted);
}

/* Pricing cards */

.card-pricing {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.card-pricing .price {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.card-pricing ul {
    margin: 0;
    padding-left: 18px;
    font-size: 13px;
    color: var(--text-muted);
}

.card-pricing.highlighted {
    border-color: rgba(34, 197, 94, .9);
    box-shadow: 0 0 40px rgba(34, 197, 94, .35);
}

/* CTA card */

.card-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.card-cta p {
    margin: 0;
    font-size: 14px;
}

/* Offer cards */

.card-offer {
    position: relative;
}

.offer-badge {
    position: absolute;
    top: 10px;
    right: -40px;
    transform: rotate(45deg);
    padding: 4px 40px;
    font-size: 11px;
    color: #020617;
    animation: pulse 1.2s infinite alternate;
}

.offer-badge-promo_flash {
    background: #f97316;
}

.offer-badge-affaire_mois {
    background: #22c55e;
}

.offer-badge-promo_24h {
    background: #e11d48;
}

@keyframes pulse {
    from { opacity: .7; }
    to { opacity: 1; }
}

.offer-img-wrapper {
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 8px;
    border: 1px solid rgba(148, 163, 184, .4);
}

.offer-img-wrapper img {
    width: 100%;
    display: block;
    object-fit: cover;
}

/* Forms */

.contact-form {
    max-width: 520px;
    margin-top: 8px;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.form-row label {
    font-size: 14px;
    color: var(--text-muted);
}

.form-row input,
.form-row select,
.form-row textarea {
    background: rgba(15, 23, 42, .85);
    border: 1px solid rgba(51, 65, 85, .9);
    border-radius: 999px;
    padding: 9px 12px;
    font-size: 14px;
    color: var(--text-main);
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.form-row textarea {
    border-radius: 12px;
    resize: vertical;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px rgba(34, 197, 94, .5);
}

/* Tables */

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

table th,
table td {
    padding: 6px 8px;
    border-bottom: 1px solid rgba(31, 41, 55, .9);
}

table th {
    text-align: left;
    color: var(--text-soft);
}

table tr:hover td {
    background: rgba(15, 23, 42, .9);
}

/* Buttons */

.btn {
    border-radius: 999px;
    padding: 8px 16px;
    border: 1px solid transparent;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-primary {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #020617;
    font-weight: 600;
    box-shadow: 0 14px 30px rgba(34, 197, 94, .4);
}

.btn-primary:hover {
    filter: brightness(1.05);
}

.btn-ghost {
    border-color: rgba(148, 163, 184, .5);
    background: transparent;
    color: var(--text-main);
}

.btn-ghost:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* Responsive */

@media (max-width: 960px) {
    .dash-shell {
        grid-template-columns: 1fr;
    }

    .dash-sidebar {
        flex-direction: row;
        align-items: center;
        padding: 10px 14px;
        position: sticky;
        top: 0;
        z-index: 40;
    }

    .side-nav {
        flex-direction: row;
        flex-wrap: wrap;
        margin-top: 0;
    }

    .side-bottom {
        display: none;
    }
}

@media (max-width: 800px) {
    .grid-2-1 {
        grid-template-columns: 1fr;
    }

    .metrics {
        grid-template-columns: 1fr;
    }

    .card-cta {
        flex-direction: column;
        align-items: flex-start;
    }
}
