/* Orbis — thème clair épuré (esprit Google / Microsoft 365), mode sombre automatique */

:root {
  --accent: #1a73e8;
  --accent-ink: #fff;
  --accent-text: var(--accent);
  --accent-soft: color-mix(in srgb, var(--accent) 11%, transparent);
  --accent-soft-2: color-mix(in srgb, var(--accent) 18%, transparent);
  --bg: #f6f8fc;
  --surface: #ffffff;
  --surface-2: #f1f3f4;
  --surface-3: #e8eaed;
  --line: #e1e4e8;
  --text: #1f1f1f;
  --text-2: #3c4043;
  --muted: #5f6368;
  --shadow-1: 0 1px 2px rgba(60, 64, 67, .14), 0 1px 3px 1px rgba(60, 64, 67, .07);
  --shadow-2: 0 2px 6px 2px rgba(60, 64, 67, .12), 0 1px 2px rgba(60, 64, 67, .2);
  --shadow-3: 0 8px 28px rgba(32, 33, 36, .22);
  --s-planned: #80868b;
  --s-in_progress: #f29900;
  --s-completed: #1e8e3e;
  --s-paused: #1a73e8;
  --s-dropped: #d93025;
  --heart: #e8434f;
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 24px;
  --nav-h: 68px;
  --font: "Inter", "Segoe UI", Roboto, system-ui, -apple-system, sans-serif;
  --mono: "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --accent-text: color-mix(in srgb, var(--accent) 55%, #fff);
    --accent-soft: color-mix(in srgb, var(--accent) 22%, transparent);
    --accent-soft-2: color-mix(in srgb, var(--accent) 32%, transparent);
    --bg: #111214;
    --surface: #1b1c1f;
    --surface-2: #26272b;
    --surface-3: #313237;
    --line: #2e3034;
    --text: #e8eaed;
    --text-2: #c8cacd;
    --muted: #9aa0a6;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .5);
    --shadow-2: 0 2px 8px rgba(0, 0, 0, .5);
    --shadow-3: 0 10px 30px rgba(0, 0, 0, .6);
    --s-paused: #8ab4f8;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --accent-text: color-mix(in srgb, var(--accent) 55%, #fff);
  --accent-soft: color-mix(in srgb, var(--accent) 22%, transparent);
  --accent-soft-2: color-mix(in srgb, var(--accent) 32%, transparent);
  --bg: #111214;
  --surface: #1b1c1f;
  --surface-2: #26272b;
  --surface-3: #313237;
  --line: #2e3034;
  --text: #e8eaed;
  --text-2: #c8cacd;
  --muted: #9aa0a6;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .5);
  --shadow-2: 0 2px 8px rgba(0, 0, 0, .5);
  --shadow-3: 0 10px 30px rgba(0, 0, 0, .6);
  --s-paused: #8ab4f8;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
p { margin: 0 0 .8em; }
.i { width: 22px; height: 22px; flex: none; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.hidden { display: none !important; }

/* ---------- Structure ---------- */
.shell { min-height: 100vh; min-height: 100dvh; }
body.with-nav .shell { padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 12px); }
.page { width: 100%; max-width: 1180px; margin: 0 auto; padding: 8px 16px 32px; }

.topbar {
  position: sticky; top: 0; z-index: 30;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px;
  padding: calc(env(safe-area-inset-top) + 8px) 12px 8px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px);
  min-height: 56px;
}
.topbar.overlay { position: fixed; left: 0; right: 0; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; transition: background .2s; }
.topbar.overlay.scrolled { background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line); }
.topbar.overlay .tb-title { opacity: 0; transition: opacity .2s; }
.topbar.overlay.scrolled .tb-title { opacity: 1; }
.tb-left { display: flex; gap: 6px; }
.tb-right { display: flex; gap: 6px; justify-content: flex-end; }
.tb-title { font-size: 17px; font-weight: 600; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 56vw; }
.tb-title.ghost { visibility: hidden; }

.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 0; display: inline-grid; place-items: center;
  background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); cursor: pointer; position: relative;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn .i { width: 20px; height: 20px; }
