/* Digital Labs v60 — skin « Nocturne »
   Couche visuelle chargée APRÈS app.css : tokens, aurora, verre dépoli, cards à spotlight.
   Pour revenir à l'ancien rendu, retirer la balise <link> de skin.css dans index.html. */

:root {
  --bg: #05060a;
  --bg-soft: #090b12;
  --surface: rgba(16, 19, 29, .62);
  --surface-solid: #11141d;
  --surface-2: rgba(255, 255, 255, .045);
  --surface-hover: rgba(255, 255, 255, .08);
  --text: #f4f6fb;
  --muted: #9aa3b8;
  --muted-2: #6c7690;
  --line: rgba(255, 255, 255, .075);
  --line-strong: rgba(255, 255, 255, .16);
  --brand: #9b8cff;
  --brand-2: #5fe3ff;
  --warm: #ffb36b;
  --success: #4ee3a4;
  --warning: #ffc66d;
  --danger: #ff6f8a;
  --shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 40px 90px -30px rgba(0, 0, 0, .75);
  --radius-xl: 32px;
  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --sans: "Inter var", Inter, "SF Pro Display", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

body.light {
  --bg: #f3f1ed;
  --bg-soft: #ebe8f2;
  --surface: rgba(255, 255, 255, .72);
  --surface-solid: #ffffff;
  --surface-2: rgba(25, 28, 45, .045);
  --surface-hover: rgba(25, 28, 45, .075);
  --text: #14172a;
  --muted: #5d6680;
  --muted-2: #8790a8;
  --line: rgba(25, 28, 55, .09);
  --line-strong: rgba(25, 28, 55, .18);
  --brand: #6a58e8;
  --brand-2: #0e8fb5;
  --shadow: 0 1px 0 rgba(255,255,255,.8) inset, 0 40px 80px -36px rgba(60, 54, 110, .28);
}

/* ── Fond : aurora lente + grain de grille ─────────────────────────────── */
body {
  background:
    radial-gradient(60rem 38rem at 12% -8%, rgba(155, 140, 255, .20), transparent 62%),
    radial-gradient(50rem 34rem at 96% 6%, rgba(95, 227, 255, .13), transparent 60%),
    radial-gradient(44rem 30rem at 55% 108%, rgba(255, 179, 107, .09), transparent 62%),
    linear-gradient(180deg, var(--bg-soft), var(--bg) 60%);
  background-attachment: fixed;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
}
body.light {
  background:
    radial-gradient(60rem 38rem at 12% -8%, rgba(106, 88, 232, .14), transparent 62%),
    radial-gradient(50rem 34rem at 96% 6%, rgba(14, 143, 181, .10), transparent 60%),
    radial-gradient(44rem 30rem at 55% 108%, rgba(255, 150, 80, .10), transparent 62%),
    linear-gradient(180deg, var(--bg-soft), var(--bg) 60%);
  background-attachment: fixed;
}
body::before {
  background-image:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 50% 0, #000, transparent 70%);
}
body.light::before {
  background-image:
    linear-gradient(rgba(25,28,55,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(25,28,55,.035) 1px, transparent 1px);
}

.shell { width: min(1440px, calc(100% - 48px)); padding-top: 20px; }

/* Verre : bordure en dégradé + reflet haut */
.glass {
  position: relative;
  border: 0;
  background: var(--surface);
  backdrop-filter: blur(28px) saturate(150%);
  -webkit-backdrop-filter: blur(28px) saturate(150%);
}
.glass::after, .context-strip::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(160deg, rgba(255,255,255,.22), rgba(255,255,255,.04) 38%, rgba(255,255,255,.02) 62%, rgba(155,140,255,.28));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
body.light .glass::after, body.light .context-strip::after {
  background: linear-gradient(160deg, rgba(255,255,255,.95), rgba(25,28,55,.06) 40%, rgba(106,88,232,.22));
}

/* ── Topbar ────────────────────────────────────────────────────────────── */
.topbar { border-radius: 999px; min-height: 66px; padding: 9px 10px 9px 12px; top: 14px; }
.brand-mark {
  width: 44px; height: 44px; border-radius: 50%;
  background: conic-gradient(from 210deg, #9b8cff, #5fe3ff, #ffb36b, #9b8cff);
  box-shadow: 0 0 0 1px rgba(255,255,255,.2) inset, 0 10px 34px rgba(155,140,255,.45);
  color: #090b12; letter-spacing: -1.5px;
}
.brand-name { font-size: 15px; letter-spacing: -.03em; }
.brand-version { letter-spacing: .14em; }
.search { border-radius: 999px; background: var(--surface-2); border-color: var(--line); }
.search:focus { border-color: color-mix(in srgb, var(--brand) 60%, transparent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 16%, transparent); }
.status-pill, .icon-btn { border-radius: 999px; }
.profile-btn { border-radius: 50%; background: linear-gradient(145deg, #9b8cff, #5b4bd6); }

/* ── Hero ──────────────────────────────────────────────────────────────── */
.overview { gap: 20px; margin-top: 20px; }
.welcome { min-height: 340px; padding: clamp(28px, 4vw, 56px); align-items: flex-end; }
.welcome::before {
  width: 560px; height: 560px; right: -140px; top: -260px; bottom: auto;
  background: conic-gradient(from 90deg, rgba(155,140,255,.5), rgba(95,227,255,.38), rgba(255,179,107,.32), rgba(155,140,255,.5));
  filter: blur(80px); opacity: .5; border-radius: 50%;
  animation: orbDrift 22s ease-in-out infinite alternate;
}
body.light .welcome::before { opacity: .38; }
.welcome::after {
  background:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px) 0 0 / 40px 40px;
  mask-image: linear-gradient(120deg, transparent 30%, #000 100%);
  -webkit-mask-image: linear-gradient(120deg, transparent 30%, #000 100%);
  inset: 0; border-radius: inherit; padding: 0; -webkit-mask-composite: initial; mask-composite: initial;
}
body.light .welcome::after {
  background:
    linear-gradient(rgba(25,28,55,.05) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, rgba(25,28,55,.05) 1px, transparent 1px) 0 0 / 40px 40px;
}
.eyebrow { display: inline-flex; align-items: center; gap: 10px; color: var(--brand-2); letter-spacing: .2em; }
.eyebrow::before { content: ""; width: 26px; height: 1px; background: currentColor; }
.welcome h1 {
  max-width: 900px;
  font-size: clamp(40px, 5.6vw, 84px);
  line-height: .94; letter-spacing: -.062em; font-weight: 780;
  background: linear-gradient(180deg, var(--text), color-mix(in srgb, var(--text) 62%, transparent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.welcome h1 span, body.light .welcome h1 span {
  background: linear-gradient(100deg, #b6aaff 0%, #5fe3ff 52%, #ffb36b 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
body.light .welcome h1 span { background: linear-gradient(100deg, #5a47e0 0%, #0e8fb5 55%, #e0701e 100%); -webkit-background-clip: text; background-clip: text; }
.welcome-sub { max-width: 560px; font-size: 15px; line-height: 1.6; }
.welcome-metrics { gap: 10px; margin-top: 26px; }
.metric {
  padding: 8px 14px; border-radius: 999px; background: var(--surface-2);
  border: 1px solid var(--line); font-size: 12px; backdrop-filter: blur(10px);
}
.metric strong { font-size: 13px; }

/* ── System Pulse ──────────────────────────────────────────────────────── */
.pulse { padding: 28px; min-height: 340px; }
.panel-heading h2 { font-size: 18px; letter-spacing: -.03em; }
.pulse-list { gap: 10px; margin-top: 22px; }
.pulse-row { border-radius: 18px; background: var(--surface-2); border: 1px solid var(--line); min-height: 58px; transition: background .2s var(--ease), transform .2s var(--ease); }
.pulse-row:hover { background: var(--surface-hover); transform: translateX(3px); }
.pulse-value { display: inline-flex; align-items: center; gap: 8px; }
.pulse-value::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 12px currentColor; }
.pulse-value.is-online::before { animation: livePulse 2.4s ease-in-out infinite; }

/* ── Bandeau contexte : une seule barre segmentée ─────────────────────── */
.context-strip {
  position: relative; gap: 0; margin-top: 20px; border-radius: 24px;
  background: var(--surface); backdrop-filter: blur(24px) saturate(140%); -webkit-backdrop-filter: blur(24px) saturate(140%);
  box-shadow: var(--shadow);
}
.context-item { border: 0; background: transparent; backdrop-filter: none; border-radius: 0; padding: 16px 20px; min-height: 78px; }
.context-item + .context-item { border-left: 1px solid var(--line); }
.context-icon { border-radius: 50%; background: var(--surface-2); }
.context-value { font-size: 16px; font-variant-numeric: tabular-nums; }

/* ── Section projets ───────────────────────────────────────────────────── */
.projects-section { margin-top: 46px; }
.projects-title-wrap h2 { font-size: clamp(28px, 3vw, 40px); letter-spacing: -.05em; font-weight: 780; }
.projects-title-wrap p { font-size: 13px; }
.segmented { border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); padding: 4px; }
.segment-btn { border-radius: 999px; }
.segment-btn.is-active { background: var(--text); color: var(--bg); box-shadow: 0 6px 20px -6px rgba(0,0,0,.5); }
.segment-btn.is-active .count-badge { background: color-mix(in srgb, var(--bg) 18%, transparent); color: var(--bg); }
.soft-btn { border-radius: 999px; background: var(--surface-2); }
.soft-btn.is-primary { background: linear-gradient(120deg, var(--brand), #5b4bd6); }

/* ── Cards ─────────────────────────────────────────────────────────────── */
.projects-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: 20px; }
.project-card {
  --mx: 50%; --my: 0%;
  min-height: 360px; border-radius: var(--radius-lg);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 30px 60px -28px rgba(0,0,0,.7);
  transition: transform .5s var(--ease), border-color .3s ease, box-shadow .5s var(--ease);
  animation: cardIn .7s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms);
}
.project-card:nth-child(1) { --i: 0; } .project-card:nth-child(2) { --i: 1; } .project-card:nth-child(3) { --i: 2; }
.project-card:nth-child(4) { --i: 3; } .project-card:nth-child(5) { --i: 4; } .project-card:nth-child(6) { --i: 5; }
.project-card:nth-child(n+7) { --i: 6; }
.project-card:hover {
  transform: translateY(-8px) scale(1.012);
  border-color: color-mix(in srgb, var(--accent) 55%, rgba(255,255,255,.1));
  box-shadow: 0 50px 80px -30px color-mix(in srgb, var(--accent) 40%, #000), 0 0 0 1px color-mix(in srgb, var(--accent) 25%, transparent);
}
.project-card::before {
  background:
    radial-gradient(420px circle at var(--mx) var(--my), color-mix(in srgb, var(--accent) 32%, transparent), transparent 62%),
    linear-gradient(180deg, rgba(5,6,10,0) 0%, rgba(5,6,10,.35) 38%, rgba(5,6,10,.92) 78%, rgba(5,6,10,.99) 100%);
}
.project-card::after { height: 2px; opacity: .9; background: linear-gradient(90deg, transparent, var(--accent), transparent); }
.project-card h3 { font-size: 30px; letter-spacing: -.05em; font-weight: 780; }
.card-tagline { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .14em; color: color-mix(in srgb, var(--accent) 70%, white); }
.card-desc { color: rgba(255,255,255,.72); font-size: 13px; line-height: 1.55; }
.app-chip { border-radius: 999px; background: rgba(8,10,16,.5); backdrop-filter: blur(14px); border: 1px solid rgba(255,255,255,.12); }
.favorite-btn { border-radius: 50%; backdrop-filter: blur(14px); }
.launch-icon { border-radius: 50%; background: rgba(255,255,255,.12); backdrop-filter: blur(14px); transition: transform .4s var(--ease), background .3s ease; }
.project-card:hover .launch-icon { background: var(--accent); color: #05060a; transform: translate(3px, -3px) rotate(0); }
.meta-pill { border-radius: 999px; backdrop-filter: blur(12px); }

/* ── Pied ──────────────────────────────────────────────────────────────── */
.footer { border-top: 0; margin-top: 40px; }
.footer-left, .footer-right { opacity: .8; }

/* ── Animations ────────────────────────────────────────────────────────── */
@keyframes cardIn { from { opacity: 0; transform: translateY(24px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes orbDrift { from { transform: translate(0, 0) rotate(0deg); } to { transform: translate(-70px, 50px) rotate(40deg); } }
@keyframes livePulse { 0%, 100% { box-shadow: 0 0 6px currentColor; } 50% { box-shadow: 0 0 16px currentColor, 0 0 0 5px color-mix(in srgb, currentColor 14%, transparent); } }

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 1120px) {
  .welcome, .pulse { min-height: auto; }
  .welcome { padding-top: 64px; }
}
@media (max-width: 820px) {
  .shell { width: min(100% - 24px, 1440px); }
  .topbar { border-radius: 28px; }
  .context-strip { border-radius: 22px; }
  .context-item { padding: 13px 14px; }
  .context-item:nth-child(odd) { border-left: 0; }
  .context-item:nth-child(n+3) { border-top: 1px solid var(--line); }
  .projects-grid { grid-template-columns: 1fr; }
  .project-card { min-height: 320px; }
}
@media (max-width: 590px) {
  .welcome h1 { font-size: 40px; }
  /* bandeau en défilement horizontal (défini dans app.css) */
  .context-item:nth-child(n+3) { border-top: 0; }
  .context-item + .context-item { border-left: 1px solid var(--line); }
  .context-item { padding: 10px 14px; }
  .projects-title-wrap h2 { font-size: 28px; }
}
@media (hover: none) {
  .project-card:hover { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .project-card, .welcome::before, .pulse-value.is-online::before { animation: none !important; }
  .project-card, .project-card:hover { transition: none; }
}

/* ── Ajustements après revue visuelle ──────────────────────────────────── */
.welcome h1 { font-size: clamp(38px, 4.8vw, 70px); max-width: 980px; }
.welcome { min-height: 300px; }
.pulse { min-height: 300px; }
.pulse-list { flex: 1; grid-auto-rows: 1fr; align-content: stretch; }
.context-value, .context-label { display: block; }
.context-item > span:last-child { min-width: 0; }
@media (max-width: 820px) {
  .pulse-list { flex: none; grid-auto-rows: auto; }
}
html:has(body.light) { background: #f3f1ed; }

/* Modale mot de passe admin */
.admin-gate { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px; background: rgba(5,6,10,.6); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.admin-gate-card { width: min(380px, 100%); display: grid; gap: 12px; padding: 24px; border-radius: 24px; background: var(--surface-solid); border: 1px solid var(--line-strong); box-shadow: var(--shadow); }
.admin-gate-card strong { font-size: 17px; letter-spacing: -.02em; }
.admin-gate-card p { margin: 0; color: var(--muted); font-size: 13px; }
.admin-gate-card input { height: 46px; border-radius: 14px; border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--text); padding: 0 14px; font-size: 16px; }
.admin-gate-actions { display: flex; gap: 8px; justify-content: flex-end; }
.admin-gate-field { display: grid; gap: 6px; }
.admin-gate-field span { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
button.admin-link { width: 100%; border: 0; background: transparent; text-align: left; cursor: pointer; }

/* ── Cards v60.2 : image au format d'origine, texte sous l'image (plus de superposition) ──
   Les couvertures Registry/importées contiennent leur propre texte : on les affiche entières
   (object-fit: contain) sur un fond flou issu de la même image, puis le contenu dans un bandeau dessous. */
.project-card {
  min-height: 0;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 9%, #0e111a), #090b12 70%);
}
.project-card::before { background: radial-gradient(420px circle at var(--mx) var(--my), color-mix(in srgb, var(--accent) 22%, transparent), transparent 62%); }
.project-media {
  position: relative; inset: auto; z-index: 0; flex: none;
  width: 100%; aspect-ratio: 16 / 9; overflow: hidden;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.project-media::before {
  content: ""; position: absolute; inset: -24px; z-index: 0;
  background: var(--cover) center / cover no-repeat;
  filter: blur(26px) saturate(1.35) brightness(.55);
}
.project-media img { position: relative; z-index: 1; object-fit: contain; }
.project-card:hover .project-media img { transform: scale(1.02); }
.card-top { position: absolute; top: 0; left: 0; right: 0; z-index: 4; }
.card-content { margin-top: 0; padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.card-desc { max-width: none; min-height: 0; margin-top: 12px; }
.card-meta { margin-top: auto; padding-top: 14px; }
@media (max-width: 820px) { .project-card { min-height: 0; } }

/* ═══ Fenêtres (couvertures, collections) — v60.4 ═══════════════════════════ */
.cover-modal { background: rgba(4, 5, 9, .66); backdrop-filter: blur(22px) saturate(120%); -webkit-backdrop-filter: blur(22px) saturate(120%); }
.cover-dialog {
  position: relative; border: 0; border-radius: 32px; padding: 26px;
  background:
    radial-gradient(520px 240px at 12% -12%, color-mix(in srgb, var(--brand) 22%, transparent), transparent 70%),
    radial-gradient(420px 220px at 100% 0, color-mix(in srgb, var(--brand-2) 12%, transparent), transparent 70%),
    var(--surface-solid);
  box-shadow: 0 0 0 1px var(--line-strong), inset 0 1px rgba(255,255,255,.07), 0 70px 140px -30px rgba(0,0,0,.85);
  animation: sheetIn .45s var(--ease) both;
}
.cover-head { margin-bottom: 20px; align-items: center; }
.cover-head h3 { font-size: 24px; letter-spacing: -.04em; font-weight: 780; }
.cover-head p { font-size: 13px; line-height: 1.5; max-width: 62ch; }
.cover-head .icon-btn { flex: none; }

/* Couvertures */
.cover-dialog { width: min(680px, 100%); }
.cover-preview { isolation: isolate; border-radius: 22px; border: 1px solid var(--line-strong); background: transparent !important; }
/* fond flou (::before) puis image entière (::after, avec le libellé) : même rendu que la card */
.cover-preview::before { content: ""; position: absolute; inset: -24px; z-index: 0; background: var(--cover, none) center / cover no-repeat; filter: blur(28px) saturate(1.35) brightness(.55); }
.cover-preview::after {
  content: "Aperçu"; position: absolute; inset: 0; z-index: 1; display: flex; align-items: flex-end; padding: 14px 16px;
  background: var(--cover, none) center / contain no-repeat; border-radius: 0; backdrop-filter: none;
  color: rgba(255,255,255,.92); font: 700 10px var(--mono); letter-spacing: .16em; text-transform: uppercase; text-shadow: 0 1px 8px rgba(0,0,0,.8);
}
.media-source-panel { margin-top: 14px; padding: 14px 16px; border-radius: 20px; background: var(--surface-2); }
.media-source-icon { width: 40px; height: 40px; border-radius: 50%; }
.media-source-copy strong { font-size: 14px; }
.media-source-copy small { font-size: 12px; }
.registry-link { border-radius: 999px; min-height: 38px; font-size: 12px; }
.cover-picker { margin-top: 14px; gap: 12px; }
.cover-file-label {
  min-height: 64px; border-radius: 20px; padding: 0 18px; gap: 14px;
  border: 1.5px dashed var(--line-strong); background: var(--surface-2);
  transition: border-color .25s var(--ease), background .25s var(--ease), transform .25s var(--ease);
}
.cover-file-label:hover { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 9%, var(--surface-2)); transform: translateY(-1px); }
.cover-file-label > i { font-size: 22px; color: var(--brand-2); }
.cover-file-label strong { font-size: 14px; }
.cover-file-label span { font-size: 12px; }
#saveCoverBtn { min-height: 64px; padding: 0 24px; }
.cover-actions { margin-top: 16px; gap: 10px; }
.cover-note { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12px; line-height: 1.55; }

/* Collections */
.collection-modal .cover-dialog { width: min(1060px, 100%); }
.collection-layout { grid-template-columns: 290px minmax(0, 1fr); gap: 18px; min-height: 520px; }
.collection-sidebar, .collection-editor { border: 1px solid var(--line); border-radius: 26px; background: var(--surface-2); }
.collection-sidebar { padding: 14px; gap: 12px; }
.collection-create-actions { gap: 8px; }
.new-collection-btn { min-height: 44px; }
.collection-list { gap: 8px; }
.collection-list-item {
  position: relative; min-height: 62px; border-radius: 20px; padding: 8px 10px; border: 1px solid transparent;
  transition: background .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.collection-list-item::before { content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 3px; border-radius: 3px; background: var(--collection-accent); opacity: 0; transition: opacity .2s ease; }
.collection-list-item:hover { transform: translateX(3px); }
.collection-list-item.is-active { background: color-mix(in srgb, var(--collection-accent) 14%, var(--surface-2)); border-color: color-mix(in srgb, var(--collection-accent) 45%, transparent); }
.collection-list-item.is-active::before { opacity: 1; }
.collection-list-icon { width: 40px; height: 40px; border-radius: 50%; }
.collection-list-copy strong { font-size: 14px; }
.collection-list-copy small { font-size: 11px; }
.collection-editor { padding: 22px; }
.collection-field > span { font-size: 10px; letter-spacing: .12em; }
.collection-input, .collection-select {
  height: 48px; border-radius: 16px; padding: 0 16px; font-size: 14px; background: var(--surface-2); border: 1px solid var(--line-strong);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.collection-select {
  appearance: none; -webkit-appearance: none; padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%239aa3b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center;
}
.collection-input:focus, .collection-select:focus { border-color: color-mix(in srgb, var(--brand) 70%, transparent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 16%, transparent); }
.collection-preview { border-radius: 22px; padding: 14px 16px; min-height: 72px; }
.collection-preview-icon { width: 46px; height: 46px; border-radius: 50%; }
.collection-preview strong { font-size: 15px; }
.collection-preview small { font-size: 12px; }
.collection-rule-explainer { border-radius: 20px; padding: 14px 16px; }
.collection-rule-explainer strong { font-size: 13px; }
.collection-rule-explainer span { font-size: 12px; line-height: 1.5; }
.collection-projects-head strong { font-size: 14px; }
.collection-projects-head span { font-size: 12px; }
.collection-project-option, .smart-result-item { border-radius: 16px; padding: 10px 14px; }
.collection-project-option strong, .smart-result-item strong { font-size: 13px; }
.collection-project-option small, .smart-result-item small { font-size: 11px; }
.collection-kind-badge, .smart-tab-mark { border-radius: 999px; }
.collection-form-actions { gap: 10px; padding-top: 4px; }
.collection-modal-note { margin-top: 14px; font-size: 12px; line-height: 1.5; }
.collection-editor-empty { color: var(--muted); font-size: 14px; }
.collection-editor-empty i { color: var(--brand); }

@keyframes sheetIn { from { opacity: 0; transform: translateY(26px) scale(.97); } to { opacity: 1; transform: none; } }

/* Mobile : feuilles plein bas avec poignée */
@media (max-width: 700px) {
  .cover-modal { align-items: end; padding: 0; }
  .cover-dialog, .collection-modal .cover-dialog {
    width: 100%; max-height: 94dvh; overflow-y: auto; overscroll-behavior: contain;
    border-radius: 30px 30px 0 0; padding: 26px 18px calc(22px + env(safe-area-inset-bottom));
  }
  .cover-dialog::before { content: ""; position: sticky; top: -18px; display: block; width: 44px; height: 5px; margin: -14px auto 14px; border-radius: 5px; background: var(--line-strong); }
  .cover-head h3 { font-size: 21px; }
  .collection-layout { grid-template-columns: 1fr; min-height: 0; gap: 12px; }
  .collection-editor { padding: 16px; }
  #saveCoverBtn { min-height: 52px; }
  .cover-file-label { min-height: 58px; }
}
@media (prefers-reduced-motion: reduce) { .cover-dialog { animation: none; } }
