/* Couleurs tirées du logo JC 224 */
:root {
  --orange: #e8622c;
  --orange-dark: #c94e1c;
  --orange-soft: #fdeee7;
  --blue: #3b6fe0;
  --blue-soft: #e9effc;
  --plum: #b2447a;
  --plum-soft: #f7e8ef;
  --teal: #2f9e7b;
  --teal-dark: #23805f;
  --teal-soft: #e5f4ef;
  --ink: #1f2937;
  --muted: #6b655b;
  --stone: #8a8377;
  --bg: #fbfaf8;
  --surface: #ffffff;
  --sunken: #f4f1ec;
  --line: #ebe6de;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(31, 41, 55, .05), 0 4px 16px rgba(31, 41, 55, .06);
  --shadow-hover: 0 2px 6px rgba(31, 41, 55, .06), 0 14px 32px rgba(31, 41, 55, .10);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --font: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@view-transition { navigation: auto; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--orange-dark); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}

/* Bande tricolore reprise des pétales du logo */
.tricolor { height: 4px; background: linear-gradient(90deg, var(--blue) 0 33.3%, var(--plum) 33.3% 66.6%, var(--teal) 66.6%); }

/* ---------- En-tête ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(251, 250, 248, .9);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; gap: 20px; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); flex: 0 0 auto; }
.brand img { width: 48px; height: 48px; border-radius: 50%; box-shadow: 0 0 0 1px var(--line); background: #fff; }
.brand-name { font-weight: 700; font-size: 16px; line-height: 1.2; }
.brand-name small { display: block; font-weight: 500; color: var(--stone); font-size: 12px; letter-spacing: .02em; }
.header-search { margin-left: auto; flex: 0 1 380px; position: relative; }
.header-search input {
  width: 100%; height: 44px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  font: inherit; color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
}
.header-search input:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 4px var(--orange-soft); }
.header-link { font-weight: 600; text-decoration: none; color: var(--ink); white-space: nowrap; padding: 8px 4px; }
.header-link:hover { color: var(--orange-dark); }
@media (max-width: 720px) {
  .site-header .container { height: auto; flex-wrap: wrap; gap: 10px 12px; padding-top: 10px; padding-bottom: 12px; }
  .site-header .header-search { order: 3; flex: 1 1 100%; margin-left: 0; }
  .header-link { display: none; } /* le contact reste dans le pied de page et sur chaque article */
  .brand img { width: 42px; height: 42px; }
  .brand-name { font-size: 15px; }
}

/* ---------- Accueil ---------- */
.hero { padding: 48px 0 28px; }
.hero .container { display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center; }
.hero-eyebrow { display: inline-block; font-size: 13px; font-weight: 600; color: var(--orange-dark); background: var(--orange-soft); padding: 5px 12px; border-radius: 999px; margin-bottom: 14px; }
.hero h1 { font-size: clamp(28px, 4.6vw, 46px); font-weight: 700; max-width: 680px; margin-bottom: 14px; }
.hero h1 em { font-style: normal; color: var(--orange); }
.hero p { margin: 0; max-width: 560px; color: var(--muted); font-size: 16px; }
.hero-logo { width: 200px; height: 200px; border-radius: 50%; background: #fff; box-shadow: var(--shadow); padding: 6px; }
@media (max-width: 720px) {
  .hero { padding: 28px 0 12px; }
  .hero .container { grid-template-columns: 1fr; }
  .hero-logo { display: none; }
}

/* ---------- Barre de filtres ---------- */
.filters {
  position: sticky; top: 72px; z-index: 30;
  background: rgba(251, 250, 248, .92);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  padding: 12px 0; margin-bottom: 4px;
}
@media (max-width: 720px) { .filters { position: static; } }
.cats { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; margin: 0 -2px; }
.cats::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 500; font-size: 14px; white-space: nowrap;
  cursor: pointer; font-family: inherit;
  transition: background-color .2s var(--ease), border-color .2s, color .2s, transform .15s var(--ease);
}
.chip:hover { border-color: var(--chip, var(--ink)); }
.chip:active { transform: scale(.97); }
.chip.active { background: var(--chip, var(--ink)); border-color: var(--chip, var(--ink)); color: #fff; }
.chip .count { font-size: 12px; font-weight: 600; color: var(--stone); min-width: 1ch; }
.chip.active .count { color: rgba(255,255,255,.8); }
.chip[data-cat="textile"] { --chip: var(--orange); }
.chip[data-cat="informatique"] { --chip: var(--blue); }
.chip[data-cat="perlage"] { --chip: var(--plum); }
.chip[data-cat="imprimerie"] { --chip: var(--teal); }
.chip[data-cat="impression-3d"] { --chip: var(--ink); }

.toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; margin: 16px 0 18px; }
.toolbar h2 { margin: 0; font-size: 22px; font-weight: 700; }
.toolbar .hint { color: var(--muted); font-size: 14px; margin: 2px 0 0; }
.toolbar-controls { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.toggle { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); cursor: pointer; user-select: none; }
.toggle input { appearance: none; -webkit-appearance: none; margin: 0; width: 38px; height: 22px; border-radius: 999px; background: var(--line); position: relative; cursor: pointer; transition: background-color .2s; }
.toggle input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .2s var(--ease); }
.toggle input:checked { background: var(--teal); }
.toggle input:checked::after { transform: translateX(16px); }
.select-sm { height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font: inherit; font-size: 14px; color: var(--ink); cursor: pointer; }

