/* ============ Thèmes ============ */
:root {
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --radius: 14px;
  --radius-sm: 9px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --max: 1480px;
}
[data-theme="dark"] {
  --bg: #0e0e11;
  --bg-2: #141418;
  --surface: #1a1a1f;
  --surface-2: #222228;
  --line: #2c2c34;
  --text: #ebe8e1;
  --muted: #9a9aa4;
  --accent: #d2ad66;
  --accent-ink: #1a1408;
  --accent-soft: rgba(210, 173, 102, .14);
  --danger: #ef6b6b;
  --ok: #6fcf97;
  --shadow: 0 10px 34px rgba(0, 0, 0, .5);
  --frame: #000;
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #f6f3ec;
  --bg-2: #efebe2;
  --surface: #ffffff;
  --surface-2: #f4f0e7;
  --line: #e1dccf;
  --text: #25221c;
  --muted: #7a7567;
  --accent: #8d6420;
  --accent-ink: #fff;
  --accent-soft: rgba(141, 100, 32, .1);
  --danger: #c0392b;
  --ok: #2f8f55;
  --shadow: 0 10px 30px rgba(60, 45, 20, .14);
  --frame: #000;
  color-scheme: light;
}
.when-light { display: none; }
[data-theme="light"] .when-light { display: inline-flex; }
[data-theme="light"] .when-dark { display: none; }
[data-theme="dark"] .when-dark { display: inline-flex; }

/* ============ Base ============ */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.55 var(--font); min-height: 100vh;
  background-image: radial-gradient(1200px 500px at 50% -200px, var(--accent-soft), transparent 70%);
  background-repeat: no-repeat;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
code, .path { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .86em; background: var(--surface-2); padding: .12em .45em; border-radius: 6px; }
.path { display: inline-block; padding: .35em .7em; word-break: break-all; }
h1, h2, h3 { margin: 0; font-weight: 600; }
.h1 { font-family: var(--serif); font-size: clamp(1.9rem, 3vw, 2.7rem); letter-spacing: .01em; line-height: 1.1; }
.h2 { font-family: var(--serif); font-size: 1.5rem; margin-bottom: .6rem; }
.muted { color: var(--muted); }
.small { font-size: .84rem; }
.nowrap { white-space: nowrap; }
.center-text { text-align: center; }
.ic { flex: none; vertical-align: -3px; }
.ok { color: var(--ok); } .ko { color: var(--danger); } .warn { color: var(--accent); }
::selection { background: var(--accent); color: var(--accent-ink); }

.wrap { max-width: var(--max); margin: 0 auto; padding: 1.6rem clamp(1rem, 3vw, 2.4rem) 4rem; }
.narrow { max-width: 760px; margin: 0 auto; padding: 1.6rem 1rem 4rem; }
main.center { display: grid; place-items: center; min-height: calc(100vh - 80px); padding: 1rem; }
.viewer-main { padding: 0; }

/* ============ Barre supérieure ============ */
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 1.2rem;
  padding: .7rem clamp(1rem, 3vw, 2.4rem);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .6rem; font-family: var(--serif); font-size: 1.5rem; font-weight: 700; color: var(--text); letter-spacing: .02em; }
.brand:hover { text-decoration: none; }
.brand-mark { color: var(--accent); font-size: 1.5rem; line-height: 1; }
.nav { display: flex; gap: .2rem; margin-left: .6rem; }
.nav a, .subnav a {
  display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .8rem; border-radius: 999px;
  color: var(--muted); font-weight: 500; font-size: .92rem; transition: .2s var(--ease);
}
.nav a:hover, .subnav a:hover { color: var(--text); background: var(--surface); text-decoration: none; }
.nav a.on, .subnav a.on { color: var(--accent); background: var(--accent-soft); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: .6rem; }
.who { display: inline-flex; align-items: center; gap: .4rem; color: var(--muted); font-size: .85rem; max-width: 220px; }
.who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.subnav { display: flex; gap: .2rem; flex-wrap: wrap; padding: .5rem clamp(1rem, 3vw, 2.4rem); border-bottom: 1px solid var(--line); background: var(--bg-2); }

