/* Liseuse PDF — Espace éditeur (back-office + sign-in screens) */
@font-face { font-family: "Inter var"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/static/fonts/inter-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter var"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/static/fonts/inter-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --bg: #f4f6f9; --card: #fff; --raised: #fff; --ink: #0d1117; --ink-2: #3a4250; --muted: #6a7383; --faint: #98a1b0;
  --line: #e6e9ef; --line-2: #d5dae2; --hover: #f2f4f8;
  --blue: #146bff; --blue-ink: #1159d6; --blue-soft: #ebf2ff; --blue-line: #c4d8ff;
  --ok: #0c7a49; --ok-soft: #e6f6ee; --warn: #9a5b00; --warn-soft: #fff3dd; --off: #b42318; --off-soft: #fdeceb;
  --night: #0b1324; --side: #0b1324; --side-ink: #c9d3e4; --side-muted: #7f8ca3; --side-hover: rgb(255 255 255 / .06); --side-active: rgb(110 161 255 / .16);
  --radius: 14px; --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgb(13 17 23 / .05);
  --shadow: 0 1px 2px rgb(13 17 23 / .04), 0 6px 20px -6px rgb(13 17 23 / .10);
  --shadow-lg: 0 2px 6px rgb(13 17 23 / .06), 0 28px 60px -20px rgb(11 19 36 / .35);
  --focus: 0 0 0 3px rgb(20 107 255 / .18);
  color-scheme: light;
  font-family: "Inter var", Inter, "SF Pro Text", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "cv11", "ss01", "ss03";
  color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; font-size: 14px; line-height: 1.45;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0e15; --card: #111722; --raised: #161d2a; --ink: #e8edf5; --ink-2: #b9c3d3; --muted: #8590a3; --faint: #5f6a7d;
    --line: #1f2735; --line-2: #2a3445; --hover: #182031;
    --blue: #4d8dff; --blue-ink: #7fadff; --blue-soft: rgb(77 141 255 / .14); --blue-line: rgb(77 141 255 / .4);
    --ok: #4cc38a; --ok-soft: rgb(76 195 138 / .13); --warn: #e8a94a; --warn-soft: rgb(232 169 74 / .13); --off: #f07167; --off-soft: rgb(240 113 103 / .13);
    --side: #070a10; --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px -8px rgb(0 0 0 / .5); --shadow-lg: 0 30px 60px -20px rgb(0 0 0 / .7);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); }
a { color: var(--blue-ink); }
h1, h2, h3 { margin: 0; letter-spacing: -.022em; font-weight: 680; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12.5px; background: var(--blue-soft); color: var(--blue-ink); padding: 1px 5px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── app shell: side navigation + content ─────────────────────────────── */
.g-app { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.g-side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 18px; padding: 20px 14px 14px; background: var(--side); color: var(--side-ink);
  background-image: radial-gradient(120% 50% at 0 0, rgb(29 79 191 / .35), transparent 60%); }
.g-brand { display: flex; align-items: center; gap: 11px; padding: 2px 8px; color: #fff; text-decoration: none; }
.g-brand-text { display: grid; line-height: 1.2; }
.g-brand-text strong { font-size: 16.5px; font-weight: 720; letter-spacing: -.02em; }
.g-brand-text b { color: #6ea1ff; margin-left: 2px; }
.g-brand-text small { color: var(--side-muted); font-size: 12px; }
.g-brandmark { width: 26px; height: 31px; flex: none; border-radius: 3px 8px 8px 3px; background: linear-gradient(90deg, var(--blue) 0 6px, var(--ink) 6px); }
.g-side .g-brandmark, .a-side .g-brandmark { background: linear-gradient(90deg, #6ea1ff 0 6px, #f4f7fd 6px); }
.g-side-cta { justify-content: center; height: 40px; margin: 0 4px; box-shadow: 0 8px 20px -8px rgb(20 107 255 / .7); }
.g-nav { display: grid; gap: 2px; }
.g-nav-item { position: relative; display: flex; align-items: center; gap: 11px; height: 38px; padding: 0 12px; border-radius: 9px; color: var(--side-ink); text-decoration: none; font-weight: 550; font-size: 14px; }
.g-nav-item svg { color: var(--side-muted); flex: none; }
.g-nav-item:hover { background: var(--side-hover); color: #fff; }
.g-nav-item:hover svg { color: #fff; }
.g-nav-item.is-active { background: var(--side-active); color: #fff; }
.g-nav-item.is-active svg { color: #8fb6ff; }
.g-nav-item.is-active::before { content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: #6ea1ff; }
.g-pill { margin-left: auto; display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--blue); color: #fff; font-size: 11.5px; font-weight: 700; }
.g-side-foot { margin-top: auto; display: grid; gap: 4px; padding-top: 14px; border-top: 1px solid rgb(255 255 255 / .08); }
.g-me { display: flex; align-items: center; gap: 10px; padding: 6px 8px 8px; min-width: 0; }
.g-avatar { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 50%; background: linear-gradient(135deg, #2d6cf0, #6ea1ff); color: #fff; font-weight: 700; font-size: 12.5px; letter-spacing: .02em; }
.g-me-text { display: grid; min-width: 0; line-height: 1.25; }
.g-me-text strong { color: #fff; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-me-text small { color: var(--side-muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-nav-quiet { height: 34px; font-size: 13px; color: var(--side-muted); }
.g-main { padding: 28px 36px 72px; max-width: 1480px; width: 100%; min-width: 0; }

.g-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 22px; flex-wrap: wrap; }
.g-page-head h1 { font-size: 27px; letter-spacing: -.03em; line-height: 1.15; }
.g-page-head p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.g-page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.g-back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); text-decoration: none; font-weight: 550; font-size: 13px; margin-bottom: 8px; }
.g-back:hover { color: var(--ink); }

@media (max-width: 960px) {
  .g-app { grid-template-columns: 1fr; }
  .g-side { position: sticky; top: 0; z-index: 20; height: auto; flex-direction: row; align-items: center; gap: 10px; padding: 10px 12px; overflow-x: auto; scrollbar-width: none; }
  .g-side::-webkit-scrollbar { display: none; }
  .g-brand-text, .g-side-foot .g-me, .g-side-cta span { display: none; }
  .g-side-cta { margin: 0; width: 40px; padding: 0; flex: none; }
  .g-nav { display: flex; gap: 2px; }
  .g-nav-item { padding: 0 10px; white-space: nowrap; }
  .g-nav-item.is-active::before { display: none; }
  .g-side-foot { margin: 0 0 0 auto; border: 0; padding: 0; }
  .g-side-foot .g-nav-item span { display: none; }
  .g-main { padding: 20px 16px 56px; }
  .g-page-head h1 { font-size: 23px; }
}

/* ── buttons & inputs ─────────────────────────────────────────────────── */
.g-btn { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: var(--radius-sm); border: 1px solid var(--line-2); background: var(--card); color: var(--ink); font-weight: 600; font-size: 13.5px; text-decoration: none; cursor: pointer; white-space: nowrap; box-shadow: var(--shadow-sm); transition: background .12s, border-color .12s, transform .06s; }
.g-btn:hover { background: var(--hover); border-color: var(--line-2); }
.g-btn:active { transform: translateY(1px); }
.g-btn:disabled { opacity: .5; cursor: not-allowed; }
.g-btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.g-btn-primary:hover { background: var(--blue-ink); border-color: var(--blue-ink); color: #fff; }
@media (prefers-color-scheme: dark) { .g-btn-primary, .g-btn-primary:hover { color: #fff; background: #2f74f0; border-color: #2f74f0; } }
.g-btn-quiet { background: transparent; box-shadow: none; }
.g-btn-danger { color: var(--off); }
.g-btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; }
.g-btn.is-done { color: var(--ok); border-color: var(--ok); }
.g-block { display: flex; justify-content: center; width: 100%; height: 40px; }
.g-icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.g-icon-btn:hover { background: var(--hover); color: var(--ink); }
.g-icon-btn.is-done { color: var(--ok); }
.g-link { align-self: center; margin-left: auto; font-size: 13px; font-weight: 550; }
.g-input { width: 100%; height: 38px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--card); transition: border-color .12s, box-shadow .12s; }
.g-input:hover { border-color: #c3cad6; }
.g-input:focus { outline: 0; border-color: var(--blue); box-shadow: var(--focus); }
select.g-input, .g-toolbar select { appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236a7383' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; }
textarea.g-input { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.g-code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12.5px; background: var(--bg); }
.g-label { display: block; font-weight: 600; font-size: 13px; margin: 16px 0 7px; }
.g-label:first-child { margin-top: 0; }
.g-label .g-muted { font-weight: 400; }
.g-copy { display: flex; gap: 8px; align-items: flex-start; }
.g-copy .g-input { flex: 1; min-width: 0; }
.g-hint { margin: 10px 0 0; color: var(--muted); font-size: 12.5px; }
.g-muted { color: var(--muted); margin: 6px 0 0; }
.g-small { font-size: 12.5px; margin: -6px 0 14px; }
.g-select-sm { width: auto; min-width: 180px; }
.g-switch { position: relative; display: inline-block; width: 40px; height: 23px; flex: none; }
.g-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.g-switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--line-2); cursor: pointer; transition: background .15s; }
.g-switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .25); transition: transform .15s; }
.g-switch input:checked + span { background: var(--blue); }
.g-switch input:checked + span::after { transform: translateX(17px); }
.g-switch input:disabled + span { opacity: .45; cursor: not-allowed; }
.g-switch input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }

/* ── cards, panels, kpis ──────────────────────────────────────────────── */
.g-panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow-sm); }
.g-panel + .g-panel { margin-top: 16px; }
.g-panel h2 { font-size: 15px; margin-bottom: 14px; }
.g-panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.g-panel-head h2 { margin: 0; }
.g-panel-head .g-muted { margin: 0; font-size: 12.5px; }
.g-panel-head a { font-size: 13px; font-weight: 600; text-decoration: none; }
.g-h3 { font-size: 13.5px; margin: 22px 0 12px; }
.g-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.g-kpi { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow-sm); overflow: hidden; }
.g-kpi span { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12.5px; font-weight: 550; }
.g-kpi span svg { color: var(--faint); }
.g-kpi strong { display: block; margin-top: 8px; font-size: 27px; font-weight: 700; letter-spacing: -.035em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.g-kpi small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.g-kpi .up { color: var(--ok); font-weight: 650; }
.g-kpi .down { color: var(--off); font-weight: 650; }
.g-two { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; }
.g-two > .g-panel + .g-panel { margin-top: 0; }
.g-three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.g-toast { display: flex; align-items: center; gap: 8px; background: var(--ok-soft); color: var(--ok); font-weight: 600; border-radius: 10px; padding: 11px 14px; margin-bottom: 18px; animation: g-in .25s ease-out; }
.g-toast-warn { background: var(--warn-soft); color: var(--warn); }
@keyframes g-in { from { opacity: 0; transform: translateY(-4px); } }
.g-error { margin: 14px 0 0; color: var(--off); background: var(--off-soft); border-radius: 8px; padding: 10px 12px; font-weight: 550; }
.g-empty { display: grid; justify-items: center; gap: 10px; padding: 64px 0; color: var(--muted); text-align: center; }
.g-empty svg { color: var(--faint); }
@media (max-width: 1100px) { .g-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g-two, .g-three { grid-template-columns: 1fr; } }

/* badges */
.g-badge { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; font-weight: 620; background: var(--bg); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }
.g-badge i { display: none; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.g-ok, .g-off, .g-warn, .g-new { border-color: transparent; }
.g-ok i, .g-off i, .g-warn i { display: inline-block; }
.g-ok { background: var(--ok-soft); color: var(--ok); }
.g-off { background: var(--off-soft); color: var(--off); }
.g-warn { background: var(--warn-soft); color: var(--warn); }
.g-new { background: var(--blue-soft); color: var(--blue-ink); }

/* ── library ──────────────────────────────────────────────────────────── */
.g-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.g-toolbar select { height: 38px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background-color: var(--card); padding: 0 32px 0 11px; max-width: 220px; }
.g-search { flex: 1 1 260px; display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--card); color: var(--muted); }
.g-search:focus-within { border-color: var(--blue); box-shadow: var(--focus); }
.g-search input { flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink); min-width: 0; }
.g-seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); }
.g-seg a { display: grid; place-items: center; min-width: 34px; height: 30px; border-radius: 7px; color: var(--muted); text-decoration: none; }
.g-seg a:hover { color: var(--ink); }
.g-seg a.is-active { background: var(--card); color: var(--ink); box-shadow: var(--shadow-sm); }
.g-seg-text a { padding: 0 12px; font-weight: 600; font-size: 13px; }
.g-count { display: flex; align-items: center; gap: 10px; color: var(--muted); margin: 16px 2px 14px; font-size: 13px; flex-wrap: wrap; }
.g-chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 6px 0 10px; border-radius: 999px; background: var(--blue-soft); color: var(--blue-ink); font-weight: 600; font-size: 12.5px; text-decoration: none; }
.g-chip::after { content: "×"; font-size: 15px; line-height: 1; padding: 0 3px; opacity: .7; }

.g-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: 26px 20px; }
.g-card { position: relative; display: flex; flex-direction: column; gap: 3px; text-decoration: none; color: var(--ink); }
.g-cover { position: relative; display: flex; align-items: flex-end; aspect-ratio: 1 / 1.414; margin-bottom: 10px; }
.g-cover img { width: 100%; height: auto; max-height: 100%; object-fit: contain; object-position: bottom; border-radius: 3px 5px 5px 3px; background: #fff; box-shadow: 0 1px 2px rgb(13 17 23 / .1), 0 6px 16px -4px rgb(13 17 23 / .14); transition: transform .2s, box-shadow .2s; }
.g-card:hover .g-cover img { transform: translateY(-4px); box-shadow: 0 2px 4px rgb(13 17 23 / .08), 0 22px 36px -12px rgb(11 19 36 / .38); }
.g-cover-empty { display: grid; place-items: center; width: 100%; height: 100%; border: 1px dashed var(--line-2); border-radius: 6px; color: var(--faint); background: var(--card); }
.g-card-kicker { color: var(--blue-ink); font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-card-title { font-weight: 620; font-size: 13.5px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.g-card:hover .g-card-title { color: var(--blue-ink); }
.g-card-meta { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.g-card .g-badge { position: absolute; top: 8px; left: 8px; box-shadow: var(--shadow-sm); }

.g-table-wrap { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: auto; box-shadow: var(--shadow-sm); }
.g-table { width: 100%; border-collapse: collapse; }
.g-table th { position: sticky; top: 0; background: var(--card); text-align: left; font-size: 11.5px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 11px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.g-table td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.g-table tr:last-child td { border-bottom: 0; }
.g-table tbody tr:hover td { background: var(--hover); }
.g-table tr.is-selected td { background: var(--blue-soft); }
.g-td-check { width: 36px; padding-right: 0 !important; }
.g-td-check input, .g-check { width: 16px; height: 16px; accent-color: var(--blue); cursor: pointer; }
.g-td-cover { width: 54px; }
.g-td-cover img { width: 36px; height: 50px; object-fit: cover; object-position: top; border-radius: 2px; box-shadow: 0 1px 3px rgb(13 17 23 / .18); display: block; }
.g-row-title { display: block; font-weight: 600; color: var(--ink); text-decoration: none; }
.g-row-title:hover { color: var(--blue-ink); }
.g-row-path { display: block; color: var(--muted); font-size: 12px; font-family: ui-monospace, Menlo, monospace; }
.g-num { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--ink-2); }
.g-row-actions { white-space: nowrap; text-align: right; }
.g-pager { display: flex; justify-content: space-between; align-items: center; margin-top: 26px; color: var(--muted); }

/* bulk action bar (list view) */
.g-bulk { position: sticky; bottom: 18px; z-index: 15; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; width: fit-content; max-width: 100%; margin: 18px auto 0; padding: 8px 8px 8px 16px; border-radius: 14px; background: var(--night); color: #fff; box-shadow: var(--shadow-lg); animation: g-in .2s ease-out; }
.g-bulk[hidden] { display: none; }
.g-bulk strong { font-size: 13.5px; margin-right: 6px; }
.g-bulk .g-btn { background: rgb(255 255 255 / .08); border-color: rgb(255 255 255 / .14); color: #fff; box-shadow: none; }
.g-bulk .g-btn:hover { background: rgb(255 255 255 / .16); }
.g-bulk select { height: 36px; border-radius: 9px; border: 1px solid rgb(255 255 255 / .14); background-color: rgb(255 255 255 / .08); color: #fff; padding: 0 30px 0 10px; }
.g-bulk select option { color: #0d1117; }

/* ── home (accueil) ───────────────────────────────────────────────────── */
.g-hero { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 26px 28px; margin-bottom: 18px; border-radius: 18px; color: #fff; overflow: hidden;
  background: radial-gradient(70% 120% at 100% 0, #2a63e0 0, transparent 60%), radial-gradient(60% 100% at 0 100%, #12306f 0, transparent 70%), var(--night); box-shadow: var(--shadow); }
.g-hero h1 { font-size: 26px; letter-spacing: -.03em; color: #fff; }
.g-hero p { margin: 6px 0 0; color: #b8c5dc; }
.g-hero .g-btn { background: #fff; color: #0b1324; border-color: #fff; }
.g-hero-covers { display: flex; align-items: flex-end; gap: 10px; margin-right: 6px; }
.g-hero-covers img { width: 62px; border-radius: 2px 4px 4px 2px; box-shadow: 0 10px 24px -8px rgb(0 0 0 / .6); background: #fff; }
.g-hero-covers img:nth-child(2) { width: 74px; }
.g-hero-actions { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.g-hero-actions .g-btn-ghost { background: rgb(255 255 255 / .1); color: #fff; border-color: rgb(255 255 255 / .2); }
@media (max-width: 760px) { .g-hero-covers { display: none; } }
.g-feed { list-style: none; margin: 0; padding: 0; display: grid; }
.g-feed li { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.g-feed li:last-child { border-bottom: 0; }
.g-feed .g-avatar { width: 30px; height: 30px; font-size: 11px; }
.g-feed-text { min-width: 0; color: var(--ink-2); font-size: 13.5px; }
.g-feed-text a { color: var(--ink); font-weight: 600; text-decoration: none; }
.g-feed-text a:hover { color: var(--blue-ink); }
.g-feed-text small { display: block; color: var(--muted); font-size: 12px; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-feed time { color: var(--muted); font-size: 12px; white-space: nowrap; }
.g-shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 18px 14px; }
.g-shelf .g-card-title { font-size: 12.5px; }

/* ── titles ───────────────────────────────────────────────────────────── */
.g-titles { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.g-title-card { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 16px; padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s; }
.g-title-card:hover { border-color: var(--blue-line); box-shadow: var(--shadow); }
.g-title-stack { position: relative; display: block; aspect-ratio: 1 / 1.414; }
.g-title-stack img, .g-title-stack .g-cover-empty { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 2px 4px 4px 2px; background: #fff; box-shadow: 0 1px 2px rgb(13 17 23 / .1), 0 6px 14px -4px rgb(13 17 23 / .18); }
.g-title-stack img:nth-child(2) { transform: translate(7px, -7px) rotate(3deg); z-index: -1; opacity: .9; }
.g-title-stack img:nth-child(3) { transform: translate(13px, -12px) rotate(6deg); z-index: -2; opacity: .75; }
.g-title-stack { isolation: isolate; }
.g-title-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.g-title-body h2 { font-size: 16px; }
.g-title-body h2 a { color: var(--ink); text-decoration: none; }
.g-title-body h2 a:hover { color: var(--blue-ink); }
.g-title-code { color: var(--muted); font-size: 11.5px; font-family: ui-monospace, Menlo, monospace; }
.g-title-stats { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 4px 18px; margin: 8px 0 4px; }
.g-title-stats span { color: var(--muted); font-size: 11.5px; }
.g-title-stats strong { display: block; color: var(--ink); font-size: 15px; font-variant-numeric: tabular-nums; }
.g-title-foot { margin-top: auto; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.g-title-foot form { display: none; gap: 6px; width: 100%; }
.g-title-card.is-editing .g-title-foot form { display: flex; }
.g-title-card.is-editing .g-title-foot > a, .g-title-card.is-editing .g-title-foot > button { display: none; }
.g-minor { display: flex; flex-wrap: wrap; gap: 8px; }
.g-minor a { display: inline-flex; gap: 6px; align-items: center; height: 30px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink-2); text-decoration: none; font-size: 12.5px; font-weight: 550; }
.g-minor a:hover { border-color: var(--blue-line); color: var(--blue-ink); }
.g-minor a span { color: var(--muted); font-variant-numeric: tabular-nums; }

/* ── document ─────────────────────────────────────────────────────────── */
.g-doc { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 32px; align-items: start; }
.g-doc-cover { position: sticky; top: 24px; display: grid; gap: 10px; }
.g-doc-cover img { width: 100%; border-radius: 3px 6px 6px 3px; box-shadow: var(--shadow-lg); background: #fff; display: block; }
.g-cover-big { aspect-ratio: 1 / 1.414; }
.g-doc-facts { display: grid; gap: 0; margin: 6px 0 0; padding: 4px 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.g-doc-facts div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.g-doc-facts div:last-child { border-bottom: 0; }
.g-doc-facts dt { color: var(--muted); }
.g-doc-facts dd { margin: 0; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-doc-main { display: grid; gap: 16px; min-width: 0; }
.g-doc-main > .g-panel + .g-panel { margin-top: 0; }
.g-doc-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.g-doc-head h1 { font-size: 28px; line-height: 1.18; letter-spacing: -.03em; }
.g-doc-head .g-muted { font-size: 13.5px; }
.g-doc-head h1, .g-doc-head .g-row-path { overflow-wrap: anywhere; }
.g-doc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 16px; }
.g-doc-nav { position: sticky; top: 0; z-index: 10; display: flex; flex-wrap: wrap; gap: 4px; padding: 8px; margin-bottom: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.g-doc-nav a { display: inline-flex; align-items: center; gap: 6px; padding: 10px 12px; border-radius: var(--radius-sm); color: var(--ink-2); text-decoration: none; font-size: 13px; font-weight: 600; }
.g-doc-nav a:hover, .g-doc-nav a:focus-visible { background: var(--blue-soft); color: var(--blue-ink); }
.g-doc-nav a:first-child { background: var(--blue-soft); color: var(--blue-ink); }
.g-doc-editor { margin-bottom: 24px; border-color: var(--blue-line); }
.g-doc-editor .g-hint { margin-bottom: 0; }
.g-doc-editor .g-form-foot { margin-top: 14px; }
.g-doc-editor, .g-doc section[id] { scroll-margin-top: 130px; }
@media (max-width: 960px) {
  .g-doc-nav { position: static; }
  .g-doc-editor, .g-doc section[id] { scroll-margin-top: 80px; }
}
.g-settings { display: grid; grid-template-columns: 1fr auto; gap: 16px 24px; align-items: center; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.g-settings strong { display: block; font-size: 13.5px; }
.g-settings span { display: block; color: var(--muted); font-size: 12.5px; }
.g-settings-inline { border-top: 0; padding-top: 0; }
.g-form-foot { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; align-items: center; }
.g-mini-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.g-mini-kpis div { padding: 10px 12px; border-radius: 10px; background: var(--bg); }
.g-mini-kpis span { display: block; color: var(--muted); font-size: 11.5px; font-weight: 550; }
.g-mini-kpis strong { display: block; font-size: 18px; font-weight: 700; letter-spacing: -.02em; margin-top: 2px; font-variant-numeric: tabular-nums; }
@media (max-width: 700px) { .g-mini-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.g-embed-opts { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: end; margin-bottom: 12px; }
.g-embed-opts label { display: grid; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.g-embed-opts .g-input { height: 34px; width: 120px; }
.g-reach { display: flex; align-items: flex-end; gap: 2px; height: 96px; }
.g-reach span { flex: 1; min-width: 2px; height: var(--h); border-radius: 2px 2px 0 0; background: linear-gradient(var(--blue), color-mix(in srgb, var(--blue) 45%, transparent)); }
.g-history { list-style: none; margin: 0; padding: 0; display: grid; }
.g-history li { position: relative; padding: 0 0 14px 20px; font-size: 13px; color: var(--ink-2); }
.g-history li::before { content: ""; position: absolute; left: 4px; top: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--blue); }
.g-history li::after { content: ""; position: absolute; left: 7px; top: 16px; bottom: 0; width: 1px; background: var(--line-2); }
.g-history li:last-child::after { display: none; }
.g-history time { display: block; color: var(--muted); font-size: 12px; }
@media (max-width: 960px) { .g-doc { grid-template-columns: 1fr; } .g-doc-cover { position: static; max-width: 260px; } }

/* charts */
.g-bars { display: flex; align-items: flex-end; gap: 3px; height: 110px; padding-top: 6px; }
.g-bars-tall { height: 170px; }
.g-bar { position: relative; flex: 1; height: var(--h); min-height: 2px; background: linear-gradient(var(--blue), color-mix(in srgb, var(--blue) 55%, transparent)); border-radius: 3px 3px 0 0; transition: filter .1s; }
.g-bar.is-zero { background: var(--line); }
.g-bar:hover { filter: brightness(1.15); }
.g-bar:hover::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); padding: 5px 9px; border-radius: 7px; background: var(--night); color: #fff; font-size: 12px; font-weight: 600; white-space: nowrap; pointer-events: none; z-index: 5; box-shadow: var(--shadow); }
.g-bars-axis { display: flex; justify-content: space-between; color: var(--muted); font-size: 11.5px; margin-top: 8px; }
.g-rank { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.g-rank a { display: grid; grid-template-columns: 22px 34px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 7px 8px; margin: 0 -8px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.g-rank a:hover { background: var(--hover); }
.g-rank-i { color: var(--faint); font-weight: 650; font-size: 12.5px; text-align: right; font-variant-numeric: tabular-nums; }
.g-rank-cover img { width: 34px; height: 46px; object-fit: cover; object-position: top; border-radius: 2px; box-shadow: 0 1px 3px rgb(13 17 23 / .18); display: block; background: #fff; }
.g-rank-main { display: grid; gap: 6px; min-width: 0; }
.g-rank-main strong { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-rank-n { font-variant-numeric: tabular-nums; font-weight: 650; color: var(--ink-2); min-width: 36px; text-align: right; }
.g-meter { display: block; height: 6px; border-radius: 999px; background: var(--bg); overflow: hidden; }
.g-meter span { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), color-mix(in srgb, var(--blue) 55%, #fff)); border-radius: 999px; }
.g-sources { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.g-sources li { display: grid; grid-template-columns: minmax(0, 1.2fr) 1fr auto; gap: 12px; align-items: center; }
.g-src { display: inline-flex; align-items: center; gap: 8px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 550; color: var(--ink); }
.g-src svg { flex: none; color: var(--muted); }
.g-stats-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }

/* journal */
.g-journal-day { margin: 22px 0 8px; color: var(--muted); font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; }
.g-journal-day:first-child { margin-top: 0; }

/* ── publish ──────────────────────────────────────────────────────────── */
.g-publish { max-width: 860px; }
.g-drop { position: relative; display: grid; justify-items: center; gap: 6px; padding: 40px 20px; border: 2px dashed var(--line-2); border-radius: 14px; background: var(--bg); text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.g-drop:hover, .g-drop.is-over { border-color: var(--blue); background: var(--blue-soft); }
.g-drop.has-file { border-style: solid; background: var(--card); }
.g-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.g-drop-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--blue-soft); color: var(--blue); margin-bottom: 6px; }
.g-drop strong { font-size: 15.5px; word-break: break-all; }
.g-drop canvas { width: 130px; height: auto; margin-top: 14px; border-radius: 3px; box-shadow: var(--shadow-lg); }
.g-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; margin-top: 18px; }
.g-field-wide { grid-column: 1 / -1; }
.g-field .g-label { margin-top: 16px; }
.g-slug { display: flex; align-items: center; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--card); overflow: hidden; }
.g-slug span { padding: 0 2px 0 12px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.g-slug .g-input { border: 0; box-shadow: none; padding-left: 2px; }
.g-slug .g-input:disabled { background: transparent; }
.g-slug:focus-within { border-color: var(--blue); box-shadow: var(--focus); }
.g-progress { margin-top: 18px; }
.g-progress-bar { height: 8px; border-radius: 999px; background: var(--bg); overflow: hidden; }
.g-progress-bar span { display: block; height: 100%; width: 0; background: var(--blue); border-radius: 999px; transition: width .2s; }
form.is-busy .g-drop { pointer-events: none; opacity: .7; }
@media (max-width: 700px) { .g-fields { grid-template-columns: 1fr; } }

/* ── équipe ───────────────────────────────────────────────────────────── */
.t-requests { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.t-request { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; flex-wrap: wrap; }
.t-who { display: grid; gap: 3px; min-width: 0; }
.t-who .g-muted { margin: 0; font-size: 12.5px; }
.t-who blockquote { margin: 6px 0 0; padding: 6px 10px; border-left: 3px solid var(--line-2); color: var(--ink-2); font-size: 13px; }
.t-actions, .t-inline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.t-inline .g-input[type=email] { flex: 1 1 240px; }
.t-invite { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.t-danger { color: var(--off); }
.t-config { list-style: none; margin: 0; padding: 0; display: grid; }
.t-config li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.t-config li:last-child { border-bottom: 0; }
.t-closed summary { cursor: pointer; list-style: none; }
.t-closed summary h2 { display: inline; }
.t-closed[open] summary { margin-bottom: 14px; }

/* ── denied / standalone ──────────────────────────────────────────────── */
.g-deny { display: grid; place-items: center; min-height: 100vh; }
.g-deny main { max-width: 420px; text-align: center; display: grid; justify-items: center; gap: 12px; padding: 24px; }
.g-deny h1 { font-size: 20px; }
.g-deny p { color: var(--ink-2); line-height: 1.6; margin: 0 0 6px; }
.g-login { display: grid; place-items: center; min-height: 100vh; background: radial-gradient(60% 60% at 70% 20%, var(--blue-soft), transparent 70%), var(--card); }
.g-login-card { width: min(420px, 100% - 32px); display: grid; gap: 14px; padding: 36px 32px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); }

/* ── auth screens ─────────────────────────────────────────────────────── */
.a-body { margin: 0; min-height: 100vh; display: grid; grid-template-columns: minmax(340px, 42%) 1fr; background: var(--card); }
.a-side { position: relative; display: flex; flex-direction: column; justify-content: space-between; padding: 40px 48px; color: #e9eef8; overflow: hidden;
  background: radial-gradient(80% 60% at 100% 0, #1d4fbf 0, transparent 60%), radial-gradient(60% 50% at 0 100%, #0f3a8f 0, transparent 70%), #0b1324; }
.a-brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-weight: 720; font-size: 18px; letter-spacing: -.02em; }
.a-brand b { color: #6ea1ff; margin-left: 3px; }
.a-brand small { margin-left: 8px; padding-left: 10px; border-left: 1px solid rgb(255 255 255 / .25); font-weight: 500; font-size: 12.5px; color: #aab6cc; }
.a-brand .g-brandmark { width: 24px; height: 28px; }
.a-pitch h2 { color: #fff; font-size: clamp(26px, 2.6vw, 36px); line-height: 1.12; letter-spacing: -.035em; margin: 10px 0 22px; max-width: 14em; }
.a-kicker { margin: 0; font-size: 12px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; color: #8eb6ff; }
.a-pitch ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; color: #cdd6e6; font-size: 15px; }
.a-pitch li { display: flex; gap: 10px; }
.a-pitch li::before { content: ""; flex: none; width: 16px; height: 9px; margin-top: 4px; border-left: 2px solid #6ea1ff; border-bottom: 2px solid #6ea1ff; transform: rotate(-45deg); }
.a-foot { margin: 0; font-size: 12.5px; color: #8b97ad; }
.a-main { display: grid; place-items: center; padding: 40px 24px; background: radial-gradient(60% 50% at 100% 0, var(--blue-soft), transparent 70%), var(--card); }
.a-card { width: min(420px, 100%); display: grid; gap: 12px; }
.a-brand-mobile { display: none; color: var(--ink); margin-bottom: 8px; }
.a-brand-mobile b { color: var(--blue); }
.a-card h1 { font-size: 28px; letter-spacing: -.035em; margin: 0; }
.a-lede { margin: 0 0 6px; color: var(--ink-2); line-height: 1.6; }
.a-oidc { justify-content: center; height: 44px; font-size: 14.5px; gap: 10px; border-color: var(--line-2); }
.a-or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12.5px; margin: 6px 0; }
.a-or::before, .a-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.a-form { display: grid; gap: 6px; }
.a-form label { font-weight: 600; font-size: 13px; margin-top: 8px; }
.a-form .g-input { height: 42px; font-size: 14.5px; }
.a-form textarea.g-input { height: auto; }
.a-label-row { display: flex; justify-content: space-between; align-items: baseline; margin-top: 8px; }
.a-label-row label { margin: 0; }
.a-label-row a { font-size: 12.5px; }
.a-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.a-row label { display: block; margin-bottom: 6px; }
.a-hint { font-weight: 400; color: var(--muted); font-size: 12px; }
.a-submit { justify-content: center; height: 44px; font-size: 14.5px; margin-top: 14px; }
.a-switch { margin: 10px 0 0; text-align: center; color: var(--ink-2); font-size: 13.5px; }
.a-fine { margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.a-notice { margin: 0; padding: 10px 12px; border-radius: 8px; font-weight: 550; font-size: 13.5px; line-height: 1.5; }
.a-warn { background: var(--off-soft); color: var(--off); }
.a-ok { background: var(--ok-soft); color: var(--ok); }
.a-tenants { display: grid; gap: 8px; margin: 6px 0; }
.a-tenant { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 10px; cursor: pointer; font-weight: 550 !important; margin: 0 !important; }
.a-tenant:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); }
.a-badge { justify-self: start; display: inline-flex; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 650; }
.a-badge-wait { background: var(--warn-soft); color: var(--warn); }
.a-oidc.is-waiting { opacity: .7; pointer-events: none; }
.a-oidc.is-waiting::after { content: ""; width: 14px; height: 14px; border: 2px solid var(--line-2); border-top-color: var(--blue); border-radius: 50%; animation: a-spin .8s linear infinite; }
@keyframes a-spin { to { transform: rotate(360deg); } }
.a-popup { display: grid; place-items: center; min-height: 100vh; margin: 0; text-align: center; color: var(--ink-2); background: var(--card); }
.a-popup main { display: grid; justify-items: center; gap: 14px; padding: 24px; }
@media (max-width: 860px) { .a-body { grid-template-columns: 1fr; } .a-side { display: none; } .a-brand-mobile { display: inline-flex; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.g-row-link { color: var(--ink-2); text-decoration: none; font-size: 13px; font-weight: 550; white-space: nowrap; }
.g-row-link:hover { color: var(--blue-ink); }
/* home shelf: a single row of the latest covers */
.g-shelf { grid-template-rows: auto; grid-auto-rows: 0; row-gap: 0; overflow: hidden; }
a.g-src { text-decoration: none; }
a.g-src:hover { color: var(--blue-ink); }

/* titles: cards (v2) */
.g-main { overflow-x: clip; }
.g-titles { grid-template-columns: repeat(auto-fill, minmax(min(100%, 310px), 1fr)); }
.g-title-card { grid-template-columns: 84px minmax(0, 1fr); gap: 24px; padding: 18px 18px 16px; overflow: hidden; }
.g-title-stack { align-self: start; margin-top: 10px; }
.g-title-body h2 { font-size: 16px; line-height: 1.25; overflow-wrap: anywhere; }
.g-title-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 10px 0 12px; }
.g-title-stats div { min-width: 0; }
.g-title-stats dt { color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-title-stats dd { margin: 2px 0 0; font-size: 15px; font-weight: 680; font-variant-numeric: tabular-nums; white-space: nowrap; }
.g-title-foot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.g-title-foot form { flex-wrap: nowrap; }
.g-title-foot form .g-input { height: 30px; min-width: 0; flex: 1; }
.g-main { max-width: 1720px; }
.g-titles { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.g-title-stats { grid-template-columns: repeat(3, auto); justify-content: space-between; gap: 6px 10px; }
.g-title-stats dt { overflow: visible; }

/* ── publier: file column (sticky cover) + form column ─────────────────────── */
.g-pub { display: grid; grid-template-columns: minmax(240px, 320px) minmax(0, 1fr); gap: 24px; align-items: start; max-width: 1040px; }
.g-pub-file { position: sticky; top: 24px; }
.g-drop-tall { min-height: 360px; align-content: center; }
.g-drop-tall canvas { width: 100%; max-width: 240px; }
.g-drop.has-file .g-drop-icon { display: none; }
.g-pub-form { min-width: 0; }
.g-pub-form .g-panel + .g-panel { margin-top: 16px; }
.g-choices { display: grid; gap: 10px; }
.g-choice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); cursor: pointer; transition: border-color .15s, background .15s; }
.g-choice:hover { background: var(--hover); }
.g-choice:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); }
.g-choice input { margin: 3px 0 0; accent-color: var(--blue); }
.g-choice strong { display: block; font-size: 14px; }
.g-choice small { display: block; margin-top: 3px; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.g-more summary { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; cursor: pointer; list-style: none; }
.g-more summary::-webkit-details-marker { display: none; }
.g-more summary strong { font-size: 14px; }
.g-more summary strong::before { content: "›"; display: inline-block; width: 14px; transition: transform .15s; }
.g-more[open] summary strong::before { transform: rotate(90deg); }
.g-more summary .g-muted { font-size: 12.5px; }
.g-pub-foot { display: flex; justify-content: flex-end; align-items: center; gap: 16px; margin-top: 18px; }
.g-pub-foot .g-muted { margin: 0; font-size: 13px; }
.g-pub .g-progress, .g-pub .g-error { margin-top: 16px; }
@media (max-width: 860px) { .g-pub { grid-template-columns: 1fr; } .g-pub-file { position: static; } .g-drop-tall { min-height: 200px; } }
[data-buy-field] .g-label { margin-top: 18px; }
.a-badge-ok { background: var(--ok-soft); color: var(--ok); }
.a-check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400 !important; font-size: 13.5px; }
.a-check input { margin-top: 3px; accent-color: var(--blue); }
.a-more { margin-top: 4px; border-top: 1px solid var(--line); padding-top: 14px; }
.a-more summary { cursor: pointer; color: var(--muted); font-size: 13.5px; font-weight: 600; }
.a-more[open] summary { margin-bottom: 10px; }
.g-banner { margin: 0 0 18px; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--blue-soft); color: var(--blue-ink); font-size: 13.5px; font-weight: 550; }
.g-banner a { color: inherit; font-weight: 700; }
.g-banner-warn { background: var(--warn-soft); color: var(--warn); }

/* ── abonnement ─────────────────────────────────────────────────────────────── */
.b-state { margin: 0 0 16px; font-size: 14px; }
.b-meters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.b-meter { display: grid; grid-template-columns: 1fr auto; gap: 6px 8px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--bg); font-size: 13px; }
.b-meter span { color: var(--muted); }
.b-meter i { grid-column: 1 / -1; height: 5px; border-radius: 3px; background: var(--line); position: relative; overflow: hidden; }
.b-meter i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); background: var(--blue); border-radius: inherit; }
.b-plans-wrap { margin-top: 24px; }
.b-plans-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.b-plans-head h2 { font-size: 16px; margin: 0; }
.b-toggle { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--card); border: 1px solid var(--line-2); }
.b-toggle label { cursor: pointer; }
.b-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.b-toggle span { display: inline-block; padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--muted); }
.b-toggle small { font-weight: 600; color: var(--ok); }
.b-toggle input:checked + span { background: var(--ink); color: var(--card); }
.b-toggle input:checked + span small { color: inherit; opacity: .8; }
.b-toggle input:focus-visible + span { box-shadow: var(--focus); }
.b-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.b-plan { display: flex; flex-direction: column; gap: 6px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow-sm); }
.b-plan.is-featured { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue), var(--shadow); }
.b-plan.is-current { border-color: var(--ok); }
.b-plan h3 { margin: 0; font-size: 16px; }
.b-plan > .g-muted { margin: 0; font-size: 13px; }
.b-price { margin: 10px 0 0; display: flex; align-items: baseline; gap: 6px; }
.b-price strong { font-size: 28px; letter-spacing: -.02em; }
.b-price span { color: var(--muted); font-size: 13px; }
.b-alt { margin: 0; font-size: 12.5px; color: var(--muted); }
.b-plan ul { list-style: none; padding: 0; margin: 12px 0 16px; display: grid; gap: 7px; font-size: 13px; flex: 1; }
.b-plan li { display: flex; gap: 8px; align-items: flex-start; }
.b-plan li svg { flex: none; margin-top: 2px; color: var(--ok); }
.b-plan .g-block { width: 100%; justify-content: center; }
@media (max-width: 960px) { .b-plans, .b-meters { grid-template-columns: 1fr; } }

/* ── intégrations ───────────────────────────────────────────────────────────── */
.i-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.i-grid .g-panel + .g-panel { margin-top: 0; }
.i-newkey { margin-bottom: 16px; border-color: var(--ok); }
.i-newkey h2 { display: flex; gap: 8px; align-items: center; color: var(--ok); }
.i-keys { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.i-keys li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.i-keys b { display: block; font-size: 13.5px; } .i-keys small { color: var(--muted); font-size: 12px; }
.i-create { display: flex; gap: 8px; } .i-create .g-input { flex: 1; }
.i-steps { margin: 0 0 14px; padding-left: 20px; display: grid; gap: 6px; font-size: 13.5px; color: var(--ink-2); }
.i-vitrines { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.i-vitrines .g-label { margin-top: 0; }
.i-vitrines .g-link { display: inline-flex; gap: 6px; align-items: center; margin-top: 8px; font-size: 13px; }
@media (max-width: 960px) { .i-grid { grid-template-columns: 1fr; } }

/* ── personnalisation ───────────────────────────────────────────────────────── */
.p-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 440px); gap: 20px; align-items: start; }
.p-form fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.p-form .g-panel + .g-panel { margin-top: 16px; }
.p-field .g-label { margin-top: 16px; }
.p-colour { display: flex; gap: 8px; align-items: center; }
.p-colour input[type=color] { width: 42px; height: 38px; padding: 2px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--card); cursor: pointer; }
.p-colour .g-input { width: 110px; font-family: ui-monospace, monospace; }
.p-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.p-opt input { position: absolute; opacity: 0; }
.p-opt span { display: inline-block; padding: 7px 12px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 13px; cursor: pointer; }
.p-opt input:checked + span { border-color: var(--blue); background: var(--blue-soft); color: var(--blue-ink); font-weight: 600; }
.p-opt input:focus-visible + span { box-shadow: var(--focus); }
.p-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.p-check { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; font-size: 13.5px; }
.p-check input { margin-top: 2px; accent-color: var(--blue); }
.p-check small { display: block; color: var(--muted); font-size: 12px; }
.p-check b { font-weight: 600; }
.p-logo { display: grid; grid-template-columns: 180px 1fr; gap: 16px; align-items: start; }
.p-logo-box { display: grid; place-items: center; gap: 4px; height: 80px; border: 1px dashed var(--line-2); border-radius: var(--radius-sm); background: var(--bg); padding: 8px; }
.p-logo-box img { max-height: 48px; max-width: 160px; object-fit: contain; }
.p-logo .g-btn + .g-btn { margin-left: 6px; }
.p-pubs { display: grid; gap: 10px; }
.p-pub { display: grid; grid-template-columns: 170px 1fr 220px; gap: 8px; align-items: center; }
.p-pub b { font-size: 13.5px; }
.p-save { position: sticky; bottom: 0; display: flex; gap: 16px; align-items: center; margin-top: 16px; padding: 14px 0; background: linear-gradient(transparent, var(--bg) 30%); }
.p-preview { position: sticky; top: 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow-sm); }
.p-preview-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; font-size: 13.5px; }
.p-preview-head .g-muted { font-size: 12px; }
.p-preview iframe { display: block; width: 100%; height: 560px; border: 1px solid var(--line); border-radius: 10px; background: #edf0f2; }
@media (max-width: 1100px) { .p-layout { grid-template-columns: 1fr; } .p-preview { position: static; } .p-pub { grid-template-columns: 1fr; } }
.i-hooks { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.i-hooks li { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.i-hooks b { display: block; font-size: 13.5px; word-break: break-all; } .i-hooks small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.i-hook-actions { display: flex; gap: 6px; flex: none; }
.i-secret { margin-top: 8px; } .i-secret summary { cursor: pointer; font-size: 12.5px; color: var(--blue-ink); }
.i-hook-new { display: grid; gap: 10px; }
.i-events { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; }
.i-events input { accent-color: var(--blue); }
.i-hook-new .g-btn { justify-self: start; }
.i-sdks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.i-sdk { display: grid; gap: 4px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); text-decoration: none; color: inherit; }
.i-sdk:hover { border-color: var(--blue); } .i-sdk b { font-size: 14px; } .i-sdk small { color: var(--muted); font-size: 12px; }
@media (max-width: 960px) { .i-sdks { grid-template-columns: 1fr 1fr; } .i-hooks li { flex-direction: column; } }
.i-deliveries { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.i-deliveries li { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 12.5px; }
.i-deliveries code { font-size: 12px; } .i-deliveries form { margin-left: auto; } .i-deliveries .g-btn { height: 28px; padding: 0 10px; font-size: 12px; }
.i-create { flex-wrap: wrap; } .i-scopes { flex-basis: 100%; }
.d-share { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 28px; }
.d-batch { display: grid; gap: 8px; } .d-batch textarea { font-family: ui-monospace, monospace; font-size: 13px; }
.d-batch-row { display: flex; gap: 8px; } .d-batch-row select { width: auto; }
.d-revoke { margin-top: 12px; } .d-revoke summary { cursor: pointer; font-size: 13px; color: var(--blue-ink); }
.d-revoke form { display: flex; gap: 8px; margin-top: 8px; }
.d-qr { display: flex; gap: 16px; align-items: flex-start; } .d-qr canvas { border: 1px solid var(--line); border-radius: 8px; flex: none; }
@media (max-width: 960px) { .d-share { grid-template-columns: 1fr; } }
.d-qr { flex-direction: column; } .d-qr .g-btn { margin-top: 6px; }
.d-schedule { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; } .d-schedule .g-input { width: auto; } .d-now { display: flex; gap: 6px; font-size: 13px; }
.g-choices-row { grid-template-columns: 1fr 1fr; } @media (max-width: 700px) { .g-choices-row { grid-template-columns: 1fr; } }

/* document: embed options, previews, share, cover files, visual */
.d-more { margin: 2px 0 6px; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0 14px; }
.d-more > summary { cursor: pointer; padding: 10px 0; font-weight: 600; font-size: 13px; list-style-position: inside; }
.d-more[open] { padding-bottom: 14px; }
.d-more .g-embed-opts .g-input { width: 190px; }
.d-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.d-chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 12.5px; cursor: pointer; user-select: none; }
.d-chip:has(input:checked) { background: var(--blue-soft); border-color: var(--blue-line); color: var(--blue-ink); }
.d-chip.is-off { opacity: .55; cursor: not-allowed; }
.d-chip input { margin: 0; }
.d-color { display: inline-flex; align-items: center; gap: 6px; }
.d-color input[type=color] { width: 44px; height: 34px; padding: 2px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--card); cursor: pointer; }
.d-inline-check { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 500; color: var(--ink-2); height: 34px; }
.d-preview-bar { margin-top: 12px; }
.d-preview { margin-top: 12px; padding: 12px; border: 1px dashed var(--line-2); border-radius: var(--radius-sm); background: var(--bg); }
.d-preview iframe { display: block; background: #fff; }
.d-preview-mail iframe { width: 100%; height: 260px; border: 0; border-radius: 6px; }
.d-social { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.d-social .g-label { margin-top: 0; }
.d-social-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.d-card { margin: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--card); }
.d-card img, .d-card-empty { display: block; width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; }
.d-card-empty { display: grid; place-items: center; background: var(--hover); color: var(--muted); font-size: 12.5px; }
.d-card figcaption { display: grid; gap: 2px; padding: 10px 12px; border-top: 1px solid var(--line); font-size: 13px; }
.d-card figcaption span { color: var(--muted); font-size: 11.5px; text-transform: lowercase; }
.d-card figcaption b { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-sizes { width: 100%; border-collapse: collapse; font-size: 13px; }
.d-sizes th, .d-sizes td { padding: 9px 0; border-top: 1px solid var(--line); text-align: left; vertical-align: middle; }
.d-sizes tr:first-child th, .d-sizes tr:first-child td { border-top: 0; }
.d-sizes th { font-weight: 600; white-space: nowrap; padding-right: 16px; width: 1%; }
.d-size-url { max-width: 0; width: 100%; }
.d-size-url .g-row-path { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-size-actions { white-space: nowrap; text-align: right !important; padding-left: 12px !important; }
.d-size-actions .g-btn + .g-btn { margin-left: 4px; }
.d-visual { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 24px; align-items: start; }
.d-visual-opts .g-label:first-child { margin-top: 0; }
.d-visual-bg { display: flex; gap: 8px; }
.d-visual-bg input[type=color] { flex: none; width: 44px; height: 38px; padding: 2px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--card); cursor: pointer; }
.d-visual-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.d-visual-stage { display: grid; place-items: center; min-height: 220px; padding: 14px; border-radius: var(--radius-sm); background: var(--bg); border: 1px solid var(--line); }
.d-visual-stage canvas { display: block; max-width: 100%; max-height: 520px; width: auto; height: auto; box-shadow: var(--shadow); border-radius: 4px; }
@media (max-width: 960px) { .d-social, .d-visual { grid-template-columns: 1fr; } .d-size-url { display: none; } }
.g-embed-opts label.d-inline-check { display: inline-flex; font-weight: 500; }
.g-doc-main { min-width: 0; }
@media (max-width: 640px) {
  .d-sizes tr { display: grid; gap: 6px; padding: 10px 0; border-top: 1px solid var(--line); }
  .d-sizes tr:first-child { border-top: 0; }
  .d-sizes th, .d-sizes td { padding: 0 !important; border: 0; width: auto; }
  .d-size-actions { text-align: left !important; white-space: normal; }
}

/* titles: download / print rule (full width under the card) */
.g-title-card .g-title-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); justify-content: stretch; }
.g-title-rights { grid-column: 1 / -1; margin: 2px 0 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12.5px; }
.g-title-rights summary { cursor: pointer; list-style: none; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 10px; align-items: baseline; }
.g-title-rights summary::-webkit-details-marker { display: none; }
.g-rights-line { display: contents; }
.g-rights-line b { font-weight: 600; color: var(--ink-2); grid-column: 1; }
.g-rights-line span { grid-column: 2; color: var(--ink); font-weight: 600; }
.g-rights-line em { grid-column: 2; font-style: normal; color: var(--muted); font-size: 11.5px; margin-top: -3px; }
.g-rights-edit { grid-column: 3; grid-row: 1; color: var(--blue-ink); font-weight: 600; }
.g-title-rights[open] .g-rights-edit { color: var(--muted); }
.g-title-rights summary:hover .g-rights-edit { text-decoration: underline; }
.g-title-rights form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.g-title-rights .g-label { display: grid; gap: 4px; margin: 0; }
.g-title-rights .g-label small { color: var(--muted); font-weight: 400; font-size: 11.5px; }
.g-title-rights .g-input { height: 32px; }
.g-title-rights .g-hint, .g-title-rights button { grid-column: 1 / -1; margin: 0; }
.g-title-rights button { justify-self: start; }
@media (max-width: 520px) { .g-title-rights form { grid-template-columns: 1fr; } }
.g-title-focus { margin-bottom: 16px; }
.g-title-focus .g-title-card { outline: 2px solid var(--blue); outline-offset: -1px; }

/* library: rights of each issue and of the filtered set */
.g-card-rights { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.g-right { display: inline-block; font-size: 11px; line-height: 1.5; padding: 0 6px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-2); white-space: nowrap; }
.g-right.is-no { color: var(--muted); background: var(--bg); }
.g-right.is-yes { color: var(--blue-ink); background: var(--blue-soft); border-color: var(--blue-line); }
.g-right.is-own { border-style: dashed; border-color: currentColor; }
.g-rights-cell { display: grid; grid-template-columns: auto auto; gap: 3px 8px; align-items: center; justify-content: start; }
.g-rights-cell small { color: var(--muted); font-size: 11px; white-space: nowrap; }
.g-rights-summary { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: -4px 2px 16px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); font-size: 12.5px; color: var(--ink-2); }
.g-rights-summary b { font-weight: 600; color: var(--ink); margin-right: 4px; }
.g-rights-summary a { color: var(--blue-ink); }
.g-rights-cell .g-right { justify-self: start; }

/* document: rights in the header and the facts */
.g-doc-rights { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 2px 0 8px; font-size: 12.5px; }
.g-doc-rights .g-right { font-size: 12px; padding: 1px 8px; }
.g-doc-rights a { color: var(--blue-ink); }
.g-doc-facts dd small { display: block; text-align: right; color: var(--muted); font-size: 11px; }
