/**
 * AdmHost — Interface publique
 * Thème clair, accent bleu, responsive mobile-first
 */

:root {
    --bg: #f8fafc;
    --bg-elevated: #ffffff;
    --bg-card: #ffffff;
    --bg-dark: #111827;
    --bg-sidebar: #111827;
    --border: #e2e8f0;
    --text: #0f172a;
    --text-muted: #64748b;
    --text-on-dark: #f1f5f9;
    --text-muted-dark: #94a3b8;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --accent-dark: #1e40af;
    --accent-soft: rgba(37, 99, 235, 0.08);
    --success: #16a34a;
    --error: #dc2626;
    --radius: 10px;
    --radius-lg: 14px;
    --shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 4px 16px rgba(15, 23, 42, 0.06);
    --font: "Segoe UI", system-ui, -apple-system, sans-serif;
    --header-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--accent-hover); }

.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 2rem 1.25rem;
}

/* --- Header --- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    height: var(--header-h);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 1.25rem;
    height: 100%;
}

.nav-brand {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
    text-decoration: none;
}

.nav-brand span { color: var(--accent); }

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 8px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    height: 2px;
    background: var(--text);
    border-radius: 1px;
    transition: transform 0.2s, opacity 0.2s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-links {
    display: flex;
    gap: 0.25rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    display: block;
    padding: 0.5rem 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.925rem;
    border-radius: var(--radius);
    text-decoration: none;
}

.nav-links a:hover {
    color: var(--text);
    background: var(--accent-soft);
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.925rem;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: background 0.15s, transform 0.1s;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover {
    background: var(--accent-hover);
    color: #fff;
}

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-lg { padding: 0.85rem 1.75rem; font-size: 1rem; }
.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.85rem; }
.btn-block { display: flex; width: 100%; }

/* --- Hero --- */
.hero {
    padding: 4rem 0 3rem;
    text-align: center;
}

.hero .container { max-width: 720px; }

.hero-badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    margin-bottom: 1.25rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent);
    background: var(--accent-soft);
    border: 1px solid rgba(37, 99, 235, 0.25);
    border-radius: 999px;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 2.75rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 540px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* --- Features --- */
.features {
    padding: 3rem 0;
}

.feature-card {
    background: var(--bg-card);
    padding: 1.75rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.feature-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.feature-card p {
    font-size: 0.925rem;
    color: var(--text-muted);
    line-height: 1.55;
}

.feature-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-soft);
    border-radius: var(--radius);
    color: var(--accent);
    font-size: 1.1rem;
    font-weight: 700;
}

/* --- Pricing --- */
.pricing { padding: 1rem 0 2rem; }