.icon-btn.flat { box-shadow: none; background: transparent; }
.icon-btn.flat:hover { background: var(--surface-2); }

/* ---------- Navigation ---------- */
.tabbar {
  position: fixed; z-index: 40; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  pointer-events: none;
}
.tabbar .brand { display: none; }
.tabbar .tabs {
  pointer-events: auto; flex: 1; display: flex; justify-content: space-around;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-radius: 28px; box-shadow: var(--shadow-2); padding: 6px; height: 60px;
}
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; font-weight: 500; color: var(--muted); flex: 1; border-radius: 22px; transition: color .15s, background .15s; }
.tab .i { width: 22px; height: 22px; }
.tab.on { color: var(--accent-text); background: var(--accent-soft); }
.tab-desk { display: none; }
.fab {
  pointer-events: auto; width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow-2); flex: none;
}
.fab span { display: none; }

@media (min-width: 900px) {
  body.with-nav .shell { padding-left: 248px; padding-bottom: 0; }
  .tabbar {
    top: 0; right: auto; width: 248px; flex-direction: column; align-items: stretch; gap: 4px;
    padding: 18px 12px; background: var(--surface); border-right: 1px solid var(--line); pointer-events: auto;
  }
  .tabbar .brand { order: -2; display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; padding: 6px 14px 18px; color: var(--text); }
  .tabbar .brand .i { width: 30px; height: 30px; color: var(--accent); }
  .tabbar .tabs { flex: none; flex-direction: column; background: none; box-shadow: none; height: auto; padding: 0; gap: 2px; backdrop-filter: none; }
  .tab { flex-direction: row; justify-content: flex-start; gap: 14px; font-size: 14.5px; padding: 11px 16px; border-radius: 24px; color: var(--text-2); }
  .tab:hover { background: var(--surface-2); }
  .tab.on { font-weight: 600; }
  .tab-desk { display: flex; }
  .fab { order: -1; width: auto; height: 48px; border-radius: 16px; display: flex; gap: 12px; padding: 0 18px; justify-content: flex-start; margin-bottom: 12px; font-weight: 600; }
  .fab span { display: inline; }
  .page { padding: 8px 32px 48px; }
  .topbar { padding-left: 24px; padding-right: 24px; }
  .topbar.overlay { left: 248px; }
}

/* ---------- Messages ---------- */
body.has-overlay .page > .flash { position: relative; z-index: 3; margin-top: calc(env(safe-area-inset-top) + 64px); margin-bottom: -52px; box-shadow: var(--shadow-2); background: var(--surface); }
.i.tiny { width: 14px; height: 14px; vertical-align: -2px; }
.flash { padding: 12px 16px; border-radius: var(--r-sm); margin: 8px 0 14px; font-size: 14px; background: var(--accent-soft); color: var(--text); border: 1px solid var(--accent-soft-2); }
.flash-err { background: color-mix(in srgb, var(--s-dropped) 10%, transparent); border-color: color-mix(in srgb, var(--s-dropped) 30%, transparent); }
.toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 24px); transform: translate(-50%, 20px);
  background: #202124; color: #fff; padding: 11px 18px; border-radius: 10px; font-size: 14px; box-shadow: var(--shadow-3);
  opacity: 0; pointer-events: none; transition: .2s; z-index: 100; max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Sections ---------- */
.sec { margin: 22px 0 8px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 26px 0 12px; }
.sec-head h2 { font-size: 18px; font-weight: 650; }
.sec-head .count { color: var(--muted); font-weight: 500; font-size: 14px; margin-left: 4px; }
.sec-head a { display: inline-flex; align-items: center; gap: 2px; font-size: 14px; color: var(--accent-text); font-weight: 500; white-space: nowrap; }
.sec-head a .i { width: 16px; height: 16px; }
.page-title { font-size: 28px; font-weight: 700; margin: 10px 0 4px; letter-spacing: -.02em; }
.lead { color: var(--muted); margin-bottom: 18px; }