/* ---------- Grille d'articles ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 22px; padding-bottom: 56px; }
@media (max-width: 560px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }

.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), opacity .25s;
  animation: rise .35s var(--ease) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@media (hover: hover) { .card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); } }
.card[hidden] { display: none; }
.card-img { position: relative; aspect-ratio: 1; background: var(--sunken); overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease), opacity .4s; }
@media (hover: hover) { .card:hover .card-img img { transform: scale(1.04); } }
.card-img .badge { position: absolute; left: 10px; bottom: 10px; }
.card-img .featured {
  position: absolute; top: 10px; left: 10px;
  background: var(--orange); color: #fff; font-size: 11px; font-weight: 600; letter-spacing: .02em;
  padding: 4px 10px; border-radius: 999px;
}
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card-cat { font-size: 12px; font-weight: 500; color: var(--stone); }
.card-title { font-size: 15px; font-weight: 600; margin: 0; color: var(--ink); text-decoration: none; line-height: 1.35; }
.card-title::after { content: ""; position: absolute; inset: 0; } /* toute la carte est cliquable */
.card-price { font-size: 17px; font-weight: 700; color: var(--ink); margin-top: auto; padding-top: 6px; }
.card-price.on-request { font-size: 14px; font-weight: 600; color: var(--muted); }
.card-actions { position: relative; z-index: 1; display: flex; gap: 8px; margin-top: 10px; }
.card-actions .btn { flex: 1; }
@media (max-width: 560px) {
  .card-body { padding: 10px 10px 12px; }
  .card-title { font-size: 13.5px; }
  .card-price { font-size: 15px; }
  .card-actions { flex-direction: column; gap: 6px; }
  .card-img .badge { left: 8px; bottom: 8px; font-size: 11px; padding: 3px 8px; }
  .card-img .featured { top: 8px; left: 8px; font-size: 10px; padding: 3px 8px; }
}

