/* Social — interface d'administration. Aucune ressource externe (CSP stricte). */
@font-face { font-family: 'Source Sans 3'; src: url('fonts/source-sans-3-latin-wght-normal.woff2') format('woff2'); font-weight: 200 900; font-display: swap; }
@font-face { font-family: 'Newsreader'; src: url('fonts/newsreader-latin-opsz-normal.woff2') format('woff2'); font-weight: 200 800; font-display: swap; }

:root {
  --ink: #1c1c1c; --ink-2: #4a463f; --muted: #7c776d; --line: #e2ddd2; --line-2: #cfc8b9;
  --paper: #f6f3ec; --sheet: #ffffff; --accent: #2f4f78; --accent-2: #24405f;
  --ok: #2e7d4f; --warn: #b7791f; --danger: #b3261e; --radius: 8px;
  --sans: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', sans-serif; --serif: 'Newsreader', Georgia, serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--sans); color: var(--ink); background: var(--paper); font-size: 15px; line-height: 1.5; }
a { color: var(--accent); }
h1, h2, h3, h4 { font-weight: 600; line-height: 1.2; margin: 0 0 .6em; }
h1 { font-family: var(--serif); font-weight: 500; font-size: 1.9rem; }
h2 { font-size: 1.1rem; }
h3 { font-size: 1rem; }
h4 { font-size: .95rem; }
code { font-size: .9em; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.nowrap { white-space: nowrap; }
[hidden] { display: none !important; }

/* en-tête */
.top { display: flex; align-items: center; gap: 1.2rem; padding: .6rem 1.4rem; background: var(--sheet); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; flex-wrap: wrap; }
.top__brand { font-family: var(--serif); font-size: 1.35rem; color: var(--ink); text-decoration: none; }
.top__brand span, .sheet__brand span { font-family: var(--sans); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-left: .45rem; }
.top__nav { display: flex; gap: .2rem; flex: 1; flex-wrap: wrap; }
.top__nav a { color: var(--ink-2); text-decoration: none; padding: .35rem .65rem; border-radius: 6px; }
.top__nav a:hover { background: var(--paper); }
.top__nav a[aria-current] { background: var(--paper); color: var(--ink); font-weight: 600; }
.top__logout { margin: 0; }
.main { max-width: 1240px; margin: 0 auto; padding: 1.6rem 1.4rem 4rem; }

/* page de connexion */
.bare { display: grid; place-items: center; min-height: 100vh; padding: 1rem; }
.sheet { background: var(--sheet); border: 1px solid var(--line); border-top: 3px solid var(--ink); border-radius: var(--radius); padding: 2rem; width: 100%; max-width: 440px; }
.sheet__brand { font-family: var(--serif); font-size: 1.4rem; margin: 0 0 1.2rem; }
.qr { margin: 1rem 0; text-align: center; }
.qr svg { width: 220px; height: 220px; }
.secret { letter-spacing: .08em; }
.codes { columns: 2; padding-left: 1.2rem; font-size: 1.05rem; }

/* boutons */
.btn { display: inline-flex; align-items: center; gap: .35rem; font: inherit; font-weight: 600; padding: .5rem .95rem; border-radius: 6px; border: 1px solid var(--line-2); background: var(--sheet); color: var(--ink); cursor: pointer; text-decoration: none; line-height: 1.2; }
.btn:hover { border-color: var(--ink-2); }
.btn--sm { padding: .32rem .7rem; font-size: .9rem; }
.btn--primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn--ghost { background: transparent; }
.btn--ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn--danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn--block { width: 100%; justify-content: center; }
.btn.is-done { border-color: var(--ok); color: var(--ok); }
.link { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font: inherit; text-decoration: underline; }
.icon { background: rgba(255,255,255,.92); border: 1px solid var(--line-2); border-radius: 5px; padding: .1rem .4rem; font: inherit; font-size: .8rem; cursor: pointer; color: var(--ink); text-decoration: none; }
.icon--danger { color: var(--danger); }

/* formulaires */
.form { display: grid; gap: 1rem; }
.form--narrow { max-width: 560px; }
.field { display: grid; gap: .3rem; margin: 0 0 .9rem; border: 0; padding: 0; min-width: 0; }
.field > span, .field > legend { font-weight: 600; font-size: .92rem; padding: 0; }
.field small { font-weight: 400; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=number], input[type=datetime-local], select, textarea {
  font: inherit; width: 100%; padding: .5rem .65rem; border: 1px solid var(--line-2); border-radius: 6px; background: #fff; color: var(--ink); }
textarea { resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.checks { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; }
.check { display: inline-flex; align-items: center; gap: .4rem; font-weight: 400; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.filters { display: flex; gap: 1rem; flex-wrap: wrap; margin: 0 0 1rem; }
.filters label { display: flex; align-items: center; gap: .4rem; font-weight: 600; font-size: .9rem; }
.filters select { width: auto; }
.w-s { max-width: 140px; } .w-xs { max-width: 80px; } .grow { flex: 1; min-width: 200px; }

/* messages */
.flash { padding: .7rem 1rem; border-radius: 6px; margin: 0 0 1rem; border: 1px solid var(--line); background: var(--sheet); border-left: 4px solid var(--accent); }
.flash--success { border-left-color: var(--ok); }
.flash--warning { border-left-color: var(--warn); }
.flash--danger { border-left-color: var(--danger); }
.note { background: #fff8e6; border: 1px solid #ecd9a6; padding: .8rem 1rem; border-radius: 6px; margin: 0 0 1rem; }

/* en-têtes de page */
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.head h1 { margin: 0; }
.head__actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.crumb { margin: 0 0 .3rem; color: var(--muted); font-size: .9rem; }

/* cartes du tableau de bord */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 1rem; margin-bottom: 1.2rem; }
.card { background: var(--sheet); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; }
.card--alert { border-top: 3px solid var(--danger); }
.count { display: inline-block; min-width: 1.6em; text-align: center; background: var(--paper); border-radius: 999px; font-size: .8rem; padding: .05rem .45rem; margin-left: .3rem; color: var(--ink-2); }
.list { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }

/* pastilles */
.net { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .03em; padding: .08rem .4rem; border-radius: 4px; color: #fff; background: #666; vertical-align: 1px; }
.net--instagram { background: #c13584; } .net--facebook { background: #1877f2; } .net--linkedin { background: #0a66c2; } .net--tiktok { background: #111; } .net--x { background: #444; }
.st { display: inline-block; font-size: .75rem; font-weight: 600; padding: .05rem .45rem; border-radius: 999px; background: #eee; color: var(--ink-2); }
.st--scheduled { background: #e6eef8; color: var(--accent); } .st--published { background: #e3f2e8; color: var(--ok); }
.st--failed { background: #fbe4e2; color: var(--danger); } .st--running { background: #fff3d6; color: var(--warn); }
.vchip { display: inline-flex; align-items: center; gap: .3rem; font-size: .8rem; padding: .1rem .45rem .1rem .15rem; border-radius: 6px; background: var(--paper); border: 1px solid var(--line); color: var(--ink-2); white-space: nowrap; }
.vchip--published { background: #eef7f1; } .vchip--failed { background: #fbecea; } .vchip--scheduled { background: #edf2f9; }
.chips { display: flex; flex-wrap: wrap; gap: .3rem; }
.chips a { text-decoration: none; }
.proj { display: inline-flex; align-items: center; gap: .35rem; }
.proj__dot { width: .7rem; height: .7rem; border-radius: 50%; background: #999; display: inline-block; flex: none; }
.tag { font-size: .72rem; background: var(--paper); border: 1px solid var(--line); padding: 0 .35rem; border-radius: 4px; color: var(--muted); }

/* tableaux */
.table { width: 100%; border-collapse: collapse; background: var(--sheet); border: 1px solid var(--line); }
.table th, .table td { text-align: left; padding: .55rem .7rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: #fbfaf7; }
.table--form td { padding: .4rem .45rem; }
.table th.is-sortable { cursor: pointer; user-select: none; white-space: nowrap; }
.table th.is-sortable::after { content: ' ↕'; opacity: .35; }
.table th[aria-sort=ascending]::after { content: ' ↑'; opacity: 1; }
.table th[aria-sort=descending]::after { content: ' ↓'; opacity: 1; }
.table tfoot td { border-bottom: 0; }
.projpick { position: relative; min-width: 170px; }
.projpick summary { cursor: pointer; list-style: none; padding: .45rem .6rem; border: 1px solid var(--line-2); border-radius: 6px; background: #fff; }
.projpick summary::-webkit-details-marker { display: none; }
.projpick[open] summary { border-color: var(--accent); }
.projpick__list { position: absolute; z-index: 15; top: calc(100% + 4px); left: 0; background: #fff; border: 1px solid var(--line-2); border-radius: 6px; padding: .5rem .7rem; display: grid; gap: .3rem; box-shadow: 0 8px 24px rgba(0,0,0,.12); min-width: 190px; }
.row-new { background: #fbfaf7; }

/* éditeur de post */
.post { display: grid; gap: 1.2rem; }
.panel { background: var(--sheet); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; }
.counter { font-size: .85rem; color: var(--muted); font-weight: 400; margin: 0; }
.counter.is-over { color: var(--danger); font-weight: 700; }
.drop { border: 2px dashed var(--line-2); border-radius: var(--radius); padding: 1.1rem; text-align: center; background: #fbfaf7; }
.drop.is-over { border-color: var(--accent); background: #edf2f9; }
.drop p { margin: .2rem 0; }
.drop__progress { margin-top: .5rem; font-size: .9rem; text-align: left; }
.drop__progress .err { color: var(--danger); }
.media-grid { list-style: none; padding: 0; margin: 1rem 0 .5rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .7rem; }
.media { position: relative; background: #fbfaf7; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; cursor: grab; aspect-ratio: 4 / 5; display: flex; align-items: center; justify-content: center; }
.media img { width: 100%; height: 100%; object-fit: contain; display: block; pointer-events: none; }
.media video { width: 100%; height: 100%; object-fit: contain; display: block; background: #111; }
.media.is-dragging { opacity: .4; }
.media.is-target { outline: 3px solid var(--accent); }
.media__pos { position: absolute; top: .35rem; left: .35rem; background: var(--ink); color: #fff; font-size: .75rem; font-weight: 700; border-radius: 999px; min-width: 1.5rem; text-align: center; padding: .05rem .3rem; }
.media__meta { position: absolute; bottom: .35rem; left: .35rem; background: rgba(255,255,255,.9); font-size: .7rem; padding: 0 .3rem; border-radius: 3px; }
.media__actions { position: absolute; top: .35rem; right: .35rem; display: flex; gap: .2rem; }
.tabs { display: flex; gap: .3rem; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 1rem; }
.tabs__tab { padding: .45rem .7rem; text-decoration: none; color: var(--ink-2); border: 1px solid transparent; border-bottom: 0; border-radius: 6px 6px 0 0; margin-bottom: -1px; display: inline-flex; gap: .35rem; align-items: center; }
.tabs__tab[aria-selected=true] { background: var(--sheet); border-color: var(--line); color: var(--ink); font-weight: 600; }
.js .tabpanel { display: none; }
.js .tabpanel.is-active { display: block; }
.tabpanel { padding-top: .3rem; }
.tabpanel__head h3 { display: flex; gap: .5rem; align-items: center; }
.readonly { white-space: pre-wrap; font-family: var(--sans); background: #fbfaf7; border: 1px solid var(--line); border-radius: 6px; padding: .8rem; }
.pick { display: flex; flex-wrap: wrap; gap: .4rem; }
.pick__item { position: relative; width: 74px; height: 74px; border: 1px solid var(--line); border-radius: 5px; overflow: hidden; cursor: pointer; background: #fbfaf7; }
.pick__item img { width: 100%; height: 100%; object-fit: cover; }
.pick__item input { position: absolute; top: .25rem; left: .25rem; }
.pick__item:has(input:not(:checked)) img { opacity: .3; }
.manual { margin-top: .8rem; padding: .9rem 1rem; background: #fbfaf7; border: 1px solid var(--line); border-radius: 6px; }
.manual__row { display: flex; flex-wrap: wrap; gap: .4rem; margin: .45rem 0; align-items: center; }
.savebar { position: sticky; bottom: 0; background: rgba(246,243,236,.95); padding: .8rem 0; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; z-index: 10; }
.danger-zone { margin-top: 2rem; text-align: right; }

/* calendrier */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cal__dow { background: #fbfaf7; padding: .4rem .5rem; font-size: .8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.cal__day { background: var(--sheet); min-height: 118px; padding: .35rem; display: flex; flex-direction: column; gap: .25rem; }
.cal__day--out { background: #faf8f4; }
.cal__day--out .cal__num { color: #bbb; }
.cal__day--today .cal__num { background: var(--accent); color: #fff; border-radius: 999px; padding: 0 .4rem; }
.cal__day.is-over { background: #edf2f9; }
.cal__num { font-size: .8rem; font-weight: 700; color: var(--ink-2); align-self: flex-start; }
.cal__item { display: flex; align-items: center; gap: .25rem; font-size: .78rem; text-decoration: none; color: var(--ink); background: #fbfaf7; border: 1px solid var(--line); border-radius: 4px; padding: .1rem .3rem; overflow: hidden; white-space: nowrap; }
.cal__item[draggable=true] { cursor: grab; }
.cal__item--published { opacity: .65; }
.cal__item--failed { border-color: var(--danger); }
.cal__item--draft { border-style: dashed; }
.cal__item--pending { border: 1px dashed #d9a441; background: #fff8e8; }
.cal__time { color: var(--muted); }
.cal__title { overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 760px) {
  .grid2 { grid-template-columns: 1fr; }
  .cal { grid-template-columns: 1fr; }
  .cal__dow { display: none; }
  .cal__day--out { display: none; }
  .table { display: block; overflow-x: auto; }
}
.table--form select[name=network] { min-width: 125px; }
.table--form select[name=mechanism] { min-width: 185px; }
.table--form input[name=handle] { min-width: 170px; }

/* lot 2 : agent */
.inline { display: inline; margin: 0; }
.panel--token { border: 2px solid var(--warn); }
.job { font-size: .8rem; font-weight: 600; padding: .05rem .45rem; border-radius: 999px; background: #eee; }
.job--done { background: #e3f2e8; color: var(--ok); } .job--failed { background: #fbe4e2; color: var(--danger); }
.job--claimed, .job--queued { background: #fff3d6; color: var(--warn); }
.acc--connected { color: var(--ok); font-weight: 600; } .acc--reconnect { color: var(--danger); font-weight: 600; }
.manual--robot { border-color: var(--accent); background: #f3f6fb; }
.session { display: block; font-size: .75rem; margin-top: .2rem; }

/* détail d'une tâche, pagination */
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1.2rem; margin: 0; }
.kv dt { font-weight: 600; color: var(--muted); }
.kv dd { margin: 0; }
.shot { max-width: 100%; border: 1px solid var(--line); border-radius: 6px; }
.tech { white-space: pre-wrap; font-size: .82rem; background: #fbfaf7; border: 1px solid var(--line); border-radius: 6px; padding: .9rem; max-height: 520px; overflow: auto; }
.pager { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; margin: .8rem 0; }
.pager .muted { margin-right: .6rem; }

/* ---- lot 8 : campagne, aperçu, projets ---- */
.warn { color: var(--danger); }
.st--pending { background: #fff1d6; color: #8a5a00; border: 1px dashed #d9a441; }
.st--draft { background: #eee; color: var(--ink-2); }
.daychips { display: inline-flex; gap: .3rem; flex-wrap: wrap; align-items: center; }
.daychip { display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .55rem; border: 1px solid var(--line); border-radius: 999px; font-weight: 500 !important; font-size: .85rem !important; cursor: pointer; background: var(--sheet); }
.daychip:has(input:checked) { border-color: var(--accent); color: var(--accent); }
.daychip input { width: auto; margin: 0; }
.toasts { position: fixed; right: 1rem; bottom: 1rem; z-index: 50; max-width: min(28rem, calc(100vw - 2rem)); display: flex; flex-direction: column; gap: .4rem; transition: opacity .5s; }
.toasts .flash { margin: 0; box-shadow: 0 4px 16px rgba(0,0,0,.15); }
.toasts.is-gone { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .toasts { transition: none; } }
.legend { display: inline-flex; gap: .35rem; flex-wrap: wrap; align-items: center; }
.actions { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: .6rem 0 0; }
.actions__when { display: inline-flex; gap: .3rem; align-items: center; }
.actions__when input { width: auto; padding: .25rem .4rem; }
.cday { margin: 0 0 1.4rem; }
.cday__title { font-family: var(--serif); font-weight: 500; font-size: 1.25rem; margin: 0 0 .5rem; padding-bottom: .3rem; border-bottom: 1px solid var(--line); }
.cday--today .cday__title { color: var(--accent); }
.cday__gen { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .4rem; }
.cpost { background: var(--sheet); border: 1px solid var(--line); border-left: 4px solid var(--line-2); border-radius: var(--radius); padding: .8rem 1rem; margin: 0 0 .7rem; }
.cpost--pending { border-left-color: #d9a441; background: #fffcf4; }
.cpost--scheduled { border-left-color: var(--accent); }
.cpost--published { border-left-color: var(--ok); }
.cpost--failed { border-left-color: var(--danger); background: #fff8f7; }
.cpost__head { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; margin-bottom: .6rem; }
.cpost__title { font-weight: 600; color: var(--ink); text-decoration: none; flex: 1 1 100%; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .55rem; }
.tile { display: flex; flex-direction: column; gap: .3rem; border: 1px solid var(--line); border-radius: 6px; padding: .45rem; text-decoration: none; color: var(--ink); background: #fff; min-width: 0; }
.tile:hover { border-color: var(--accent); }
.tile--pending { border-style: dashed; border-color: #d9a441; }
.tile--failed { border-color: var(--danger); }
.tile__top { display: flex; justify-content: space-between; align-items: center; gap: .3rem; }
.tile__img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 4px; background: var(--paper); }
.tile__img--none { display: flex; align-items: center; justify-content: center; font-size: .75rem; color: var(--muted); }
.tile__text { font-size: .8rem; color: var(--ink-2); line-height: 1.35; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; }
.tile__warn { font-size: .72rem; color: var(--danger); font-weight: 600; }
.previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; margin-top: 1rem; align-items: start; }
.pv { background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.pv__head { display: flex; gap: .55rem; align-items: center; padding: .6rem .75rem; }
.pv__avatar { width: 34px; height: 34px; border-radius: 999px; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; flex: none; }
.pv--instagram .pv__avatar { background: #c13584; } .pv--facebook .pv__avatar { background: #1877f2; } .pv--linkedin .pv__avatar { background: #0a66c2; } .pv--tiktok .pv__avatar { background: #111; } .pv--x .pv__avatar { background: #444; }
.pv__status { margin-left: auto; }
.pv__title { font-weight: 700; margin: 0 .75rem .4rem; }
.pv__media { position: relative; background: #111; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; }
.pv__media--4x5 { aspect-ratio: 4 / 5; } .pv__media--9x16 { aspect-ratio: 9 / 16; max-height: 520px; } .pv__media--1\.91x1 { aspect-ratio: 1.91; }
.pv__media img, .pv__media video { width: 100%; height: 100%; object-fit: cover; }
.pv__media--none { background: var(--paper); color: var(--muted); font-size: .85rem; aspect-ratio: 3; }
.pv__count { position: absolute; top: .4rem; right: .4rem; background: rgba(0,0,0,.6); color: #fff; font-size: .75rem; padding: 0 .4rem; border-radius: 999px; }
.pv__text { padding: .7rem .75rem; font-size: .92rem; white-space: normal; word-wrap: break-word; }
.pv__tags { color: #1d4ed8; }
.pv__foot { padding: 0 .75rem .7rem; }
.projcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .8rem; margin: 0 0 1.2rem; }
.projcard { display: flex; flex-direction: column; gap: .45rem; background: var(--sheet); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; text-decoration: none; color: var(--ink); }
.projcard:hover { border-color: var(--accent); }
.projcard--off { opacity: .6; }
.projcard__head { font-weight: 700; font-size: 1.05rem; }
.projcard__line { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.projcard__accs { display: flex; gap: .3rem; }
.accdot { display: inline-flex; align-items: center; justify-content: center; min-width: 1.6rem; height: 1.6rem; border-radius: 999px; font-size: .68rem; font-weight: 700; background: #eee; color: #999; }
.accdot:empty { min-width: .7rem; height: .7rem; }
.accdot--ok { background: #dff3e6; color: var(--ok); } .accdot--ko { background: #fbe4e2; color: var(--danger); }
.accdot--unknown { background: #fff1d6; color: #8a5a00; } .accdot--manual { background: #eef0f3; color: #555; }
.tabs--links { position: sticky; top: 52px; background: var(--paper); z-index: 5; padding-top: .3rem; }
.panel + .panel, form.panel + form.panel, .panel + form.panel, form.panel + .panel { margin-top: 1rem; }
.newproj .manual__row input { width: auto; }
@media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* publication à la main depuis une vignette ou l'aperçu */
.tile { padding: 0; }
.tile__link { display: flex; flex-direction: column; gap: .3rem; padding: .45rem; text-decoration: none; color: var(--ink); min-width: 0; }
.mini { border-top: 1px solid var(--line); font-size: .8rem; }
.mini > summary { cursor: pointer; padding: .3rem .45rem; color: var(--accent); font-weight: 600; list-style: none; }
.mini > summary::-webkit-details-marker { display: none; }
.mini > summary::before { content: '▸ '; }
.mini[open] > summary::before { content: '▾ '; }
.mini__text { margin: 0 .45rem .4rem; padding: .45rem; background: var(--paper); border-radius: 4px; white-space: pre-wrap; word-wrap: break-word; font-family: var(--sans); font-size: .8rem; max-height: 220px; overflow: auto; }
.mini__row { display: flex; flex-wrap: wrap; gap: .3rem; padding: 0 .45rem .45rem; align-items: center; }
.mini__row .grow { flex: 1 1 140px; min-width: 0; padding: .25rem .4rem; font-size: .8rem; }
.pv__manual { border-top: 1px solid var(--line); }
.tiles:has(.mini[open]) { align-items: start; }
.tile:has(.mini[open]) { grid-column: 1 / -1; } .tile:has(.mini[open]) .tile__link { flex-direction: row; align-items: flex-start; } .tile:has(.mini[open]) .tile__img { width: 120px; flex: none; }
/* apprentissage (docs/06) */
.learn__head { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.learn__msg { font-family: var(--mono, ui-monospace, monospace); font-size: .88rem; margin: .5rem 0; overflow-wrap: anywhere; }
.learn__form { display: grid; gap: .5rem; margin-top: .5rem; }
.learn__form label { display: grid; gap: .25rem; font-weight: 600; font-size: .9rem; }
.learn__row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: end; }
.learn__row label { display: flex; align-items: center; gap: .4rem; }
.learn__row input, .learn__row select { width: auto; }
.visual-preview { max-width: 220px; max-height: 220px; border: 1px solid var(--line); border-radius: 6px; display: block; }
/* bouton ↻ des vignettes (22/11) */
.tile__redo { display: block; }
.tile__redo .btn { width: 100%; justify-content: center; }
/* captures d'écran des carrousels (lot B, 28/11) */
.captures { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .8rem; margin: .5rem 0 1rem; }
.capture { margin: 0; border: 1px solid var(--line); border-radius: 6px; padding: .4rem; display: flex; flex-direction: column; gap: .3rem; }
.capture img { width: 100%; aspect-ratio: 16 / 10; object-fit: contain; background: var(--paper); border-radius: 4px; }
.capture figcaption { font-size: .82rem; }
.capture-add { display: grid; grid-template-columns: 1fr 2fr auto; gap: .6rem; align-items: end; }
@media (max-width: 700px) { .capture-add { grid-template-columns: 1fr; } }
/* tri des rushes (lot C) */
.rush-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .8rem; }
.rush-item { margin: 0; border: 2px solid var(--line); border-radius: 6px; padding: .4rem; display: flex; flex-direction: column; gap: .35rem; }
.rush-item.is-kept { border-color: #2e7d4f; }
.rush-item img, .rush-item video { width: 100%; aspect-ratio: 16 / 10; object-fit: contain; background: var(--paper); border-radius: 4px; display: block; }
.rush-item__keep { display: grid; grid-template-columns: 1fr auto; gap: .4rem; align-items: end; }
.rush-item__keep .field { margin: 0; }
.rush-item.is-gone { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
