/* =========================================================
   Partage — feuille de style
   ========================================================= */

:root {
  --bg:        #0d1117;
  --bg-soft:   #131a23;
  --surface:   #171f2a;
  --surface-2: #1d2734;
  --border:    #26313f;
  --border-lt: #2f3c4d;
  --text:      #e7edf5;
  --text-dim:  #98a5b6;
  --text-mute: #6b7889;
  --accent:    #4f8cff;
  --accent-h:  #6ba0ff;
  --ok:        #35c98a;
  --warn:      #f0b429;
  --danger:    #f2545b;
  --radius:    14px;
  --radius-sm: 9px;
  --shadow:    0 10px 30px rgba(0,0,0,.35);
  --sidebar-w: 236px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

:root[data-theme="light"] {
  --bg:        #f4f6fa;
  --bg-soft:   #eaeef5;
  --surface:   #ffffff;
  --surface-2: #f7f9fc;
  --border:    #dfe5ee;
  --border-lt: #cfd8e5;
  --text:      #16202e;
  --text-dim:  #5a6879;
  --text-mute: #8492a4;
  --accent:    #2f6fed;
  --accent-h:  #1f5fdd;
  --shadow:    0 8px 24px rgba(20,35,60,.10);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg:        #f4f6fa;
    --bg-soft:   #eaeef5;
    --surface:   #ffffff;
    --surface-2: #f7f9fc;
    --border:    #dfe5ee;
    --border-lt: #cfd8e5;
    --text:      #16202e;
    --text-dim:  #5a6879;
    --text-mute: #8492a4;
    --accent:    #2f6fed;
    --accent-h:  #1f5fdd;
    --shadow:    0 8px 24px rgba(20,35,60,.10);
  }
}

*, *::before, *::after { box-sizing: border-box; }

/* L'attribut hidden doit toujours l'emporter : une règle d'auteur qui fixe
   « display » (.modal, .app, .login-view…) masquerait sinon la règle du
   navigateur, et l'élément resterait affiché malgré hidden. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
body[data-loading="1"] { visibility: hidden; }

h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
p  { margin: 0; }
kbd {
  font: 600 .78em var(--mono);
  background: var(--surface-2);
  border: 1px solid var(--border-lt);
  border-radius: 5px;
  padding: 1px 5px;
}
code { font-family: var(--mono); font-size: .88em; }

.muted { color: var(--text-dim); }
.sm    { font-size: .85rem; }
.ok    { color: var(--ok); }
.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;
}

/* ---------- Icônes ---------- */
.icon-defs { display: none; }
.ic {
  width: 20px; height: 20px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
.ic-lg { width: 26px; height: 26px; }
.ic-xl { width: 38px; height: 38px; stroke-width: 1.6; }

/* ---------- Contrôles ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 15px;
  font: inherit; font-weight: 550; font-size: .92rem;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border-lt);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .06s, opacity .15s;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover  { background: var(--border); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn:focus-visible, .input:focus-visible, .nav-item:focus-visible,
.dropzone:focus-visible, .icon-btn:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-h); border-color: var(--accent-h); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-dim); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-danger { color: var(--danger); border-color: transparent; background: transparent; }
.btn-danger:hover { background: rgba(242,84,91,.12); }
.btn-sm { padding: 6px 11px; font-size: .85rem; }
.btn-lg { padding: 12px 20px; font-size: 1rem; }
.btn-block { width: 100%; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; padding: 0;
  color: var(--text-dim); background: transparent;
  border: 0; border-radius: var(--radius-sm); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }

.input {
  width: 100%;
  padding: 10px 13px;
  font: inherit; font-size: .95rem;
  color: var(--text);
  background: var(--bg-soft);
  border: 1px solid var(--border-lt);
  border-radius: var(--radius-sm);
  transition: border-color .15s, background .15s;
}
.input:focus { border-color: var(--accent); outline: none; background: var(--surface); }
.input::placeholder { color: var(--text-mute); }
textarea.input { resize: vertical; min-height: 74px; font-family: inherit; }
select.input { cursor: pointer; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: .85rem; font-weight: 550; color: var(--text-dim); }
.stack { display: flex; flex-direction: column; gap: 14px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }

.form-error {
  padding: 9px 12px; font-size: .88rem;
  color: var(--danger);
  background: rgba(242,84,91,.10);
  border: 1px solid rgba(242,84,91,.28);
  border-radius: var(--radius-sm);
}

.chip {
  display: inline-block; padding: 1px 8px;
  font-size: .78rem; font-weight: 600;
  color: var(--text-dim); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 20px;
}

/* =========================================================
   Connexion
   ========================================================= */
.login-view {
  display: grid; place-items: center;
  min-height: 100vh; min-height: 100dvh; padding: 24px;
  background:
    radial-gradient(900px 500px at 50% -10%, rgba(79,140,255,.14), transparent 70%),
    var(--bg);
}
.login-card {
  width: 100%; max-width: 380px;
  padding: 30px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
}
.login-brand { text-align: center; margin-bottom: 24px; color: var(--accent); }
.login-brand h1 { margin: 10px 0 4px; color: var(--text); }
.login-brand p { color: var(--text-dim); font-size: .9rem; }
.login-pair { margin-top: 20px; border-top: 1px solid var(--border); padding-top: 14px; }
.login-pair summary {
  cursor: pointer; font-size: .88rem; color: var(--text-dim);
  list-style: none; padding: 4px 0;
}
.login-pair summary::-webkit-details-marker { display: none; }
.login-pair summary:hover { color: var(--text); }
.login-pair .stack { margin-top: 12px; }
.code-input {
  text-align: center; letter-spacing: .4em; font-family: var(--mono);
  font-size: 1.3rem; font-weight: 700; text-transform: uppercase;
}

/* =========================================================
   Structure de l'application
   ========================================================= */
.app { display: flex; min-height: 100vh; min-height: 100dvh; }

.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 40;
  display: flex; flex-direction: column;
  width: var(--sidebar-w); padding: 18px 12px;
  background: var(--bg-soft);
  border-right: 1px solid var(--border);
}
.brand {
  display: flex; align-items: center; gap: 9px;
  padding: 4px 8px 18px;
  font-weight: 700; font-size: 1.05rem; color: var(--accent);
}
.brand span { color: var(--text); }