/* ============ Boutons & formulaires ============ */
.btn, .icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem; cursor: pointer; font: inherit; font-weight: 500;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 999px;
  padding: .55rem 1.1rem; transition: .2s var(--ease); text-decoration: none;
}
.btn:hover, .icon-btn:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn-primary:hover { color: var(--accent-ink); filter: brightness(1.08); }
.btn-danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); }
.btn-danger:hover { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-sm { padding: .32rem .8rem; font-size: .85rem; }
.btn-block { width: 100%; padding: .75rem; }
.btn:disabled { opacity: .5; cursor: wait; transform: none; }
.icon-btn { width: 38px; height: 38px; padding: 0; background: transparent; }
.icon-btn.danger:hover { color: #fff; background: var(--danger); border-color: var(--danger); }

.form { display: grid; gap: 1rem; }
.form-wide { max-width: 900px; }
label { display: grid; gap: .35rem; font-size: .85rem; font-weight: 500; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], select, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: .6rem .75rem; transition: .15s;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.req { color: var(--danger); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: end; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; }
label.check { display: flex; align-items: center; gap: .55rem; color: var(--text); font-weight: 400; font-size: .93rem; cursor: pointer; }
label.check input { width: 17px; height: 17px; accent-color: var(--accent); flex: none; }
.check-box { padding: .55rem .75rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-2); }
.form-actions { display: flex; gap: .7rem; align-items: center; flex-wrap: wrap; margin-top: 1rem; }
.inline-form { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.inline-form input[type=text] { width: auto; min-width: 220px; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem 1rem; margin: 0; min-width: 0; }
legend { padding: 0 .5rem; font-weight: 600; font-size: .9rem; color: var(--text); }
.checklist { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .35rem .9rem; max-height: 220px; overflow: auto; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem; box-shadow: var(--shadow); }
.flash { padding: .75rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1rem; border: 1px solid var(--line); background: var(--surface); }
.flash-ok { border-color: var(--ok); } .flash-err { border-color: var(--danger); color: var(--danger); }

/* ============ Connexion ============ */
.login-card { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 2.4rem 2rem; box-shadow: var(--shadow); }
.login-mark { text-align: center; font-size: 2.6rem; color: var(--accent); line-height: 1; }
.login-title { font-family: var(--serif); font-size: 2.2rem; text-align: center; margin: .4rem 0; }
.login-card > .muted { text-align: center; margin: 0 0 1.4rem; }

/* ============ Page d'accueil / classeurs ============ */
.hero { margin: .6rem 0 1.4rem; }
.searchbox { margin-bottom: 1.8rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1.1rem; }
.searchbox summary { cursor: pointer; font-weight: 500; color: var(--accent); }
.searchbar { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; align-items: end; margin: 1rem 0 1.4rem; }
.empty-state { text-align: center; color: var(--muted); padding: 4rem 1rem; display: grid; justify-items: center; gap: 1rem; }
.empty-art { width: min(380px, 80%); border-radius: var(--radius); box-shadow: var(--shadow); }

.year-group { margin-bottom: 2.6rem; }
.year-title { display: flex; align-items: center; gap: 1rem; font-family: var(--serif); font-size: 2.1rem; margin-bottom: 1.1rem; color: var(--text); }
.year-title::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }
.year-title span { color: var(--accent); }
.grid-cl { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.4rem; }
.cl-card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: .3s var(--ease); }
.cl-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.cl-thumb { position: relative; display: block; aspect-ratio: 4 / 3; background: #000; overflow: hidden; }
.cl-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s var(--ease); }
.cl-card:hover .cl-thumb img { transform: scale(1.04); }
.cl-thumb img.is-empty { object-fit: cover; }
.cl-body { padding: .85rem 1rem 1rem; }
.cl-title { font-family: var(--serif); font-size: 1.35rem; line-height: 1.2; }
.cl-title a { color: var(--text); }
.cl-meta { display: flex; align-items: baseline; gap: .7rem; margin-top: .35rem; flex-wrap: wrap; }
.cl-year { font-weight: 600; color: var(--accent); font-size: 1rem; }
.cl-dates { font-size: .72rem; color: var(--muted); }
.card-edit { position: absolute; top: .6rem; right: .6rem; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; opacity: 0; transition: .2s; }
.cl-card:hover .card-edit { opacity: 1; }
.card-edit:hover { background: var(--accent); color: var(--accent-ink); text-decoration: none; }