/* ---------- Cartes d'œuvres ---------- */
.rail { scroll-padding-inline: 16px; display: grid; grid-auto-flow: column; grid-auto-columns: 132px; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 16px 10px; margin: 0 -16px; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }
.rail.wide { grid-auto-columns: 240px; }
@media (min-width: 900px) { .rail { grid-auto-columns: 150px; padding: 2px 32px 10px; margin: 0 -32px; scroll-padding-inline: 32px; } }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 18px 14px; }
@media (min-width: 600px) { .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); } }

.card { display: flex; flex-direction: column; min-width: 0; }
.card-media { position: relative; display: block; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-1); background: var(--surface-2); transition: transform .15s, box-shadow .15s; }
.card:hover .card-media { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.poster { position: relative; display: block; aspect-ratio: 2 / 3; background: var(--surface-2); overflow: hidden; }
.poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.poster .ph { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--muted); text-align: center; padding: 8px; }
.poster .ph .i { width: 28px; height: 28px; opacity: .7; }
.poster .ph small { font-size: 11px; }
.card-title { margin-top: 8px; font-size: 13.5px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-meta { display: flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.card-meta .i { width: 13px; height: 13px; }
.cbadge { position: absolute; left: 7px; top: 7px; background: rgba(255, 255, 255, .92); border-radius: 20px; padding: 4px; display: grid; place-items: center; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.cfav { position: absolute; right: 7px; bottom: 7px; width: 26px; height: 26px; border-radius: 50%; background: rgba(255, 255, 255, .92); display: grid; place-items: center; color: var(--heart); box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.cfav .i { width: 15px; height: 15px; fill: currentColor; }
.sdot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; background: var(--s-planned); flex: none; }
.s-in_progress { background: var(--s-in_progress); }
.s-completed { background: var(--s-completed); }
.s-paused { background: var(--s-paused); }
.s-dropped { background: var(--s-dropped); }

/* Mosaïque de collection */
.mosaic { display: grid; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: var(--surface-2); gap: 2px; box-shadow: var(--shadow-1); }
.mosaic.n2, .mosaic.n3, .mosaic.n4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.mosaic.n2 img { grid-row: span 2; }
.mosaic.n3 img:first-child { grid-row: span 2; }
.mosaic img { width: 100%; height: 100%; object-fit: cover; min-height: 0; }
.mosaic-empty { display: grid; place-items: center; color: var(--muted); }
.mosaic-empty .i { width: 34px; height: 34px; }
.coll-card { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.coll-card strong { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.coll-card small { color: var(--muted); font-size: 12px; margin-top: -8px; }
.coll-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px 14px; }
@media (min-width: 900px) { .coll-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); } }

/* ---------- Listes ---------- */
.list { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow-1); overflow: hidden; }
.list-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; min-height: 54px; }
.list-row + .list-row { border-top: 1px solid var(--line); }
a.list-row:hover { background: var(--surface-2); }
.list-row .lr-main { flex: 1; min-width: 0; }
.list-row .lr-main strong { font-weight: 500; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row .lr-main small { color: var(--muted); font-size: 13px; }
.list-row .lr-end { color: var(--muted); font-size: 14px; display: flex; align-items: center; gap: 4px; }
.list-row .lr-end .i { width: 18px; height: 18px; }
.list-row .lr-ico { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); flex: none; color: var(--text-2); }
.list-row .lr-ico .i { width: 19px; height: 19px; }
.list-row .lr-ico.heart { color: var(--heart); background: color-mix(in srgb, var(--heart) 12%, transparent); }
.list-row .lr-ico.heart .i { fill: currentColor; }
.list-row .lr-ico .sdot { width: 12px; height: 12px; }
.list-row .lr-thumb { width: 44px; height: 62px; border-radius: 6px; overflow: hidden; flex: none; background: var(--surface-2); }
.list-row .lr-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Boutons et chips ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 20px;
  border-radius: 20px; border: 1px solid var(--line); background: var(--surface); color: var(--accent-text);
  font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; transition: background .15s, box-shadow .15s;
}
.btn:hover { background: var(--accent-soft); }
.btn .i { width: 18px; height: 18px; }
.btn-primary { background: var(--accent); border-color: transparent; color: var(--accent-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, #000); box-shadow: var(--shadow-1); }
.btn-tonal { background: var(--accent-soft); border-color: transparent; color: var(--accent-text); }
.btn-tonal:hover { background: var(--accent-soft-2); }
.btn-danger { color: var(--s-dropped); }
.btn-danger:hover { background: color-mix(in srgb, var(--s-dropped) 10%, transparent); }
.btn-block { width: 100%; }
.btn-lg { height: 48px; border-radius: 24px; font-size: 15px; }
.btn-sm { height: 32px; padding: 0 14px; font-size: 13px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 16px 6px; margin: 0 -16px 8px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 8px; flex: none;
  border: 1px solid var(--line); background: var(--surface); font-size: 13.5px; font-weight: 500; color: var(--text-2); cursor: pointer;
}
.chip .i { width: 16px; height: 16px; }
.chip.on { background: var(--accent-soft); border-color: transparent; color: var(--accent-text); }
.chip .n { color: var(--muted); font-weight: 400; }

/* ---------- Formulaires ---------- */
.card-box { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow-1); padding: 20px; }
.card-box + .card-box { margin-top: 16px; }
.card-box h3 { font-size: 16px; margin-bottom: 4px; }
.card-box > p.muted { font-size: 13.5px; }
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field > label, .field > .lbl { font-size: 13px; font-weight: 600; color: var(--text-2); }
.field small { color: var(--muted); font-size: 12.5px; }
.input, .field input[type=text], .field input[type=email], .field input[type=password], .field input[type=url], .field input[type=number], .field input[type=date], .field select, .field textarea {
  width: 100%; min-height: 46px; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); outline: none; transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 110px; resize: vertical; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field code, .copy { font-family: var(--mono); font-size: 12.5px; background: var(--surface-2); padding: 8px 10px; border-radius: 8px; word-break: break-all; display: block; }
.row2 { display: grid; gap: 16px; }
@media (min-width: 640px) { .row2 { grid-template-columns: 1fr 1fr; } }
.switch { display: flex; align-items: center; gap: 12px; cursor: pointer; font-size: 14.5px; }
.switch input { appearance: none; width: 42px; height: 24px; border-radius: 12px; background: var(--surface-3); position: relative; flex: none; cursor: pointer; transition: background .15s; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.3); transition: transform .15s; }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(18px); }

