/* Espace atelier */
.admin { min-height: 100vh; }
.a-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 16px var(--pad); border-bottom: 1px solid var(--line); position: sticky; top: 0; background: rgba(16,16,16,.9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); z-index: 20; }
.a-top-actions { display: flex; gap: 8px; }
.a-top-actions[hidden] { display: none; }
.a-main { max-width: 1100px; margin: 0 auto; padding: clamp(28px, 5vw, 64px) var(--pad) 120px; }
.admin h1 { font-size: clamp(34px, 5vw, 56px); line-height: 1.05; margin-bottom: 12px; }
.muted { color: var(--stone); }
code { background: var(--ink-2); border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; font-size: .9em; }

.panel { background: var(--ink-2); border: 1px solid var(--line); border-radius: 8px; padding: clamp(24px, 4vw, 44px); }
.panel.narrow { max-width: 460px; margin: 4vh auto 0; }
.a-form { display: grid; gap: 18px; margin-top: 24px; }
.a-form .btn { width: 100%; }
.linkish { background: none; border: 0; color: var(--brass); font: inherit; font-size: 15px; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; padding: 6px; justify-self: center; }
.form-ok { color: #a9cf9f; margin: 0; font-size: 15px; }

.dash-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 24px; }
.dash-head h1 { margin: 0 0 4px; }
.dash-head p { margin: 0; }

.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 14px; overflow-x: auto; }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; color: var(--stone); font: 600 16px var(--sans); padding: 12px 14px; cursor: pointer; white-space: nowrap; margin-bottom: -1px; }
.tabs button[aria-selected="true"] { color: var(--skin); border-bottom-color: var(--brass); }
.tabs .count { font-weight: 400; color: var(--stone); }
.tab-help { font-size: 15px; margin: 0 0 18px; }