/* ---------- Pastilles de disponibilité ---------- */
.badge {
  display: inline-flex; align-items: center;
  font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px;
  background: rgba(255,255,255,.94); white-space: nowrap;
}
.badge-disponible { color: var(--teal-dark); }
.badge-sur_commande { color: var(--blue); }
.badge-rupture { color: var(--plum); }
.product-info .badge, td .badge { background: var(--sunken); }
.product-info .badge-disponible, td .badge-disponible { background: var(--teal-soft); }
.product-info .badge-sur_commande, td .badge-sur_commande { background: var(--blue-soft); }
.product-info .badge-rupture, td .badge-rupture { background: var(--plum-soft); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: 12px; border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: 14px; text-decoration: none; cursor: pointer;
  background: var(--ink); color: #fff; white-space: nowrap;
  transition: background-color .2s, border-color .2s, color .2s, transform .15s var(--ease), box-shadow .2s;
}
.btn:hover { background: #111827; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--orange); }
.btn-primary:hover { background: var(--orange-dark); }
.btn-outline { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-outline:hover { background: var(--surface); border-color: var(--ink); }
.btn-danger { background: var(--surface); color: var(--plum); border-color: var(--plum-soft); }
.btn-danger:hover { background: var(--plum); color: #fff; border-color: var(--plum); }
.btn-wa { background: var(--teal); color: #fff; }
.btn-wa:hover { background: var(--teal-dark); }
.btn-lg { height: 56px; font-size: 16px; border-radius: 14px; padding: 0 28px; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 13px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn[aria-disabled="true"], .btn:disabled { opacity: .45; pointer-events: none; }

/* ---------- État vide ---------- */
.empty { text-align: center; padding: 56px 16px 80px; color: var(--muted); }
.empty img { width: 88px; height: 88px; margin: 0 auto 14px; opacity: .9; }
.empty h3 { color: var(--ink); font-size: 19px; }

/* ---------- Page article ---------- */
.crumbs { font-size: 13px; color: var(--stone); padding: 20px 0; display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--orange-dark); }
.crumbs span[aria-hidden] { color: var(--line); }
.product { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 48px; padding-bottom: 48px; align-items: start; }
@media (max-width: 880px) { .product { grid-template-columns: minmax(0, 1fr); gap: 24px; } }
.gallery { position: sticky; top: 96px; }
@media (max-width: 880px) { .gallery { position: static; margin: 0 -16px; } }
.slides {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  aspect-ratio: 1; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow);
  scroll-behavior: smooth;
}
.slides::-webkit-scrollbar { display: none; }
.slides img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: contain; scroll-snap-align: center; }
@media (max-width: 880px) { .slides { border-radius: 0; box-shadow: none; } }
.dots { display: none; justify-content: center; gap: 6px; margin-top: 12px; }
.dots span { width: 7px; height: 7px; border-radius: 50%; background: var(--line); transition: background-color .2s, width .2s var(--ease); }
.dots span.active { background: var(--orange); width: 20px; border-radius: 4px; }
.thumbs { display: flex; gap: 10px; margin-top: 14px; overflow-x: auto; scrollbar-width: none; }
.thumbs button {
  flex: 0 0 76px; height: 76px; padding: 0; border-radius: 12px; overflow: hidden;
  border: 2px solid transparent; background: var(--sunken); cursor: pointer; opacity: .65;
  transition: opacity .2s, border-color .2s;
}
.thumbs button:hover { opacity: 1; }
.thumbs button.active { border-color: var(--orange); opacity: 1; }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 880px) { .thumbs { display: none; } .dots { display: flex; } }

.product-info h1 { font-size: clamp(24px, 3.6vw, 34px); font-weight: 700; margin: 10px 0 8px; }
.product-price { font-size: 28px; font-weight: 700; color: var(--orange); margin: 0 0 14px; }
.product-price.on-request { font-size: 20px; color: var(--muted); }
.meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tag { font-size: 13px; font-weight: 500; padding: 4px 12px; border-radius: 999px; background: var(--sunken); color: var(--ink); text-decoration: none; transition: background-color .2s; }
a.tag:hover { background: var(--orange-soft); color: var(--orange-dark); }
.desc { color: #4b4f56; white-space: pre-line; margin: 20px 0 0; padding-top: 20px; border-top: 1px solid var(--line); }
.order-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-top: 24px; }
.qty-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.qty-label { font-size: 13px; font-weight: 600; color: var(--muted); display: block; margin-bottom: 6px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
.qty button { width: 44px; height: 44px; border: 0; background: var(--sunken); font: inherit; font-size: 20px; color: var(--ink); cursor: pointer; transition: background-color .15s; }
.qty button:hover { background: var(--line); }
.qty input { width: 56px; height: 44px; border: 0; text-align: center; font: inherit; font-weight: 600; -moz-appearance: textfield; background: transparent; }
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.total { font-size: 14px; color: var(--muted); text-align: right; }
.total strong { display: block; color: var(--ink); font-size: 20px; }
.order-note { font-size: 13px; color: var(--muted); margin: 12px 0 0; text-align: center; }
.ref { font-size: 13px; color: var(--stone); }

/* Barre de commande fixe sur mobile */
.order-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 35;
  display: none; align-items: center; gap: 12px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.96); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  transform: translateY(110%); transition: transform .3s var(--ease);
}
.order-bar.show { transform: none; }
.order-bar .name { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.order-bar .price { font-weight: 700; }
.order-bar > div { min-width: 0; flex: 1; }
@media (max-width: 880px) { .order-bar { display: flex; } }

.section-title { font-size: 20px; font-weight: 700; margin: 8px 0 18px; }

/* ---------- Pied de page ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.site-footer .container { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding-top: 28px; padding-bottom: 28px; }
.site-footer .brand img { width: 40px; height: 40px; }
.site-footer a { color: var(--ink); font-weight: 600; }
.has-order-bar .site-footer { padding-bottom: 76px; }
@media (min-width: 881px) { .has-order-bar .site-footer { padding-bottom: 0; } }

/* ---------- Administration ---------- */
.admin-nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.admin-nav a { padding: 8px 14px; border-radius: 10px; text-decoration: none; color: var(--ink); font-weight: 500; font-size: 14px; transition: background-color .2s; }
.admin-nav a.active, .admin-nav a:hover { background: var(--sunken); }
.admin-nav a.cta { background: var(--orange); color: #fff; }
.admin-nav a.cta:hover { background: var(--orange-dark); }
@media (max-width: 720px) {
  .site-header.admin .admin-nav { order: 3; margin-left: 0; width: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .admin-nav a { white-space: nowrap; }
}
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 28px 0 20px; }
.page-head h1 { margin: 0; font-size: 26px; font-weight: 700; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
@media (max-width: 720px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat { background: var(--surface); border-radius: 14px; padding: 16px 18px; box-shadow: var(--shadow); border-top: 3px solid var(--c, var(--ink)); }
.stat b { display: block; font-size: 26px; font-weight: 700; }
.stat span { color: var(--muted); font-size: 13px; }

.panel { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; margin-bottom: 20px; }
.panel h2 { font-size: 17px; font-weight: 600; margin-bottom: 16px; }
@media (max-width: 560px) { .panel { padding: 18px 16px; } }

/* Liste d'articles admin : tableau sur ordinateur, cartes sur mobile */
.rows { display: flex; flex-direction: column; gap: 10px; margin-bottom: 48px; }
.row {
  display: grid; grid-template-columns: 64px minmax(0, 2fr) minmax(0, 1fr) 170px auto; gap: 16px; align-items: center;
  background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); padding: 12px 14px;
  transition: box-shadow .2s;
}
.row:hover { box-shadow: var(--shadow-hover); }
.row img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; background: var(--sunken); }
.row-title { font-weight: 600; color: var(--ink); text-decoration: none; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-title:hover { color: var(--orange-dark); }
.row-sub { font-size: 13px; color: var(--muted); }
.row-price { font-weight: 600; white-space: nowrap; }
.row .actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.row select { height: 36px; padding: 0 10px; font-size: 13px; }
.state { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; padding: 2px 8px; border-radius: 6px; margin-left: 6px; vertical-align: middle; }
.state-online { background: var(--teal-soft); color: var(--teal-dark); }
.state-draft { background: var(--sunken); color: var(--muted); }
.state-featured { background: var(--orange-soft); color: var(--orange-dark); }
@media (max-width: 860px) {
  .row { grid-template-columns: 56px minmax(0, 1fr); grid-template-areas: "img info" "img price" "status status" "actions actions"; gap: 6px 12px; }
  .row img { grid-area: img; width: 56px; height: 56px; align-self: start; }
  .row > .info { grid-area: info; }
  .row > .row-price { grid-area: price; }
  .row > .status { grid-area: status; margin-top: 6px; }
  .row > .actions { grid-area: actions; justify-content: stretch; }
  .row > .actions > * { flex: 1; }
  .row > .actions .btn { width: 100%; }
  .row-title { white-space: normal; }
}
.inline { display: inline; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
label.field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; }
label.field small, .help { font-weight: 400; color: var(--muted); font-size: 13px; }
input[type=text], input[type=number], input[type=password], input[type=tel], input[type=search], select, textarea {
  width: 100%; padding: 11px 14px; border: 1px solid var(--line); border-radius: 12px;
  font: inherit; font-weight: 400; background: #fff; color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
}
textarea { min-height: 140px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 4px var(--orange-soft); }
.segmented { display: flex; gap: 6px; flex-wrap: wrap; }
.segmented label { flex: 1; min-width: 120px; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span {
  display: block; text-align: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px;
  font-weight: 500; font-size: 14px; cursor: pointer; transition: all .2s;
}
.segmented input:checked + span { border-color: var(--c); background: var(--c); color: #fff; }
.segmented input:focus-visible + span { box-shadow: 0 0 0 4px var(--orange-soft); }
.switch { display: inline-flex; gap: 10px; align-items: center; font-weight: 500; cursor: pointer; }
.switch input { appearance: none; -webkit-appearance: none; margin: 0; width: 38px; height: 22px; border-radius: 999px; background: var(--line); position: relative; cursor: pointer; transition: background-color .2s; flex: 0 0 auto; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .2s var(--ease); }
.switch input:checked { background: var(--orange); }
.switch input:checked::after { transform: translateX(16px); }

.form-actions {
  position: sticky; bottom: 0; z-index: 20;
  display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap;
  margin: 0 -16px; padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
  background: rgba(251, 250, 248, .94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
}
.form-actions.static { position: static; margin: 4px 0 0; padding: 0; background: none; border: 0; backdrop-filter: none; }
@media (max-width: 560px) { .form-actions .btn { flex: 1; } }

.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  border: 2px dashed var(--line); border-radius: 14px; padding: 28px 16px; text-align: center; cursor: pointer;
  color: var(--muted); background: var(--bg); transition: border-color .2s, background-color .2s;
}
.dropzone strong { color: var(--orange-dark); font-size: 15px; }
.dropzone:hover, .dropzone.over { border-color: var(--orange); background: var(--orange-soft); }
.dropzone input { display: none; }
.img-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-top: 14px; }
.img-item { position: relative; border-radius: 12px; overflow: hidden; border: 2px solid var(--line); background: var(--sunken); transition: border-color .2s, opacity .2s; }
.img-item img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.img-item .opts { display: flex; justify-content: space-between; align-items: center; gap: 4px; padding: 6px 8px; font-size: 12px; background: #fff; }
.img-item .opts label { display: inline-flex; gap: 4px; align-items: center; cursor: pointer; }
.img-item .opts button { border: 0; background: none; color: var(--plum); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; padding: 0; }
.img-item.main { border-color: var(--orange); }
.img-item.remove { opacity: .4; }
.img-item .new { position: absolute; top: 6px; left: 6px; background: var(--blue); color: #fff; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; }

.alert { padding: 12px 16px; border-radius: 12px; margin: 16px 0; font-weight: 500; font-size: 14px; animation: rise .3s var(--ease) both; }
.alert-ok { background: var(--teal-soft); color: var(--teal-dark); }
.alert-error { background: var(--plum-soft); color: var(--plum); }
.alert-warn { background: var(--orange-soft); color: var(--orange-dark); }

.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login { width: 100%; max-width: 400px; }
.login .logo { width: 110px; height: 110px; margin: 0 auto 20px; border-radius: 50%; box-shadow: var(--shadow); background: #fff; }
.login .panel { display: flex; flex-direction: column; gap: 16px; }