.searchbox { position: relative; margin: 6px 0 14px; }
.searchbox input { width: 100%; height: 52px; border-radius: 26px; border: 0; background: var(--surface); box-shadow: var(--shadow-1); padding: 0 48px 0 52px; font-size: 16px; outline: none; }
.searchbox input:focus { box-shadow: var(--shadow-2); }
.searchbox > .i { position: absolute; left: 18px; top: 15px; color: var(--muted); }
.searchbox button { position: absolute; right: 8px; top: 8px; }

/* ---------- Fiche œuvre ---------- */
.hero { position: relative; margin: 0 -16px; padding: calc(env(safe-area-inset-top) + 64px) 16px 18px; overflow: hidden; text-align: center; }
.hero-bg { position: absolute; inset: -40px; background-size: cover; background-position: center; filter: blur(38px) saturate(1.3); opacity: .55; transform: scale(1.1); }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 30%, var(--bg) 96%); }
.hero > *:not(.hero-bg) { position: relative; z-index: 1; }
.hero .poster-lg { width: min(58vw, 250px); margin: 0 auto; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-3); }
.hero .poster-lg.wide { width: min(86vw, 460px); }
.hero .poster-lg.wide .poster { aspect-ratio: 16 / 9; }
.hero h1 { font-size: 26px; font-weight: 700; margin: 18px 0 4px; letter-spacing: -.02em; }
.hero .by { color: var(--text-2); font-size: 15px; }
.hero .facts { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 10px; color: var(--muted); font-size: 13.5px; margin-top: 6px; }
.hero .facts .i { width: 15px; height: 15px; vertical-align: -2px; }
@media (min-width: 900px) {
  .hero { margin: 0 -32px; padding: 90px 32px 26px; text-align: left; display: grid; grid-template-columns: 250px 1fr; gap: 32px; align-items: end; }
  .hero .poster-lg { margin: 0; }
  .hero .poster-lg.wide { width: 250px; }
  .hero .poster-lg.wide .poster { aspect-ratio: 2 / 3; }
  .hero .facts { justify-content: flex-start; }
  .hero h1 { font-size: 34px; margin-top: 0; }
}
.logbar {
  display: flex; align-items: center; gap: 10px; background: var(--surface); border-radius: 30px; box-shadow: var(--shadow-2);
  padding: 7px 7px 7px 7px; margin: 16px auto 4px; max-width: 520px;
}
@media (min-width: 900px) { .logbar { margin-left: 0; } }
.logbar .fav-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--surface-2); display: grid; place-items: center; cursor: pointer; color: var(--muted); flex: none; }
.logbar .fav-btn.on { color: var(--heart); background: color-mix(in srgb, var(--heart) 12%, transparent); }
.logbar .fav-btn.on .i { fill: currentColor; }
.logbar .log-open { flex: 1; display: flex; align-items: center; gap: 10px; border: 0; background: none; text-align: left; cursor: pointer; padding: 0 4px; min-width: 0; }
.logbar .log-open strong { display: block; font-size: 14.5px; font-weight: 600; }
.logbar .log-open small { display: block; color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.logbar .log-open .i { color: var(--muted); }
.logbar .add-btn { flex: none; }

.summary { color: var(--text-2); white-space: pre-line; }
.summary.clamp { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.readmore { border: 0; background: none; color: var(--accent-text); font-weight: 600; padding: 4px 0; cursor: pointer; }
.tagline { font-style: italic; color: var(--muted); margin-bottom: 8px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

.providers { display: flex; flex-wrap: wrap; gap: 14px; }
.provider { width: 64px; text-align: center; font-size: 11px; color: var(--muted); line-height: 1.25; }
.provider img { width: 52px; height: 52px; border-radius: 12px; margin: 0 auto 6px; box-shadow: var(--shadow-1); }
.prov-group { margin-bottom: 14px; }
.prov-group h4 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }

.person { text-align: center; width: 92px; }
.person .ph-round { width: 76px; height: 76px; border-radius: 50%; overflow: hidden; margin: 0 auto 8px; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); box-shadow: var(--shadow-1); }
.person .ph-round img { width: 100%; height: 100%; object-fit: cover; }
.person strong { display: block; font-size: 12.5px; font-weight: 600; line-height: 1.25; }
.person small { display: block; font-size: 11.5px; color: var(--muted); line-height: 1.25; }
.rail.people { grid-auto-columns: 92px; }

.video { display: block; }
.video .thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; box-shadow: var(--shadow-1); }
.video .thumb img { width: 100%; height: 100%; object-fit: cover; opacity: .92; }
.video .thumb .play { position: absolute; inset: 0; display: grid; place-items: center; }
.video .thumb .play span { width: 46px; height: 46px; border-radius: 50%; background: rgba(255,255,255,.92); display: grid; place-items: center; color: #202124; box-shadow: var(--shadow-2); }
.video strong { display: block; font-size: 13px; font-weight: 600; margin-top: 7px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.video small { color: var(--muted); font-size: 12px; }

.uni-link { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow-1); }
.uni-link + .uni-link { margin-top: 10px; }
.uni-link .uni-ico { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; flex: none; }
.uni-link .uni-main { flex: 1; min-width: 0; }
.uni-link strong { display: block; font-weight: 600; }
.uni-link small { color: var(--muted); font-size: 12.5px; display: flex; gap: 10px; flex-wrap: wrap; }
.uni-link small .i { width: 13px; height: 13px; vertical-align: -2px; }
.uni-link .uni-thumb { width: 52px; height: 52px; border-radius: 10px; overflow: hidden; flex: none; }
.uni-link .uni-thumb img { width: 100%; height: 100%; object-fit: cover; }

.seasons .season { display: flex; gap: 12px; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 4px 10px; border-radius: 12px; background: var(--surface-2); color: var(--text-2); }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- Univers ---------- */
.uni-hero { position: relative; margin: 0 -16px; padding: 20px 16px 8px; }
.uni-hero .eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-text); }
.uni-hero .eyebrow .i { width: 15px; height: 15px; }
.uni-hero h1 { font-size: 32px; font-weight: 700; margin: 6px 0 4px; letter-spacing: -.02em; }
.uni-stats { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.start-here { display: flex; gap: 14px; align-items: center; padding: 14px; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow-1); margin-top: 14px; border: 1px solid var(--accent-soft-2); }
.start-here .sh-img { width: 64px; flex: none; border-radius: 8px; overflow: hidden; }
.start-here .eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .1em; color: var(--accent-text); text-transform: uppercase; }
.start-here strong { display: block; font-size: 16px; font-weight: 650; line-height: 1.3; }
.start-here small { color: var(--muted); display: block; }
.start-here .go { color: var(--accent-text); font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; margin-top: 3px; }
.uni-card { display: block; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow-1); overflow: hidden; }
.uni-card .uc-img { aspect-ratio: 16 / 9; background: var(--surface-2); position: relative; }
.uni-card .uc-img img { width: 100%; height: 100%; object-fit: cover; }
.uni-card .uc-body { padding: 12px 14px 14px; }
.uni-card strong { display: block; font-weight: 650; }
.uni-card small { color: var(--muted); font-size: 12.5px; }
.uni-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }

