/* Espace admin — s'appuie sur les couleurs et polices du site (assets/style.css) */
.adm { min-height: 100vh; }
.adm::before { display: none; }
.adm-h1 { font-size: clamp(2.2rem, 4vw, 3rem); text-transform: uppercase; }
.adm-h2 { font-size: 1.8rem; text-transform: uppercase; }

.adm-login { min-height: 100vh; display: grid; place-items: center; padding: 24px max(16px, env(safe-area-inset-right, 0px)) 24px max(16px, env(safe-area-inset-left, 0px)); }
.adm-login form { width: min(420px, 100%); }
.adm-logo { height: 52px; width: auto; display: var(--logo-light); }
.adm-back { font-size: .9rem; text-decoration: none; text-align: center; }

.adm-bar { position: sticky; top: 0; z-index: 30; background: var(--band); color: var(--on-band); }
.adm-bar-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.adm-brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--on-band); font: 500 .8rem var(--f-mono); letter-spacing: .14em; text-transform: uppercase; }
.adm-brand img { height: 36px; width: auto; filter: brightness(0) invert(1); opacity: .9; }
.adm-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.adm-nav a, .adm-nav .linkish { color: var(--on-band-soft); text-decoration: none; font: 600 .9rem var(--f-body); padding: 8px 10px; border-radius: var(--radius); background: none; border: 0; cursor: pointer; }
.adm-nav a:hover, .adm-nav .linkish:hover { color: var(--on-band); background: rgba(255,255,255,.08); }

.adm-main { padding-block: 28px 96px; display: grid; gap: 36px; }
.adm-crumbs { display: flex; flex-wrap: wrap; gap: 8px; font: 500 .82rem/1.4 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); }
.adm-crumbs a { color: var(--palm); text-decoration: none; }
.adm-crumbs a:last-child { color: var(--ink); }
.adm-main .head { margin-bottom: 0; }

.adm-album-head { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: end; }
.adm-album-fields { display: grid; gap: 14px; min-width: 0; }
.adm-album-fields #a-titre { font: 700 1.6rem/1.1 var(--f-display); }
.adm-album-side { display: grid; gap: 10px; justify-items: stretch; min-width: 200px; }
.adm-count { color: var(--ink-soft); font-size: .95rem; text-align: right; }
.adm-count b { font-family: var(--f-mono); color: var(--ink); }
.btn-danger { background: transparent; color: #b3261e; border-color: color-mix(in srgb, #b3261e 40%, transparent); }
.btn-danger:hover { background: color-mix(in srgb, #b3261e 10%, transparent); }
@media (max-width: 720px) { .adm-album-head { grid-template-columns: 1fr; } .adm-count { text-align: left; } }

.adm-section { display: grid; gap: 18px; }
.adm-section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; border-bottom: 2px solid var(--ink); padding-bottom: 10px; }
.adm-section-head h2 { font-size: 1.7rem; text-transform: uppercase; }
.adm-n { font: 500 .9rem var(--f-mono); color: var(--ink-soft); margin-left: 6px; vertical-align: middle; }
.adm-hint { font-size: .85rem; color: var(--ink-soft); }

.adm-albums { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; align-items: start; }
.adm-acard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: grid; }
.adm-acard-link { text-decoration: none; color: inherit; display: grid; gap: 4px; padding-bottom: 12px; }
.adm-acard-link h3 { font-size: 1.35rem; padding: 10px 14px 0; }
.adm-acard-link p { font-size: .88rem; color: var(--ink-soft); padding: 0 14px; }
.adm-acard-ph { aspect-ratio: 4 / 3; background: var(--paper); display: grid; place-items: center; overflow: hidden; }
.adm-acard-ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.adm-acard-link:hover img { transform: scale(1.04); }
.adm-acard-ph span { font: 500 .8rem var(--f-mono); color: var(--ink-soft); text-transform: uppercase; letter-spacing: .1em; }
.adm-acard .adm-tools { border-top: 1px solid var(--line); padding: 8px 10px; }
.adm-new { padding: 18px; gap: 12px; border-style: dashed; border-width: 2px; background: transparent; }
.adm-new h3 { font-size: 1.35rem; text-transform: uppercase; }

.adm-tools { display: flex; gap: 6px; justify-content: flex-end; }
.ico { width: 34px; height: 34px; border-radius: 6px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); cursor: pointer; font-size: .95rem; line-height: 1; }
.ico:hover:not([disabled]) { border-color: var(--palm); color: var(--palm); }
.ico[disabled] { opacity: .35; cursor: default; }
.ico.on { background: var(--amber); color: var(--on-amber); border-color: var(--amber); }
.ico.danger:hover { border-color: #b3261e; color: #b3261e; }

.adm-drop { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 34px 20px; border: 2px dashed var(--line); border-radius: var(--radius); background: var(--surface); cursor: pointer; transition: border-color .15s, background-color .15s; }
.adm-drop:hover, .adm-drop.over { border-color: var(--palm); background: color-mix(in srgb, var(--palm) 7%, var(--surface)); }
.adm-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.adm-drop:focus-within { outline: 3px solid var(--amber); outline-offset: 2px; }
.adm-drop svg { width: 36px; height: 36px; color: var(--palm); }
.adm-drop span { font-size: .9rem; color: var(--ink-soft); }

.adm-queue { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.adm-queue li { display: grid; grid-template-columns: minmax(0, 1fr) 160px minmax(0, 1fr); gap: 12px; align-items: center; font-size: .9rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; }
.q-nom { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-bar { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
.q-bar i { display: block; height: 100%; width: 0; background: var(--palm); transition: width .2s; }
.q-etat { color: var(--ink-soft); text-align: right; }
.adm-queue li.ok .q-etat { color: var(--palm); font-weight: 600; }
.adm-queue li.err .q-etat { color: #b3261e; font-weight: 600; }
.adm-queue li.err .q-bar i { background: #b3261e; }
@media (max-width: 600px) { .adm-queue li { grid-template-columns: 1fr; } .q-etat { text-align: left; } }

.adm-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.adm-photo { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: grid; }
.adm-photo.is-cover { border-color: var(--amber); box-shadow: inset 0 0 0 1px var(--amber); }
.adm-photo-ph { aspect-ratio: 1; background: var(--paper); display: block; overflow: hidden; }
.adm-photo-ph img { width: 100%; height: 100%; object-fit: cover; }
.adm-caption { border: 0; border-bottom: 1px solid var(--line); background: transparent; font: inherit; font-size: .88rem; color: var(--ink); padding: 10px 12px; width: 100%; }
.adm-caption:focus { outline: 2px solid var(--palm); outline-offset: -2px; }
.adm-photo .adm-tools { padding: 8px 10px; }
.adm-empty { color: var(--ink-soft); }

.adm-dialog { border: 0; border-radius: var(--radius); padding: 28px; width: min(440px, 92vw); background: var(--surface); color: var(--ink); }
.adm-dialog::backdrop { background: rgba(10, 16, 6, .6); }

.adm-toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 60; background: var(--ink); color: var(--paper); padding: 12px 18px; border-radius: 999px; font-weight: 600; font-size: .95rem; box-shadow: 0 12px 30px -10px rgba(0,0,0,.5); max-width: calc(100vw - 32px); }
.adm-toast.err { background: #b3261e; color: #fff; }
