/* crushimmo — feuille de style minimaliste */
:root {
    --c-bg: #0e1525;
    --c-bg-soft: #161e33;
    --c-card: #1a2238;
    --c-border: #2a3552;
    --c-text: #e6ecf5;
    --c-text-soft: #a4b0c8;
    --c-accent: #6c9bff;
    --c-accent-hover: #5187ff;
    --c-success: #4ade80;
    --c-warn: #fbbf24;
    --c-danger: #f87171;
    --radius: 8px;
    --shadow: 0 4px 16px rgba(0,0,0,0.25);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
    background: var(--c-bg);
    color: var(--c-text);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--c-accent); text-decoration: none; }
a:hover { color: var(--c-accent-hover); }

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

/* ---- Header ---- */
.site-header {
    border-bottom: 1px solid var(--c-border);
    background: var(--c-bg-soft);
    padding: 16px 0;
}
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 600;
    color: var(--c-text);
}
.brand-mark { color: var(--c-accent); font-size: 24px; }
.brand-name { letter-spacing: -0.02em; }
.main-nav { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.main-nav a { color: var(--c-text-soft); }
.main-nav a:hover { color: var(--c-text); }

/* ---- Main / Footer ---- */
.site-main { flex: 1; padding: 40px 0; }
.site-footer {
    border-top: 1px solid var(--c-border);
    padding: 24px 0;
    color: var(--c-text-soft);
    font-size: 14px;
    text-align: center;
}

/* ---- Typography ---- */
h1 { font-size: 32px; margin: 0 0 12px; letter-spacing: -0.02em; }
h2 { font-size: 22px; margin: 32px 0 12px; }
h3 { font-size: 17px; margin: 16px 0 8px; }
p  { margin: 0 0 12px; }

.text-muted { color: var(--c-text-soft); }
.text-success { color: var(--c-success); }
.text-warn    { color: var(--c-warn); }
.text-danger  { color: var(--c-danger); }
.small { font-size: 13px; }

/* ---- Boutons ---- */
.btn, .btn-primary, .btn-ghost, .btn-danger {
    display: inline-block;
    padding: 10px 18px;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 500;
    border: 1px solid transparent;
    cursor: pointer;
    text-align: center;
    transition: background .15s, border-color .15s;
    font-family: inherit;
}
.btn-primary {
    background: var(--c-accent);
    color: #0b1120;
    border-color: var(--c-accent);
}
.btn-primary:hover { background: var(--c-accent-hover); color: #0b1120; }
.btn-ghost {
    background: transparent;
    color: var(--c-text);
    border-color: var(--c-border);
}
.btn-ghost:hover { border-color: var(--c-accent); color: var(--c-accent); }
.btn-danger {
    background: transparent;
    color: var(--c-danger);
    border-color: var(--c-danger);
}
.btn-danger:hover { background: var(--c-danger); color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 14px; }

/* ---- Cards ---- */
.card {
    background: var(--c-card);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
}

/* ---- Form ---- */
.field { margin-bottom: 16px; }
.field label {
    display: block;
    font-size: 14px;
    color: var(--c-text-soft);
    margin-bottom: 6px;
    font-weight: 500;
}
.field input, .field select, .field textarea {
    width: 100%;
    padding: 10px 12px;
    background: var(--c-bg);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    color: var(--c-text);
    font-size: 15px;
    font-family: inherit;
}
.field input:focus, .field select:focus, .field textarea:focus {
    outline: none;
    border-color: var(--c-accent);
}
.field .hint { font-size: 13px; color: var(--c-text-soft); margin-top: 4px; }
.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
@media (max-width: 600px) {
    .field-row { grid-template-columns: 1fr; }
}

/* ---- Tables ---- */
.tbl {
    width: 100%;
    border-collapse: collapse;
    background: var(--c-card);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    overflow: hidden;
}
.tbl th, .tbl td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--c-border);
}
.tbl th {
    background: var(--c-bg-soft);
    font-size: 13px;
    font-weight: 600;
    color: var(--c-text-soft);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.tbl tr:last-child td { border-bottom: none; }
.tbl tr:hover { background: rgba(255,255,255,0.02); }

/* ---- Badges ---- */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.badge-active { background: rgba(74,222,128,0.15); color: var(--c-success); }
.badge-pending,
.badge-provisioning { background: rgba(251,191,36,0.15); color: var(--c-warn); }
.badge-failed { background: rgba(248,113,113,0.15); color: var(--c-danger); }
.badge-deleted, .badge-disabled { background: rgba(255,255,255,0.06); color: var(--c-text-soft); }

/* ---- Hero (landing) ---- */
.hero {
    text-align: center;
    padding: 60px 0 40px;
}
.hero h1 {
    font-size: 48px;
    line-height: 1.15;
    margin-bottom: 16px;
}
.hero p.lead {
    font-size: 18px;
    color: var(--c-text-soft);
    max-width: 640px;
    margin: 0 auto 32px;
}
.hero .cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---- KPIs ---- */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}
.kpi {
    background: var(--c-card);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 16px;
}
.kpi .num { font-size: 28px; font-weight: 600; }
.kpi .lbl { font-size: 13px; color: var(--c-text-soft); text-transform: uppercase; letter-spacing: 0.04em; }

/* ---- Log viewer ---- */
.log-pane {
    background: #060a14;
    color: #d1e0ff;
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 14px;
    font-family: ui-monospace, SF Mono, Menlo, Consolas, monospace;
    font-size: 13px;
    line-height: 1.55;
    max-height: 460px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

/* ---- Alert ---- */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    border: 1px solid;
}
.alert-success { background: rgba(74,222,128,0.08); border-color: rgba(74,222,128,0.3); color: var(--c-success); }
.alert-error   { background: rgba(248,113,113,0.08); border-color: rgba(248,113,113,0.3); color: var(--c-danger); }
.alert-warn    { background: rgba(251,191,36,0.08); border-color: rgba(251,191,36,0.3); color: var(--c-warn); }

/* ---- Page header (admin) ---- */
.page-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.page-head h1 { margin: 0; }