.cand { display: flex; gap: 12px; align-items: center; padding: 10px 14px; }
.cand + .cand { border-top: 1px solid var(--line); }
.cand input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; }
.cand .lr-thumb { width: 40px; height: 56px; border-radius: 6px; overflow: hidden; background: var(--surface-2); flex: none; }
.cand .lr-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cand strong { display: block; font-size: 14px; font-weight: 500; }
.cand small { color: var(--muted); font-size: 12.5px; }

/* ---------- Feuille « Mon suivi » ---------- */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .42); z-index: 80; opacity: 0; pointer-events: none; transition: opacity .2s; }
.sheet-backdrop.open { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; max-height: 92vh; max-height: 92dvh; overflow-y: auto;
  background: var(--surface); border-radius: 24px 24px 0 0; box-shadow: var(--shadow-3);
  transform: translateY(105%); transition: transform .28s cubic-bezier(.2, .8, .2, 1);
  padding: 8px 16px calc(20px + env(safe-area-inset-bottom));
}
.sheet.open { transform: none; }
@media (min-width: 700px) {
  .sheet { left: 50%; right: auto; bottom: auto; top: 50%; width: 560px; border-radius: 24px; transform: translate(-50%, -46%) scale(.97); opacity: 0; pointer-events: none; transition: .2s; }
  .sheet.open { transform: translate(-50%, -50%); opacity: 1; pointer-events: auto; }
}
.sheet-grip { width: 36px; height: 4px; border-radius: 2px; background: var(--surface-3); margin: 4px auto 8px; }
.sheet-head { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; margin-bottom: 14px; }
.sheet-head h3 { text-align: center; font-size: 16px; }
.sheet-head small { display: block; text-align: center; color: var(--muted); font-size: 12.5px; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet-head .icon-btn { box-shadow: none; background: var(--surface-2); }
.sheet-head .icon-btn.save { background: var(--accent); color: var(--accent-ink); }
.seg { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 6px; background: var(--surface-2); padding: 4px; border-radius: 14px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: flex; align-items: center; justify-content: center; gap: 6px; height: 38px; border-radius: 10px; font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer; text-align: center; padding: 0 4px; line-height: 1.1; }
.seg input:checked + span { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); }
.status-state { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 18px 10px 6px; }
.status-state .big { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; color: #fff; margin-bottom: 8px; }
.status-state strong { font-size: 16px; }
.status-state p { color: var(--muted); font-size: 13px; margin: 2px 0 0; max-width: 360px; }
.log-rows { margin-top: 14px; border-radius: var(--r); background: var(--surface-2); overflow: hidden; }
.log-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-height: 52px; }
.log-row + .log-row { border-top: 1px solid var(--line); }
.log-row > .i { color: var(--muted); width: 20px; height: 20px; }
.log-row .lbl { flex: 1; font-size: 14.5px; font-weight: 500; }
.log-row .ctl { display: flex; align-items: center; gap: 8px; }
.log-row select, .log-row input[type=date], .log-row input[type=text] { border: 0; background: transparent; text-align: right; color: var(--accent-text); font-weight: 600; outline: none; max-width: 170px; }
.log-row textarea { width: 100%; border: 0; background: transparent; resize: vertical; min-height: 80px; outline: none; }
.stars { display: flex; gap: 2px; }
.stars button { border: 0; background: none; padding: 2px; cursor: pointer; color: var(--surface-3); }
.stars button .i { width: 24px; height: 24px; fill: currentColor; stroke: none; }
.stars button.on { color: #fbbc04; }
.rating-val { min-width: 34px; text-align: right; font-weight: 700; color: var(--accent-text); font-family: var(--mono); font-size: 14px; }
.stepper { display: flex; align-items: center; gap: 4px; }
.stepper button { width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--surface); cursor: pointer; font-size: 18px; line-height: 1; box-shadow: var(--shadow-1); }
.stepper output { min-width: 26px; text-align: center; font-weight: 700; font-family: var(--mono); }
.react { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.react label input { position: absolute; opacity: 0; }
.react span { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 10px; border-radius: 15px; background: var(--surface); font-size: 12.5px; cursor: pointer; border: 1px solid var(--line); }
.react input:checked + span { background: var(--accent-soft); border-color: transparent; color: var(--accent-text); font-weight: 600; }
.sheet-list .list-row { padding: 12px 4px; }
.check-ico { width: 24px; height: 24px; border-radius: 6px; border: 2px solid var(--line); display: grid; place-items: center; flex: none; }
.check-ico.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.check-ico .i { width: 16px; height: 16px; }

/* ---------- Social / profil ---------- */
.avatar { --h: 210; display: inline-grid; place-items: center; border-radius: 50%; font-weight: 700; color: #fff; background: hsl(var(--h) 55% 48%); flex: none; letter-spacing: .02em; }
.avatar-sm { width: 32px; height: 32px; font-size: 12px; }
.avatar-md { width: 42px; height: 42px; font-size: 15px; }
.avatar-lg { width: 84px; height: 84px; font-size: 30px; }
.feed { display: grid; gap: 12px; }
.feed-item { display: flex; gap: 12px; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow-1); padding: 14px; }
.feed-item .fi-main { flex: 1; min-width: 0; }
.feed-item .fi-main p { margin: 0; font-size: 14.5px; }
.feed-item .fi-main time { font-size: 12.5px; color: var(--muted); }
.feed-item .fi-main blockquote { margin: 8px 0 0; padding: 8px 12px; border-left: 3px solid var(--accent-soft-2); color: var(--text-2); font-size: 14px; background: var(--surface-2); border-radius: 0 8px 8px 0; }
.feed-item .fi-thumb { width: 50px; flex: none; border-radius: 6px; overflow: hidden; align-self: flex-start; }
.feed-item .stars-inline { color: #f29900; font-weight: 600; }
.profile-head { display: flex; align-items: center; gap: 18px; margin: 12px 0 8px; }
.profile-head h1 { font-size: 24px; font-weight: 700; }
.profile-head .handle { color: var(--muted); font-size: 14px; }
.profile-head .bio { margin-top: 4px; color: var(--text-2); font-size: 14px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin: 16px 0; }
.stat { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow-1); padding: 14px 16px; }
.stat .i { color: var(--accent-text); width: 20px; height: 20px; }
.stat b { display: block; font-size: 24px; font-weight: 700; margin-top: 6px; letter-spacing: -.02em; }
.stat small { color: var(--muted); font-size: 12.5px; }
.follow-counts { display: flex; gap: 18px; font-size: 14px; color: var(--muted); margin-top: 4px; }
.follow-counts b { color: var(--text); }

/* ---------- Vides & divers ---------- */
.empty { text-align: center; padding: 38px 20px; color: var(--muted); background: var(--surface); border-radius: var(--r); border: 1px dashed var(--line); }
.empty .i { width: 38px; height: 38px; color: var(--accent-text); opacity: .8; margin-bottom: 8px; }
.empty strong { display: block; color: var(--text); font-size: 16px; margin-bottom: 4px; }
.empty p { font-size: 14px; max-width: 420px; margin: 0 auto 14px; }
.tbadge { display: inline-flex; align-items: center; gap: 4px; }
.tbadge .i { width: 14px; height: 14px; }
.divider { height: 1px; background: var(--line); margin: 20px 0; }
.hello { font-size: 26px; font-weight: 700; margin: 12px 0 2px; letter-spacing: -.02em; }
.table-wrap { overflow-x: auto; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow-1); }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; background: var(--surface-2); }
.table tr:last-child td { border-bottom: 0; }
.tag { display: inline-block; font-size: 11.5px; padding: 2px 8px; border-radius: 10px; background: var(--surface-2); color: var(--text-2); font-weight: 600; }
.tag.accent { background: var(--accent-soft); color: var(--accent-text); }
.tag.ok { background: color-mix(in srgb, var(--s-completed) 15%, transparent); color: var(--s-completed); }
.tag.err { background: color-mix(in srgb, var(--s-dropped) 13%, transparent); color: var(--s-dropped); }
.subnav { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); margin: 6px -16px 18px; padding: 0 16px; scrollbar-width: none; }
.subnav a { padding: 12px 14px; font-size: 14px; font-weight: 500; color: var(--muted); border-bottom: 3px solid transparent; white-space: nowrap; }
.subnav a.on { color: var(--accent-text); border-color: var(--accent); font-weight: 600; }
.dropdown { position: relative; }
.menu { position: absolute; right: 0; top: 46px; min-width: 220px; background: var(--surface); border-radius: 12px; box-shadow: var(--shadow-3); padding: 6px; z-index: 50; display: none; }
.menu.open { display: block; }
.menu a, .menu button { display: flex; width: 100%; align-items: center; gap: 12px; padding: 10px 12px; border: 0; background: none; border-radius: 8px; font-size: 14px; cursor: pointer; text-align: left; color: var(--text); }
.menu a:hover, .menu button:hover { background: var(--surface-2); }
.menu .i { width: 18px; height: 18px; color: var(--muted); }
.menu .danger, .menu .danger .i { color: var(--s-dropped); }