.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 11px;
  font: inherit; font-size: .93rem; font-weight: 550;
  color: var(--text-dim); background: transparent;
  border: 0; border-radius: var(--radius-sm);
  cursor: pointer; text-align: left; width: 100%;
  transition: background .14s, color .14s;
}
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.is-active { background: var(--accent); color: #fff; }
.nav-item .badge {
  margin-left: auto; padding: 1px 7px;
  font-size: .72rem; font-style: normal; font-weight: 700;
  color: #fff; background: var(--danger); border-radius: 20px;
}
.nav-item.is-active .badge { background: rgba(255,255,255,.28); }

.side-foot { display: flex; flex-direction: column; gap: 11px; padding-top: 14px; border-top: 1px solid var(--border); }
.quota-bar { height: 5px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.quota-bar i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 4px; transition: width .4s; }
.quota-bar.is-full i { background: var(--danger); }
.quota small { display: block; margin-top: 5px; font-size: .76rem; color: var(--text-mute); }
.me { display: flex; flex-direction: column; line-height: 1.3; }
.me-name { font-size: .86rem; font-weight: 600; }
.me-device { font-size: .74rem; color: var(--text-mute); }

.main { flex: 1; margin-left: var(--sidebar-w); min-width: 0; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 26px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.dot-live { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); opacity: .35; transition: opacity .3s; }
.dot-live.is-live { opacity: 1; box-shadow: 0 0 0 3px rgba(53,201,138,.18); }

.view { display: none; padding: 22px 26px 60px; max-width: 940px; }
.view.is-active { display: block; }

/* ---------- Cartes ---------- */
.card {
  margin-bottom: 16px; padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-head h3 { margin-right: auto; }

/* ---------- Zone de dépôt ---------- */
.dropzone {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 42px 20px;
  margin-bottom: 16px;
  color: var(--text-dim);
  background: var(--surface);
  border: 2px dashed var(--border-lt);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color .18s, background .18s, transform .18s;
}
.dropzone:hover { border-color: var(--accent); }
.dropzone.is-over {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  transform: scale(1.008);
}
.dropzone .ic-xl { color: var(--accent); }
.dz-title { font-size: 1.05rem; font-weight: 600; color: var(--text); }
.dz-sub { font-size: .85rem; }
.dz-actions { display: flex; gap: 9px; margin-top: 10px; }

/* ---------- Liste de fichiers ---------- */
.file-list { list-style: none; margin: 0; padding: 0; max-height: 300px; overflow-y: auto; }
.file-row {
  display: flex; align-items: center; gap: 11px;
  padding: 8px 4px;
  border-bottom: 1px solid var(--border);
}
.file-row:last-child { border-bottom: 0; }
.file-row .ic { color: var(--text-mute); }
.file-name { flex: 1; min-width: 0; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-size { font-size: .82rem; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.pack-note {
  margin-top: 12px; padding: 9px 12px;
  font-size: .85rem; color: var(--text-dim);
  background: var(--surface-2); border-radius: var(--radius-sm);
}

/* ---------- Destinataires ---------- */
.targets { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 16px; }
.target {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 13px;
  background: var(--bg-soft);
  border: 1.5px solid var(--border-lt);
  border-radius: var(--radius-sm);
  cursor: pointer; font-size: .9rem;
  transition: border-color .14s, background .14s;
}
.target:hover { border-color: var(--text-mute); }
.target.is-on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.target .ic { color: var(--text-dim); }
.target.is-on .ic { color: var(--accent); }
.target-meta { display: flex; flex-direction: column; line-height: 1.25; }
.target-meta small { font-size: .74rem; color: var(--text-mute); }
.target .live { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.target .live.off { background: var(--text-mute); opacity: .5; }

/* ---------- Progression ---------- */
.prog-wrap { margin-bottom: 10px; }
.prog { height: 9px; background: var(--surface-2); border-radius: 6px; overflow: hidden; }
.prog i {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-h));
  border-radius: 6px; transition: width .25s;
}
.prog.is-pack i { background: linear-gradient(90deg, var(--warn), #ffd166); }
.prog-stats {
  display: flex; gap: 14px; margin-top: 7px;
  font-size: .82rem; color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}
.prog-stats span:first-child { font-weight: 650; color: var(--text); }

.done-card { border-color: var(--ok); }
.done-head { display: flex; align-items: center; gap: 13px; margin-bottom: 14px; }

/* ---------- Listes de transferts ---------- */
.list-head { margin-bottom: 14px; }
.search { max-width: 320px; }
.tlist { display: flex; flex-direction: column; gap: 10px; }

.titem {
  display: flex; align-items: center; gap: 13px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color .15s;
}
.titem:hover { border-color: var(--border-lt); }
.titem.is-new { border-color: var(--accent); }
.titem-ic {
  display: grid; place-items: center;
  width: 40px; height: 40px; flex: none;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border-radius: 11px;
}
.titem-body { flex: 1; min-width: 0; }
.titem-title { font-weight: 600; font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.titem-sub { font-size: .8rem; color: var(--text-dim); margin-top: 2px; }
.titem-acts { display: flex; gap: 4px; flex: none; }

.status-pill {
  display: inline-block; padding: 1px 8px; border-radius: 20px;
  font-size: .72rem; font-weight: 650;
}
.status-ready    { color: var(--ok);     background: rgba(53,201,138,.14); }
.status-uploading,
.status-packing  { color: var(--warn);   background: rgba(240,180,41,.14); }
.status-failed   { color: var(--danger); background: rgba(242,84,91,.14); }

.empty {
  padding: 46px 20px; text-align: center;
  color: var(--text-mute); font-size: .92rem;
  border: 1px dashed var(--border-lt); border-radius: var(--radius);
}

/* ---------- Appareils ---------- */
.dev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 12px; }
.dev-card {
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.dev-card.is-current { border-color: var(--accent); }
.dev-top { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.dev-top .ic { color: var(--accent); }
.dev-name { font-weight: 620; font-size: .95rem; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dev-meta { font-size: .8rem; color: var(--text-dim); }
.dev-acts { display: flex; gap: 5px; margin-top: 11px; }

.pair-out {
  display: flex; align-items: center; gap: 14px;
  margin-top: 14px; padding: 15px;
  background: var(--bg-soft); border-radius: var(--radius-sm);
}
.pair-code {
  font-family: var(--mono); font-size: 1.9rem; font-weight: 700;
  letter-spacing: .3em; color: var(--accent);
}

/* ---------- Petites listes ---------- */
.mini-list { display: flex; flex-direction: column; }
.mini-row {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 2px;
  font-size: .89rem;
  border-bottom: 1px solid var(--border);
}
.mini-row:last-child { border-bottom: 0; }
.mini-row .grow { flex: 1; min-width: 0; }
.mini-list.log .mini-row { font-family: var(--mono); font-size: .78rem; color: var(--text-dim); }

/* ---------- Notes ---------- */
.note-item {
  padding: 13px 15px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.note-text {
  margin: 0 0 9px; font-family: var(--mono); font-size: .84rem;
  white-space: pre-wrap; word-break: break-word;
  max-height: 190px; overflow: auto;
}
.note-foot { display: flex; align-items: center; gap: 9px; font-size: .78rem; color: var(--text-mute); }
.note-foot .row-actions { margin-left: auto; }

/* ---------- Boîte à outils ---------- */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 12px;
}
.tool-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 7px;
  padding: 16px;
  text-align: left; font: inherit; color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color .15s, transform .1s, background .15s;
}
.tool-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.tool-card .ic { color: var(--accent); }
.tool-card b { font-size: .94rem; font-weight: 620; }
.tool-card small { color: var(--text-dim); font-size: .8rem; line-height: 1.35; }

.dz-sm { padding: 26px 16px; margin-bottom: 14px; }
#tool-back { margin-bottom: 12px; }

.opt-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.opt-row > label { flex: 1; min-width: 160px; }
.hint {
  padding: 9px 12px; font-size: .84rem;
  color: var(--text-dim); background: var(--surface-2);
  border-left: 3px solid var(--warn); border-radius: var(--radius-sm);
}

/* ---------- Scanner ---------- */
.scan-stage {
  position: relative;
  margin: 12px 0;
  background: #000;
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex; justify-content: center;
}
.scan-stage video, .scan-stage canvas { max-width: 100%; height: auto; display: block; }
.crop-stage { background: var(--bg-soft); touch-action: none; cursor: crosshair; }
.filter-btn.is-on { background: var(--accent); border-color: var(--accent); color: #fff; }

.page-strip {
  display: flex; gap: 10px; overflow-x: auto;
  padding: 4px 2px 12px;
}
.page-thumb {
  position: relative; flex: none;
  width: 96px; height: 128px;
  border: 2px solid var(--border-lt); border-radius: 8px;
  overflow: hidden; background: var(--surface-2);
}
.page-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.page-thumb .num {
  position: absolute; left: 4px; bottom: 4px;
  padding: 0 6px; font-size: .72rem; font-weight: 700;
  color: #fff; background: rgba(0,0,0,.65); border-radius: 10px;
}
.page-thumb .del {
  position: absolute; top: 3px; right: 3px;
  display: grid; place-items: center;
  width: 22px; height: 22px; padding: 0;
  color: #fff; background: rgba(0,0,0,.6);
  border: 0; border-radius: 50%; cursor: pointer;
}
.page-thumb .del:hover { background: var(--danger); }

/* ---------- Signature ---------- */
.sig-pad {
  width: 100%; height: 190px;
  background: #fff;
  border: 1px dashed var(--border-lt); border-radius: var(--radius-sm);
  touch-action: none; cursor: crosshair;
}
.sig-preview {
  position: relative; margin-top: 10px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  overflow: hidden; background: var(--surface-2);
  display: flex; justify-content: center;
}
.sig-preview canvas { max-width: 100%; height: auto; display: block; cursor: move; }

/* ---------- Modale ---------- */
.modal {
  position: fixed; inset: 0; z-index: 90;
  display: grid; place-items: center;
  padding: 20px;
  background: rgba(4,8,14,.62);
  backdrop-filter: blur(3px);
}
.modal-box {
  width: 100%; max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--border-lt);
  border-radius: 16px;
  box-shadow: var(--shadow);
  max-height: 88vh; display: flex; flex-direction: column;
}
.modal-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.modal-head h3 { flex: 1; }
.modal-body { padding: 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 9px; padding: 14px 18px; border-top: 1px solid var(--border); }

/* ---------- Notifications ---------- */
.toasts {
  position: fixed; right: 16px; bottom: 16px; z-index: 120;
  display: flex; flex-direction: column; gap: 9px;
  max-width: min(360px, calc(100vw - 32px));
}
.toast {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 15px;
  font-size: .89rem;
  background: var(--surface-2);
  border: 1px solid var(--border-lt);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  animation: toast-in .22s ease-out;
}
.toast.ok    { border-left-color: var(--ok); }
.toast.err   { border-left-color: var(--danger); }
.toast.warn  { border-left-color: var(--warn); }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }

/* =========================================================
   Page de partage public
   ========================================================= */
.share-page { display: grid; place-items: center; min-height: 100vh; min-height: 100dvh; padding: 22px; }
.share-card {
  width: 100%; max-width: 420px; padding: 32px; text-align: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; box-shadow: var(--shadow);
}
.share-logo { color: var(--accent); margin-bottom: 12px; }
.share-logo svg { fill: none; stroke: currentColor; }
.share-name { margin: 10px 0; font-weight: 620; word-break: break-word; }
.share-sub { color: var(--text-dim); margin-bottom: 18px; }
.share-error { color: var(--danger); font-size: .88rem; margin-bottom: 12px; }
.share-meta { list-style: none; margin: 0 0 22px; padding: 0; color: var(--text-dim); font-size: .87rem; }
.share-meta li { padding: 2px 0; }
.share-form { margin-top: 6px; }
.share-hash { margin-top: 16px; font-size: .68rem; color: var(--text-mute); word-break: break-all; }
.share-foot { margin-top: 24px; font-size: .78rem; color: var(--text-mute); }

/* =========================================================
   Adaptatif
   ========================================================= */
.only-mobile { display: none; }

@media (max-width: 860px) {
  .only-mobile { display: inline-flex; }
  .sidebar {
    transform: translateX(-100%);
    transition: transform .22s ease;
    box-shadow: var(--shadow);
  }
  .sidebar.is-open { transform: none; }
  .main { margin-left: 0; }
  .view { padding: 16px 15px 80px; }
  .topbar { padding: 12px 15px; }
  .grid-2 { grid-template-columns: 1fr; }
  .dropzone { padding: 32px 16px; }
  .toasts { right: 10px; left: 10px; bottom: 10px; max-width: none; }
  .titem-acts { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
