/* ==========================================================================
   DESIGN SYSTEM & VARIABLES — Vitrine RestIA (iso application)
   ========================================================================== */

:root {
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --border-color: #334155;
    /* Palette de marque RestIA UNIFIÉE avec l'application : bleu canard / océan.
       Auparavant : indigo → violet → rose. */
    --accent: #0091c7; /* Bleu canard — accent principal (= app sombre) */
    --accent-glow: rgba(0, 145, 199, 0.35);
    --accent-indigo: #0077a3; /* Teal profond */
    --accent-secondary: #38bdf8; /* Teal lumineux */
    --brand-gradient: var(--accent); /* aplat teal (flat, iso app) */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-title: 'Outfit', sans-serif;
    --success: #10b981;
    --danger: #ef4444;
}

/* Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.5;
}

body {
    position: relative;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Orbes lumineux supprimés : flat design strict, iso avec l'application. */
.glow,
.glow-1,
.glow-2 {
    display: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Class Utils */
.glass {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

.text-gradient {
    /* Aplat teal lumineux (flat, iso app — pas de dégradé). */
    color: var(--accent-secondary);
}

.badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 9999px;
    background: rgba(0, 145, 199, 0.15);
    border: 1px solid rgba(0, 145, 199, 0.3);
    color: #38bdf8;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 16px;
    font-family: var(--font-title);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #fbbf24;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}
.btn-primary {
    background: var(--accent);
    color: #fff;
    border: none;
}
.btn-primary:hover {
    background: #0077a3;
    transform: translateY(-2px);
}
.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}
.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}
.btn-outline:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Header */
header {
    height: 80px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-dark);
}

.nav-container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}
.logo-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.logo-text {
    font-family: var(--font-title);
    font-weight: 800;
    font-size: 18px;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

nav {
    display: flex;
    align-items: center;
    gap: 24px;
}
nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}
nav a:hover {
    color: var(--text-primary);
}

/* Hero Section */
.hero {
    padding: 80px 0;
    text-align: center;
}
.hero-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.hero h1 {
    font-family: var(--font-title);
    font-size: 56px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -1.5px;
    margin-bottom: 24px;
    max-width: 800px;
}
.hero-desc {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 650px;
    margin-bottom: 36px;
    line-height: 1.6;
}
.hero-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.hero-badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.hero-beta-note {
    font-size: 14px;
    color: var(--text-secondary);
    max-width: 620px;
    margin: 0 auto 64px;
    line-height: 1.6;
}

.hero-beta-note a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
}

.hero-beta-note a:hover {
    text-decoration: underline;
}

/* Hero Mockup (App Visual simulation) */
.hero-mockup {
    width: 100%;
    max-width: 900px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    aspect-ratio: 16/10;
    display: flex;
    flex-direction: column;
}
.mockup-header {
    height: 40px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 8px;
}
.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.dot.red { background: #ef4444; }
.dot.yellow { background: #f59e0b; }
.dot.green { background: #10b981; }
.mockup-title {
    font-size: 11.5px;
    color: var(--text-muted);
    margin-left: 8px;
}
.mockup-body {
    flex: 1;
    background: rgba(0,0,0,0.15);
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
.mockup-chat {
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: left;
}
.chat-msg {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}
.msg-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
}
.chat-msg.assistant .msg-avatar {
    background: var(--brand-gradient);
    font-size: 10px;
}
.font-logo {
    font-family: var(--font-title);
}
.msg-text {
    flex: 1;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-color);
    border-radius: 0 8px 8px 8px;
    padding: 12px 16px;
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--text-primary);
}
.chat-msg.user .msg-text {
    background: rgba(0, 145, 199, 0.10);
    border-color: rgba(0, 145, 199, 0.25);
    border-radius: 8px 0 8px 8px;
}

/* Inline Validation UI Simulation */
.mockup-validation {
    margin-top: 12px;
    border-radius: 6px;
    padding: 12px;
    border: 1px solid rgba(245, 158, 11, 0.4);
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.05);
}
.validation-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
}
.tool-tag {
    font-size: 10px;
    background: rgba(255,255,255,0.05);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--text-muted);
}
.validation-args {
    font-size: 11.5px;
    color: var(--text-secondary);
    background: rgba(0,0,0,0.2);
    padding: 6px 8px;
    border-radius: 4px;
}
.validation-actions {
    display: flex;
    gap: 8px;
    align-self: flex-end;
}
.btn-mock {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    border: none;
    cursor: pointer;
}
.btn-approve {
    background: var(--accent);
    color: #fff;
}
.btn-reject {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.15);
}

