:root {
  --bg: #ffffff;
  --side: #f7f7f5;
  --line: #e6e6e3;
  --text: #1f2328;
  --muted: #80868f;
  --accent: #2f6fde;
  --card: #ffffff;
  --shadow: 0 1px 2px rgba(15, 20, 30, .08), 0 0 0 1px rgba(15, 20, 30, .05);
  --radius: 8px;
  --col-w: 320px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { display: flex; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
a { color: inherit; text-decoration: none; }
svg.i { width: 16px; height: 16px; flex: none; }
[hidden] { display: none !important; }

/* ---------- Barre de gauche ---------- */

#sidebar { width: 260px; flex: none; background: var(--side); border-right: 1px solid var(--line); display: flex; flex-direction: column; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 12px; font-weight: 700; font-size: 16px; }
.logo { width: 20px; height: 20px; border-radius: 5px; background: linear-gradient(90deg, #1f2328 0 45%, transparent 45% 55%, #2f6fde 55%); }
.side-links { padding: 0 8px; }
.side-link { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 10px; border-radius: 6px; color: #444; text-align: left; }
.side-link:hover { background: #ececea; }
.side-link.active { background: #e3e7ee; color: #111; font-weight: 600; }
.side-link .kbd { margin-left: auto; font-size: 11px; color: var(--muted); }
.side-label { padding: 16px 18px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
#tree { flex: 1; overflow: auto; padding: 0 8px 8px; }
.branch { list-style: none; margin: 0; padding: 0; }
.row { display: flex; align-items: center; gap: 4px; height: 30px; border-radius: 6px; padding-right: 4px; color: #3a3f45; }
.row:hover { background: #ececea; }
.row.active { background: #e3e7ee; color: #111; font-weight: 600; }
.row.drop-into { background: #dbe7fb; box-shadow: inset 0 0 0 2px var(--accent); }
.twist { width: 18px; height: 18px; display: grid; place-items: center; color: var(--muted); flex: none; border-radius: 4px; }
.twist svg { width: 12px; height: 12px; transition: transform .15s; }
.twist.open svg { transform: rotate(90deg); }
.twist:hover { background: #dcdcd9; }
.row .ico { color: var(--muted); display: grid; place-items: center; }
.row .label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 4px 2px; }
.row-act { width: 22px; height: 22px; border-radius: 5px; display: grid; place-items: center; color: var(--muted); opacity: 0; flex: none; }
.row:hover .row-act { opacity: 1; }
.row-act:hover { background: #dcdcd9; color: #222; }
.sec-row { color: #5b6168; font-size: 13px; height: 27px; }
.sec-row .label { padding-left: 4px; }
.sec-dot { width: 6px; height: 6px; border-radius: 2px; background: #b8bdc3; flex: none; margin-left: 6px; }
.sec-row.active .sec-dot { background: var(--accent); }
.sections.focus .sec-toggle, .sections.focus .sec-grip { display: none; }
.side-add { margin: 4px 16px 10px; padding: 7px 10px; border-radius: 7px; border: 1px dashed #cfd2d6; color: #555; display: flex; align-items: center; gap: 8px; }
.side-add:hover { background: #ececea; color: #111; }
.side-foot { border-top: 1px solid var(--line); padding: 8px; }

/* ---------- Page ---------- */

#main { flex: 1; min-width: 0; height: 100vh; overflow: auto; }
.page-head { padding: 22px 32px 18px; }
.crumbs { font-size: 12.5px; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.crumbs a:hover { color: var(--text); text-decoration: underline; }
.title-row { display: flex; align-items: flex-start; gap: 16px; justify-content: space-between; flex-wrap: wrap; }
.page-title { font-size: 30px; font-weight: 700; margin: 0; letter-spacing: -.01em; min-width: 120px; }
.hint { color: var(--muted); font-size: 12.5px; margin-top: 6px; }
.head-actions { display: flex; gap: 8px; }
.editable { outline: none; border-radius: 4px; cursor: text; }
.editable:hover { background: rgba(0, 0, 0, .04); }
.editable:focus { background: #fff; box-shadow: 0 0 0 2px var(--accent); }
.editable:empty::before { content: attr(data-ph); color: #b3b7bd; }

.btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 7px; background: #f0f0ee; font-weight: 500; white-space: nowrap; }
.btn:hover { background: #e6e6e3; }
.btn.primary { background: #1f2328; color: #fff; }
.btn.primary:hover { background: #000; }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: #f0f0ee; }
.btn.danger { background: #c93c3c; color: #fff; }
.icon-btn { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 6px; color: var(--muted); flex: none; }
.icon-btn:hover { background: rgba(0, 0, 0, .06); color: #222; }

/* ---------- Bannière ---------- */

.banner { position: relative; height: 240px; overflow: hidden; background: #1f2328; }
.banner img { display: block; width: 100%; height: 100%; object-fit: cover; user-select: none; }
.banner.moving img { cursor: ns-resize; }
.banner-resize { position: absolute; left: 0; right: 0; bottom: 0; height: 14px; cursor: ns-resize; display: grid; place-items: center; z-index: 2; }
.banner-resize span { width: 56px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .85); box-shadow: 0 1px 4px rgba(0, 0, 0, .4); opacity: 0; transition: opacity .15s; }
.banner:hover .banner-resize span, .banner.resizing .banner-resize span { opacity: 1; }
.banner.resizing { user-select: none; }
.banner-tools { bottom: 18px; }
.banner-tools { position: absolute; right: 16px; bottom: 12px; display: flex; gap: 6px; align-items: center; opacity: 0; transition: opacity .15s; }
.banner:hover .banner-tools, .banner.moving .banner-tools { opacity: 1; }
.banner-tools button, .banner-note { background: rgba(0, 0, 0, .58); color: #fff; padding: 6px 10px; border-radius: 6px; font-size: 12.5px; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.banner-tools button:hover { background: rgba(0, 0, 0, .75); }
.banner-tools button.on { background: #fff; color: #111; }
.head-top { display: flex; align-items: center; gap: 12px; justify-content: space-between; }
.banner-add { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; padding: 4px 8px; border-radius: 6px; opacity: 0; transition: opacity .15s; margin-bottom: 8px; }
.page-head:hover .banner-add, .banner-add:focus-visible { opacity: 1; }
.banner-add:hover { background: #f0f0ee; color: #222; }
.pick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-height: 55vh; overflow: auto; }
.pick-grid button { border-radius: 6px; overflow: hidden; }
.pick-grid button:hover { outline: 2px solid var(--accent); }
.pick-grid img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

/* ---------- Sections ---------- */

.sections { display: flex; flex-direction: column; }
.sec { background: var(--sec-bg, #eaf3fc); padding: 18px 32px 22px; border-top: 1px solid rgba(0, 0, 0, .04); }
.sec-head { display: flex; align-items: center; gap: 6px; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid rgba(0, 0, 0, .08); }
.sec.collapsed .sec-head { margin-bottom: 0; }
.sec-title { font-size: 18px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; margin: 0; color: #2b2f35; }
.sec-count { color: var(--muted); font-size: 13px; flex: 1; }
.sec-grip, .col-grip { color: #a5a9ae; cursor: grab; display: grid; place-items: center; opacity: 0; }
.sec-head:hover .sec-grip, .col-head:hover .col-grip { opacity: 1; }
.sec-toggle { color: var(--muted); width: 22px; height: 22px; display: grid; place-items: center; border-radius: 5px; }
.sec-toggle svg { transform: rotate(90deg); transition: transform .15s; }
.sec.collapsed .sec-toggle svg { transform: none; }
.sec-toggle:hover { background: rgba(0, 0, 0, .06); }

.columns { display: flex; gap: 20px; overflow-x: auto; align-items: flex-start; padding-bottom: 8px; }
.col { width: var(--col-w); flex: none; display: flex; flex-direction: column; border-radius: 8px; }
.col.drop { outline: 2px dashed var(--accent); outline-offset: 4px; }
.col-head { display: flex; align-items: center; gap: 6px; padding: 0 2px 8px; border-bottom: 2px solid rgba(0, 0, 0, .12); margin-bottom: 12px; }
.col-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; margin: 0; }
.col-count { color: var(--muted); font-size: 12.5px; flex: 1; }
.cards { display: flex; flex-direction: column; gap: 12px; min-height: 48px; }
.col-foot { padding-top: 10px; display: flex; gap: 4px; }
.add-card { color: var(--muted); display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 6px; flex: 1; }
.add-file { flex: none; }
.add-card:hover { color: #222; background: rgba(0, 0, 0, .05); }
.col-add { flex: none; width: 180px; height: 40px; border: 1px dashed rgba(0, 0, 0, .2); border-radius: 8px; color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 6px; }
.col-add:hover { color: #222; border-color: rgba(0, 0, 0, .4); }
.wall-foot { padding: 20px 32px 80px; }

/* ---------- Cartes ---------- */

.card { position: relative; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; cursor: grab; }
.card:active { cursor: grabbing; }
.card img { display: block; width: 100%; height: auto; }
.card-image img { cursor: zoom-in; background: #f1f1ef; }
.caption { padding: 8px 12px; font-size: 13px; color: #444; }
.card-menu { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 50%; background: rgba(255, 255, 255, .94); box-shadow: 0 1px 3px rgba(0, 0, 0, .2); display: grid; place-items: center; opacity: 0; transition: opacity .12s; z-index: 2; }
.card:hover .card-menu, .card-menu:focus-visible { opacity: 1; }
.sortable-ghost { opacity: .35; }
.card video { display: block; width: 100%; max-height: 480px; background: #000; }
.card audio { display: block; width: calc(100% - 24px); margin: 0 12px 12px; }
.file-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.badge { font-size: 10.5px; font-weight: 700; text-transform: uppercase; background: #6b7280; color: #fff; border-radius: 4px; padding: 3px 6px; flex: none; }
.badge.pdf { background: #e5483e; }
.badge.video { background: #7c3aed; }
.badge.audio { background: #0e9f6e; }
.fname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.fsize { color: var(--muted); font-size: 12px; flex: none; }
.doc-thumb { cursor: pointer; border-bottom: 1px solid var(--line); max-height: 440px; object-fit: cover; object-position: top; }
.link-img { position: relative; cursor: pointer; background: #f1f1ef; }
.link-img img { max-height: 280px; object-fit: cover; }
.link-img.yt img { aspect-ratio: 16 / 9; }
.link-img.noimg { aspect-ratio: 16 / 9; background: #16181b; }
.lb-stage .lb-video { max-width: 100%; max-height: calc(100vh - 90px); background: #000; }
.play { position: absolute; inset: 0; margin: auto; width: 58px; height: 40px; border-radius: 10px; background: rgba(230, 0, 0, .9); color: #fff; display: grid; place-items: center; }
.play svg { width: 20px; height: 20px; fill: #fff; stroke: none; }
.link-body { padding: 10px 12px 12px; }
.link-host { font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.link-title { font-weight: 600; color: #c2410c; display: block; }
.link-title:hover { text-decoration: underline; }
.link-desc { margin: 6px 0 0; color: #555; font-size: 13px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.note { padding: 12px 14px; cursor: text; }
.note-body { outline: none; min-height: 1.4em; overflow-wrap: anywhere; }
.note-body:empty::before { content: attr(data-ph); color: #b3b7bd; }
.note-body > :first-child { margin-top: 0; }
.note-body > :last-child { margin-bottom: 0; }
.note-body h3 { font-size: 16px; margin: .2em 0 .4em; }
.note-body p, .note-body div { margin: 0 0 .5em; }
.note-body ul, .note-body ol { margin: .2em 0 .6em; padding-left: 1.3em; }
.note-body a { color: var(--accent); text-decoration: underline; }
.card.editing { box-shadow: 0 0 0 2px var(--accent); cursor: auto; }
.note-tools { display: flex; gap: 2px; margin: -4px -6px 8px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.note-tools button { min-width: 28px; height: 26px; padding: 0 6px; border-radius: 5px; font-weight: 600; color: #444; }
.note-tools button:hover { background: #f0f0ee; }
.sub-wall { display: block; }
.sub-img { aspect-ratio: 16 / 10; background: #eef0f3; display: grid; place-items: center; color: #9aa0a6; }
.sub-img img { width: 100%; height: 100%; object-fit: cover; }
.sub-img svg { width: 40px; height: 40px; }
.sub-meta { padding: 10px 12px; display: flex; align-items: center; gap: 8px; }
.sub-title { font-weight: 600; flex: 1; }
.sub-count { color: var(--muted); font-size: 12px; }
.card.uploading { padding: 12px; cursor: default; }
.up-name { font-size: 13px; margin-bottom: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar { height: 4px; background: #eee; border-radius: 2px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.card.flash { animation: flash 1.8s ease; }
@keyframes flash { 0%, 60% { box-shadow: 0 0 0 3px #f5b400; } 100% { box-shadow: var(--shadow); } }

/* ---------- Tuiles (dossiers) ---------- */

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 26px 24px; padding: 4px 32px 48px; }
.tile { display: block; text-align: left; }
.tile-img { aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: #eef0f3; display: grid; place-items: center; color: #a0a6ad; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
.tile:hover .tile-img { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0, 0, 0, .12); }
.tile-img img { width: 100%; height: 100%; object-fit: cover; }
.tile-img svg { width: 44px; height: 44px; }
.tile-meta { padding: 10px 2px 0; }
.tile-title { font-weight: 600; font-size: 15px; }
.tile-sub { color: var(--muted); font-size: 12.5px; }
.tile.add .tile-img { background: transparent; border: 1.5px dashed #cfd3d8; box-shadow: none; }
.tile.add:hover .tile-img { border-color: #9aa0a6; color: #555; }
.empty-state { padding: 0 32px; color: var(--muted); }

/* ---------- Menu, fenêtres, visionneuse ---------- */

#menu { position: fixed; z-index: 50; min-width: 230px; background: #fff; border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, .18), 0 0 0 1px rgba(0, 0, 0, .06); padding: 6px; }
#menu .mi { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 7px 10px; border-radius: 6px; }
#menu .mi:hover { background: #f1f1ef; }
#menu .mi.danger { color: #c93c3c; }
#menu hr { border: 0; border-top: 1px solid var(--line); margin: 5px 4px; }
.swatches { display: flex; gap: 7px; padding: 6px 10px 8px; }
.swatch { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .18); }
.swatch.on { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .18), 0 0 0 2px #fff, 0 0 0 4px var(--accent); }
.menu-label { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 6px 10px 0; }

.modal-back { position: fixed; inset: 0; background: rgba(20, 22, 26, .35); z-index: 60; display: grid; place-items: start center; padding-top: 14vh; }
.modal { background: #fff; border-radius: 12px; width: min(480px, calc(100vw - 32px)); padding: 20px; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
.modal h3 { margin: 0 0 12px; font-size: 16px; }
.modal p { color: #555; margin: 0 0 4px; }
.modal input[type=text], .modal input[type=search] { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid #d6d8dc; border-radius: 8px; outline: none; }
.modal input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47, 111, 222, .15); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.choices { max-height: 50vh; overflow: auto; display: flex; flex-direction: column; gap: 2px; }
.choices button { text-align: left; padding: 7px 10px; border-radius: 6px; display: flex; gap: 8px; align-items: center; }
.choices button:hover { background: #f1f1ef; }
.results { margin-top: 10px; max-height: 55vh; overflow: auto; }
.res { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; }
.res:hover { background: #f1f1ef; }
.res-type { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); width: 56px; flex: none; }
.res-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res-where { color: var(--muted); font-size: 12px; white-space: nowrap; }

#lightbox { position: fixed; inset: 0; z-index: 70; background: rgba(12, 13, 15, .95); display: grid; grid-template-rows: 1fr auto; }
.lb-stage { display: grid; place-items: center; min-height: 0; padding: 24px 76px 0; }
.lb-stage img { max-width: 100%; max-height: calc(100vh - 90px); object-fit: contain; }
.lb-stage iframe { width: min(1200px, 88vw); aspect-ratio: 16 / 9; border: 0; }
.lb-stage.doc { padding: 16px 76px 0; }
.lb-stage iframe.doc-frame { width: min(1000px, 92vw); height: calc(100vh - 70px); aspect-ratio: auto; border-radius: 8px; background: #e9e9e7; }
.lb-bar { color: #ccc; display: flex; gap: 18px; align-items: center; padding: 14px 24px; font-size: 13px; }
.lb-bar a { color: #fff; text-decoration: underline; }
.lb-bar .grow { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-nav { position: fixed; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; background: rgba(255, 255, 255, .1); color: #fff; display: grid; place-items: center; }
.lb-nav:hover { background: rgba(255, 255, 255, .22); }
.lb-nav svg { width: 22px; height: 22px; }
.lb-prev { left: 16px; }
.lb-prev svg { transform: rotate(180deg); }
.lb-next { right: 16px; }
.lb-close { position: fixed; top: 14px; right: 16px; color: #fff; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; }
.lb-close:hover { background: rgba(255, 255, 255, .15); }
.lb-close svg { width: 22px; height: 22px; }

#toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: #1f2328; color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 80; font-size: 13.5px; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); }

.muted { color: var(--muted); }
.trash { padding: 0 32px 40px; display: flex; flex-direction: column; gap: 6px; max-width: 900px; }
.trash-row { display: flex; align-items: center; gap: 14px; padding: 10px 12px; background: #fafaf9; border-radius: 8px; }
.trash-label { flex: 1; font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 760px) {
  #sidebar { display: none; }
  .page-head, .sec, .tiles, .wall-foot, .trash { padding-left: 16px; padding-right: 16px; }
  :root { --col-w: 280px; }
  .banner { max-height: 220px; }
  .banner-add { opacity: 1; }
}

/* ---------- Comptes, partage, lecture seule ---------- */

.me { display: flex; align-items: center; gap: 8px; padding: 6px 10px 2px; font-size: 13px; color: #444; }
.me-name { text-align: left; border-radius: 6px; padding: 4px 6px; margin-left: -6px; }
.me-name:hover { background: #ececea; }
.me-name { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-out { color: var(--muted); font-size: 12px; padding: 3px 6px; border-radius: 5px; }
.me-out:hover { background: #ececea; color: #222; }

.share { display: flex; flex-direction: column; gap: 10px; }
.share h3 { margin: 0; }
.share p { margin: 0; }
.share-list { display: flex; flex-direction: column; gap: 6px; max-height: 40vh; overflow: auto; }
.share-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: #fafaf9; border-radius: 8px; }
.share-who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.share-who span { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share select, .share input { font: inherit; padding: 7px 9px; border: 1px solid #d6d8dc; border-radius: 7px; background: #fff; }
.share-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-top: 6px; border-top: 1px solid var(--line); }
.share-add select:first-child { flex: 1 1 100%; }
.share-add input { flex: 1 1 45%; min-width: 0; }
.invite { background: #eef5ff; border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.invite-row { display: flex; gap: 8px; }
.invite-row input { flex: 1; min-width: 0; font-size: 12.5px; }

.lecture .add-card, .lecture .add-file, .lecture .col-add, .lecture .sec-grip, .lecture .col-grip,
.lecture .head-actions button, .lecture .wall-foot, .lecture .banner-tools, .lecture .banner-add, .lecture .banner-resize,
.lecture .col-head .icon-btn, .lecture .page-head .hint, .page-head.lecture .hint, .sections.fixe .sec-grip { display: none !important; }
.sec-chefs { color: #3b6fd8; }
.lecture .card { cursor: default; }

.account { display: flex; flex-direction: column; gap: 10px; }
.account h3 { margin: 0 0 4px; }
.form-row { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; }
.form-row input { font: inherit; font-weight: 400; font-size: 14px; padding: 9px 11px; border: 1px solid #d6d8dc; border-radius: 8px; outline: none; }
.form-row input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47, 111, 222, .15); }
.form-row small { color: var(--muted); font-weight: 400; font-size: 12px; }
.form-sep { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding-top: 8px; border-top: 1px solid var(--line); margin-top: 4px; }
.form-err { color: #c93c3c; font-size: 13px; min-height: 1em; }

/* Titre au-dessus d'une carte */
.card-label { padding: 9px 40px 8px 12px; font-weight: 700; font-size: 13.5px; line-height: 1.3; color: #1f2328; background: #fff; border-bottom: 1px solid var(--line); cursor: text; }
.lecture .card-label { cursor: default; }
.label-preview { margin-top: 10px; border: 1px solid var(--line); border-radius: 8px; padding-right: 12px; }
.modal .swatches { padding: 4px 0; flex-wrap: wrap; }
.share-badge { font-size: 12.5px; color: var(--muted); padding: 6px 8px; background: #f0f0ee; border-radius: 6px; white-space: nowrap; }
.share-legend { font-size: 12.5px; }
#link-demandes .count { margin-left: auto; background: #e5484d; color: #fff; font-size: 11px; font-weight: 700; border-radius: 10px; padding: 1px 7px; }
.share-row.pending { background: #fff8e6; }

/* Recadrer une couverture */
.tile-img { position: relative; }
.tile .tile-menu { top: 8px; right: 8px; }
.tile:hover .tile-menu { opacity: 1; }
.reframe { aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: #eef0f3; cursor: grab; margin-top: 10px; touch-action: none; }
.reframe:active { cursor: grabbing; }
.reframe img { width: 100%; height: 100%; object-fit: cover; display: block; user-select: none; pointer-events: none; }
.reframe-zoom { display: flex; align-items: center; gap: 12px; margin-top: 14px; font-size: 13px; font-weight: 600; }
.reframe-zoom input { flex: 1; }
.reframe-box h3 { margin: 0 0 4px; }
.reframe-box p { margin: 0; }