.pricing > h1 {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.pricing-intro {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
}

.pricing-grid-web {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.pricing-block {
    margin-bottom: 3rem;
}

.pricing-block-smtp {
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.pricing-block-title {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.35rem;
}

.pricing-block-intro {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
}

.pricing-grid-smtp {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    max-width: 420px;
}

.pricing-card-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: -0.25rem 0 0.75rem;
}

.pricing-card {
    background: var(--bg-card);
    padding: 2rem 1.75rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.pricing-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.price {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 1.25rem;
    letter-spacing: -0.02em;
}

.price span {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
}

.pricing-card ul {
    list-style: none;
    margin: 0 0 1.5rem;
    flex: 1;
}

.pricing-card li {
    padding: 0.45rem 0;
    font-size: 0.925rem;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}

.pricing-card li::before {
    content: "—";
    color: var(--accent);
    margin-right: 0.5rem;
}

/* --- Auth --- */
.auth-form {
    max-width: 420px;
    margin: 2rem auto 3rem;
    background: var(--bg-card);
    padding: 2rem 1.75rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.auth-form h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.form-group { margin-bottom: 1.1rem; }

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
}

.form-group input {
    width: 100%;
    padding: 0.75rem 0.9rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 1rem;
    transition: border-color 0.15s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.alert-error {
    background: #fef2f2;
    color: #991b1b;
    padding: 0.75rem 0.9rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: 0.9rem;
    border: 1px solid #fecaca;
}

.auth-link {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* --- Dashboard --- */
.dashboard-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.dashboard-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.dashboard-section { margin-bottom: 2rem; }

.dashboard-section h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.8rem;
}

.text-muted { color: var(--text-muted); }

.sub-card {
    background: var(--bg-card);
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.sub-card.sub-cancelled { border-left-color: var(--error); }
.sub-card.sub-past_due { border-left-color: #f59e0b; }

.sub-plan { font-size: 1.1rem; font-weight: 600; display: block; }
.sub-amount { color: var(--text-muted); font-size: 0.9rem; }

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.status-active { background: #dcfce7; color: #166534; }
.status-cancelled { background: #fee2e2; color: #991b1b; }
.status-pending { background: #fef3c7; color: #92400e; }
.status-past_due { background: #ffedd5; color: #9a3412; }

.service-card {
    background: var(--bg-card);
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    margin-bottom: 1rem;
}

.service-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.credentials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.cred-block {
    background: var(--bg-elevated);
    padding: 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.cred-block h4 {
    margin-bottom: 0.75rem;
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.cred-block dl {
    display: grid;
    grid-template-columns: minmax(80px, 100px) 1fr;
    gap: 0.35rem 0.5rem;
    font-size: 0.875rem;
}

.cred-block dt { color: var(--text-muted); font-weight: 500; }
.cred-block dd { margin: 0; word-break: break-all; }

.cred-block code {
    background: var(--bg);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.8rem;
    color: var(--text);
}

.config-textarea {
    width: 100%;
    font-family: ui-monospace, monospace;
    font-size: 0.82rem;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    margin-top: 0.5rem;
    resize: vertical;
}

.empty-state {
    background: var(--bg-card);
    padding: 2.5rem 1.5rem;
    border-radius: var(--radius-lg);
    text-align: center;
    color: var(--text-muted);
    border: 1px dashed var(--border);
}

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.card {
    background: var(--bg-card);
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

/* --- Site footer (dark) --- */
.site-footer {
    background: var(--bg-dark);
    color: var(--text-muted-dark);
    margin-top: 3rem;
    padding: 3rem 0 0;
    font-size: 0.875rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
    padding-bottom: 2rem;
}

.footer-brand strong { color: #fff; font-size: 1.1rem; display: block; margin-bottom: 0.5rem; }
.footer-brand p { line-height: 1.55; max-width: 280px; }

.footer-col h4 {
    color: #fff;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.footer-col a {
    display: block;
    color: var(--text-muted-dark);
    padding: 0.25rem 0;
    text-decoration: none;
}
.footer-col a:hover { color: #fff; }

.footer-bottom {
    border-top: 1px solid #1f2937;
    padding: 1.25rem 0;
    text-align: center;
}

/* --- Trust bar --- */
.trust-bar {
    background: var(--bg-elevated);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 1.25rem 0;
}

.trust-bar-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem 3rem;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    font-size: 0.925rem;
    color: var(--text);
}

.trust-icon { font-size: 1.1rem; }

/* --- Section titles --- */
.section-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
    text-align: center;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
}

/* --- Pricing featured --- */
.pricing-card-featured {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent), var(--shadow);
    position: relative;
}

.pricing-card-focused {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent), 0 8px 24px rgba(37, 99, 235, 0.15);
    position: relative;
}

.pricing-badge {
    position: absolute;
    top: -0.65rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    white-space: nowrap;
}

.pricing-annual {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: -0.75rem;
    margin-bottom: 1rem;
}

.pricing-discount {
    color: var(--success);
    font-weight: 600;
    font-size: 0.75rem;
}

.pricing-form { margin-bottom: 0.5rem; }

.pricing-card-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: -0.5rem 0 0.85rem;
}

.pricing-auth-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-align: center;
    margin: 0.65rem 0 0;
    line-height: 1.5;
}

/* --- Provisionnement --- */
.provision-section { margin-bottom: 1.5rem; }
.provision-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
}
.provision-progress { margin-top: 0.65rem; }
.provision-progress-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.85rem;
    margin-bottom: 0.35rem;
}
.provision-progress-eta { color: var(--text-muted); white-space: nowrap; }
.provision-progress-track {
    height: 8px;
    background: var(--border);
    border-radius: 999px;
    overflow: hidden;
}
.provision-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #60a5fa);
    border-radius: 999px;
    transition: width 0.4s ease;
}
.provision-progress-pct {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-muted);
    font-size: 0.75rem;
}
.provision-progress-error .provision-progress-fill { background: #ef4444; }

.subdomain-input-group {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    max-width: 420px;
}
.subdomain-input-group input { flex: 1; }
.subdomain-suffix { color: var(--text-muted); font-size: 0.9rem; white-space: nowrap; }
.file-bulk-toolbar { margin-bottom: 0.75rem; display: flex; gap: 0.5rem; flex-wrap: wrap; }
.file-manager-table input[type="checkbox"],
.file-manager-table .file-check {
    width: 1.15rem;
    height: 1.15rem;
    min-width: 1.15rem;
    min-height: 1.15rem;
    accent-color: #2563eb;
    cursor: pointer;
    vertical-align: middle;
    opacity: 1;
    appearance: auto;
    -webkit-appearance: checkbox;
    display: inline-block;
    position: static;
}
.file-manager-table .file-check-col {
    width: 2.75rem;
    text-align: center;
    vertical-align: middle;
}
.file-manager-table input[type="checkbox"]:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
.btn-warn {
    border-color: #f59e0b;
    color: #b45309;
}
.btn-warn:hover {
    background: #fffbeb;
}

/* Terminal conteneur */
.terminal-wrap {
    background: #0f172a;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #1e293b;
}
.terminal-output {
    min-height: 220px;
    max-height: 420px;
    overflow-y: auto;
    padding: 1rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.85rem;
    color: #e2e8f0;
}
.terminal-line { white-space: pre-wrap; word-break: break-word; margin-bottom: 0.35rem; }
.terminal-line.terminal-cmd { color: #93c5fd; }
.terminal-line.terminal-err { color: #fca5a5; }
.terminal-line.terminal-muted { color: #64748b; }
.terminal-input-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
    background: #1e293b;
    border-top: 1px solid #334155;
}
.terminal-prompt { color: #4ade80; font-family: monospace; font-weight: 600; }
.terminal-input-row input {
    flex: 1;
    background: #0f172a;
    border: 1px solid #334155;
    color: #f8fafc;
    padding: 0.45rem 0.65rem;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.85rem;
}

/* Éditeur de fichiers */
.file-editor-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.file-editor-modal:not([hidden]) {
    display: flex;
}
.file-editor-dialog {
    background: var(--card-bg, #fff);
    border-radius: 10px;
    width: min(960px, 100%);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}
.file-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border, #e2e8f0);
}
.file-editor-header h3 { margin: 0; font-size: 1rem; }
.file-editor-dialog .CodeMirror {
    flex: 1;
    min-height: 360px;
    font-size: 0.9rem;
}
#file-editor-content {
    flex: 1;
    min-height: 360px;
    width: 100%;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.9rem;
    padding: 0.75rem;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 6px;
    resize: vertical;
}
.file-editor-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--border, #e2e8f0);
}
.btn-edit-file { margin-left: 0.5rem; vertical-align: middle; }
.service-actions-row { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.inline-form { display: inline; }
.danger-zone {
    border: 1px solid #fecaca;
    background: #fef2f2;
    border-radius: 8px;
    padding: 1rem 1.25rem;
}
.danger-zone h3 { margin: 0 0 0.5rem; font-size: 1rem; color: #b91c1c; }
.btn-danger {
    background: #dc2626;
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
}
.btn-danger:hover { background: #b91c1c; }

.pricing-auth-hint a { color: var(--accent); }

.billing-sub-card {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}

.billing-sub-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.billing-cancel-notice {
    display: block;
    color: #92400e;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.btn-danger-outline {
    color: #dc2626 !important;
    border-color: #fecaca !important;
}

.inline-form { display: inline; }

.pricing-note {
    margin-top: 2rem;
    padding: 1rem 1.25rem;
    background: var(--accent-soft);
    border-radius: var(--radius);
    font-size: 0.9rem;
    color: var(--text-muted);
}

.pricing-card li::before { content: "✓"; color: var(--accent); margin-right: 0.5rem; font-weight: 700; }

/* --- Promise --- */
.promise {
    padding: 2rem 0;
    background: var(--bg-elevated);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.promise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem;
}

.promise-item {
    font-size: 0.9rem;
    color: var(--text-muted);
    padding: 0.5rem 0;
}

/* --- FAQ --- */
.faq { padding: 3rem 0; }

.faq-list { max-width: 720px; margin: 2rem auto 0; }

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
    overflow: hidden;
}

.faq-item summary {
    padding: 1rem 1.25rem;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item p {
    padding: 0 1.25rem 1rem;
    color: var(--text-muted);
    font-size: 0.925rem;
    line-height: 1.55;
}

/* --- Nav status --- */
.nav-status {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.15s;
}

.nav-status:hover { color: var(--text); }

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* --- Dashboard table --- */
.section-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.services-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
}

.services-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    font-size: 0.9rem;
}

.services-table th,
.services-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

.services-table th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    background: var(--bg);
}

.service-card-detail { margin-top: 1rem; }

@media (max-width: 768px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .trust-bar-inner { flex-direction: column; align-items: center; gap: 1rem; }
    .nav-status { display: none; }
}

.upload-form { max-width: 420px; margin-bottom: 1rem; }

.usage-bar-wrap { max-width: 420px; }
.usage-bar-label { font-size: 0.9rem; margin-bottom: 0.5rem; }
.usage-bar {
    height: 8px;
    background: var(--border);
    border-radius: 999px;
    overflow: hidden;
}
.usage-bar-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 999px;
    transition: width 0.3s;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .nav-toggle { display: flex; }

    .nav-links {
        position: fixed;
        top: var(--header-h);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        background: var(--bg-elevated);
        border-bottom: 1px solid var(--border);
        padding: 0.75rem;
        gap: 0.25rem;
        transform: translateY(-110%);
        opacity: 0;
        visibility: hidden;
        transition: transform 0.25s, opacity 0.25s, visibility 0.25s;
        box-shadow: var(--shadow);
    }

    .nav-links.is-open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-links a,
    .nav-links .btn {
        width: 100%;
        text-align: center;
    }

    .hero { padding: 2.5rem 0 2rem; }

    .hero-actions { flex-direction: column; }
    .hero-actions .btn { width: 100%; }

    .dashboard-header { flex-direction: column; align-items: flex-start; }

    .cred-block dl { grid-template-columns: 1fr; }
    .cred-block dt { margin-top: 0.5rem; }
}

@media (min-width: 769px) {
    body:not(.console-body) { display: flex; flex-direction: column; min-height: 100vh; }
    main { flex: 1; }
}

/* --- Console client (sidebar) --- */
body.console-body {
    display: flex;
    min-height: 100vh;
    margin: 0;
}

.console-sidebar {
    width: 240px;
    background: var(--bg-sidebar);
    border-right: 1px solid #1f2937;
    padding: 1.25rem 0;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.console-brand {
    font-weight: 700;
    font-size: 1.1rem;
    padding: 0 1.25rem 0.5rem;
    color: #fff;
}

.console-project {
    padding: 0 1.25rem 1rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid #1f2937;
    font-size: 0.8rem;
    color: var(--text-muted-dark);
}

.console-nav { display: flex; flex-direction: column; flex: 1; }
.console-nav a {
    padding: 0.65rem 1.25rem;
    color: var(--text-muted-dark);
    text-decoration: none;
    font-size: 0.925rem;
}
.console-nav a:hover, .console-nav a.active {
    background: rgba(37, 99, 235, 0.15);
    color: var(--text-on-dark);
}
.console-nav-danger { color: #f87171 !important; }

.console-help {
    margin-top: auto;
    padding: 1rem 1.25rem;
    border-top: 1px solid #1f2937;
    font-size: 0.8rem;
    color: var(--text-muted-dark);
}
.console-help a { color: var(--accent); font-size: 0.85rem; }

.console-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--bg);
}

.console-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.75rem;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.console-page-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.02em;
}

.console-topbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.console-user-menu {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 0.85rem;
}

.console-user-name { font-weight: 600; color: var(--text); }
.console-user-email { color: var(--text-muted); font-size: 0.78rem; }

.console-content {
    padding: 1.5rem 1.75rem 2rem;
    flex: 1;
    max-width: 1200px;
    width: 100%;
}

.console-page-intro { margin-bottom: 1.25rem; }
.console-metrics { margin-bottom: 1.5rem; }

.console-nav-divider {
    height: 1px;
    background: #1f2937;
    margin: 0.75rem 1.25rem;
}

.console-nav-muted { opacity: 0.85; font-size: 0.875rem !important; }

.console-quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.quick-action-card {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1rem 1.15rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--text);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.quick-action-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow);
}

.quick-action-card span { font-size: 0.85rem; color: var(--text-muted); }
.quick-action-highlight { border-color: rgba(37, 99, 235, 0.35); background: var(--accent-soft); }

.stat-card-accent { border-left: 3px solid var(--accent); }
.stat-hint { display: block; margin-top: 0.35rem; font-size: 0.75rem; color: var(--text-muted); }

.sub-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0.75rem;
}

.type-pill {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    background: var(--accent-soft);
    color: var(--accent);
}

.empty-state-inline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
}

.alert-error {
    background: #fef2f2;
    color: #991b1b;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    border: 1px solid #fecaca;
}

.section-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
}