/* Features Grid */
.features {
    padding: 100px 0;
    border-top: 1px solid var(--border-color);
}
.section-title {
    text-align: center;
    font-family: var(--font-title);
    font-size: 38px;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 16px;
}
.section-desc {
    text-align: center;
    color: var(--text-secondary);
    font-size: 16px;
    max-width: 600px;
    margin: 0 auto 64px auto;
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.card {
    padding: 32px;
    border-radius: 12px;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.04);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}

/* Élévation au survol : cartes de tarifs et de téléchargement. */
.plan-card,
.download-card {
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.plan-card:hover,
.download-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}

/* Reveal au scroll (piloté par script.js ; contenu visible par défaut). */
.reveal-init {
    opacity: 0;
    transform: translateY(16px);
}
.reveal-in {
    opacity: 1;
    transform: none;
    transition: opacity 0.5s ease, transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}
@media (prefers-reduced-motion: reduce) {
    .reveal-init { opacity: 1; transform: none; }
}
.card-icon {
    font-size: 28px;
    margin-bottom: 20px;
    color: var(--accent);
    line-height: 0;
}
.card-icon svg { display: block; }
.card h3 {
    font-family: var(--font-title);
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}
.card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Security Focus Section */
.security-focus {
    padding: 100px 0;
    border-top: 1px solid var(--border-color);
}
.security-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}
.security-text h2 {
    font-family: var(--font-title);
    font-size: 38px;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 20px;
}
.security-text p {
    color: var(--text-secondary);
    font-size: 15.5px;
    margin-bottom: 24px;
    line-height: 1.6;
}
.security-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.security-list li {
    font-size: 14px;
    color: var(--text-secondary);
    position: relative;
    padding-left: 20px;
}
.security-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
}
.security-list strong {
    color: var(--text-primary);
}

.security-visual {
    border-radius: 12px;
    padding: 32px;
}
.mcp-permissions-mock {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
}
.perm-title {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-family: var(--font-title);
}
.perm-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 13px;
}
.tag-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: auto;
}
.tag-badge.green {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}
.tag-badge.orange {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

/* Download Section */
.download {
    padding: 100px 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
}
.download h2 {
    font-family: var(--font-title);
    font-size: 38px;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 16px;
}
.download-desc {
    color: var(--text-secondary);
    font-size: 16px;
    max-width: 600px;
    margin: 0 auto 64px auto;
}
.download-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 48px;
}
.download-card {
    border-radius: 12px;
    padding: 40px 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.dl-os {
    font-family: var(--font-title);
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 8px;
}
.dl-details {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 32px;
}
.btn-dl {
    width: 100%;
}
.github-link-note {
    font-size: 13.5px;
    color: var(--text-muted);
}
.github-link-note a {
    color: var(--text-secondary);
    text-decoration: underline;
}

/* Footer */
footer {
    border-top: 1px solid var(--border-color);
    padding: 48px 0;
    background: #040406;
}
.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.footer-left p {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 12px;
}
.footer-right p {
    font-size: 13px;
    color: var(--text-muted);
}

/* Bouton menu mobile — masqué sur desktop, affiché < 768px (voir plus bas). */
.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    cursor: pointer;
}
.nav-toggle:hover { border-color: var(--accent); }

