/* Collecter — design system « TimeTrack Flow » (comme le chemin de fer) :
   neutres ink/paper, accent orange, PP Mori + Graebenbach Mono (dans assets/fonts). */
/* Polices de la maquette (fichiers fournis par Units) */
@font-face { font-family: "Graebenbach Mono"; src: url("fonts/GraebenbachMono-Light.woff2") format("woff2"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Graebenbach Mono"; src: url("fonts/GraebenbachMono-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Graebenbach Mono"; src: url("fonts/GraebenbachMono-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Graebenbach Mono"; src: url("fonts/GraebenbachMono-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Graebenbach Mono"; src: url("fonts/GraebenbachMono-Black.woff2") format("woff2"); font-weight: 900; font-style: normal; font-display: swap; }
@font-face { font-family: "PP Mori"; src: url("fonts/PPMori-Extralight.woff2") format("woff2"); font-weight: 200; font-style: normal; font-display: swap; }
@font-face { font-family: "PP Mori"; src: url("fonts/PPMori-ExtralightItalic.woff2") format("woff2"); font-weight: 200; font-style: italic; font-display: swap; }
@font-face { font-family: "PP Mori"; src: url("fonts/PPMori-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "PP Mori"; src: url("fonts/PPMori-RegularItalic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "PP Mori"; src: url("fonts/PPMori-SemiBold.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  --bg: #eeeeee;
  --surface: #ffffff;
  --paper: #f6f6f6;
  --ink: #121212;
  --muted: #5f5f5f;
  --faint: #9a9a9a;
  --line: #c4c4c4;
  --line-soft: #dcdcdc;
  --accent: #ed5b36;
  --accent-25: #fef7f5;
  --ui-10: rgba(18, 18, 18, .1);
  --ui-30: rgba(18, 18, 18, .3);
  --ui-40: rgba(18, 18, 18, .4);
  --ui-60: rgba(18, 18, 18, .6);
  --danger: #e11d48;
  --ok: #059669;
  --radius: 4px;
  --card-radius: 10px;
  --font: "PP Mori", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "Graebenbach Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  color-scheme: light;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121212;
  --surface: #1b1b1b;
  --paper: #242424;
  --ink: #eeeeee;
  --muted: #a8a8a8;
  --faint: #6f6f6f;
  --line: #383838;
  --line-soft: #2c2c2c;
  --ui-10: rgba(238, 238, 238, .1);
  --ui-30: rgba(238, 238, 238, .3);
  --ui-40: rgba(238, 238, 238, .4);
  --ui-60: rgba(238, 238, 238, .6);
  --accent-25: #2b1812;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: 14px; line-height: 1.4; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.error { color: var(--danger); }
.fatal { padding: 40px; text-align: center; color: var(--danger); }
kbd { font-family: var(--mono); font-size: 12px; padding: 1px 5px; border: 1px solid var(--line); border-radius: 4px; }
code { font-family: var(--mono); font-size: 12.5px; background: var(--paper); padding: 2px 6px; border-radius: 4px; word-break: break-all; }

/* Boutons et champs ---------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 7px 12px; border: 1px solid var(--line); border-radius: 6px;
  background: var(--surface); color: var(--ink); cursor: pointer; white-space: nowrap; text-decoration: none; font-size: 14px;
}
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn.primary:hover { opacity: .88; }
.btn.danger, .btn.primary.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: rgba(127,127,127,.12); }
.btn.light { color: #fff; }
.btn.small { padding: 4px 9px; font-size: 12.5px; }
.btn.icon { width: 34px; padding: 6px 0; }
.btn:disabled { opacity: .4; cursor: default; }
.danger-text { color: var(--danger) !important; }
.link { border: 0; background: none; padding: 0; color: var(--muted); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; font-size: 12px; }
input:not([type=checkbox]):not([type=file]), select, textarea {
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); width: 100%;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--ink); outline-offset: -1px; }

.logo { display: inline-flex; gap: 2px; align-items: flex-end; }
.logo span { width: 7px; height: 16px; background: var(--ink); border-radius: 1px; }
.logo span:nth-child(2) { height: 11px; background: var(--accent); }
.logo span:nth-child(3) { height: 14px; }

.spinner {
  width: 18px; height: 18px; border-radius: 50%; display: inline-block;
  border: 2px solid var(--line); border-top-color: var(--ink); animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.avatar {
  width: 24px; height: 24px; border-radius: 50%; flex: none; object-fit: cover;
  display: inline-grid; place-items: center; font-size: 10px; font-weight: 600;
  background: hsl(var(--h, 20) 45% 42%); color: #fff;
}

/* Connexion ------------------------------------------------------------------ */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-card { background: var(--surface); padding: 40px 32px; border-radius: 14px; text-align: center; width: min(400px, 100%); box-shadow: 0 10px 40px rgba(0,0,0,.08); display: grid; gap: 10px; justify-items: center; }
.login-card h1 { font-size: 26px; margin-top: 8px; }
.login-card .google { margin-top: 14px; padding: 10px 18px; width: 100%; }
.auth-form { display: grid; gap: 8px; margin-top: 12px; width: 100%; text-align: left; }

/* Barre du haut (maquette « Collecter », Figma 233:21479 et 233:21773) ------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: grid; grid-template-columns: minmax(0, .5fr) minmax(0, 1fr) minmax(0, .5fr);
  height: 64px; padding: 0 16px;
  background: var(--bg);
  border-bottom: 1px solid var(--ui-40);
}
.topbar img { display: block; flex: none; }
:root[data-theme="light"] .topbar img, :root[data-theme="light"] .dd-menu img { filter: invert(1); }
.mono-ui, .brand, .toggle a, .dd-btn, .dd-menu button, .search input, .tb-btn, .af-chip {
  font-family: var(--mono); font-size: 12px; line-height: 12px; text-transform: uppercase; letter-spacing: 0;
}
.tb-left { display: flex; align-items: center; gap: 16px; min-width: 0; }
.brand { display: flex; align-items: center; gap: 16px; text-decoration: none; color: var(--ink); white-space: nowrap; }
.brand img { width: 26px; height: 23.8px; }
.toggle {
  display: flex; align-items: center; padding: 8px 12px;
  border: 1px solid var(--ui-30); border-radius: 6px; backdrop-filter: blur(10px);
}
.toggle a { padding: 7px 12px; border-radius: 6px; text-decoration: none; color: var(--ui-40); white-space: nowrap; }
.toggle a:hover, .toggle a.on { color: var(--ink); }

.tb-center { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 10px; min-width: 0; }
.dropdown { position: relative; flex: none; }
.dd-btn {
  display: flex; align-items: center; gap: 8px; width: 135px; height: 40px; padding: 4px 8px;
  border: 1px solid var(--ui-30); border-radius: 6px; background: none; color: var(--ink); cursor: pointer; text-align: left;
}
.dd-btn span { flex: 1 0 0; }
.dd-btn .chev { width: 16px; height: 16px; transform: rotate(90deg); }
.dd-btn:hover, .dd-btn[aria-expanded="true"] { border-color: var(--ink); }
.dd-btn.active span::after { content: " •"; }
.dd-menu {
  position: absolute; top: calc(100% + 24px); left: 0; z-index: 30; width: 160px;
  display: flex; flex-direction: column;
  background: var(--bg); border: 1px solid var(--ui-30); border-radius: 6px;
  filter: drop-shadow(2px 4px 7.75px rgba(0, 0, 0, .25));
}
.dd-menu button {
  display: flex; align-items: center; gap: 8px; height: 40px; padding: 10px; width: 100%;
  border: 0; background: none; color: var(--ink); cursor: pointer; text-align: left; white-space: nowrap;
}
.dd-menu button:hover { background: var(--ui-10); }
.dd-menu button:disabled { color: var(--ui-40); cursor: default; background: none; }
.dd-menu .ck { width: 16px; height: 16px; flex: none; display: flex; align-items: center; }
.dd-menu button[aria-checked="false"] .ck img { visibility: hidden; }
.dd-sep { display: flex; align-items: center; padding: 8px 0; }
.dd-sep span { flex: 1; height: 1px; background: var(--ui-30); }

.search {
  position: relative; display: flex; align-items: center; gap: 8px;
  width: 438px; max-width: 100%; height: 100%; padding: 4px 8px;
  border: 1px solid var(--ui-30); border-radius: 6px;
}
.search:focus-within { border-color: var(--ink); }
.search-ico { width: 16px; height: 16px; }
.search input[type=search] {
  flex: 1 0 0; min-width: 0; padding: 0; border: 0; border-radius: 0; background: none; color: var(--ink); outline: none;
}
.search input[type=search]::placeholder { color: var(--ui-30); opacity: 1; }
.search input[type=search]:focus { outline: none; }
.search-panel {
  position: absolute; top: calc(100% + 20px); left: 0; z-index: 30; width: 100%;
  display: flex; flex-direction: column; gap: 32px; padding: 16px; overflow: hidden;
  background: var(--bg); border: 1px solid var(--ui-30); border-radius: 6px;
  text-transform: none; font-family: var(--font);
}
.search-panel section { display: flex; flex-direction: column; gap: 13px; min-width: 0; }
.search-panel h4 { margin: 0; font: 400 12px/14px var(--font); color: var(--ui-60); }
.sp-tags, .sp-recent { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.sp-tags::-webkit-scrollbar, .sp-recent::-webkit-scrollbar { display: none; }
.sp-tag {
  display: flex; align-items: center; flex: none; padding: 8px 12px;
  border: 1px solid var(--ui-30); border-radius: 6px; backdrop-filter: blur(10px);
  background: none; color: var(--ink); font: 400 16px/18px var(--font); cursor: pointer; white-space: nowrap;
}
.sp-tag:hover, .sp-tag.on { border-color: var(--ink); }
.sp-shot {
  position: relative; flex: none; width: 97px; height: 117px; padding: 0; overflow: hidden;
  border: 0; border-radius: 6px; background: var(--ui-30); cursor: pointer;
}
.sp-shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sp-shot span {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 6px 6px; text-align: left;
  font: 400 12px/14px var(--font); color: #eee; background: linear-gradient(transparent, rgba(0, 0, 0, .6));
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.tb-right { display: flex; align-items: center; justify-content: flex-end; gap: 16px; padding: 12px 0; min-width: 0; }
.tb-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 8px 10px;
  border: 1px solid var(--ui-30); border-radius: 6px; background: none; color: var(--ink); cursor: pointer; white-space: nowrap; overflow: hidden;
}
.tb-btn:hover { border-color: var(--ink); }
.tb-btn img { width: 20px; height: 20px; }
.tb-btn.sq { width: 40px; padding: 0; flex: none; }
/* « + » de la maquette : deux traits de 1,25 px dans un carré de 20 px */
.ico-plus { position: relative; width: 20px; height: 20px; flex: none; }
.ico-plus::before, .ico-plus::after { content: ""; position: absolute; background: var(--ink); }
.ico-plus::before { top: 6.25%; bottom: 6.25%; left: 46.875%; right: 46.875%; }
.ico-plus::after { left: 6.25%; right: 6.25%; top: 46.875%; bottom: 46.875%; }
.user .user-badge { width: 32px; height: 32px; display: block; }
.user { border: 0; background: none; padding: 0; border-radius: 50%; cursor: pointer; display: grid; flex: none; }
.user .avatar { width: 32px; height: 32px; font-size: 11px; }

/* Filtres actifs (tag, personne, couleur) */
.active-filters { display: flex; gap: 8px; flex-wrap: wrap; padding: 12px 16px 0; }
.af-chip {
  display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px;
  border: 1px solid var(--ink); border-radius: 6px; background: none; color: var(--ink); cursor: pointer;
}
.af-chip .x { color: var(--ui-60); font-size: 15px; line-height: 1; }
.af-chip .swatch { width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--ui-30); }

.segs { display: flex; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 2px; }
.seg { border: 0; background: none; padding: 5px 12px; border-radius: 16px; cursor: pointer; color: var(--muted); font-size: 13px; }
.seg.on { background: var(--ink); color: var(--bg); }

/* Feed en mosaïque ----------------------------------------------------------------- */
#view { padding: 16px 20px 120px; }
.masonry { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: 16px; align-items: start; }
.col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.feed-end { display: grid; place-items: center; min-height: 60px; padding: 20px 0; }
.empty { display: grid; gap: 6px; text-align: center; max-width: 420px; margin: 40px auto; color: var(--muted); }
.empty strong { color: var(--ink); font-size: 16px; }

.card { margin: 0; cursor: zoom-in; position: relative; }
.card .thumb {
  position: relative; overflow: hidden; border-radius: var(--card-radius); background: var(--paper);
  transition: box-shadow .15s;
}
.card:hover .thumb { box-shadow: 0 0 0 1px var(--line), 0 6px 20px rgba(0,0,0,.12); }
.card .thumb > img, .card .thumb > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.card .ph {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 6px;
  padding: 12px; text-align: center; color: var(--muted); font-size: 13px;
}
.card .ph small { font-size: 11px; color: var(--faint); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card .ph.over { background: rgba(0,0,0,.35); color: #fff; }
.card .ph.over small { color: #ddd; }
.card .ph.failed, .card.failed .ph { background: var(--accent-25); color: var(--ink); }
.card .ph.failed strong { color: var(--danger); }
.badges { position: absolute; left: 8px; top: 8px; display: flex; gap: 4px; pointer-events: none; }
.badge { background: rgba(0,0,0,.6); color: #fff; font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 10px; backdrop-filter: blur(4px); }
.card .board-btn, .card .src, .card .check { position: absolute; opacity: 0; transition: opacity .12s; z-index: 2; }
.card .board-btn { top: 8px; right: 8px; background: var(--ink); color: var(--bg); border-color: transparent; }
.card .src {
  left: 8px; bottom: 8px; max-width: calc(100% - 16px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  background: rgba(255,255,255,.92); color: #121212; font-size: 11.5px; padding: 3px 8px; border-radius: 12px; text-decoration: none;
}
.card .check {
  top: 8px; left: 8px; width: 24px; height: 24px; border-radius: 50%; border: 2px solid #fff; background: rgba(0,0,0,.25); cursor: pointer; padding: 0;
}
.card:hover .board-btn, .card:hover .src, .card:hover .check, .card .board-btn:focus { opacity: 1; }
.card:hover .badges { opacity: 0; }
.selecting .card .check { opacity: 1; }
.selecting .card .badges { opacity: 0; }
.selecting .card .board-btn, .selecting .card .src { display: none; }
.selecting .card { cursor: pointer; }
.card.selected .thumb { outline: 3px solid var(--accent); outline-offset: 2px; }
.card.selected .check { background: var(--accent); border-color: var(--accent); }
.card.selected .check::after { content: "✓"; color: #fff; font-size: 13px; font-weight: 700; display: grid; place-items: center; height: 100%; }
@media (hover: none) {
  /* Sur écran tactile, on ne voit que les images (tableaux : depuis la fiche ou par appui long). */
  .card .board-btn, .card .src { display: none; }
}
figcaption { padding: 6px 2px 0; display: grid; gap: 4px; }
figcaption p { margin: 0; font-size: 13px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.by { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); min-width: 0; }
.by .avatar { width: 20px; height: 20px; font-size: 9px; }
.meta-icons { display: flex; justify-content: flex-end; gap: 8px; font-size: 11px; color: var(--faint); white-space: nowrap; }
figcaption .tags { display: flex; flex-wrap: wrap; gap: 4px; }
figcaption .site-title { display: grid; gap: 1px; -webkit-line-clamp: unset; }
figcaption .site-title strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
figcaption .site-title span { font-size: 11.5px; color: var(--muted); }
.card.site .thumb > img { object-position: top; }
.scroll-shot { max-height: calc(100vh - 32px - 84px); width: min(100%, 1100px); overflow: auto; border-radius: 4px; }
.scroll-shot img { width: 100%; max-height: none !important; max-width: none; border-radius: 0; }
.site-box { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.site-box strong { font-size: 15px; }
.site-box p { margin: 0; font-size: 13px; color: var(--muted); }
.site-box .btn { justify-self: start; }
.tag {
  border: 0; background: var(--paper); color: var(--muted); padding: 1px 7px; border-radius: 10px;
  font-size: 11.5px; cursor: pointer; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tag:hover { background: var(--ink); color: var(--bg); }
figcaption .more { font-size: 11px; color: var(--faint); align-self: center; }
#filterTag.active { border-color: var(--ink); }
.tagchip { display: inline-flex; align-items: center; gap: 2px; padding: 3px 4px 3px 10px; }
.tagchip .link-tag { border: 0; background: none; padding: 0; color: inherit; cursor: pointer; font: inherit; }
.tagchip .x { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 15px; line-height: 1; padding: 0 4px; border-radius: 50%; }
.tagchip .x:hover { color: var(--danger); }
.tag-input { width: 110px !important; padding: 5px 10px !important; border-radius: 16px !important; font-size: 13px; border-style: dashed !important; }
.side .comments { display: grid; gap: 10px; border-top: 1px solid var(--line); padding-top: 14px; }
.side .comments h3 { font-size: 13px; display: flex; align-items: center; gap: 6px; }
.count { background: var(--paper); border-radius: 9px; padding: 0 7px; font-size: 11px; color: var(--muted); font-weight: 400; }
#commentList { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
#commentList li { display: grid; grid-template-columns: 24px 1fr; gap: 8px; align-items: start; }
#commentList li.empty-c { display: block; }
.c-head { display: flex; gap: 8px; align-items: baseline; font-size: 13px; }
.c-body { margin: 2px 0 0; white-space: pre-line; word-break: break-word; font-size: 13.5px; }
.c-body a { color: inherit; }
.c-actions { display: flex; gap: 10px; margin-top: 2px; }
.comment-form { display: grid; gap: 6px; justify-items: end; }
.comment-form textarea { font-size: 13.5px; color: var(--ink); }
.comment-form.edit { justify-items: stretch; }
.up-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(0,0,0,.15); }
.up-bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.card.uploading { cursor: default; }

.new-pins {
  position: fixed; top: 70px; left: 50%; transform: translateX(-50%); z-index: 21;
  border: 0; border-radius: 18px; padding: 8px 16px; background: var(--accent); color: #fff; cursor: pointer;
  box-shadow: 0 6px 20px rgba(0,0,0,.2); font-weight: 600;
}

/* Tableaux ---------------------------------------------------------------- */
.boards-head, .board-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.boards-head h1, .board-head h1 { font-size: 26px; }
.boards-head .btn { margin-left: auto; }
.board-head { display: grid; justify-items: center; text-align: center; gap: 6px; padding: 8px 0 12px; }
.board-head .back { justify-self: start; color: var(--muted); text-decoration: none; font-size: 13px; }
.board-head .desc { margin: 0; max-width: 640px; white-space: pre-line; }
.board-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.boards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 24px 18px; }
.board-card { display: grid; gap: 4px; text-decoration: none; }
.board-card .covers {
  display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 2px;
  aspect-ratio: 3 / 2; border-radius: 14px; overflow: hidden; background: var(--paper); margin-bottom: 4px;
}
.board-card .covers > :first-child { grid-row: span 2; }
.board-card .covers img, .board-card .covers span { width: 100%; height: 100%; object-fit: cover; display: block; background: var(--line-soft); }
.board-card:hover .covers { opacity: .9; }
.board-card strong { font-size: 15px; }

/* Barre de sélection ------------------------------------------------------- */
.selection-bar {
  position: fixed; bottom: max(16px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); z-index: 25;
  width: max-content; max-width: calc(100vw - 32px);
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center;
  padding: 10px 14px; background: var(--ink); color: var(--bg); border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,.3);
}
.selection-bar .btn.ghost { color: var(--bg); }

/* Zone de dépôt ---------------------------------------------------------- */
.drop-overlay {
  position: fixed; inset: 0; z-index: 1500; pointer-events: none;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  display: grid; place-items: center; border: 4px dashed var(--accent);
}
.drop-overlay div { background: var(--surface); padding: 20px 28px; border-radius: 14px; display: grid; gap: 4px; text-align: center; box-shadow: 0 10px 40px rgba(0,0,0,.2); }
.drop-overlay strong { font-size: 18px; }
.drop-overlay span { color: var(--muted); }

/* Boîtes de dialogue ------------------------------------------------------- */
dialog { border: 1px solid var(--line); border-radius: 12px; padding: 0; background: var(--surface); color: var(--ink); box-shadow: 0 20px 60px rgba(0,0,0,.3); }
dialog::backdrop { background: rgba(10,10,10,.6); }
.form-dialog { width: min(500px, calc(100vw - 24px)); }
.form-dialog.wide { width: min(720px, calc(100vw - 24px)); }
.form-dialog form { padding: 20px; display: grid; gap: 14px; }
.form-dialog label, .field { display: grid; gap: 6px; font-size: 12px; color: var(--muted); }
.form-dialog label input, .form-dialog label textarea { font-size: 14px; color: var(--ink); }
.dlg-head { display: flex; justify-content: space-between; align-items: center; }
.actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
.actions .spacer { flex: 1; }
.dropzone {
  display: grid !important; justify-items: center; gap: 4px; padding: 24px 16px; text-align: center; cursor: pointer;
  border: 2px dashed var(--line); border-radius: 10px; color: var(--ink) !important; font-size: 14px !important;
}
.dropzone:hover, .dropzone.has-files { border-color: var(--accent); background: var(--accent-25); }
.files-list { font-size: 12px; color: var(--muted); word-break: break-all; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 5px 11px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; font-size: 13px; }
.chip:hover { border-color: var(--muted); }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chip.new { border-style: dashed; color: var(--muted); }

.help-body { padding: 20px; display: grid; gap: 18px; max-height: 85vh; overflow: auto; }
.help-body section { display: grid; gap: 8px; border-top: 1px solid var(--line); padding-top: 14px; }
.help-body p, .help-body ol { margin: 0; line-height: 1.5; }
.help-body ol { padding-left: 20px; display: grid; gap: 6px; }

/* Pin en grand -------------------------------------------------------------- */
.pin-dialog {
  width: calc(100vw - 32px); height: calc(100vh - 32px); max-width: 1600px; max-height: none;
  display: none; grid-template-columns: minmax(0, 1fr) 340px; background: #0c0c0c; border: 0; overflow: hidden;
}
.pin-dialog[open] { display: grid; }
.viewer { position: relative; min-width: 0; min-height: 0; display: grid; }
.stage { display: grid; place-items: center; padding: 20px 56px 64px; min-height: 0; }
.stage img, .stage video { max-width: 100%; max-height: calc(100vh - 32px - 84px); object-fit: contain; display: block; border-radius: 4px; }
.stage-msg { display: grid; justify-items: center; gap: 8px; color: #eee; text-align: center; max-width: 420px; }
.stage-msg .muted { color: #aaa; word-break: break-all; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.viewer .nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 42px; height: 42px; border: 0; border-radius: 50%; background: rgba(255,255,255,.88); color: #121212; font-size: 24px; line-height: 1; cursor: pointer;
}
.viewer .nav:disabled { opacity: .25; cursor: default; }
.viewer .nav.prev { left: 10px; }
.viewer .nav.next { right: 10px; }
.dots { position: absolute; bottom: 52px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; }
.dots button { width: 8px; height: 8px; border-radius: 50%; border: 0; padding: 0; background: rgba(255,255,255,.35); cursor: pointer; }
.dots button.on { background: #fff; }
.pin-nav { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; justify-content: center; gap: 12px; }
.pin-nav .btn:disabled { opacity: .3; }
.drop-hint { position: absolute; inset: 12px; border: 3px dashed var(--accent); border-radius: 12px; display: grid; place-items: center; color: #fff; font-size: 18px; background: rgba(237,91,54,.15); pointer-events: none; }
.side { background: var(--surface); overflow: auto; padding: 18px; display: flex; flex-direction: column; gap: 16px; }
.side header { display: flex; justify-content: space-between; align-items: flex-start; }
.side header .by { color: var(--ink); font-size: 14px; }
.side header .by .avatar { width: 34px; height: 34px; font-size: 12px; }
.pin-title { margin: 0; font-size: 13px; color: var(--muted); white-space: pre-line; max-height: 140px; overflow: auto; word-break: break-word; }
.side textarea { color: var(--ink); font-size: 14px; }
.source-row { display: flex; align-items: center; gap: 10px; color: var(--ink); font-size: 14px; }
.source-link { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.source-edit { display: flex; gap: 6px; }
.side-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }

/* Menus flottants ---------------------------------------------------------- */
.popover {
  position: absolute; z-index: 1000; width: 280px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 34px rgba(0,0,0,.2);
}
.popover input { margin-bottom: 4px; }
.popover ul { list-style: none; margin: 0; padding: 0; max-height: 300px; overflow: auto; }
.popover button {
  width: 100%; display: flex; align-items: center; gap: 8px; text-align: left;
  padding: 8px 8px; border: 0; background: none; border-radius: 6px; cursor: pointer; color: var(--ink);
}
.popover button:hover { background: var(--paper); }
.popover button .muted { margin-left: auto; }
.popover .tick { width: 16px; color: var(--accent); font-weight: 700; flex: none; }
.popover .pad { padding: 8px; }
.popover.menu { width: 300px; }

/* Notifications -------------------------------------------------------------- */
.toasts { position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%); z-index: 2000; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 8px; box-shadow: 0 6px 24px rgba(0,0,0,.25); transition: opacity .4s; max-width: min(520px, calc(100vw - 32px)); }
.toast.error { background: var(--danger); color: #fff; }
.toast.success { background: var(--ok); color: #fff; }
.toast.out { opacity: 0; }

/* Mobile --------------------------------------------------------------------- */
@media (max-width: 760px) {
  .seg { padding: 5px 10px; }
  #view { padding: 12px 10px 120px; }
  .masonry, .col { gap: 10px; }
  .pin-dialog { width: 100vw; height: 100dvh; max-width: none; border-radius: 0; grid-template-columns: 1fr; grid-template-rows: auto auto; overflow: auto; }
  .stage { padding: 12px 8px 56px; min-height: 50vh; }
  .stage img, .stage video { max-height: 70vh; }
  .scroll-shot { max-height: 70vh; }
  .viewer .nav { width: 34px; height: 34px; font-size: 20px; }
  .side { overflow: visible; }
}

/* ===========================================================================
   Version mobile : navigation en bas, panneaux qui montent du bas, fiche plein écran.
   =========================================================================== */
.bottom-nav, .mobile-only, .pin-top { display: none; }

@media (max-width: 760px) {
  .desktop-only { display: none !important; }
  .mobile-only { display: revert; }
  body { -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none; }

  /* Barre du haut réduite : logo, onglets (masqués : ils sont en bas), recherche à la demande. */
  .topbar {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px; height: auto;
    padding: 10px 12px; padding-top: max(10px, env(safe-area-inset-top));
  }
  .topbar .toggle, .tb-right { display: none; }
  .tb-left { flex: 1; }
  .tb-center { display: contents; }
  .dd-btn { width: auto; }
  .dd-menu { left: auto; right: 0; top: calc(100% + 8px); }
  .search { display: none; order: 10; flex-basis: 100%; width: 100%; height: 40px; }
  body.search-open .search { display: flex; }
  .search input[type=search] { font-size: 16px; }   /* évite le zoom automatique d'iOS */
  .search-panel { top: calc(100% + 8px); gap: 20px; }
  .active-filters { padding: 10px 12px 0; }

  #btnSelect { display: none; }
  #view { padding: 10px 8px calc(96px + env(safe-area-inset-bottom)); }
  .masonry, .col { gap: 8px; }
  .card .thumb { border-radius: 12px; }
  figcaption { padding: 5px 2px 0; }
  figcaption p { font-size: 12.5px; }
  .boards-head h1, .board-head h1 { font-size: 22px; }
  .boards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 10px; }
  .board-card .covers { border-radius: 12px; }
  .board-card strong { font-size: 14px; }

  /* Barre de navigation du bas */
  .bottom-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
    padding: 6px 6px max(6px, env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
  }
  .bottom-nav > * {
    display: grid; justify-items: center; gap: 2px; padding: 4px 0; border: 0; background: none;
    color: var(--muted); font-size: 10.5px; text-decoration: none; cursor: pointer;
  }
  .bottom-nav svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
  .bottom-nav .on, body.search-open .bottom-nav [data-nav=search] { color: var(--ink); }
  .bottom-nav .on svg { stroke-width: 2.2; }
  .bottom-nav .add { justify-self: center; width: 52px; height: 40px; border-radius: 14px; background: var(--ink); color: var(--bg); place-items: center; }
  .bottom-nav .add svg { stroke-width: 2.4; }
  .nav-avatar .avatar { width: 24px; height: 24px; font-size: 9px; }
  .bottom-nav .on .nav-avatar .avatar { box-shadow: 0 0 0 2px var(--ink); }

  .selection-bar { bottom: calc(70px + env(safe-area-inset-bottom)); width: calc(100vw - 16px); max-width: none; border-radius: 14px; }
  .toasts { bottom: calc(80px + env(safe-area-inset-bottom)); }
  .new-pins { top: calc(60px + env(safe-area-inset-top)); }

  /* Boîtes de dialogue : panneaux qui montent du bas */
  dialog.form-dialog {
    width: 100vw; max-width: 100vw; margin: auto 0 0; max-height: 92dvh; border-radius: 18px 18px 0 0; border-width: 1px 0 0;
    padding-bottom: env(safe-area-inset-bottom); animation: sheet-up .22s ease-out;
  }
  dialog.form-dialog form, .help-body { padding: 16px; }
  dialog.form-dialog::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 8px auto 0; }
  .form-dialog input:not([type=checkbox]):not([type=file]), .form-dialog textarea { font-size: 16px; }
  .actions .btn { flex: 1; padding: 11px 12px; }
  .actions .spacer { display: none; }
  .add-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .big-action {
    display: grid !important; justify-items: center; gap: 6px; padding: 14px 6px; border-radius: 14px;
    border: 1px solid var(--line); background: var(--paper); color: var(--ink) !important; font: 500 13px var(--font) !important; text-align: center; cursor: pointer;
  }
  .big-action svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
  .files-list.mobile-only:empty { display: none; }

  /* Menus (tableaux, tags, compte) : panneaux en bas */
  .sheet-backdrop { position: fixed; inset: 0; z-index: 999; background: rgba(0,0,0,.45); animation: fade .2s; }
  .popover.sheet {
    position: fixed; left: 0 !important; right: 0; top: auto !important; bottom: 0; transform: none !important;
    width: auto !important; max-height: 75dvh; overflow: auto; border-radius: 18px 18px 0 0; border-width: 1px 0 0;
    padding: 10px 10px max(12px, env(safe-area-inset-bottom)); animation: sheet-up .22s ease-out;
  }
  .popover.sheet::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 0 auto 10px; }
  .popover.sheet input { font-size: 16px; }
  .popover.sheet button { padding: 13px 10px; font-size: 15px; }
  .popover.sheet ul { max-height: none; }

  /* Fiche d'un pin plein écran */
  .pin-dialog { display: none; width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; grid-template-columns: 1fr; grid-template-rows: auto auto; overflow-y: auto; overscroll-behavior: contain; }
  .pin-dialog[open] { display: block; }
  .viewer { display: block; background: #0c0c0c; }
  .pin-top {
    display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 4;
    padding: max(6px, env(safe-area-inset-top)) 6px 6px; color: #ddd; font-size: 13px;
    background: linear-gradient(#0c0c0c, rgba(12,12,12,.85));
  }
  .stage { padding: 0 0 26px; min-height: 40vh; }
  .stage img, .stage video { max-width: 100%; max-height: 72dvh; border-radius: 0; }
  .stage-msg { padding: 40px 20px; }
  .scroll-shot { max-height: 72dvh; width: 100%; }
  .viewer .nav, .pin-nav { display: none; }
  .dots { bottom: 8px; }
  .side { padding: 16px 16px calc(24px + env(safe-area-inset-bottom)); overflow: visible; }
  .side header .btn[data-act=close] { display: none; }
  .side textarea, .tag-input, #pinSource { font-size: 16px !important; }
  .side-actions .btn { flex: 1 1 40%; }
}

@keyframes sheet-up { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } }

.devices { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.devices li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.devices li div { display: grid; gap: 2px; }
.advanced { margin-top: 4px; }
.advanced summary { cursor: pointer; }
.advanced[open] { display: grid; gap: 8px; }

.group-menu { width: 300px; }
.group-menu button span { display: grid; gap: 2px; text-align: left; }
.group-menu button .muted { font-weight: 400; line-height: 1.35; }

.side .pin-name { font-size: 16px; font-weight: 600; color: var(--ink); border-color: transparent; background: var(--paper); }
.side .pin-name:hover { border-color: var(--line); }
.side .pin-name:focus { background: var(--surface); }

.warn-box { display: grid; gap: 8px; padding: 10px 12px; border-radius: 10px; background: #fdf1d6; color: #7a5200; font-size: 13px; }
.warn-box p { margin: 0; }
[data-theme="dark"] .warn-box { background: #3a2c10; color: #e6b866; }

.import-banner { display: flex; align-items: center; gap: 8px; justify-content: center; padding: 8px 14px; border-radius: 10px; background: var(--paper); font-size: 13px; }
.import-banner .spinner { width: 14px; height: 14px; }
.import-banner.error { background: var(--accent-25); color: var(--danger); }
.pinterest-form { display: grid; gap: 12px; }
.pinterest-form input, .pinterest-form select { font-size: 14px; color: var(--ink); }

/* Couleurs et images similaires */
.palette { display: flex; gap: 6px; }
.palette .swatch { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line); cursor: pointer; padding: 0; }
.palette .swatch:hover { transform: scale(1.12); }
.side .similar { padding-top: 12px; border-top: 1px solid var(--line); }
.side .similar h3 { font-size: 13px; margin: 0 0 8px; }
#similarGrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
#similarGrid > .spinner, #similarGrid > p { grid-column: 1 / -1; }
.sim { position: relative; }
.sim > button[data-sim] { display: block; width: 100%; aspect-ratio: 1; padding: 0; border: 0; border-radius: 8px; overflow: hidden; background: var(--line); cursor: pointer; }
.sim img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sim.dup > button[data-sim] { outline: 2px solid var(--accent); outline-offset: -2px; }
.sim .dup-tag { position: absolute; left: 4px; right: 4px; bottom: 4px; font-size: 11px; padding: 3px 4px; border-radius: 6px; border: 0; background: rgba(0, 0, 0, .75); color: #fff; cursor: pointer; }

/* Feed « Pour vous » / chronologique */
.segs[hidden] { display: none; }

/* Menus du compte et ☰ : même style que le menu « Classer » */
.popover.menu { background: var(--bg); border: 1px solid var(--ui-30); border-radius: 6px; box-shadow: none; filter: drop-shadow(2px 4px 7.75px rgba(0, 0, 0, .25)); padding: 0; }
.popover.menu button { font-family: var(--mono); font-size: 12px; line-height: 14px; text-transform: uppercase; min-height: 40px; padding: 10px; }
.popover.menu button:hover { background: var(--ui-10); }
.popover.menu .pad { padding: 12px 10px; border-bottom: 1px solid var(--ui-30); }
.login-card .brand-logo { width: 26px; height: 23.8px; }
:root[data-theme="light"] .login-card .brand-logo { filter: invert(1); }

/* ===========================================================================
   Pin ouvert : typos et style de la maquette Collecter
   (libellés et boutons en Graebenbach Mono capitales, textes en PP Mori, bordures UI/30, coins de 6 px)
   =========================================================================== */
.pin-dialog {
  background: #121212; border: 1px solid var(--ui-30); border-radius: 6px; padding: 0;
  filter: drop-shadow(2px 4px 7.75px rgba(0, 0, 0, .25));
}
.pin-dialog::backdrop { background: rgba(18, 18, 18, .8); backdrop-filter: blur(4px); }
.pin-dialog .viewer { background: #121212; }
.pin-dialog .stage img, .pin-dialog .stage video { border-radius: 6px; }
.pin-dialog .stage-msg { font: 400 16px/18px var(--font); }
.pin-dialog .viewer .nav {
  width: 40px; height: 40px; border-radius: 6px; border: 1px solid rgba(238, 238, 238, .3);
  background: rgba(18, 18, 18, .6); color: #eee; font: 400 20px/1 var(--mono); backdrop-filter: blur(10px);
}
.pin-dialog .viewer .nav:hover:not(:disabled) { border-color: #eee; }
.pin-dialog .dots button { border-radius: 2px; }
.pin-dialog .pin-nav .btn, .pin-dialog .pin-top .btn {
  font-family: var(--mono); font-size: 12px; line-height: 12px; text-transform: uppercase;
  height: 40px; padding: 8px 10px; border: 1px solid rgba(238, 238, 238, .3); border-radius: 6px; background: rgba(18, 18, 18, .6); color: #eee;
}
.pin-dialog .pin-nav .btn:hover:not(:disabled) { border-color: #eee; }

/* Colonne d'informations */
.pin-dialog .side {
  background: var(--bg); color: var(--ink); border-left: 1px solid var(--ui-30);
  padding: 16px; gap: 24px; font: 400 14px/18px var(--font);
}
.pin-dialog .side header { align-items: center; padding-bottom: 16px; border-bottom: 1px solid var(--ui-30); }
.pin-dialog .side header .by { gap: 10px; font: 400 16px/18px var(--font); color: var(--ink); }
.pin-dialog .side header .by strong { font-weight: 400; }
.pin-dialog .side header .by .muted { font: 400 12px/14px var(--mono); text-transform: uppercase; color: var(--ui-60); }
.pin-dialog .side header .avatar { width: 32px; height: 32px; }

/* Libellés de champs : mono capitales, UI/60 ; champs : PP Mori 16 */
.pin-dialog .field, .pin-dialog .side > label {
  gap: 10px; font: 400 12px/12px var(--mono); text-transform: uppercase; color: var(--ui-60);
}
.pin-dialog .field > span { font: inherit; }
.pin-dialog input:not([type=checkbox]):not([type=file]), .pin-dialog textarea {
  font: 400 16px/18px var(--font); text-transform: none; color: var(--ink);
  background: none; border: 1px solid var(--ui-30); border-radius: 6px; padding: 11px 12px;
}
.pin-dialog input:focus, .pin-dialog textarea:focus { outline: none; border-color: var(--ink); }
.pin-dialog input::placeholder, .pin-dialog textarea::placeholder { color: var(--ui-30); opacity: 1; }
.pin-dialog .side .pin-name { font: 400 16px/18px var(--font); background: none; border-color: var(--ui-30); }
.pin-dialog .side .pin-name:hover { border-color: var(--ui-60); }

.pin-dialog .source-row { font: 400 16px/18px var(--font); text-transform: none; color: var(--ink); }
.pin-dialog .source-link { text-decoration: none; }
.pin-dialog .source-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.pin-dialog .link, .pin-dialog .c-actions button {
  font: 400 12px/12px var(--mono); text-transform: uppercase; color: var(--ui-60); text-decoration: none;
}
.pin-dialog .link:hover, .pin-dialog .c-actions button:hover { color: var(--ink); }

/* Pastilles (tableaux, tags) : comme les tags du panneau de recherche */
.pin-dialog .chips { gap: 8px; }
.pin-dialog .chip {
  padding: 8px 12px; border: 1px solid var(--ui-30); border-radius: 6px; background: none;
  font: 400 16px/18px var(--font); text-transform: none; color: var(--ink); backdrop-filter: blur(10px);
}
.pin-dialog .chip:hover { border-color: var(--ink); }
.pin-dialog .chip.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.pin-dialog .chip.new { border-style: dashed; color: var(--ui-60); }
.pin-dialog .tagchip { padding: 8px 6px 8px 12px; gap: 4px; }
.pin-dialog .tagchip .x { color: var(--ui-60); font-size: 16px; }
.pin-dialog .tag-input {
  width: 120px !important; padding: 8px 12px !important; border-radius: 6px !important;
  border-style: dashed !important; font: 400 16px/18px var(--font) !important;
}

/* Informations techniques et couleurs */
.pin-dialog .side > p.small { font: 400 12px/14px var(--mono); text-transform: uppercase; color: var(--ui-60); margin: 0; }
.pin-dialog .side > p.small a { color: var(--ink); text-transform: none; font-family: var(--font); }
.pin-dialog .palette { gap: 8px; }
.pin-dialog .palette .swatch { width: 32px; height: 32px; border-radius: 6px; border: 1px solid var(--ui-30); }
.pin-dialog .palette .swatch:hover { transform: none; border-color: var(--ink); }
.pin-dialog .site-box { border: 1px solid var(--ui-30); border-radius: 6px; padding: 16px; gap: 12px; }
.pin-dialog .site-box p { font: 400 14px/18px var(--font); color: var(--ui-60); }
.pin-dialog .warn-box { border-radius: 6px; font: 400 14px/18px var(--font); }

/* Titres de section : mono capitales, UI/60 */
.pin-dialog .side .comments, .pin-dialog .side .similar { border-top: 1px solid var(--ui-30); padding-top: 16px; gap: 13px; }
.pin-dialog .side h3 {
  font: 400 12px/12px var(--mono); text-transform: uppercase; color: var(--ui-60); margin: 0;
}
.pin-dialog .count { background: none; border: 1px solid var(--ui-30); border-radius: 6px; padding: 2px 6px; font: 400 12px/12px var(--mono); color: var(--ui-60); }
.pin-dialog #commentList { gap: 16px; }
.pin-dialog .c-head { font: 400 14px/18px var(--font); }
.pin-dialog .c-head .muted { font: 400 12px/14px var(--mono); text-transform: uppercase; color: var(--ui-60); }
.pin-dialog .c-body { font: 400 16px/20px var(--font); }
.pin-dialog .empty-c, .pin-dialog #similarGrid > p { font: 400 14px/18px var(--font); color: var(--ui-60); }

/* Images similaires */
.pin-dialog #similarGrid { gap: 8px; }
.pin-dialog .sim > button[data-sim] { border-radius: 6px; background: var(--ui-30); }
.pin-dialog .sim .dup-tag { font: 400 11px/12px var(--mono); text-transform: uppercase; border-radius: 6px; padding: 5px 4px; }

/* Boutons : comme ceux de l'en-tête */
.pin-dialog .side .btn {
  height: 40px; padding: 8px 10px; border: 1px solid var(--ui-30); border-radius: 6px; background: none; color: var(--ink);
  font: 400 12px/12px var(--mono); text-transform: uppercase;
}
.pin-dialog .side .btn.small { height: 32px; padding: 6px 10px; }
.pin-dialog .side .btn:hover { border-color: var(--ink); }
.pin-dialog .side .btn.primary { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.pin-dialog .side .btn.ghost { border-color: var(--ui-30); }
.pin-dialog .side .btn.icon { width: 40px; padding: 0; font-size: 14px; }
.pin-dialog .side .danger-text { border-color: rgba(225, 29, 72, .5) !important; }
.pin-dialog .side-actions { gap: 8px; padding-top: 16px; border-top: 1px solid var(--ui-30); }

@media (max-width: 760px) {
  .pin-dialog { border: 0; border-radius: 0; filter: none; }
  .pin-dialog .side { border-left: 0; border-top: 1px solid var(--ui-30); }
}