/* ---------- Connexion ---------- */
body.bare { background: var(--bg); }
.auth { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 420px; background: var(--surface); border-radius: 28px; box-shadow: var(--shadow-2); padding: 36px 28px 28px; }
.auth-card .logo { width: 56px; height: 56px; border-radius: 16px; background: var(--accent); color: #fff; display: grid; place-items: center; margin: 0 auto 16px; box-shadow: var(--shadow-2); }
.auth-card .logo .i { width: 34px; height: 34px; }
.auth-card h1 { text-align: center; font-size: 24px; font-weight: 600; }
.auth-card .sub { text-align: center; color: var(--muted); margin: 6px 0 24px; font-size: 14.5px; }
.sso { display: grid; gap: 10px; }
.sso-btn {
  display: flex; align-items: center; justify-content: center; gap: 12px; height: 46px; border-radius: 23px;
  border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 14.5px; color: var(--text); transition: background .15s, box-shadow .15s;
}
.sso-btn:hover { background: var(--surface-2); box-shadow: var(--shadow-1); }
.sso-btn svg { width: 20px; height: 20px; flex: none; }
.sso-btn.facebook { background: #1877f2; border-color: #1877f2; color: #fff; }
.sso-btn.facebook:hover { background: #166fe5; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; margin: 20px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-foot { text-align: center; font-size: 14px; color: var(--muted); margin-top: 18px; }
.auth-foot a { color: var(--accent-text); font-weight: 600; }

/* Installateur */
.install { max-width: 640px; margin: 0 auto; padding: 32px 16px 60px; }
.steps { display: flex; gap: 8px; margin: 18px 0 22px; }
.steps span { flex: 1; height: 4px; border-radius: 2px; background: var(--surface-3); }
.steps span.on { background: var(--accent); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