.section-header-row h2 { margin: 0; font-size: 1.1rem; }

.console-nav-toggle {
    display: none;
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 50;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: var(--shadow);
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    border: 1px solid #bbf7d0;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
}

.dashboard-stats { margin-bottom: 2rem; }
.stat-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem; }
.stat-card p { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.stat-value { font-size: 1.75rem; font-weight: 700; color: var(--accent); margin-top: 0.35rem; }
.stat-sm { font-size: 1.1rem !important; }

.data-table { width: 100%; border-collapse: collapse; background: var(--bg-card); }
.data-table th, .data-table td { padding: 0.65rem 0.85rem; border-bottom: 1px solid var(--border); text-align: left; font-size: 0.9rem; }
.data-table th { color: var(--text-muted); font-size: 0.75rem; text-transform: uppercase; }

.form-group textarea, .form-group select {
    width: 100%;
    padding: 0.75rem 0.9rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 1rem;
}

.ticket-thread { display: flex; flex-direction: column; gap: 1rem; margin: 1rem 0 1.5rem; }

.ticket-message {
    padding: 1rem 1.15rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--bg-card);
}

.ticket-message-staff { border-left: 3px solid var(--accent); background: var(--accent-soft); }

.ticket-message-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

.ticket-message-meta time { color: var(--text-muted); margin-left: auto; font-size: 0.78rem; }