.badge { display: inline-flex; align-items: center; gap: .3rem; font-size: .72rem; font-weight: 600; padding: .18rem .55rem; border-radius: 999px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.badge-ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); }
.badge-lock { color: var(--accent); }
.badge-count, .cl-thumb .badge-lock { position: absolute; background: rgba(0, 0, 0, .62); color: #fff; border-color: transparent; backdrop-filter: blur(4px); }
.badge-count { bottom: .6rem; right: .6rem; }
.cl-thumb .badge-lock { top: .6rem; left: .6rem; }
.badge-video { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.badge-recue { background: rgba(0,0,0,.6); color: #fff; border-color: transparent; }

.crumbs { color: var(--muted); font-size: .88rem; margin-bottom: .6rem; }
.crumbs span { margin: 0 .35rem; opacity: .6; }
.cl-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.cl-head .obs { max-width: 70ch; color: var(--muted); }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.result-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .8rem; }

/* ============ Grille de médias ============ */
.grid-media { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.1rem; }
.tile { position: relative; margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: .25s var(--ease); }
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.tile a { display: block; aspect-ratio: 4 / 3; background: #000; }
.tile img { width: 100%; height: 100%; object-fit: contain; display: block; }
.tile figcaption { display: flex; justify-content: space-between; gap: .6rem; padding: .5rem .75rem; font-size: .82rem; }
.tile-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-sub { color: var(--muted); white-space: nowrap; }
.tile-badges { position: absolute; top: .55rem; left: .55rem; display: flex; gap: .3rem; pointer-events: none; }
.tile-sel { position: absolute; top: .5rem; right: .5rem; z-index: 2; display: none; }
.selecting .tile-sel { display: block; }
.tile-sel input { position: absolute; opacity: 0; }
.tile-sel span { display: block; width: 26px; height: 26px; border-radius: 8px; border: 2px solid #fff; background: rgba(0,0,0,.45); box-shadow: 0 1px 6px rgba(0,0,0,.5); cursor: pointer; }
.tile-sel input:checked + span { background: var(--accent); border-color: var(--accent); }
.tile-sel input:checked + span::after { content: "✓"; color: var(--accent-ink); font-weight: 700; display: grid; place-items: center; height: 100%; }
.tile.is-selected { outline: 3px solid var(--accent); outline-offset: -3px; }
.bulkbar { position: sticky; top: 64px; z-index: 20; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; padding: .6rem .9rem; margin-bottom: 1rem; background: var(--surface); border: 1px solid var(--accent); border-radius: var(--radius); box-shadow: var(--shadow); }
.bulkbar[hidden] { display: none; }
.bulkbar select { width: auto; padding: .3rem .5rem; }

/* ============ Visionneuse ============ */
.viewer { display: grid; grid-template-columns: minmax(0, 1fr) 360px; min-height: calc(100vh - 62px); }
.stage { padding: 1rem clamp(.8rem, 2vw, 2rem) 1.6rem; background: var(--bg-2); display: flex; flex-direction: column; align-items: center; }
.stage-bar { width: 100%; max-width: 1500px; display: flex; justify-content: space-between; align-items: center; margin-bottom: .6rem; }
.frame { position: relative; width: 100%; max-width: 1500px; aspect-ratio: 4 / 3; max-height: calc(100vh - 190px); background: var(--frame); border-radius: 6px; box-shadow: var(--shadow); overflow: hidden; display: grid; place-items: center; margin: 0 auto; }
.frame .media { width: 100%; height: 100%; object-fit: contain; display: block; background: #000; }
.frame-sm { max-height: 60vh; }
.nav-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 48px; height: 64px; display: grid; place-items: center; color: #fff; background: rgba(0,0,0,.35); opacity: .0; transition: .2s; }
.frame:hover .nav-arrow { opacity: 1; }
.nav-arrow:hover { background: rgba(0,0,0,.7); text-decoration: none; }
.nav-arrow.left { left: 0; border-radius: 0 10px 10px 0; } .nav-arrow.right { right: 0; border-radius: 10px 0 0 10px; }
.copyright { margin: .8rem 0 0; font-family: var(--serif); font-size: 1.15rem; letter-spacing: .04em; color: var(--muted); }
.margin { border-left: 1px solid var(--line); background: var(--surface); padding: 1.3rem 1.4rem 2rem; overflow-y: auto; max-height: calc(100vh - 62px); position: sticky; top: 62px; }
.margin-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .8rem; }
.margin-actions { display: flex; gap: .2rem; }
.m-title { font-family: var(--serif); font-size: 1.9rem; line-height: 1.15; margin-bottom: 1rem; }
.meta { margin: 0; display: grid; gap: .15rem; }
.meta dt { font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); margin-top: .85rem; }
.meta dd { margin: 0; }
.chip { display: inline-block; font-size: .8rem; padding: .15rem .65rem; margin: 0 .3rem .3rem 0; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text); }
a.chip:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.chip-link { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
@media (max-width: 960px) {
  .viewer { grid-template-columns: 1fr; }
  .margin { position: static; max-height: none; border-left: 0; border-top: 1px solid var(--line); }
  .frame { max-height: none; }
  .nav-arrow { opacity: .85; }
}

/* ============ Administration ============ */
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin: 1.2rem 0 2rem; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.3rem; }
.stat-n { font-family: var(--serif); font-size: 2.6rem; line-height: 1; color: var(--accent); font-weight: 700; }
.stat-l { color: var(--muted); font-size: .88rem; margin-top: .3rem; }
.grid-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }
.tile-link { display: grid; gap: .35rem; align-content: start; padding: 1.3rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--text); transition: .25s var(--ease); }
.tile-link .ic { color: var(--accent); margin-bottom: .3rem; }
.tile-link span { color: var(--muted); font-size: .86rem; }
.tile-link:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--shadow); text-decoration: none; }