.drop { position: relative; display: grid; justify-items: center; gap: 6px; text-align: center; padding: 34px 20px; border: 1.5px dashed #4a463f; border-radius: 10px; cursor: pointer; transition: border-color .2s, background .2s; }
.drop:hover, .drop.over { border-color: var(--brass); background: rgba(198, 167, 123, .05); }
.drop:focus-within { outline: 2px solid var(--brass); outline-offset: 3px; }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop-icon { width: 52px; height: 52px; border-radius: 50%; background: var(--cream); color: var(--ink); display: grid; place-items: center; font-size: 30px; line-height: 1; margin-bottom: 6px; }
.drop-title { font-weight: 600; font-size: 18px; }
.drop-sub { color: var(--stone); font-size: 14px; max-width: 34em; }

.queue { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; }
.queue li { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; font-size: 14px; padding: 10px 14px; background: var(--ink-2); border: 1px solid var(--line); border-radius: 6px; }
.queue .bar { grid-column: 1 / -1; height: 3px; background: var(--line); border-radius: 3px; overflow: hidden; }
.queue .bar i { display: block; height: 100%; width: 0; background: var(--brass); transition: width .3s; }
.queue .done { color: #a9cf9f; }
.queue .fail { color: #e7a291; }

.import { margin-top: 20px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 8px; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; }
.import p { margin: 0; color: var(--stone); max-width: 40em; }
.import[hidden] { display: none; }
.empty { text-align: center; color: var(--stone); padding: 40px 0; }

.cards { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.card { background: var(--ink-2); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; transition: opacity .3s, transform .3s var(--ease); }
.card.busy { opacity: .5; pointer-events: none; }
.card.hidden-photo .thumb img { opacity: .35; filter: grayscale(1); }
.thumb { position: relative; aspect-ratio: 4 / 5; background: var(--ink); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .pos { position: absolute; top: 8px; left: 8px; background: rgba(16,16,16,.8); border-radius: 999px; padding: 2px 10px; font-size: 13px; }
.thumb .off { position: absolute; top: 8px; right: 8px; background: var(--cream); color: var(--ink); border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 600; }
.card-body { padding: 12px; display: grid; gap: 10px; }
.card-body input[type="text"] { padding: 10px 12px; font-size: 15px; }
.card-body .row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.switch { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--stone); cursor: pointer; }
.switch input { width: 18px; height: 18px; accent-color: var(--brass); }
.icon-btns { display: flex; gap: 6px; }
.ibtn { min-width: 40px; height: 40px; border-radius: 8px; border: 1px solid #3a3732; background: transparent; color: var(--skin); font: 600 14px var(--sans); cursor: pointer; padding: 0 10px; }
.ibtn:hover { border-color: var(--cream); }
.ibtn:disabled { opacity: .3; cursor: default; }
.ibtn.danger { color: #e7a291; }
.ibtn.danger:hover { border-color: #e7a291; }
.card select { background: var(--ink); color: var(--skin); border: 1px solid #3a3732; border-radius: 4px; padding: 9px 10px; font: inherit; font-size: 14px; }
.saved { font-size: 12px; color: #a9cf9f; min-height: 1em; }

.btn-danger { background: #d98c7a; border-color: #d98c7a; color: var(--ink); }
.btn-danger:hover { background: #e7a291; border-color: #e7a291; }
.confirm { border: 1px solid var(--line); border-radius: 10px; background: var(--ink-2); color: var(--skin); padding: 26px; max-width: 380px; width: calc(100% - 32px); }
.confirm::backdrop { background: rgba(0,0,0,.7); }
.confirm h2 { font-size: 28px; margin-bottom: 14px; }
.confirm img { width: 100%; max-height: 220px; object-fit: cover; border-radius: 6px; margin-bottom: 12px; }
.confirm p { color: var(--stone); }
.confirm .actions .btn { flex: 1; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; background: var(--cream); color: var(--ink); padding: 12px 20px; border-radius: 999px; font-weight: 600; font-size: 15px; transition: all .3s var(--ease); pointer-events: none; z-index: 100; max-width: calc(100% - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: #e7a291; }

@media (max-width: 560px) {
  .a-top .wordmark span { display: inline; }
  .a-top-actions { width: 100%; }
  .a-top-actions .btn { flex: 1; width: auto; }
  .cards { grid-template-columns: 1fr 1fr; gap: 12px; }
  .card-body { padding: 10px; }
  .card-body .row { flex-wrap: wrap; }
  .icon-btns { width: 100%; flex-wrap: wrap; }
  .icon-btns .ibtn.danger { flex-basis: 100%; }
  .icon-btns .ibtn { flex: 1; min-width: 0; }
  .btn { width: auto; }
}
.cards.busy { opacity: .6; pointer-events: none; }

/* Formulaires (repris du site) */
.field { display: grid; gap: 8px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > label, .field-label { font-size: 14px; font-weight: 600; color: var(--skin); }
.opt { font-weight: 400; color: var(--stone); margin-left: 6px; }
.admin input[type="text"], .admin input[type="email"], .admin input[type="password"], .admin textarea { width: 100%; background: var(--ink); color: var(--skin); border: 1px solid #3a3732; border-radius: 4px; padding: 12px 14px; font: inherit; font-size: 16px; line-height: 1.5; transition: border-color .2s; }
.admin input:focus, .admin textarea:focus { outline: none; border-color: var(--brass); box-shadow: 0 0 0 3px rgba(198, 167, 123, .18); }
.admin textarea { resize: vertical; min-height: 96px; }
.form-error { color: #e7a291; font-size: 14px; margin: 0; }

/* Onglets principaux */
.panels-nav { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; background: var(--ink-2); border: 1px solid var(--line); border-radius: 8px; margin-bottom: 26px; }
.panels-nav button { background: none; border: 0; border-radius: 6px; color: var(--stone); font: 600 15px var(--sans); padding: 11px 8px; cursor: pointer; }
.panels-nav button[aria-selected="true"] { background: var(--cream); color: var(--ink); }

/* Textes */
.texts-form { display: grid; gap: 22px; padding-bottom: 90px; }
.tgroup { border: 1px solid var(--line); border-radius: 8px; padding: 18px; display: grid; gap: 16px; margin: 0; background: var(--ink-2); }
.tgroup legend { font-family: var(--serif); font-size: 24px; padding: 0 6px; }
.field-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.reset { background: none; border: 0; color: var(--brass); font: 13px var(--sans); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 2px; }
.list-item { display: grid; gap: 8px; padding: 12px; border: 1px dashed #3a3732; border-radius: 6px; }
.list-item .row { display: flex; justify-content: space-between; align-items: center; }
.list-actions { display: flex; gap: 6px; }
.add-item { justify-self: start; }
.savebar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; justify-content: flex-end; align-items: center; gap: 16px; padding: 12px var(--pad) max(12px, env(safe-area-inset-bottom)); background: rgba(16,16,16,.94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--line); }
.savebar[hidden], .panel-body[hidden] { display: none; }

/* Grandes images */
.big-images { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.big-card { background: var(--ink-2); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.big-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--ink); }
.big-card .card-body { padding: 14px; }
.big-card h3 { font-family: var(--serif); font-size: 22px; margin: 0; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0; }
.big-card.busy { opacity: .5; pointer-events: none; }