.ticket-staff-badge {
    font-size: 0.7rem;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    background: var(--accent);
    color: #fff;
    font-weight: 600;
}

.ticket-message-body { line-height: 1.55; }

.ticket-form { max-width: 640px; }

.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.status-open { background: #dbeafe; color: #1e40af; }
.status-in_progress { background: #fef3c7; color: #92400e; }
.status-waiting_customer { background: #fce7f3; color: #9d174d; }
.status-resolved { background: #dcfce7; color: #166534; }
.status-closed { background: #f1f5f9; color: #64748b; }

@media (max-width: 600px) {
    .form-row-2 { grid-template-columns: 1fr; }
}

/* --- Page statut des services --- */
.status-page {
    padding: 3rem 0 4rem;
}

.status-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 2rem;
}

.status-header h1 {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    margin-bottom: 0.75rem;
}

.status-intro {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
}

.status-overall-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 1rem;
}

.status-overall-ok {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.status-overall-warn {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.status-overall-down {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.status-overall-unknown {
    background: var(--bg-card);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.status-overall-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-overall-ok .status-overall-dot { background: #22c55e; }
.status-overall-warn .status-overall-dot { background: #f59e0b; }
.status-overall-down .status-overall-dot { background: #ef4444; }
.status-overall-unknown .status-overall-dot { background: var(--text-muted); }

.status-checked-at {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.status-components {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.status-row-left {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    min-width: 0;
}

.status-row-left strong {
    display: block;
    font-size: 0.95rem;
}

.status-row-msg {
    display: block;
    color: var(--text-muted);
    font-size: 0.82rem;
    margin-top: 0.15rem;
}

.status-row-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.status-latency {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-top: 0.35rem;
    flex-shrink: 0;
}

.status-indicator-operational { background: #22c55e; }
.status-indicator-degraded { background: #f59e0b; }
.status-indicator-major_outage { background: #ef4444; }
.status-indicator-unknown { background: #94a3b8; }

.status-pill {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    white-space: nowrap;
}

.status-pill-operational { background: #dcfce7; color: #166534; }
.status-pill-degraded { background: #fef3c7; color: #92400e; }
.status-pill-major_outage { background: #fee2e2; color: #991b1b; }
.status-pill-unknown { background: #f1f5f9; color: #64748b; }

.status-note {
    max-width: 720px;
    margin: 2rem auto 0;
    padding: 1rem 1.25rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    color: var(--text-muted);
    text-align: center;
}

.status-note a { color: var(--accent); }

@media (max-width: 600px) {
    .status-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .status-row-right {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 768px) {
    body.console-body { flex-direction: column; }
    .console-sidebar {
        position: fixed;
        top: 0; left: 0; bottom: 0;
        z-index: 100;
        transform: translateX(-100%);
        transition: transform 0.25s;
        box-shadow: var(--shadow);
    }
    .console-sidebar.is-open { transform: translateX(0); }
    .console-nav-toggle { display: block; }
    .console-content { padding: 1rem; padding-bottom: 4rem; }
    .console-topbar { padding: 1rem; }
}

/* --- Page service (console) --- */
.service-page [id^="service-"] { scroll-margin-top: 3.5rem; }
.service-page .dashboard-section-compact h2 { margin-bottom: 0.65rem; }
.service-section-lead { font-size: 0.88rem; margin-bottom: 0.75rem; }

.service-subnav {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.35rem;
    margin-bottom: 1rem;
    padding: 0.35rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    position: sticky;
    top: 0.5rem;
    z-index: 20;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.service-subnav-link {
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
    flex-shrink: 0;
}

.service-subnav-link:hover {
    background: var(--accent-soft);
    color: var(--accent);
}

.service-subnav-pages .service-subnav-link.is-active {
    background: var(--accent);
    color: #fff;
}

.dashboard-kpi-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.dashboard-kpi { padding: 0.85rem 1rem; }

.dashboard-kpi p {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.stat-kpi { font-size: 1.35rem !important; line-height: 1.2; }
.stat-kpi-text { font-size: 0.95rem !important; }

.health-badge {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
}

.health-ok { background: #dcfce7; color: #166534; }
.health-mid { background: #fef3c7; color: #92400e; }
.health-warn { background: #fee2e2; color: #991b1b; }
.health-muted { background: #f1f5f9; color: #64748b; }

.settings-panel { margin-bottom: 0; }
.account-delete-zone { grid-column: 1 / -1; }
.mfa-setup-area { margin: 0.5rem 0; }
.mfa-qr-wrap { text-align: center; margin: 0.75rem 0; }

@media (max-width: 900px) {
    .dashboard-kpi-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .dashboard-kpi-row { grid-template-columns: 1fr 1fr; }
}

.service-overview-grid {
    display: grid;
    grid-template-columns: minmax(200px, 280px) 1fr;
    gap: 1rem;
    align-items: start;
}

.service-info-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 0.85rem 1rem;
}

.service-info-row {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.88rem;
}

.service-info-row:last-child { border-bottom: none; }

.service-info-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    font-weight: 600;
}

.service-metrics-foot {
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

/* Jauges demi-cercle (style Proxmox) */
.pve-gauges {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.5rem;
}

.pve-gauge {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 0.5rem 0.35rem 0.65rem;
    text-align: center;
}

.pve-gauge-chart {
    position: relative;
    width: 100%;
    max-width: 110px;
    margin: 0 auto;
}

.pve-gauge-svg {
    display: block;
    width: 100%;
    height: auto;
}

.pve-gauge-track {
    stroke: #e8edf3;
}

.pve-gauge-arc {
    stroke: var(--accent);
    transition: stroke-dashoffset 0.4s ease;
}

.pve-gauge-ok .pve-gauge-arc { stroke: #22c55e; }
.pve-gauge-mid .pve-gauge-arc { stroke: #f59e0b; }
.pve-gauge-warn .pve-gauge-arc { stroke: #ef4444; }

.pve-gauge-center {
    position: absolute;
    left: 50%;
    bottom: 2px;
    transform: translateX(-50%);
    line-height: 1;
}

.pve-gauge-pct {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
}

.pve-gauge-io-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    bottom: 0;
}

.pve-io-line {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    line-height: 1.15;
}

.pve-gauge-io-card,
.pve-gauge-metric-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 88px;
    padding: 0.55rem 0.5rem 0.6rem;
    text-align: left;
}

.pve-metric-visual,
.pve-io-visual {
    width: 100%;
}

.pve-metric-head,
.pve-io-visual-head {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.45rem;
}

.pve-metric-icon,
.pve-io-visual-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 6px;
    flex-shrink: 0;
}

.pve-metric-visual-status .pve-metric-icon {
    color: #16a34a;
    background: rgba(22, 163, 74, 0.12);
}

.pve-gauge-mid.pve-gauge-metric-card .pve-metric-visual-status .pve-metric-icon {
    color: #d97706;
    background: rgba(217, 119, 6, 0.12);
}

.pve-gauge-warn.pve-gauge-metric-card .pve-metric-visual-status .pve-metric-icon {
    color: #dc2626;
    background: rgba(220, 38, 38, 0.12);
}

.pve-metric-visual-cpu .pve-metric-icon {
    color: #ea580c;
    background: rgba(234, 88, 12, 0.12);
}

.pve-metric-visual-memory .pve-metric-icon {
    color: #2563eb;
    background: rgba(37, 99, 235, 0.12);
}

.pve-metric-visual-disk .pve-metric-icon {
    color: #0891b2;
    background: rgba(8, 145, 178, 0.12);
}

.pve-metric-label,
.pve-io-visual-label {
    margin-top: 0 !important;
    text-align: left;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    font-weight: 600;
}

.pve-metric-body {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.pve-metric-track {
    height: 7px;
    background: #e8edf3;
    border-radius: 99px;
    overflow: hidden;
}

.pve-metric-fill {
    height: 100%;
    border-radius: 99px;
    min-width: 0;
    transition: width 0.45s ease;
}

.pve-metric-fill-ok {
    background: linear-gradient(90deg, #22c55e, #4ade80);
}

.pve-metric-fill-mid {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.pve-metric-fill-warn {
    background: linear-gradient(90deg, #ef4444, #f87171);
}

.pve-metric-values {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.35rem;
    min-width: 0;
}

.pve-metric-main {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.pve-metric-sub {
    font-size: 0.62rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: right;
    min-width: 0;
}

.pve-io-visual {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.pve-io-visual-network .pve-io-visual-icon {
    color: #2563eb;
    background: rgba(37, 99, 235, 0.12);
}

.pve-io-visual-disk .pve-io-visual-icon {
    color: #7c3aed;
    background: rgba(124, 58, 237, 0.12);
}

.pve-io-visual-bars {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.pve-io-visual-row {
    display: grid;
    grid-template-columns: 1rem 1fr auto;
    align-items: center;
    gap: 0.35rem;
}

.pve-io-visual-dir {
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
}

.pve-io-visual-dir-in { color: #2563eb; }
.pve-io-visual-dir-out { color: #059669; }

.pve-io-visual-disk .pve-io-visual-dir-in { color: #7c3aed; }
.pve-io-visual-disk .pve-io-visual-dir-out { color: #d97706; }

.pve-io-visual-track {
    height: 7px;
    background: #e8edf3;
    border-radius: 99px;
    overflow: hidden;
}

.pve-io-visual-fill {
    height: 100%;
    border-radius: 99px;
    min-width: 0;
    transition: width 0.45s ease;
}

.pve-io-visual-fill-in {
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
}

.pve-io-visual-fill-out {
    background: linear-gradient(90deg, #10b981, #34d399);
}

.pve-io-visual-disk .pve-io-visual-fill-in {
    background: linear-gradient(90deg, #7c3aed, #a78bfa);
}

.pve-io-visual-disk .pve-io-visual-fill-out {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.pve-io-visual-val {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    min-width: 2.5rem;
    text-align: right;
}

.pve-gauge-io .pve-gauge-track {
    opacity: 0.35;
}

.pve-gauge-status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25);
}

.pve-gauge-warn .pve-gauge-status-dot {
    background: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.25);
}

.pve-gauge-mid .pve-gauge-status-dot {
    background: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25);
}

.pve-gauge-status-only {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 88px;
    padding: 0.75rem 0.35rem;
}

.pve-status-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
}

.pve-gauge-status-dot-lg {
    width: 14px;
    height: 14px;
}

.pve-status-text {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: lowercase;
    color: var(--text);
}

.pve-gauge-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-top: 0.15rem;
    font-weight: 600;
}

.pve-gauge-value {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text);
    margin-top: 0.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 0.25rem;
}

.pve-gauge-hint {
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-top: 0.05rem;
}

.settings-block {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 0.85rem 1rem;
    margin-bottom: 0.75rem;
}

.settings-block:last-child { margin-bottom: 0; }

.settings-block-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.settings-subtitle {
    font-size: 0.85rem;
    font-weight: 600;
    margin: 1rem 0 0.5rem;
    color: var(--text);
}

.settings-divider {
    border: none;
    border-top: 1px solid var(--border, #e2e8f0);
    margin: 1.25rem 0;
}

.settings-form { max-width: 480px; margin: 0; }

.upload-form-compact .upload-form-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.75rem;
}

.upload-form-compact .form-group { flex: 1; min-width: 140px; margin-bottom: 0; }

.file-bulk-hint { font-size: 0.78rem; margin: 0.35rem 0 0.5rem; }

.file-move-input { max-width: 160px !important; display: inline-block !important; }

.alert-banner-compact {
    margin: 0.65rem 0 !important;
    padding: 0.55rem 0.75rem !important;
    font-size: 0.85rem;
}

.terminal-help { margin-bottom: 0.5rem; font-size: 0.85rem; }
.terminal-help summary { cursor: pointer; }
.terminal-help-body { font-size: 0.82rem; margin-top: 0.35rem; }
.terminal-help-body ul { margin: 0.25rem 0 0.5rem 1.1rem; }

.service-actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

@media (max-width: 900px) {
    .service-overview-grid { grid-template-columns: 1fr; }
    .pve-gauges { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 480px) {
    .service-subnav { top: 0; border-radius: var(--radius); }
    .pve-gauges { grid-template-columns: repeat(2, 1fr); gap: 0.35rem; }
}

/* Paiement */
.payment-method-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 0.85rem 1rem;
}

.payment-method-info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
}

.payment-method-brand {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--accent);
}

.payment-method-number {
    font-family: ui-monospace, monospace;
    font-size: 0.95rem;
}

/* Gestionnaire fichiers */
.file-manager-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.file-manager-actions .file-manager-toolbar,
.file-manager-actions .file-bulk-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0;
}

.file-manager-actions .file-bulk-toolbar {
    padding-left: 0.5rem;
    border-left: 1px solid var(--border);
}

.file-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.88rem;
    margin-bottom: 0.75rem;
}

@media (max-width: 640px) {
    .file-manager-actions .file-bulk-toolbar {
        padding-left: 0;
        border-left: none;
        width: 100%;
    }
}

.file-breadcrumb-sep { color: var(--text-muted); }
.file-breadcrumb-current { font-weight: 600; }
.file-breadcrumb-current { font-weight: 600; }

.file-manager-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.file-upload-modal[hidden],
.file-alert-modal[hidden] {
    display: none !important;
}

.file-upload-modal,
.file-alert-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(15, 23, 42, 0.45);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.file-upload-modal:not([hidden]),
.file-alert-modal:not([hidden]) {
    display: flex;
}

.file-alert-modal {
    z-index: 210;
}

.file-upload-dialog,
.file-alert-dialog {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    width: min(520px, 100%);
    max-height: 90vh;
    overflow: auto;
    padding: 1rem;
    box-shadow: var(--shadow);
}

.file-dropzone {
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem 1rem;
    text-align: center;
    margin: 0.75rem 0;
    transition: border-color 0.15s, background 0.15s;
}

.file-dropzone-active {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.file-dropzone-title { font-weight: 600; margin-bottom: 0.35rem; }
.file-dropzone-hint { font-size: 0.82rem; margin-bottom: 0.75rem; }

.file-upload-queue {
    list-style: none;
    margin: 0;
    padding: 0;
}

.file-upload-item {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 0.25rem 0.5rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.82rem;
}

.file-upload-name {
    grid-column: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-upload-status {
    grid-column: 2;
    grid-row: 1 / 3;
    align-self: center;
    font-weight: 600;
    min-width: 3rem;
    text-align: right;
}

.file-upload-progress {
    grid-column: 1;
    height: 4px;
    background: #e8edf3;
    border-radius: 2px;
    overflow: hidden;
}

.file-upload-bar {
    height: 100%;
    width: 0;
    background: var(--accent);
    transition: width 0.15s;
}

.file-upload-ok .file-upload-bar { background: #22c55e; }
.file-upload-err .file-upload-bar { background: #ef4444; }

.file-alert-dialog h3 { margin-bottom: 0.5rem; }
.file-alert-dialog p { margin-bottom: 1rem; font-size: 0.9rem; }

.file-bulk-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.file-sortable {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.file-sortable:hover {
    color: var(--accent);
}

.file-sort-active {
    color: var(--accent);
}

.file-sort-indicator {
    font-size: 0.65rem;
    opacity: 0.85;
}

.file-prompt-modal,
.file-move-modal,
.file-rename-modal,
.file-confirm-modal {
    position: fixed;
    inset: 0;
    z-index: 205;
    background: rgba(15, 23, 42, 0.45);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.file-prompt-modal[hidden],
.file-move-modal[hidden],
.file-rename-modal[hidden],
.file-confirm-modal[hidden] {
    display: none !important;
}

.file-prompt-modal:not([hidden]),
.file-move-modal:not([hidden]),
.file-rename-modal:not([hidden]),
.file-confirm-modal:not([hidden]) {
    display: flex;
}

.file-prompt-dialog,
.file-move-dialog {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    width: min(480px, 100%);
    max-height: 90vh;
    overflow: auto;
    padding: 1rem;
    box-shadow: var(--shadow);
}

.file-move-dialog {
    width: min(520px, 100%);
}

.file-prompt-dialog h3,
.file-move-dialog h3 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
}

.file-prompt-label {
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.file-prompt-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1rem;
}

.file-move-hint {
    font-size: 0.85rem;
    margin: 0.5rem 0;
}

.file-move-tree {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    max-height: 280px;
    overflow: auto;
    margin: 0.5rem 0;
    padding: 0.35rem 0;
    font-size: 0.88rem;
}

.file-move-tree-row {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.file-move-tree-toggle {
    background: none;
    border: none;
    cursor: pointer;
    width: 1.25rem;
    padding: 0;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.file-move-tree-toggle:disabled {
    opacity: 0.35;
    cursor: default;
}

.file-move-tree-select {
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    padding: 0.2rem 0.35rem;
    border-radius: 4px;
    flex: 1;
    font-size: 0.88rem;
}

.file-move-tree-select:hover {
    background: var(--accent-soft);
}

.file-move-tree-select.file-move-tree-selected {
    background: var(--accent-soft);
    font-weight: 600;
    outline: 1px solid var(--accent);
}

.file-move-tree-children {
    display: none;
}

.file-move-tree-children.file-move-tree-open {
    display: block;
}

#file-prompt-input,
#file-rename-input {
    width: 100%;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.radio-row { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.radio-row label { font-weight: 500; cursor: pointer; }
.auth-form-wide { max-width: 520px; }
.dns-instructions { margin: 0.75rem 0; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
