/* =====================================================================
   NUMERIK’ART
   Idée : la sérigraphie. Des encres opaques posées à plat, l'une sur l'autre,
   avec des repères de calage. Pas de dégradés, pas d'ombres portées.
   Noir, blanc, vert dominant ; rouge et jaune en touches.
   Titres : Big Shoulders Display. Texte : police du téléphone (rien à télécharger).
   ===================================================================== */

:root {
  --black: #000;
  --white: #fff;
  --green: #00a650;       /* encre verte : fonds, boutons (texte noir dessus) */
  --green-deep: #006b34;  /* vert lisible sur blanc (texte, liens) */
  --red: #d62a22;
  --yellow: #ffd21f;
  --g1: #f2f2f2;
  --g2: #e2e2e2;
  --g3: #bdbdbd;
  --muted: #595959;
  --display: 'Big Shoulders Display', 'Numerik Secours', 'Arial Narrow', sans-serif;
  --body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --maxw: 1180px;
  --tabs-h: 64px;
}

/* Police de secours si « Big Shoulders Display » ne se charge pas : réduite pour rester étroite. */
@font-face {
  font-family: 'Numerik Secours';
  font-weight: 800 900;
  size-adjust: 74%;
  src: local('Roboto Bold'), local('Arial Bold'), local('Helvetica Neue Bold'), local('Helvetica Bold'), local('DejaVu Sans Bold'), local('Liberation Sans Bold');
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--white); color: var(--black);
  font: 400 16px/1.55 var(--body); text-rendering: optimizeLegibility;
}
body.no-scroll { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
ul, ol { padding: 0; }
:focus-visible { outline: 3px solid var(--black); outline-offset: 2px; }
.site-header :focus-visible, .site-footer :focus-visible, .band--black :focus-visible,
.hero__band--black :focus-visible, .admin-side :focus-visible, .admin-top :focus-visible { outline-color: var(--yellow); }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--yellow); color: #000; padding: 10px 14px; font-weight: 700; }
.skip:focus { top: 8px; }
.hp { position: absolute; left: -9999px; }
.ic { flex: none; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 460px; margin: 0 auto; }
.muted { color: var(--muted); }
.hint { font-size: 13px; color: var(--muted); margin: 6px 0 0; }
.form-error { color: var(--red); font-weight: 700; font-size: 14px; margin: 0; }
.form-error:empty { display: none; }
.count { font-size: 14px; color: var(--muted); margin: 0 0 12px; }
.link { white-space: nowrap; font-weight: 700; color: var(--green-deep); text-underline-offset: 3px; }
.link-btn { background: none; border: 0; padding: 6px 0; color: var(--green-deep); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.alt { margin-top: 24px; }

/* ---------- Titres ---------- */
.h1, .h2, .h3 { font-family: var(--display); font-weight: 900; text-transform: uppercase; line-height: .95; letter-spacing: .005em; margin: 0 0 .4em; }
.h1 { font-size: clamp(46px, 11vw, 96px); }
.h2 { font-size: clamp(34px, 7.5vw, 56px); }
.h3 { font-size: clamp(26px, 5vw, 34px); }
.h4 { font: 700 17px/1.3 var(--body); margin: 0 0 8px; }
.lead { font-size: clamp(18px, 3.4vw, 22px); line-height: 1.45; margin: 0 0 1em; max-width: 46ch; }
.prose p { margin: 0 0 1em; max-width: 62ch; }
.prose--wide p { max-width: 70ch; }
.prose ul { margin: 0 0 1em; }

/* ---------- Mise en page ---------- */
.section { padding-block: clamp(44px, 8vw, 92px); }
.section--tight { padding-top: 8px; padding-bottom: clamp(40px, 7vw, 72px); }
.page-head { padding-block: clamp(30px, 6vw, 60px) clamp(14px, 3vw, 24px); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.section-head .h2 { margin: 0; }
.split { display: grid; gap: 28px; }
.band { width: 100%; }
.band--green { background: var(--green); color: var(--black); }
.band--black { background: var(--black); color: var(--white); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.page-cta { margin-top: 28px; }
.stack { display: grid; gap: 16px; }
.stack-lg { display: grid; gap: 28px; }
.crumbs { margin: 8px 0 18px; }
.crumbs a, .crumb-back { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; text-decoration: none; }
.plain-list { list-style: none; margin: 0 0 16px; }
.plain-list li { padding: 7px 0; border-bottom: 1px solid var(--g2); }
.plain-list--links a { font-weight: 700; }
@media (min-width: 800px) {
  .split { grid-template-columns: 1fr 1fr; gap: 56px; }
  .split--center { align-items: center; }
  .split--form { grid-template-columns: 1.5fr 1fr; align-items: start; gap: 48px; }
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 11px 20px; border: 2px solid var(--black); border-radius: 0;
  background: var(--white); color: var(--black); font: 700 15px/1.1 var(--body); letter-spacing: .02em;
  text-decoration: none; text-align: center; cursor: pointer;
}
.btn:hover { background: var(--g1); }
.btn:active { transform: translateY(1px); }
.btn--green { background: var(--green); }
.btn--green:hover { background: #009448; }
.btn--black { background: var(--black); color: var(--white); }
.btn--black:hover { background: #262626; }
.btn--white { background: var(--white); }
.btn--ghost { background: transparent; }
.btn--danger { background: var(--white); color: var(--red); border-color: var(--red); }
.btn--danger:hover { background: var(--red); color: var(--white); }
.btn--wa { background: #25d366; }
.btn--wa:hover { background: #1fbd5a; }
.btn--disabled, .btn:disabled { background: var(--g2); color: var(--muted); border-color: var(--g3); cursor: not-allowed; }
.btn--sm { min-height: 38px; padding: 7px 12px; font-size: 14px; }
.btn--lg { min-height: 54px; padding: 14px 24px; font-size: 16px; }
.btn--xl { min-height: 64px; padding: 16px 24px; font-size: 18px; }
.btn--block { display: flex; width: 100%; }
.site-header .btn--ghost, .admin-top .btn--ghost { color: var(--white); border-color: var(--white); }
.band--black .btn--ghost { color: var(--white); border-color: var(--white); }
.file-btn { cursor: pointer; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; background: none; border: 0; color: inherit; cursor: pointer; text-decoration: none; }

/* ---------- Repère de calage (motif de sérigraphie) ---------- */
.reg { display: inline-block; position: relative; width: 26px; height: 26px; border: 2px solid currentColor; border-radius: 50%; color: var(--red); }
.reg::before, .reg::after { content: ''; position: absolute; background: currentColor; }
.reg::before { left: 50%; top: -9px; bottom: -9px; width: 2px; transform: translateX(-50%); }
.reg::after { top: 50%; left: -9px; right: -9px; height: 2px; transform: translateY(-50%); }
.reg--corner { position: absolute; top: 22px; right: 22px; }

/* ---------- En-tête ---------- */
.site-header { position: sticky; top: 0; z-index: 30; background: var(--black); color: var(--white); }
.header-row { display: flex; align-items: center; gap: 12px; min-height: 60px; }
.brand { font: 900 27px/1 var(--display); text-transform: uppercase; letter-spacing: .01em; text-decoration: none; color: inherit; margin-right: auto; white-space: nowrap; }
.brand--logo img { height: 40px; width: auto; }
.nav { display: none; }
.header-actions { display: flex; align-items: center; gap: 4px; }
.header-actions .btn { margin-right: 4px; }
.header-login { display: none; font-weight: 700; text-decoration: none; padding: 0 10px; }
.hide-sm { display: none; }
.mobile-menu { background: var(--black); border-top: 1px solid #333; padding: 6px 16px 22px; }
.mobile-menu a { display: block; padding: 13px 0; border-bottom: 1px solid #2a2a2a; font: 900 28px/1 var(--display); text-transform: uppercase; text-decoration: none; }
.mobile-menu a[aria-current='page'] { color: var(--green); }
.mobile-menu .mobile-menu__wa { color: #25d366; }
@media (min-width: 900px) {
  .nav { display: flex; gap: 22px; margin-right: 12px; }
  .nav a { text-decoration: none; font-weight: 600; padding: 6px 0; border-bottom: 3px solid transparent; }
  .nav a:hover { border-bottom-color: var(--g3); }
  .nav a[aria-current='page'] { border-bottom-color: var(--green); }
  .menu-btn, .mobile-menu { display: none !important; }
  .header-login { display: inline-block; }
  .hide-sm { display: inline-flex; }
  .brand { margin-right: 20px; }
  .header-row { justify-content: space-between; }
  .header-actions { margin-left: auto; }
}

.wa-float { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 25; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: #25d366; color: #000; border: 2px solid #000; }

/* ---------- Pied de page ---------- */
.site-footer { background: var(--black); color: var(--white); padding: 44px 0 28px; margin-top: 0; }
.footer-grid { display: grid; gap: 30px; }
.footer-brand { font: 900 32px/1 var(--display); text-transform: uppercase; margin: 0 0 6px; }
.footer-slogan { color: #cfcfcf; margin: 0; }
.site-footer nav, .footer-contact { display: grid; gap: 8px; align-content: start; }
.site-footer a { text-underline-offset: 3px; }
.footer-contact p { margin: 0; color: #cfcfcf; }
.footer-bottom { margin-top: 30px; padding-top: 18px; border-top: 1px solid #333; color: #a8a8a8; font-size: 14px; }
.footer-bottom p { margin: 0; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1.2fr; } }

/* ---------- Accueil : trois encres, trois bandes ---------- */
.hero { position: relative; }
.hero__band { position: relative; padding: clamp(10px, 2.4vw, 26px) 0; overflow: hidden; }
.hero__band--white { background: var(--white); color: var(--black); }
.hero__band--green { background: var(--green); color: var(--black); }
.hero__band--black { background: var(--black); color: var(--white); }
.hero__line { margin: 0; font: 900 clamp(60px, 16.4vw, 210px)/.88 var(--display); text-transform: uppercase; letter-spacing: .003em; overflow-wrap: anywhere; }
.hero__actions { background: var(--black); color: var(--white); padding: 4px 0 26px; }
.hero__actions-row { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 14px; }
.hero__actions .btn { flex: 1 1 200px; }
.hero__actions .btn--green, .hero__actions .btn--white { border-color: var(--white); }
@media (min-width: 700px) { .hero__actions .btn { flex: 0 0 auto; min-width: 220px; } }

.rules { list-style: none; margin: 0; padding: 0; border-top: 3px solid var(--black); align-self: start; }
.rules li { padding: 11px 0; border-bottom: 1px solid var(--black); font: 900 clamp(26px, 6vw, 38px)/1 var(--display); text-transform: uppercase; }
.rules--big li { font-size: clamp(34px, 9vw, 66px); padding: 16px 0; }
.steps { list-style: none; counter-reset: s; display: grid; gap: 28px; margin: 22px 0 0; }
.steps li { counter-increment: s; position: relative; padding-left: 66px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: -4px; width: 50px; padding-bottom: 4px; border-bottom: 6px solid var(--green); font: 900 52px/1 var(--display); }
.steps p { margin: 0; max-width: 40ch; }
@media (min-width: 800px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 40px; } }
.contact-list { list-style: none; margin: 0; display: grid; gap: 14px; }
.contact-list li { display: flex; align-items: center; gap: 12px; font-size: 18px; }
.contact-list a { font-weight: 700; }

/* ---------- Catalogue ---------- */
.tabs { display: inline-flex; margin-top: 10px; }
.tabs a { min-height: 46px; display: inline-flex; align-items: center; padding: 0 26px; border: 2px solid var(--black); font-weight: 700; text-decoration: none; }
.tabs a + a { margin-left: -2px; }
.tabs a[aria-current='page'] { background: var(--black); color: var(--white); }
.filters { display: grid; gap: 10px; margin: 0 0 22px; }
.search { position: relative; }
.search .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.search input[type='search'] { padding-left: 44px; }
.filters--admin .search input[type='search'] { padding-left: 14px; }
@media (min-width: 720px) { .filters { grid-template-columns: 1.6fr 1fr auto; align-items: center; } .filters--admin { grid-template-columns: 1.6fr 1fr 1fr; } }

.grid-products { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px 12px; }
@media (min-width: 720px) { .grid-products { grid-template-columns: repeat(3, 1fr); gap: 28px 18px; } }
@media (min-width: 1040px) { .grid-products { grid-template-columns: repeat(4, 1fr); } }
.tile { position: relative; }
.tile__media { display: block; aspect-ratio: 4 / 5; background: var(--g1); overflow: hidden; }
.tile__media img { width: 100%; height: 100%; object-fit: cover; }
.tile__none { display: grid; place-items: center; width: 100%; height: 100%; color: var(--muted); font-size: 13px; }
.tile__flags { position: absolute; left: 8px; top: 8px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.tile__flags .badge { box-shadow: 0 0 0 2px var(--white); }
.tile__body { padding-top: 10px; border-top: 3px solid var(--black); margin-top: 0; }
.tile__name { margin: 0; font: 700 15px/1.3 var(--body); }
.tile__name a { text-decoration: none; }
.tile__name a:hover { text-decoration: underline; }
.tile__cat { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.tile__price { margin: 4px 0 0; font: 900 24px/1 var(--display); }
.fav { position: absolute; right: 8px; top: 8px; width: 42px; height: 42px; display: grid; place-items: center; background: var(--white); border: 2px solid var(--black); cursor: pointer; padding: 0; }
.fav[aria-pressed='true'] { background: var(--red); color: var(--white); border-color: var(--red); }
.fav[aria-pressed='true'] svg, .fav-line[aria-pressed='true'] svg { fill: currentColor; }
.fav-line[aria-pressed='true'] { border-color: var(--red); color: var(--red); }
.tile--sk .tile__media, .sk { background: linear-gradient(90deg, var(--g1), var(--g2), var(--g1)); background-size: 200% 100%; animation: sk 1.4s linear infinite; }
.sk--line { height: 14px; margin: 10px 0 0; }
.sk--short { width: 50%; }
@keyframes sk { to { background-position: -200% 0; } }
.more { text-align: center; margin-top: 28px; }
.empty { display: grid; justify-items: center; gap: 12px; padding: 48px 16px; text-align: center; border: 2px dashed var(--g3); }
.empty p { margin: 0; font-size: 18px; font-weight: 600; }
.empty .reg { margin: 8px 0; }

/* ---------- Pastilles ---------- */
.badge { display: inline-block; padding: 3px 9px; font: 700 12px/1.3 var(--body); background: var(--g2); color: var(--black); }
.badge--green { background: var(--green); }
.badge--yellow { background: var(--yellow); }
.badge--red { background: var(--red); color: var(--white); }
.badge--black { background: var(--black); color: var(--white); }
.badge--gray { background: var(--g2); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 2px solid var(--black); background: var(--white); font-weight: 700; font-size: 13px; }
.chip button { display: inline-grid; place-items: center; width: 22px; height: 22px; background: none; border: 0; padding: 0; cursor: pointer; }
.chip--btn { cursor: pointer; }
.chip--btn:hover { background: var(--g1); }
.chip--status, .chip--prod { border-color: transparent; }
.chip--nouvelle { background: var(--yellow); }
.chip--confirmee { background: var(--green); }
.chip--en_preparation { background: var(--white); border-color: var(--black); }
.chip--prete { background: var(--black); color: var(--white); }
.chip--livree { background: var(--green-deep); color: var(--white); }
.chip--annulee { background: var(--red); color: var(--white); }
.chip--brouillon { background: var(--g2); }
.chip--publie { background: var(--green); }
.chip--masque { background: var(--white); border: 2px dashed var(--black); }
.chips, .chips-static { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; padding: 0; }
.chips-static li { padding: 6px 12px; border: 2px solid var(--black); font-weight: 700; }
.chip-none { color: var(--muted); font-size: 14px; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; }

/* ---------- Fiche produit ---------- */
.pdp { display: grid; gap: 24px; }
.gallery__main { aspect-ratio: 4 / 5; background: var(--g1); overflow: hidden; }
.gallery__main img { width: 100%; height: 100%; object-fit: contain; }
.gallery__thumbs { display: flex; gap: 8px; margin-top: 8px; overflow-x: auto; }
.gallery__thumbs button { flex: none; width: 68px; height: 68px; padding: 0; border: 2px solid var(--g3); background: var(--g1); cursor: pointer; }
.gallery__thumbs button[aria-current='true'] { border-color: var(--black); border-width: 3px; }
.gallery__thumbs img { width: 100%; height: 100%; object-fit: cover; }
.pdp__cat { margin: 0 0 6px; color: var(--muted); font-weight: 600; }
.pdp__price { font: 900 clamp(38px, 8vw, 56px)/1 var(--display); margin: 8px 0 12px; }
.pdp__flags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.opts { margin: 18px 0; }
.pdp__actions { display: grid; gap: 10px; margin-top: 26px; }
@media (min-width: 860px) {
  .pdp { grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: start; }
  .gallery { position: sticky; top: 84px; }
}

/* ---------- Formulaires ---------- */
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; }
.fs { border-top: 3px solid var(--black); padding: 16px 0 0; display: grid; gap: 16px; }
.fs > legend { float: left; width: 100%; margin-bottom: 4px; }
.fs > legend + * { clear: both; }
.field { display: grid; gap: 6px; }
.field > label, .label { font-weight: 700; font-size: 14px; }
.field--inline { grid-template-columns: auto 1fr; align-items: center; gap: 12px; }
input[type='text'], input[type='email'], input[type='tel'], input[type='number'], input[type='password'], input[type='search'], input[type='url'], select, textarea {
  width: 100%; min-height: 48px; padding: 10px 14px; background: var(--white); border: 2px solid var(--black); border-radius: 0; font-size: 16px; appearance: none; -webkit-appearance: none;
}
input[type='search']::-webkit-search-cancel-button { -webkit-appearance: none; }
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='black' stroke-width='2'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }
textarea { min-height: 96px; resize: vertical; }
input:disabled, select:disabled { background: var(--g1); color: var(--muted); }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--green-deep); flex: none; }
.seg { display: flex; flex-wrap: wrap; }
.seg label { position: relative; flex: 1 1 0; min-width: 96px; }
.seg input { position: absolute; opacity: 0; inset: 0; }
.seg span { display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 12px; border: 2px solid var(--black); margin-left: -2px; font-weight: 700; background: var(--white); cursor: pointer; }
.seg label:first-child span { margin-left: 0; }
.seg input:checked + span { background: var(--black); color: var(--white); }
.seg input:focus-visible + span { outline: 3px solid var(--black); outline-offset: 2px; }
.inline { display: flex; gap: 8px; }
.inline input { flex: 1; }
.inline--tight { margin-top: 8px; }
.qty { display: inline-flex; }
.qty button { width: 48px; min-height: 48px; border: 2px solid var(--black); background: var(--white); font-size: 22px; font-weight: 700; cursor: pointer; }
.qty input { width: 84px; text-align: center; border-left: 0; border-right: 0; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.panel { border: 2px solid var(--black); padding: 20px; background: var(--white); }
.panel > :first-child { margin-top: 0; }
.notice { padding: 14px 16px; border-left: 6px solid var(--black); background: var(--g1); margin: 0 0 16px; }
.notice p { margin: 0 0 6px; }
.notice p:last-child { margin-bottom: 0; }
.notice--warn { border-color: var(--yellow); background: #fff7d1; }
.notice--err { border-color: var(--red); background: #fdeceb; }
.notice--ok { border-color: var(--green); background: #e3f6ec; }

/* ---------- Commande ---------- */
.summary { margin: 12px 0; }
.summary > div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--g2); }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; font-weight: 700; text-align: right; }
.summary__total { border-bottom: 0 !important; font-size: 20px; }
.summary__img { width: 100%; max-height: 260px; object-fit: cover; margin-bottom: 10px; }
.summary__name { font-weight: 700; margin: 0; }
.orders { display: grid; gap: 14px; }
.order { background: var(--white); border: 2px solid var(--black); padding: 16px; }
.order__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.order__head p { margin: 0; }
.order__no { font: 900 26px/1 var(--display); letter-spacing: .01em; }
.order-no { font: 900 1.3em/1 var(--display); }
.order__client { margin: 12px 0 2px; font-size: 18px; }
.order__contact { display: flex; flex-wrap: wrap; gap: 14px; margin: 0 0 6px; }
.order__contact a { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.order__items { list-style: none; margin: 12px 0; }
.order__items li { padding: 9px 0; border-top: 1px solid var(--g2); }
.order__items span { display: block; font-size: 14px; }
.order__perso { margin-top: 2px; font-weight: 600; }
.order__note { margin: 6px 0; font-style: italic; }
.order__total { margin: 10px 0 12px; font-size: 18px; }
.order--admin .field { margin-top: 4px; }
.pills { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 14px; }
.pills button { flex: none; min-height: 40px; padding: 0 14px; border: 2px solid var(--black); background: var(--white); font-weight: 700; cursor: pointer; }
.pills button[aria-current='true'] { background: var(--black); color: var(--white); }

/* ---------- Fenêtres, chargement, messages ---------- */
.modal { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .62); }
.modal__box { position: relative; width: 100%; max-width: 480px; max-height: 92vh; overflow: auto; background: var(--white); border: 2px solid var(--black); padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); }
.modal__box .h3 { margin-bottom: 10px; }
.modal__actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }
.modal__actions .btn { flex: 1; }
@media (min-width: 600px) { .modal { align-items: center; } .modal__actions .btn { flex: 0 0 auto; } }
.modal--full { align-items: stretch; }
.modal--full .modal__box { max-width: none; max-height: none; height: 100%; padding: 0; border: 0; display: flex; flex-direction: column; }
.preview { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.preview__bar { background: var(--yellow); padding: 12px 16px; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; border-bottom: 2px solid var(--black); }
.preview__body { flex: 1; overflow: auto; padding: 22px 0 30px; }
.preview__actions { display: flex; gap: 10px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 2px solid var(--black); background: var(--white); }
.preview__actions .btn { flex: 1; }
.busy { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: rgba(255, 255, 255, .86); }
.busy__box { display: grid; justify-items: center; gap: 12px; padding: 24px; background: var(--white); border: 2px solid var(--black); min-width: 240px; text-align: center; }
.busy__box p { margin: 0; font-weight: 700; }
.spinner { width: 34px; height: 34px; border: 4px solid var(--g2); border-top-color: var(--green); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
#toast-root { position: fixed; left: 0; right: 0; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 90; display: grid; justify-items: center; gap: 8px; pointer-events: none; padding: 0 12px; }
body.is-admin #toast-root { bottom: calc(var(--tabs-h) + 16px + env(safe-area-inset-bottom)); }
.toast { pointer-events: auto; max-width: 460px; padding: 12px 16px; background: var(--black); color: var(--white); font-weight: 600; border: 2px solid var(--black); transition: opacity .3s; }
.toast--err { background: var(--red); border-color: var(--red); }
.toast--out { opacity: 0; }
.setup { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--g1); }
.setup__box { max-width: 560px; background: var(--white); border: 2px solid var(--black); padding: 28px; }
.setup__brand { font: 900 30px/1 var(--display); text-transform: uppercase; margin: 0 0 16px; }

/* =====================================================================
   ADMINISTRATION (téléphone d'abord)
   ===================================================================== */
.admin { min-height: 100vh; background: var(--g1); }
.admin-side { display: none; }
.admin-top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 0 16px; background: var(--black); color: var(--white); }
.admin-top__brand { font: 900 24px/1 var(--display); text-transform: uppercase; text-decoration: none; }
.admin-view { padding-bottom: calc(var(--tabs-h) + 90px + env(safe-area-inset-bottom)); }
.admin-page { max-width: 880px; margin: 0 auto; padding: 22px 16px 24px; display: grid; gap: 20px; }
.admin-page--form { max-width: 720px; }
.admin-page > .h2, .admin-page > p { margin: 0; }
.admin-page .fs { background: var(--white); padding: 18px 16px; border: 1px solid var(--g3); border-top: 4px solid var(--black); }
.admin-page .panel, .admin-page .notice { margin: 0; }
.admin-page .filters { margin: 0; }
.admin-tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; height: calc(var(--tabs-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); display: grid; grid-template-columns: repeat(4, 1fr); background: var(--black); color: var(--white); }
.admin-tabs a { position: relative; display: grid; justify-items: center; align-content: center; gap: 3px; font-size: 12px; font-weight: 600; text-decoration: none; color: #d0d0d0; }
.admin-tabs a[aria-current='page'] { color: var(--white); box-shadow: inset 0 4px 0 var(--green); }
.badge-count { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 20px; padding: 1px 6px; border-radius: 10px; background: var(--red); color: var(--white); font-size: 12px; line-height: 18px; text-align: center; }
.statlist { list-style: none; margin: 0; padding: 0; border-top: 3px solid var(--black); background: var(--white); }
.statlist a { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--g2); text-decoration: none; }
.statlist b { font: 900 34px/1 var(--display); }
.todo { list-style: none; margin: 0; display: grid; gap: 8px; }
.todo li { background: var(--white); border-left: 6px solid var(--yellow); }
.todo a, .todo__info { display: flex; align-items: center; gap: 10px; padding: 13px 14px; text-decoration: none; font-weight: 600; }
.todo__info { border-left-color: var(--black); font-weight: 400; }
.rows { list-style: none; margin: 0; padding: 0; background: var(--white); border-top: 3px solid var(--black); }
.rows li { border-bottom: 1px solid var(--g2); }
.rows li > a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 14px; text-decoration: none; }
.rows small { display: block; color: var(--muted); }
.rows--edit li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; }
.rows__name { font-weight: 700; }
.rows__actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.menu-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.menu-grid a, .menu-grid button { width: 100%; min-height: 108px; display: grid; justify-items: center; align-content: center; gap: 8px; padding: 14px; background: var(--white); border: 2px solid var(--black); font-weight: 700; text-align: center; text-decoration: none; cursor: pointer; }
.plist { display: grid; gap: 12px; }
.pitem { display: grid; grid-template-columns: 92px 1fr; gap: 12px 14px; padding: 12px; background: var(--white); border: 1px solid var(--g3); }
.pitem__img { width: 92px; height: 116px; background: var(--g1); display: grid; place-items: center; overflow: hidden; font-size: 12px; color: var(--muted); text-align: center; text-decoration: none; }
.pitem__img img { width: 100%; height: 100%; object-fit: cover; }
.pitem__name { margin: 0; font: 700 16px/1.3 var(--body); overflow-wrap: anywhere; }
.pitem__price { display: block; margin: 4px 0 6px; padding: 0; background: none; border: 0; font: 900 26px/1 var(--display); cursor: pointer; text-align: left; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 4px; }
.pitem__flags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; }
.chip--prod { padding: 3px 9px; font-size: 12px; }
.pitem__actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.pitem__actions .btn { flex: 1 1 auto; }
.client { display: grid; gap: 12px; padding: 14px; background: var(--white); border: 1px solid var(--g3); }
.client p { margin: 0; overflow-wrap: anywhere; }
.client__side { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.clients { display: grid; gap: 10px; }
@media (min-width: 640px) { .client { grid-template-columns: 1fr auto; align-items: center; } }

.actionbar { position: sticky; bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom)); z-index: 20; display: flex; gap: 10px; padding: 12px; background: var(--white); border: 2px solid var(--black); }
.actionbar .btn { flex: 1; }
.danger-zone { margin: 0; }

.pf-photo { position: relative; display: grid; gap: 8px; }
.pf-photo img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: var(--g1); border: 2px solid var(--black); }
.pf-photo--main { grid-template-columns: 132px 1fr; align-items: start; gap: 14px; }
.pf-photo--main img { aspect-ratio: 4 / 5; }
.pf-photo--main .pf-photo__actions { flex-direction: column; align-items: stretch; }
.pf-photo__actions { display: flex; flex-wrap: wrap; gap: 6px; }
.pf-photo__actions .btn { flex: 1 1 auto; }
.pf-drop { display: grid; place-items: center; align-content: center; gap: 6px; min-height: 160px; max-width: 340px; padding: 16px; border: 3px dashed var(--black); background: var(--g1); font-weight: 700; text-align: center; cursor: pointer; }
.pf-drop--small { min-height: 0; aspect-ratio: 1 / 1; max-width: none; padding: 8px; }
.pf-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.logo-preview { padding: 16px; background: var(--black); display: inline-block; }
.logo-preview img { max-height: 72px; width: auto; }
.facts { margin: 0; display: grid; gap: 4px; }
.facts > div { display: grid; grid-template-columns: 110px 1fr; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--g2); }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.mk-block { background: var(--white); border: 1px solid var(--g3); border-top: 4px solid var(--green); padding: 14px 16px; margin-bottom: 12px; }
.mk-block header { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.mk-block .h4 { margin: 0; }
.mk-text p { margin: 0 0 .8em; }
.diag-sum { font-weight: 800; margin: 14px 0 8px; }
.diag-sum--bad { color: var(--red); }
.diag-sum--ok { color: var(--green-deep); }
.diag { list-style: none; margin: 0; display: grid; gap: 6px; }
.diag li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; background: var(--g1); }
.diag small { display: block; color: var(--muted); }
.diag__ok .ic { color: var(--green-deep); }
.diag__ko { background: #fdeceb !important; }
.diag__ko .ic { color: var(--red); }

@media (min-width: 900px) {
  .admin { display: grid; grid-template-columns: 250px 1fr; }
  .admin-side { display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; padding: 18px 12px; background: var(--black); color: var(--white); overflow: auto; }
  .admin-brand { display: grid; gap: 2px; padding: 4px 8px 18px; font: 900 26px/1 var(--display); text-transform: uppercase; text-decoration: none; }
  .admin-brand span { font: 500 13px var(--body); text-transform: none; color: #b5b5b5; }
  .admin-side nav { display: grid; gap: 2px; }
  .admin-side nav a { position: relative; display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 12px; text-decoration: none; color: #d6d6d6; font-weight: 600; }
  .admin-side nav a:hover { background: #1c1c1c; }
  .admin-side nav a[aria-current='page'] { background: var(--white); color: var(--black); }
  .admin-side .badge-count { position: static; margin-left: auto; }
  .admin-side__site { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px; color: #d6d6d6; text-decoration: none; font-weight: 600; }
  .admin-top { display: none; }
  .admin-tabs { display: none; }
  .admin-view { padding-bottom: 60px; }
  .actionbar { bottom: 12px; }
  body.is-admin #toast-root { bottom: 18px; }
  .menu-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