/* Responsive */
@media (max-width: 992px) {
    .hero h1 {
        font-size: 44px;
    }
    .features-grid, .download-grid {
        grid-template-columns: 1fr 1fr;
    }
    .security-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 36px;
    }
    .hero-desc {
        font-size: 16px;
    }
    .features-grid, .download-grid {
        grid-template-columns: 1fr;
    }
    .footer-container {
        flex-direction: column;
        gap: 24px;
        text-align: center;
    }
    .footer-left {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    /* Menu mobile : la nav devient un panneau déroulant déclenché par le bouton. */
    .nav-toggle { display: inline-flex; }
    nav {
        display: none;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 16px 24px 24px;
        background: var(--bg-dark);
        border-bottom: 1px solid var(--border-color);
        z-index: 90;
    }
    nav.open { display: flex; }
    nav a, nav .btn, nav button { width: 100%; text-align: center; }
}

/* ==========================================================================
   TARIFS (pricing) — ajouté pour l'offre freemium
   ========================================================================== */
.pricing { padding: 100px 0; }
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 48px;
    align-items: stretch;
}
.plan-card { display: flex; flex-direction: column; gap: 18px; position: relative; padding: 32px; }
.plan-card.featured { border-color: var(--accent); }
.plan-badge {
    position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
    background: var(--accent); color: #fff; font-size: 0.72rem; font-weight: 700;
    letter-spacing: 0.04em; text-transform: uppercase; padding: 5px 14px; border-radius: 999px;
}
.plan-name { font-family: var(--font-title); font-size: 1.3rem; }
.plan-price { font-family: var(--font-title); font-size: 2.4rem; font-weight: 800; }
.plan-price span { font-size: 0.95rem; font-weight: 500; color: var(--text-secondary); }
.plan-list { list-style: none; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.plan-list li { position: relative; padding-left: 26px; color: var(--text-secondary); font-size: 0.92rem; }
.plan-list li::before { content: '✓'; position: absolute; left: 0; color: var(--success); font-weight: 700; }
.pricing-note { text-align: center; color: var(--text-muted); font-size: 0.85rem; margin-top: 32px; }

/* Tableau comparatif des plans — défilable horizontalement sur petit écran. */
.compare-wrap { margin-top: 56px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.compare-table {
    width: 100%;
    min-width: 640px;
    border-collapse: collapse;
    font-size: 0.92rem;
}
.compare-table th, .compare-table td {
    padding: 14px 18px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}
.compare-table thead th {
    font-family: var(--font-title);
    font-size: 1rem;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
}
.compare-table tbody td:first-child,
.compare-table thead th:first-child {
    text-align: left;
    color: var(--text-secondary);
    font-weight: 500;
}
.compare-table .col-featured {
    background: rgba(0, 145, 199, 0.08);
    color: var(--text-primary);
}
.compare-table thead .col-featured { color: var(--accent); }
.compare-table .yes { color: var(--success); font-weight: 700; }
.compare-table .no { color: var(--text-muted); }

/* ==========================================================================
   FAQ — accordéon natif <details>
   ========================================================================== */
.faq { padding: 90px 0; }
.faq-list { max-width: 820px; margin: 48px auto 0; display: flex; flex-direction: column; gap: 12px; }
.faq-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 4px 20px;
    transition: border-color 0.2s ease;
}
.faq-item[open] { border-color: var(--accent); }
.faq-item > summary {
    list-style: none;
    cursor: pointer;
    padding: 16px 0;
    font-weight: 600;
    font-size: 1.02rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary::after {
    content: '+';
    color: var(--accent);
    font-size: 1.4rem;
    line-height: 1;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}
.faq-item[open] > summary::after { content: '−'; }
.faq-item p {
    margin: 0 0 18px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.65;
}

/* Avis sur les pages légales (visible en EN : la version FR fait foi). Masqué
   quand vide (en FR, le texte par défaut est vide → :empty le cache). */
.legal-notice:empty { display: none; }
.legal-notice {
    margin: 16px 0 8px;
    padding: 12px 18px;
    border-radius: 12px;
    background: rgba(0, 145, 199, 0.08);
    border: 1px solid rgba(0, 145, 199, 0.25);
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Téléchargement indisponible (mac : en cours d'implémentation) */
.download-card.soon { opacity: 0.6; }
.btn.disabled { pointer-events: none; opacity: 0.7; cursor: default; }

/* ==========================================================================
   MODALES (espace client, compte, téléchargement) + TOAST
   ========================================================================== */
.modal-overlay {
    position: fixed; inset: 0; z-index: 2000;
    display: flex; align-items: center; justify-content: center;
    background: rgba(2, 6, 23, 0.6); padding: 20px;
}
.modal {
    width: min(440px, 100%); position: relative;
    padding: 32px; border-radius: 20px;
    display: flex; flex-direction: column; gap: 14px;
}
.modal h3 { font-family: var(--font-title); font-size: 1.4rem; }
.modal-sub { color: var(--text-secondary); font-size: 0.85rem; }
.modal-close {
    position: absolute; top: 16px; right: 16px;
    background: none; border: none; color: var(--text-muted);
    font-size: 1.1rem; cursor: pointer;
}
.modal form { display: flex; flex-direction: column; gap: 12px; }
.modal input {
    padding: 12px 15px; border-radius: 12px;
    border: 1px solid var(--border-color); background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary); font-size: 0.92rem; font-family: inherit; outline: none;
}
.modal input:focus { border-color: var(--accent); }
.link-btn { background: none; border: none; color: var(--accent); cursor: pointer; font-size: 0.85rem; }
.form-error { color: var(--danger); font-size: 0.85rem; }
.account-row { display: flex; justify-content: space-between; font-size: 0.92rem; border-bottom: 1px solid var(--border-color); padding-bottom: 10px; }
.account-row span { color: var(--text-secondary); }
.account-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.btn.danger { color: var(--danger); border-color: rgba(239, 68, 68, 0.4); }
#btn-account { cursor: pointer; font-family: inherit; }

.toast {
    position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
    z-index: 2500; background: #16161f; border: 1px solid var(--border-color);
    color: var(--text-primary); padding: 13px 22px; border-radius: 14px;
    font-size: 0.88rem; box-shadow: 0 16px 50px rgba(0, 0, 0, 0.5);
}
[hidden] { display: none !important; }

/* ==========================================================================
   BACK-OFFICE ADMIN (page dédiée admin.html)
   Aligné sur la charte RestIA : aplats teal, aucun dégradé, aucun halo.
   L'ancienne version utilisait de l'indigo/violet (#6366f1 → #a855f7),
   hérité d'avant la refonte de marque, et jurait avec le reste du site.
   ========================================================================== */

/* --- utilitaires partagés --- */
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.icon { flex-shrink: 0; }
/* `.btn` est en inline-flex : `gap` n'espace que les boutons ayant réellement
   une icône ET un libellé. Un bouton icône seule (supprimer) reste compact.
   Une marge sur l'icône ne convenait pas : le SVG est le seul enfant *élément*,
   donc `:only-child` matchait même quand un libellé texte suivait. */
.btn { gap: 8px; }
.logo-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
}

/* --- en-tête de la page --- */
.admin-topnav {
    display: flex;
    align-items: center;
    gap: 12px;
}
.admin-whoami {
    color: var(--text-secondary);
    font-size: 0.85rem;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.admin-page {
    padding: 40px 0 80px;
    color: var(--text-primary);
}
.admin-page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}
.admin-page-title {
    margin: 0 0 6px;
    font-family: var(--font-title);
    font-size: 2rem;
    letter-spacing: -0.5px;
}
.admin-page-sub {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
}
.badge-admin {
    background: rgba(0, 145, 199, 0.15);
    border: 1px solid rgba(0, 145, 199, 0.35);
    color: var(--accent-secondary);
    padding: 6px 12px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    margin: 0;
    font-family: var(--font-title);
}

/* --- écran d'attente / refus d'accès --- */
.admin-gate {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.admin-gate-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    text-align: center;
    max-width: 420px;
    padding: 40px 32px;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-secondary);
}
.admin-gate-spinner {
    width: 26px;
    height: 26px;
    border: 2px solid var(--border-color);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: admin-spin 0.8s linear infinite;
}
.admin-gate.denied .admin-gate-spinner { display: none; }
@keyframes admin-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .admin-gate-spinner { animation: none; }
}