.tbl { border-collapse: collapse; }
.tbl-full { width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.tbl th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: .7rem .9rem; background: var(--bg-2); }
.tbl td { padding: .65rem .9rem; border-top: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.mini { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; display: block; background: #000; }
.row-actions { display: flex; gap: .2rem; justify-content: flex-end; }
.row-actions form { margin: 0; }

.picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: .5rem; max-height: 340px; overflow: auto; padding: .2rem; }
.pick { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; cursor: pointer; background: #000; outline: 2px solid transparent; }
.pick input { position: absolute; opacity: 0; }
.pick img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pick:has(input:checked) { outline-color: var(--accent); }
.pick:has(input:checked)::after { content: "✓"; position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 700; font-size: .8rem; }
.pick-auto { display: grid; place-items: center; height: 100%; color: var(--muted); font-size: .8rem; background: var(--surface-2); }

.dropzone { border: 2px dashed var(--line); border-radius: 22px; padding: 3rem 1rem; text-align: center; display: grid; justify-items: center; gap: .4rem; color: var(--muted); transition: .2s; background: var(--surface); }
.dropzone .ic { color: var(--accent); }
.dropzone.over { border-color: var(--accent); background: var(--accent-soft); transform: scale(1.01); }
.dropzone p { margin: .2rem 0; }
.uploads { list-style: none; padding: 0; margin: 1.2rem 0; display: grid; gap: .5rem; }
.uploads li { display: grid; grid-template-columns: 1fr auto; gap: .2rem .8rem; padding: .6rem .9rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.uploads .progress { grid-column: 1 / -1; }
.uploads .up-state { grid-column: 1 / -1; color: var(--muted); }
.uploads li.ok .up-state { color: var(--ok); } .uploads li.err .up-state { color: var(--danger); }
.up-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.progress { height: 6px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.progress-bar { height: 100%; width: 0; background: var(--accent); transition: width .3s var(--ease); }
.progress-txt { font-family: var(--serif); font-size: 1.6rem; color: var(--accent); }

.wizard { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 1.6rem; margin-top: 1.2rem; align-items: start; }
.wz-preview { position: sticky; top: 80px; }
.mform { display: grid; gap: .9rem; }
@media (max-width: 900px) { .wizard { grid-template-columns: 1fr; } .wz-preview { position: static; } .row2, .row3 { grid-template-columns: 1fr; } }

/* ============ Modale, toast, pagination ============ */
.modal-overlay { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.65); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 1rem; }
.modal { width: min(720px, 100%); max-height: 92vh; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.modal-head, .modal-foot { display: flex; align-items: center; gap: .7rem; padding: .9rem 1.3rem; }
.modal-head { justify-content: space-between; border-bottom: 1px solid var(--line); }
.modal-head .h2 { margin: 0; }
.modal-body { padding: 1.2rem 1.3rem; overflow: auto; }
.modal-foot { border-top: 1px solid var(--line); }
body.modal-open { overflow: hidden; }
.toast { position: fixed; left: 50%; bottom: 1.5rem; transform: translate(-50%, 30px); opacity: 0; pointer-events: none; z-index: 120; background: var(--surface-2); border: 1px solid var(--accent); padding: .7rem 1.2rem; border-radius: 999px; box-shadow: var(--shadow); transition: .3s var(--ease); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast-err { border-color: var(--danger); color: var(--danger); }
.pager { display: flex; gap: .3rem; justify-content: center; margin: 2rem 0; flex-wrap: wrap; }
.pg { min-width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); padding: 0 .6rem; }
.pg.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.pg.gap { border: 0; background: none; }
a.pg:hover { border-color: var(--accent); text-decoration: none; }

@media (max-width: 720px) {
  .nav a span, .who { display: none; }
  .grid-cl { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
  .grid-media { grid-template-columns: repeat(2, 1fr); gap: .6rem; }
  .brand { font-size: 1.2rem; }
  .tbl-full { display: block; overflow-x: auto; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
