/* Jetons repris du PMS et du site vitrine (ganexus-landing/src/style.css). */
:root {
    --background: hsl(228 100% 98.6%);
    --surface: #fff;
    --text: hsl(217 33% 12%);
    --muted: hsl(217 12% 42%);
    --border: hsl(220 20% 89%);
    --primary: hsl(217 62% 9%);
    --primary-hover: hsl(217 40% 15%);
    --success: hsl(161 100% 21%);
    --success-soft: hsl(161 60% 94%);
    --news: hsl(262 52% 42%);
    --news-soft: hsl(262 70% 96%);
    --danger: hsl(0 70% 45%);
    --radius: 0.75rem;
}

@media (prefers-color-scheme: dark) {
    :root {
        --background: hsl(217 45% 7%);
        --surface: hsl(217 35% 11%);
        --text: hsl(220 20% 92%);
        --muted: hsl(220 12% 65%);
        --border: hsl(217 25% 20%);
        --success: hsl(161 60% 45%);
        --success-soft: hsl(161 50% 14%);
        --news: hsl(262 70% 75%);
        --news-soft: hsl(262 35% 18%);
        --danger: hsl(0 75% 62%);
    }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
    margin: 0;
    background: var(--background);
    color: var(--text);
    font: 16px/1.6 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}

h1, h2, h3 { font-family: "Plus Jakarta Sans", Inter, sans-serif; line-height: 1.25; }
a { color: inherit; }
code { font-size: 0.85em; background: var(--background); border: 1px solid var(--border); border-radius: 4px; padding: 0 4px; }

.topbar { background: var(--primary); color: #fff; position: sticky; top: 0; z-index: 10; }
.topbar-inner {
    max-width: 920px; margin: 0 auto; padding: 12px 16px;
    display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { height: 24px; width: auto; }
.tabs { display: flex; gap: 4px; }
.tab {
    padding: 6px 16px; border-radius: 999px; text-decoration: none; font-weight: 500;
    color: hsl(220 20% 80%);
}
.tab:hover { color: #fff; background: hsl(217 40% 18%); }
.tab.is-active { background: #fff; color: var(--primary); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.link-light { color: hsl(220 20% 80%); text-decoration: none; font-size: 14px; }
.link-light:hover { color: #fff; }

.container { max-width: 920px; margin: 0 auto; padding: 32px 16px 64px; }
.intro h1 { margin: 0 0 4px; font-size: 32px; }
.intro p { margin: 0 0 32px; color: var(--muted); }
.empty { color: var(--muted); padding: 32px 0; }
.back { margin: 0 0 16px; font-size: 14px; color: var(--muted); }
.flash { background: var(--success-soft); color: var(--success); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 24px; font-weight: 500; }
.error { color: var(--danger); font-weight: 500; }
.muted { color: var(--muted); }

.post, .card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 24px; margin-bottom: 24px;
}
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; }
.post-date { color: var(--muted); margin-left: auto; }
.post-title { margin: 12px 0 8px; font-size: 24px; }
.post-title a { text-decoration: none; }
.post-title a:hover { text-decoration: underline; }
.post-body p, .post-body ul { margin: 0 0 12px; }
.post-body h3 { margin: 20px 0 8px; font-size: 18px; }
.post-body a { color: var(--success); }

.badge { font-weight: 600; padding: 2px 10px; border-radius: 999px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }
.badge-pms { background: var(--success-soft); color: var(--success); }
.badge-news { background: var(--news-soft); color: var(--news); }
.chip { border: 1px solid var(--border); border-radius: 999px; padding: 1px 10px; color: var(--muted); }
.chip-draft { border-color: hsl(38 90% 50%); color: hsl(38 90% 40%); }

.gallery { display: grid; gap: 8px; margin-top: 16px; }
.gallery-2 { grid-template-columns: 1fr 1fr; }
.gallery-3 { grid-template-columns: repeat(3, 1fr); }
.gallery img { width: 100%; height: 100%; max-height: 520px; object-fit: cover; border-radius: 8px; display: block; }
.gallery-2 img, .gallery-3 img { aspect-ratio: 4 / 3; }
.video-file, .video-embed { width: 100%; border-radius: 8px; margin-top: 16px; background: #000; display: block; }
.video-embed { aspect-ratio: 16 / 9; overflow: hidden; }
.video-embed iframe { width: 100%; height: 100%; border: 0; }

.pager { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 14px; }

.btn {
    display: inline-block; border: 1px solid var(--border); background: var(--surface); color: var(--text);
    padding: 8px 16px; border-radius: 8px; font: inherit; font-size: 14px; font-weight: 500;
    text-decoration: none; cursor: pointer;
}
.btn:hover { border-color: var(--muted); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-accent { background: var(--success); border-color: var(--success); color: #fff; }
.btn-ghost { background: transparent; }
.btn-danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn-sm { padding: 4px 10px; font-size: 13px; }
@media (prefers-color-scheme: dark) {
    .btn-primary { background: #fff; color: var(--primary); border-color: #fff; }
    .btn-primary:hover { background: hsl(220 20% 85%); }
}

form label { display: block; font-weight: 500; font-size: 14px; margin-bottom: 16px; }
input:not([type=checkbox]), select, textarea {
    display: block; width: 100%; margin-top: 6px; padding: 10px 12px;
    border: 1px solid var(--border); border-radius: 8px; background: var(--background); color: var(--text);
    font: inherit; font-weight: 400;
}
textarea { resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--success); outline-offset: 1px; }
fieldset { border: 1px dashed var(--border); border-radius: var(--radius); padding: 16px; margin: 0 0 16px; }
legend { font-weight: 600; padding: 0 6px; }
.help { font-size: 13px; color: var(--muted); margin: -8px 0 16px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.danger-zone { text-align: right; }
.inline { display: inline; }
.narrow { max-width: 420px; margin: 40px auto; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar h1 { margin: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.user-list { list-style: none; padding: 0; margin: 0 0 24px; }
.user-list li { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); }

.media-list { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.media-item { width: 140px; margin: 0; font-weight: 400; font-size: 13px; }
.media-item img, .media-item video { width: 140px; height: 100px; object-fit: cover; border-radius: 8px; display: block; margin-bottom: 4px; background: #000; }

.table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; font-size: 14px; }
.table th, .table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.table th { color: var(--muted); font-weight: 500; }
.table td a { font-weight: 500; text-decoration: none; }
.table td a:hover { text-decoration: underline; }

.footer { text-align: center; color: var(--muted); font-size: 13px; padding: 24px 16px 40px; }

@media (max-width: 640px) {
    .topbar-inner { gap: 12px; }
    .topbar-actions { margin-left: 0; width: 100%; justify-content: space-between; }
    .field-row, .grid-2 { grid-template-columns: 1fr; }
    .gallery-3 { grid-template-columns: 1fr 1fr; }
    .post { padding: 16px; }
    .post-date { margin-left: 0; width: 100%; }
    .table th:nth-child(4), .table td:nth-child(4), .table th:nth-child(5), .table td:nth-child(5) { display: none; }
}

.token { word-break: break-all; user-select: all; }