/* --- onglets --- */
.admin-nav-tabs {
    display: flex;
    gap: 6px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
    overflow-x: auto;
    /* Défilement horizontal sur petit écran, sans afficher de barre : elle
       apparaissait comme un artefact au bout de la rangée sur grand écran. */
    scrollbar-width: none;
}
.admin-nav-tabs::-webkit-scrollbar { display: none; }
.admin-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    padding: 12px 16px;
    margin-bottom: -1px;
    cursor: pointer;
    font-size: 0.9rem;
    font-family: inherit;
    font-weight: 500;
    white-space: nowrap;
    transition: color 0.2s ease, border-color 0.2s ease;
}
.admin-tab-btn:hover { color: var(--text-primary); }
.admin-tab-btn.active {
    color: var(--accent-secondary);
    border-bottom-color: var(--accent);
    font-weight: 600;
}
.admin-tab-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}

/* --- cartes de statistiques --- */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}
.admin-stat-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 18px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.admin-stat-card.highlight {
    background: rgba(0, 145, 199, 0.08);
    border-color: rgba(0, 145, 199, 0.35);
}
.stat-label {
    color: var(--text-secondary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.stat-value {
    font-size: 1.5rem;
    font-family: var(--font-title);
    color: var(--text-primary);
}

/* --- barre d'outils --- */
.admin-toolbar {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.admin-toolbar-split { justify-content: space-between; }
.admin-toolbar-end { justify-content: flex-end; margin: 16px 0 0; }
.admin-hint {
    color: var(--text-secondary);
    font-size: 0.88rem;
    margin: 0;
    max-width: 60ch;
}
.admin-hint code {
    background: rgba(255, 255, 255, 0.06);
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 0.85em;
}

/* --- champs --- */
.admin-input, .admin-select, .admin-textarea {
    padding: 9px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    font-size: 0.88rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s ease;
}
.admin-input:focus, .admin-select:focus, .admin-textarea:focus {
    border-color: var(--accent);
}
.admin-select option { background: var(--bg-card); color: var(--text-primary); }
.admin-textarea { min-height: 90px; resize: vertical; }
#adm-user-search { flex: 1 1 240px; }

/* --- tableaux --- */
.admin-table-container {
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.01);
}
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.87rem;
    text-align: left;
}
.admin-table th {
    background: rgba(255, 255, 255, 0.03);
    padding: 12px 14px;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}
.admin-table td {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    vertical-align: middle;
}
.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover { background: rgba(255, 255, 255, 0.02); }
.admin-table-empty {
    text-align: center;
    padding: 28px 16px !important;
    color: var(--text-secondary);
}
.matrix-table .admin-input { width: 100%; min-width: 110px; }
.cell-email { display: block; }
.cell-id {
    display: block;
    color: var(--text-muted);
    font-size: 0.72rem;
    margin-top: 2px;
}
.cell-actions { text-align: right; }
.cell-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent-secondary);
    text-decoration: none;
}
.cell-link:hover { text-decoration: underline; }
.cell-muted { color: var(--text-muted); }
.cell-warn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #fbbf24;
}
.btn-tiny {
    padding: 5px 10px;
    font-size: 0.78rem;
    font-weight: 500;
}
.badge-plan {
    padding: 3px 9px;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: capitalize;
}
.badge-plan.free { background: rgba(148, 163, 184, 0.18); color: #cbd5e1; }
.badge-plan.plus { background: rgba(56, 189, 248, 0.18); color: #7dd3fc; }
.badge-plan.premium { background: rgba(0, 145, 199, 0.22); color: var(--accent-secondary); }

/* --- formulaire de publication --- */
.admin-form-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: rgba(255, 255, 255, 0.02);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}
.admin-form-title {
    margin: 0;
    font-family: var(--font-title);
    font-size: 1.1rem;
    color: var(--text-primary);
}
.admin-section-gap { margin-top: 32px; margin-bottom: 14px; }
.form-row-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.admin-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    color: var(--text-secondary);
    cursor: pointer;
}
.admin-form-grid .btn { align-self: flex-start; }

@media (max-width: 640px) {
    .admin-page-title { font-size: 1.6rem; }
    .form-row-grid { grid-template-columns: 1fr; }
    .admin-whoami { display: none; }
    .admin-form-grid .btn { align-self: stretch; }
}
