/* ==========================================================================
   Feuille de style unique du site. Polices hébergées ici (aucune ressource externe).
   Palette : prune et safran sur fond crème. Lisibilité d'abord : texte de 18 px,
   contrastes AA, boutons d'au moins 44 px, mode sombre, impression propre.
   ========================================================================== */

@font-face { font-family: "Gloock"; src: url("/assets/fonts/gloock.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Work Sans"; src: url("/assets/fonts/worksans-400.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Work Sans"; src: url("/assets/fonts/worksans-400i.woff") format("woff"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Work Sans"; src: url("/assets/fonts/worksans-700.woff") format("woff"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --bg: #fbf8f3; --surface: #ffffff; --ink: #201a1e; --muted: #675d64; --line: #e6ddd3;
  --plum: #5b1f4b; --plum-d: #431539; --tint: #f4e9f1; --saffron: #f3b83e;
  --link: #5b1f4b;
  --btn-bg: #5b1f4b; --btn-ink: #ffffff; --btn-hover: #431539;
  --ok: #1f6b3a; --ok-bg: #e6f3ea; --warn: #7a4b00; --warn-bg: #fff2d6; --bad: #9b1c1c; --bad-bg: #fbe5e5;
  --focus: #1a5fd0; --shadow: 0 1px 2px rgba(32,26,30,.06), 0 8px 24px rgba(32,26,30,.07);
  --serif: "Gloock", Georgia, "Times New Roman", serif;
  --sans: "Work Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --radius: 16px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171219; --surface: #221a27; --ink: #f3ecf1; --muted: #bcb0b9; --line: #3b2f41;
    --plum: #e9b8dc; --plum-d: #f6d6ee; --tint: #2d2133; --link: #f0c3e6;
    --btn-bg: #f3b83e; --btn-ink: #231a00; --btn-hover: #ffd070;
    --ok: #8fdca6; --ok-bg: #173324; --warn: #ffd98a; --warn-bg: #3a2c0c; --bad: #ffb3b3; --bad-bg: #401a1a;
    --focus: #8ab4ff; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1.125rem/1.6 var(--sans); }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; line-height: 1.15; margin: 1.6em 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 5.5vw, 3.2rem); margin-top: .6em; }
h2 { font-size: clamp(1.5rem, 3.4vw, 2rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
a { color: var(--link); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 560px; }
.muted { color: var(--muted); }
.small { font-size: .95rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--btn-bg); color: var(--btn-ink); padding: 10px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
[hidden] { display: none !important; }
.printonly { display: none; }
.eyebrow { font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin-bottom: .6em; }
.lead { font-size: 1.25rem; color: var(--ink); max-width: 38em; }
.lead.small { font-size: 1.1rem; }
.crumb { margin: 1.2rem 0 0; font-size: .95rem; }

/* ---------- En-tête et pied de page ---------- */
.top { background: var(--bg); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
.brand { font-family: var(--serif); font-size: 1.45rem; color: var(--plum); text-decoration: none; letter-spacing: -.01em; }
.top nav { display: flex; align-items: center; gap: 4px 20px; flex-wrap: wrap; }
.top nav a:not(.btn) { color: var(--ink); text-decoration: none; padding: 8px 2px; font-size: 1rem; }
.top nav a:not(.btn):hover { text-decoration: underline; }
.subnav { background: var(--tint); border-top: 1px solid var(--line); }
.subnav .wrap { display: flex; gap: 6px 22px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; font-size: 1rem; align-items: center; }
footer { margin-top: 5rem; border-top: 1px solid var(--line); padding: 2.2rem 0 3rem; color: var(--muted); font-size: .95rem; }
.foot-in { display: flex; gap: 24px 48px; flex-wrap: wrap; justify-content: space-between; }
.foot-brand { margin: 0; }
.foot { display: flex; flex-wrap: wrap; gap: 8px 22px; max-width: 560px; }
.foot a { color: var(--muted); }
main.wrap { padding-top: 8px; padding-bottom: 24px; }

/* ---------- Boutons ---------- */
.btn, button.btn {
  display: inline-flex; align-items: center; justify-content: center; text-align: center; gap: .5em;
  min-height: 52px; padding: 12px 26px; border: 2px solid var(--btn-bg); border-radius: 999px;
  background: var(--btn-bg); color: var(--btn-ink); font: 700 1.05rem/1.2 var(--sans); text-decoration: none; cursor: pointer;
  transition: background .15s, color .15s, transform .05s;
}
.btn:hover { background: var(--btn-hover); border-color: var(--btn-hover); }
.btn:active { transform: translateY(1px); }
.btn.alt { background: transparent; color: var(--link); border-color: var(--link); }
.btn.alt:hover { background: var(--tint); }
.btn.small { min-height: 44px; padding: 8px 18px; font-size: .98rem; }
.btn.big { min-height: 58px; padding: 14px 32px; font-size: 1.15rem; }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
@media (prefers-color-scheme: dark) { .btn.danger { background: #c0392b; border-color: #c0392b; color: #fff; } }
.btn.light { background: #fff; color: #2a1024; border-color: #fff; }
.btn.light:hover { background: #ffe8b0; border-color: #ffe8b0; }
.btn.ghost { background: rgba(0,0,0,.28); color: #fff; border-color: rgba(255,255,255,.85); }
.btn.ghost:hover { background: rgba(255,255,255,.2); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.2rem 0; align-items: center; }
form.inline { display: inline; margin: 0; }
.linkbtn { background: none; border: 0; padding: 8px 2px; font: inherit; font-size: 1rem; color: var(--link); text-decoration: underline; cursor: pointer; min-height: 44px; }
.linkbtn.light { color: #fff; font-weight: 700; }

/* ---------- Formulaires ---------- */
label, .label-like { display: block; font-weight: 700; margin: 1.1rem 0 .35rem; font-size: 1rem; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=search], input[type=date], select, textarea {
  width: 100%; min-height: 52px; padding: 12px 14px; font: inherit; color: var(--ink); background: var(--surface);
  border: 2px solid var(--line); border-radius: 12px;
}
input:hover, select:hover, textarea:hover { border-color: var(--muted); }
input:focus, select:focus, textarea:focus { border-color: var(--focus); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 30%, transparent); }
textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
label.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; margin: 1rem 0; cursor: pointer; }
label.check input { width: 24px; height: 24px; margin-top: 3px; flex: none; accent-color: var(--plum); }
.pw { position: relative; }
.pw input { padding-right: 112px; }
.pw-btn { position: absolute; right: 6px; top: 6px; min-height: 40px; padding: 4px 14px; border: 0; border-radius: 8px; background: var(--tint); color: var(--link); font: 700 .95rem var(--sans); cursor: pointer; }
.hp { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }
.sticky-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 2rem 0; }
.search { display: flex; gap: 10px; margin: 1rem 0 1.4rem; max-width: 640px; }
.search input { flex: 1; }

/* ---------- Messages, badges, cartes ---------- */
.notice { padding: 14px 18px; border-radius: 12px; margin: 1rem 0; border: 1px solid transparent; font-size: 1rem; }
.notice.ok { background: var(--ok-bg); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.notice.err { background: var(--bad-bg); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 30%, transparent); }
.notice.warn { background: var(--warn-bg); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.notice a { color: inherit; font-weight: 700; }
.badge { display: inline-block; padding: 2px 12px; border-radius: 999px; font-size: .85rem; font-weight: 700; background: var(--tint); color: var(--muted); vertical-align: middle; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin: 1.2rem 0; box-shadow: var(--shadow); }
.card h2, .card h3 { margin-top: 0; }
.card.highlight { border-color: var(--saffron); border-width: 2px; }
.card.main-card { border-color: color-mix(in srgb, var(--plum) 35%, var(--line)); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid2 .card { margin: 0; }
.list { padding-left: 1.2em; } .list li { margin: .4em 0; }
.steps { padding-left: 0; list-style: none; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding: 0 0 14px 52px; min-height: 40px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: -2px; width: 36px; height: 36px; border-radius: 50%; background: var(--plum); color: var(--btn-ink, #fff); display: grid; place-items: center; font: 700 1rem var(--sans); }
@media (prefers-color-scheme: dark) { .steps li::before { background: var(--saffron); color: #231a00; } }
.steps3 { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: 8px; }
.steps3 li { padding: 10px 14px 10px 46px; border-radius: 12px; background: var(--bg); position: relative; }
.steps3 li::before { content: ""; position: absolute; left: 14px; top: 50%; width: 20px; height: 20px; margin-top: -10px; border-radius: 50%; border: 2px solid var(--muted); }
.steps3 li.done::before { background: var(--ok); border-color: var(--ok); }
.steps3 li.done::after { content: "✓"; position: absolute; left: 19px; top: 50%; transform: translateY(-52%); color: #fff; font-size: .8rem; font-weight: 700; }
.price { font: 400 3rem/1 var(--serif); color: var(--plum); margin-bottom: .4rem; }
.price small { font: 400 1.1rem var(--sans); }
.price-card { max-width: 640px; }
.maj { color: var(--muted); font-size: .98rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-btn { min-height: 44px; padding: 8px 18px; border-radius: 999px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); font: 700 .98rem var(--sans); cursor: pointer; }
.chip-btn:hover { border-color: var(--plum); }
.chip-btn.strong { background: var(--tint); border-color: var(--plum); color: var(--link); }
.chip-btn.on { background: var(--btn-bg); color: var(--btn-ink); border-color: var(--btn-bg); }
.thumb { display: block; width: 100%; max-width: 320px; height: auto; border-radius: 12px; border: 1px solid var(--line); margin: .5rem 0; background: var(--tint); }
.thumb.logo { max-width: 120px; } .thumb.mini { max-width: 160px; }
.photos { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.filebtn { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-weight: 400; cursor: pointer; margin-top: .6rem; }
.filebtn input[type=file] { position: absolute; opacity: 0; width: 100%; height: 100%; left: 0; top: 0; cursor: pointer; }
.filebtn:focus-within .btn { outline: 3px solid var(--focus); outline-offset: 2px; }
.info-row { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.account { margin-top: 2.5rem; color: var(--muted); }
.danger-link { color: var(--bad); }
.prolonger { margin-top: 1.2rem; padding-top: 1rem; border-top: 1px dashed var(--line); }
.wiz-quit { margin-top: 2rem; }

/* ---------- Accueil ---------- */
.hero-home { display: grid; grid-template-columns: 1.3fr .7fr; gap: 32px; align-items: center; padding: clamp(32px, 7vw, 88px) 0 clamp(24px, 5vw, 56px); }
.hero-home h1 { font-size: clamp(2.4rem, 7vw, 4.6rem); margin: 0 0 .35em; }
.hero-art { display: grid; place-items: center; }
.plate { width: min(100%, 320px); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #7a2c64, #431539 70%); display: grid; place-items: center; box-shadow: 0 30px 60px rgba(67,21,57,.28); }
.plate-in { width: 68%; aspect-ratio: 1; border-radius: 50%; border: 3px solid var(--saffron); background: radial-gradient(circle at 40% 35%, #fff4d6, #f3b83e 80%); opacity: .95; }
.story { padding: clamp(24px, 5vw, 56px) 0; border-top: 1px solid var(--line); }
.story blockquote { margin: 0 0 1.4rem; max-width: 30em; }
.story blockquote p { font: 400 clamp(1.7rem, 4.2vw, 2.6rem)/1.2 var(--serif); color: var(--plum); margin: 0; }
.story-text { max-width: 40em; }
.how { padding: clamp(16px, 4vw, 40px) 0; }
.cta-band { background: var(--tint); border-radius: 24px; padding: clamp(28px, 5vw, 56px); margin: 2.5rem 0 0; text-align: center; }
.cta-band h2 { margin-top: 0; } .cta-band .lead { margin: 0 auto 1rem; } .cta-band .actions { justify-content: center; }

/* ---------- Répertoire ---------- */
.rgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; margin-top: 1rem; }
.rcard { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
.rcard:hover { transform: translateY(-3px); }
.rcard-img { display: block; width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.rcard-body { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px 20px; align-items: flex-start; }
.rcard-name { font: 400 1.4rem/1.2 var(--serif); color: var(--plum); }
.rcard-maj { font-size: .9rem; color: var(--muted); } .rcard-maj.old { color: var(--warn); }
.rcard-desc { font-size: .98rem; color: var(--ink); margin-top: 4px; }
.tone-0 { background: linear-gradient(135deg, #5b1f4b, #a0476f); }
.tone-1 { background: linear-gradient(135deg, #1f4b5b, #3b7f94); }
.tone-2 { background: linear-gradient(135deg, #4b3a1f, #9a6d1c); }
.tone-3 { background: linear-gradient(135deg, #2c4b1f, #55853a); }
.tone-4 { background: linear-gradient(135deg, #4b1f2c, #b04a5c); }
.tone-5 { background: linear-gradient(135deg, #2f2a5b, #6258b8); }
.initials { display: grid; place-items: center; width: 100%; height: 100%; font: 400 3.4rem var(--serif); color: rgba(255,255,255,.92); }
span.rcard-img.tone-0, span.rcard-img[class*="tone-"] { display: block; }

/* ---------- Page d'un restaurant ---------- */
.rhero { position: relative; min-height: min(78vh, 600px); display: flex; align-items: flex-end; color: #fff; overflow: hidden; background: #2a1024; }
.rhero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rhero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,8,18,.15) 0%, rgba(20,8,18,.35) 40%, rgba(20,8,18,.82) 100%); }
.rhero-body { position: relative; padding-top: 80px; padding-bottom: 36px; }
.rhero h1 { color: #fff; margin: .2em 0 .1em; font-size: clamp(2.4rem, 8vw, 4.8rem); text-shadow: 0 2px 18px rgba(0,0,0,.35); }
.rhero-city { font-size: 1.25rem; margin: 0 0 1.2rem; color: #fff; opacity: .95; }
.rhero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.rlogo { width: 88px; height: 88px; border-radius: 50%; object-fit: contain; border: 3px solid #fff; box-shadow: 0 6px 20px rgba(0,0,0,.3); display: block; }
img.rlogo { background: #fff; }
.initials-logo { display: grid; place-items: center; font: 400 2rem var(--serif); color: #fff; }
.fiche-body { padding-top: 12px; }
.owner-bar { display: flex; gap: 10px; flex-wrap: wrap; margin: 1.2rem 0; }
.infos { margin: 1.6rem 0 .6rem; }
.infos address { font-style: normal; font-size: 1.15rem; margin-bottom: .6em; }
.infos .desc { max-width: 42em; }
.carte { margin-top: 2rem; scroll-margin-top: 80px; }
.carte-head { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: 8px 20px; }
.carte-head h2 { margin-bottom: .2em; }
.carte-tools { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 .4rem; }
.cat { margin: 2rem 0; }
.cat h3, .apercu .cat h3 { font-size: 1.6rem; color: var(--plum); border-bottom: 2px solid var(--saffron); padding-bottom: .25em; margin: 0 0 .6em; }
.plat { padding: 10px 0; break-inside: avoid; }
.ligne { display: flex; align-items: baseline; gap: 10px; }
.ligne .nom { font-weight: 700; }
.ligne i { flex: 1; border-bottom: 2px dotted var(--line); transform: translateY(-4px); min-width: 16px; }
.ligne .prix { font-weight: 700; white-space: nowrap; }
.plat .desc { margin: .15em 0 0; color: var(--muted); font-size: 1rem; }
.tagline { margin: .35em 0 0; display: flex; gap: 6px; flex-wrap: wrap; }
.tag { font-size: .8rem; font-weight: 700; padding: 1px 10px; border-radius: 999px; background: var(--ok-bg); color: var(--ok); }
html.bigtext .carte { font-size: 1.5rem; line-height: 1.5; }
html.bigtext .plat .desc, html.bigtext .tag { font-size: 1.2rem; }
html.bigtext .carte .cat h3 { font-size: 2rem; }

/* ---------- Assistant ---------- */
.wizard { max-width: 760px; margin: 0 auto; }
.wiz-head { margin-top: 1.4rem; }
.progress { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.seg { height: 8px; border-radius: 99px; background: var(--line); }
.seg.done { background: var(--ok); } .seg.now { background: var(--plum); }
@media (prefers-color-scheme: dark) { .seg.now { background: var(--saffron); } }

/* ---------- Éditeur de carte ---------- */
.ed-tabs { display: none; gap: 8px; margin: 1rem 0; }
.ed-tabs button { flex: 1; min-height: 48px; border-radius: 999px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); font: 700 1rem var(--sans); cursor: pointer; }
.ed-tabs button[aria-selected=true] { background: var(--btn-bg); color: var(--btn-ink); border-color: var(--btn-bg); }
.ed-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 400px); gap: 28px; align-items: start; }
.ed-side { position: sticky; top: 84px; }
.ed-preview { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; max-height: calc(100vh - 110px); overflow: auto; }
.apercu { font-size: 1rem; } .apercu .cat { margin: 1.2rem 0; } .apercu .cat h3 { font-size: 1.25rem; }
.paste { background: var(--tint); border-radius: var(--radius); padding: 4px 18px; margin: 1rem 0; }
.paste summary { cursor: pointer; font-weight: 700; min-height: 48px; display: flex; align-items: center; color: var(--link); }
.paste-body { padding-bottom: 14px; }
.paste-preview { background: var(--surface); border-radius: 12px; padding: 14px 16px; border: 1px solid var(--line); }
.paste-preview h4 { font-size: 1.1rem; margin: .8em 0 .2em; color: var(--plum); }
.paste-count { font-weight: 700; }
.cats { display: grid; gap: 16px; margin: 1.2rem 0; }
.ecat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.ecat-head { display: flex; gap: 8px; align-items: center; padding: 10px 12px; flex-wrap: wrap; }
.ecat-titre { flex: 1; min-width: 160px; font: 400 1.35rem var(--serif) !important; color: var(--plum) !important; border-color: transparent !important; background: var(--tint) !important; }
.ecat-titre:focus { border-color: var(--focus) !important; }
.ecat-body { padding: 4px 14px 16px; border-top: 1px solid var(--line); }
.tool { min-height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 700 .95rem var(--sans); padding: 6px 12px; cursor: pointer; }
.tool.ico { min-width: 44px; padding: 6px 8px; font-size: 1.1rem; }
.tool:hover { border-color: var(--plum); }
.tool.danger { color: var(--bad); }
.tool-group { display: flex; gap: 6px; }
.eplat { padding: 12px 0; border-bottom: 1px solid var(--line); }
.eplat:last-child { border-bottom: 0; }
.eplat-row { display: grid; grid-template-columns: 1fr 112px; gap: 8px; }
.eplat-tools { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.eplat-more { background: var(--bg); border-radius: 12px; padding: 4px 14px 14px; margin-top: 8px; }
.eplat-more label { font-weight: 400; font-size: .95rem; }
fieldset.tags { border: 0; padding: 0; margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
fieldset.tags legend { font-weight: 700; font-size: .95rem; padding: 0; margin-bottom: 6px; }
label.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 14px; border: 2px solid var(--line); border-radius: 999px; font-weight: 400; margin: 0; background: var(--surface); cursor: pointer; }
label.chip input { width: 20px; height: 20px; accent-color: var(--plum); }
label.chip:has(input:checked) { border-color: var(--ok); background: var(--ok-bg); color: var(--ok); }
.quick { display: flex; gap: 8px; margin-top: 12px; }
.quick-input { flex: 1; border-style: dashed !important; }
.addcat-label { font-weight: 700; margin: 1.2rem 0 .5rem; }
.empty-help { background: var(--warn-bg); color: var(--warn); border-radius: 12px; padding: 14px 18px; }
.valid-row { display: flex; gap: 12px 16px; flex-wrap: wrap; align-items: center; }
.valid-row input[type=date] { width: auto; min-width: 200px; }
.ed-bar { position: sticky; bottom: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-top: 1px solid var(--line); margin: 2rem -20px 0; padding: 12px 20px; }
.bar-in { display: flex; gap: 12px; align-items: center; justify-content: flex-end; flex-wrap: wrap; padding: 0; }
.save-state { margin-right: auto; color: var(--muted); font-size: .95rem; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 96px; background: #2a1024; color: #fff; padding: 10px 14px 10px 18px; border-radius: 999px; display: flex; gap: 14px; align-items: center; z-index: 50; box-shadow: var(--shadow); max-width: calc(100vw - 24px); }
.draft-note { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }

/* ---------- Tableaux (administration) ---------- */
.scroll { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 1rem; background: var(--surface); border-radius: 12px; }
.tbl th, .tbl td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.tbl .acts { min-width: 210px; } .tbl .acts .btn { margin-bottom: 6px; }
.filtres { display: flex; gap: 14px; flex-wrap: wrap; align-items: end; margin: 1rem 0; }
.filtres label { margin-top: 0; } .filtres select { min-width: 180px; }
.demo-box { background: var(--tint); box-shadow: none; }

/* ---------- Adaptation aux petits écrans ---------- */
@media (max-width: 960px) {
  .ed-grid { grid-template-columns: 1fr; }
  .ed-tabs { display: flex; }
  .ed-tabs[hidden] { display: none !important; }
  .ed-grid[data-view=edit] .ed-side { display: none; }
  .ed-grid[data-view=view] .ed-main { display: none; }
  .ed-side { position: static; } .ed-preview { max-height: none; }
}
@media (max-width: 720px) {
  body { font-size: 1.0625rem; }
  .grid2, .photos, .row2, .hero-home { grid-template-columns: 1fr; }
  .hero-art { display: none; }
  .bar { padding-top: 8px; padding-bottom: 8px; }
  .top nav { gap: 2px 14px; }
  .search { flex-direction: column; }
  .actions .btn, .rhero-actions .btn { flex: 1 1 auto; }
  .ecat-head { gap: 6px; }
  .eplat-row { grid-template-columns: 1fr 92px; }
  .ed-bar .btn { flex: 1 1 auto; }
  .save-state { flex-basis: 100%; }
  .toast { bottom: 140px; }
  .card { padding: 18px; }
}

/* ---------- Respect des préférences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media (forced-colors: active) { .btn, .chip-btn, .tool { border: 2px solid ButtonText; } }

/* ---------- Impression : seulement la carte, en noir sur blanc ---------- */
@media print {
  @page { margin: 16mm; }
  html, body { background: #fff !important; color: #000 !important; font-size: 12pt; }
  .top, footer, .noprint, .owner-bar, .rhero-actions, .rhero-img, .rhero-shade, .notice, .skip, .infos .desc { display: none !important; }
  .printonly { display: block !important; margin-top: 1.5rem; color: #444; }
  .rhero { min-height: 0; background: none; color: #000; display: block; }
  .rhero-body { padding: 0 !important; }
  .rhero h1 { color: #000; text-shadow: none; font-size: 26pt; margin: 0; }
  .rhero-city { color: #000; margin-bottom: .6rem; }
  .rlogo { display: none; }
  .wrap { max-width: none; padding: 0; }
  .cat h3 { color: #000; border-bottom: 1px solid #000; }
  .ligne i { border-bottom: 1px dotted #000; }
  .plat .desc { color: #333; }
  .tag { background: none; color: #000; border: 1px solid #000; }
  a { color: #000; text-decoration: none; }
  .carte { margin-top: 0; }
  html.bigtext .carte { font-size: 14pt; }
}
