/* Wine List Manager — interface
   Principe : l'éditeur ressemble à la carte imprimée (même police, même rouge, millésime en marge).
   Tout le reste reste calme : fond blanc, gris pierre, grands boutons. */

/* Charte Le Clos — Wine Cellar : Scotch Deck (titres, vins), Gopher (interface) */
@font-face { font-family: "Scotch Deck"; src: url("fonts/ScotchDeck-Light.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Scotch Deck"; src: url("fonts/ScotchDeck-Roman.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Gopher"; src: url("fonts/Gopher-Light.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Gopher"; src: url("fonts/Gopher-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --paper: #FFFFFF;
  --canvas: #FBF4E0;          /* Pantone 7-9 C */
  --ink: #211E20;             /* Pantone Black */
  --stone: #6B675F;
  --line: #E9DFC6;
  --brick: #5F7C5F;           /* vert du logo (accent, boutons) */
  --brick-dark: #4B654B;
  --brick-wash: #EDF1E6;
  --sage: #728269;            /* Pantone 10313 C */
  --sage-light: #8CA084;      /* Pantone 8321 C */
  --ok: #3E6B45;
  --ok-wash: #E7EFE3;
  --warn: #8A5A10;
  --warn-wash: #F8ECD2;
  --danger: #B3261E;
  --serif: "Scotch Deck", "Iowan Old Style", Georgia, serif;
  --sans: "Gopher", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius-s: 10px;
  --radius-m: 14px;
  --radius-l: 22px;
  --bar-h: 92px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 300 17px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
strong, b, .btn, .tab, .seg button, label .check, .item .t, .status, .toast, .tag, .chip { font-weight: 500; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: var(--brick); }
:focus-visible { outline: 3px solid rgba(95, 124, 95, .5); outline-offset: 2px; border-radius: 6px; }
.boot { padding: 40vh 0; text-align: center; color: var(--stone); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 22px; border-radius: var(--radius-m); border: 1px solid var(--line); background: var(--paper); font-weight: 500; font-size: 17px; text-decoration: none; color: var(--ink); white-space: nowrap; }
.btn:hover { border-color: #D6CAAA; }
.btn:active { transform: scale(.985); }
.btn-primary { background: var(--brick); border-color: var(--brick); color: #fff; }
.btn-primary:hover { background: var(--brick-dark); border-color: var(--brick-dark); }
.btn-quiet { border-color: transparent; background: transparent; color: var(--brick); padding: 0 12px; }
.btn-quiet:hover { background: var(--brick-wash); border-color: transparent; }
.btn-danger { color: var(--danger); }
.btn-danger-fill { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger-fill:hover { background: #95201A; border-color: #95201A; }
.danger-zone { border-color: #F0CFCB; }
/* glisser-déposer */
.wine .n.drag { touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; background: var(--canvas); }
.wine .n.drag:active { cursor: grabbing; }
.grip { width: 22px; height: 22px; color: var(--stone); flex: none; display: inline-grid; place-items: center; }
.grip svg { width: 20px; height: 20px; }
.wine.dragging { opacity: .3; }
.ghost { position: fixed; z-index: 45; pointer-events: none; background: var(--paper); border-radius: 12px; box-shadow: 0 14px 40px rgba(40, 25, 15, .22); opacity: .97; }
.drop-line { position: fixed; z-index: 46; height: 3px; border-radius: 2px; background: var(--brick); pointer-events: none; box-shadow: 0 0 0 3px rgba(95, 124, 95, .18); }
body.is-dragging, body.is-dragging * { cursor: grabbing !important; user-select: none; -webkit-user-select: none; }
.btn-block { width: 100%; }
.btn-big { min-height: 64px; font-size: 19px; border-radius: 18px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.icon-btn { width: 48px; height: 48px; border-radius: 12px; border: 0; background: transparent; display: inline-grid; place-items: center; color: var(--stone); }
.icon-btn:hover { background: var(--canvas); color: var(--ink); }
.icon-btn svg, .btn svg { width: 22px; height: 22px; flex: none; }

/* ---------- Champs ---------- */
.field { display: block; margin: 0 0 18px; }
.field > span { display: block; font-size: 15px; color: var(--stone); margin: 0 0 6px; }
.field small { display: block; color: var(--stone); font-size: 14px; margin-top: 6px; }
.input, select.input, textarea.input { width: 100%; min-height: 52px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--paper); font-size: 18px; }
textarea.input { min-height: 96px; line-height: 1.4; }
.input:focus { border-color: var(--brick); outline: none; box-shadow: 0 0 0 4px rgba(95, 124, 95, .16); }
.check { display: flex; gap: 14px; align-items: center; min-height: 52px; padding: 6px 0; font-size: 17px; }
.check input { width: 26px; height: 26px; accent-color: var(--brick); flex: none; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ---------- Pages simples ---------- */
.shell { max-width: 1040px; margin: 0 auto; padding: 28px 20px 140px; }
.topline { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.topline .grow { flex: 1; }
.hello { font-family: var(--serif); font-weight: 300; font-size: 44px; line-height: 1.05; letter-spacing: -.01em; margin: 8px 0 6px; }
.lead { color: var(--stone); margin: 0 0 30px; font-size: 18px; }
h2.page { font-family: var(--serif); font-weight: 400; font-size: 34px; margin: 0; line-height: 1.1; }
.muted { color: var(--stone); }

/* Connexion */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: 100%; max-width: 420px; background: var(--paper); border-radius: var(--radius-l); padding: 40px 32px 32px; box-shadow: 0 1px 0 var(--line), 0 20px 60px rgba(60, 40, 30, .08); }
.auth-mark { font-family: var(--serif); font-weight: 300; color: var(--ink); font-size: 34px; line-height: 1.1; margin: 0 0 6px; }
.auth-logo { display: block; width: 230px; max-width: 80%; height: auto; margin: 0 auto 26px; }
.auth-card .tagline { text-align: center; font-family: var(--serif); font-weight: 300; font-size: 22px; color: var(--ink); margin: -8px 0 26px; }
.auth-card p { color: var(--stone); margin: 0 0 28px; }
.auth-card .links { text-align: center; margin-top: 18px; }

/* Restaurants */
.rest-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.rest { background: var(--paper); border-radius: var(--radius-l); padding: 26px 24px 22px; border: 1px solid var(--line); display: flex; flex-direction: column; }
.rest h3 { font-family: var(--serif); font-weight: 400; font-size: 30px; margin: 0; line-height: 1.05; }
.rest .city { color: var(--stone); margin: 2px 0 16px; }
.status { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; padding: 6px 12px; border-radius: 999px; background: var(--ok-wash); color: var(--ok); align-self: flex-start; margin-bottom: 20px; }
.status.pending { background: var(--warn-wash); color: var(--warn); }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.rest .actions { display: grid; gap: 10px; margin-top: auto; }

/* ---------- Éditeur ---------- */
.ed-head { position: sticky; top: 0; z-index: 20; background: rgba(251, 244, 224, .94); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.ed-head-in { max-width: 1040px; margin: 0 auto; padding: 10px 14px 0; }
.ed-title { display: flex; align-items: center; gap: 8px; min-height: 56px; }
.ed-title h1 { font-family: var(--serif); font-weight: 400; font-size: 28px; margin: 0; line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed-title .grow { flex: 1; min-width: 0; }
.ed-sub { font-size: 14px; color: var(--stone); margin-top: 3px; display: flex; column-gap: 14px; row-gap: 2px; align-items: center; flex-wrap: wrap; }
.save { display: inline-flex; align-items: center; gap: 6px; }
.save.ok { color: var(--ok); }
.save.busy { color: var(--stone); }
.save.err { color: var(--danger); font-weight: 500; }
.save.ok::before { content: "✓"; font-weight: 500; }
.search { position: relative; margin: 8px 0 10px; }
.search input { padding-left: 46px; min-height: 48px; font-size: 17px; background: var(--paper); border-color: var(--line); }
.search svg { position: absolute; left: 14px; top: 13px; width: 22px; height: 22px; color: var(--stone); }
.tabs { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 12px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); font-family: var(--serif); font-weight: 400; font-size: 17px; color: var(--ink); letter-spacing: .02em; }
.tab[aria-selected="true"] { background: var(--brick); border-color: var(--brick); color: #fff; }

.ed-body { max-width: 1040px; margin: 0 auto; padding: 18px 14px calc(var(--bar-h) + var(--safe-b) + 40px); }
.sheet-paper { background: var(--paper); border-radius: var(--radius-l); border: 1px solid var(--line); padding: 22px 8px 26px 0; }
.sec-title { display: flex; align-items: center; gap: 10px; padding: 0 12px 0 calc(var(--vint-w) + 10px); }
.sec-title h2 { font-family: var(--serif); font-weight: 400; font-size: 30px; margin: 0; flex: 1; letter-spacing: .005em; }
.empty-note { padding: 18px calc(var(--vint-w) + 12px); color: var(--stone); }

/* Grille commune aux en-têtes de rubrique et aux lignes de vins */
.ed-body { --vint-w: 64px; --price-w: 84px; --act-w: 48px; }
.grid { display: grid; grid-template-columns: var(--vint-w) minmax(0, 1fr) repeat(var(--ncol), var(--price-w)) var(--act-w); align-items: center; column-gap: 4px; }
.rub { margin-top: 26px; }
.rub-head { min-height: 46px; }
.rub-head .t { grid-column: 2; font-family: var(--serif); font-weight: 400; color: var(--brick); font-size: 21px; letter-spacing: .02em; line-height: 1.15; padding: 4px 6px; }
.rub-head .t.untitled { color: var(--stone); font-style: italic; font-family: var(--sans); font-size: 15px; }
.rub-head .f { font-family: var(--serif); color: var(--brick); text-align: center; font-size: 17px; }
.rub-head .tools { grid-column: -2; }
.rub-flag { display: inline-block; font-family: var(--sans); font-size: 12px; color: var(--stone); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; margin-left: 8px; vertical-align: middle; }

.wine { min-height: 50px; border-radius: 10px; }
.wine:hover { background: #FDF9EE; }
.wine.spacer { margin-top: 18px; }
.wine .v { font-family: var(--serif); color: var(--brick); text-align: right; font-size: 17px; padding-right: 8px; }
.wine .n { font-family: var(--serif); font-weight: 400; font-size: 18px; line-height: 1.25; text-align: left; background: none; border: 0; padding: 10px 6px 10px 6px; border-radius: 8px; min-height: 48px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wine .n:hover { background: var(--canvas); }
.wine .n sup { font-size: .62em; }
.wine .n img { height: 15px; width: auto; }
.wine .p { min-height: 48px; border: 1px solid transparent; border-radius: 10px; background: none; font-family: var(--serif); font-size: 19px; text-align: center; padding: 0 4px; width: 100%; font-variant-numeric: tabular-nums; }
.wine .p:hover { border-color: var(--line); background: var(--paper); }
.wine .p.empty { color: transparent; }
.wine .p.empty:hover { color: #c5beb3; }
.wine .p small { font-family: var(--sans); font-size: 11px; color: var(--stone); display: block; line-height: 1; }
.wine input.p { border-color: var(--brick); background: var(--paper); box-shadow: 0 0 0 4px rgba(95, 124, 95, .16); outline: none; }
.wine.saving .p, .wine.saving .n { opacity: .55; }
.wine.is-hidden .n, .wine.is-hidden .v, .wine.is-hidden .p { color: #b3aca2; }
.tag { font-family: var(--sans); font-size: 12px; font-weight: 500; color: var(--stone); background: var(--canvas); border-radius: 6px; padding: 2px 8px; }
.flash { animation: flash 1.4s ease-out; }
@keyframes flash { 0% { background: #E3EBDB; } 100% { background: transparent; } }
.move { display: flex; flex-direction: column; }
.move .icon-btn { width: 48px; height: 30px; }
.add-line { padding: 6px 0 0 calc(var(--vint-w) + 4px); }
.add-line .btn { color: var(--brick); border-style: dashed; min-height: 48px; }
.manage-bar { display: flex; flex-wrap: wrap; gap: 10px; padding: 26px 12px 0 calc(var(--vint-w) + 12px); }
.result-group { margin-top: 22px; }
.result-group .where { padding-left: calc(var(--vint-w) + 10px); font-size: 14px; color: var(--stone); margin-bottom: 4px; }

/* Barre d'actions fixe */
.bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: rgba(251, 244, 224, .96); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); padding: 14px 14px calc(14px + var(--safe-b)); }
.bar-in { max-width: 1040px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1.6fr; gap: 12px; }

/* ---------- Fenêtres (feuilles) ---------- */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(30, 24, 20, .38); display: flex; align-items: flex-end; justify-content: center; animation: fade .18s ease-out; }
.modal { background: var(--paper); width: 100%; max-width: 620px; max-height: 92vh; overflow-y: auto; border-radius: 24px 24px 0 0; padding: 10px 24px calc(24px + var(--safe-b)); animation: up .22s cubic-bezier(.2, .8, .2, 1); -webkit-overflow-scrolling: touch; }
@media (min-width: 700px) { .overlay { align-items: center; } .modal { border-radius: 24px; padding-bottom: 26px; } }
.modal .grab { width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 14px; }
.modal h3 { font-family: var(--serif); font-weight: 400; font-size: 30px; margin: 0 0 6px; line-height: 1.1; }
.modal .intro { color: var(--stone); margin: 0 0 22px; }
.modal-actions { display: grid; gap: 10px; margin-top: 22px; }
.modal-actions.two { grid-template-columns: 1fr 1fr; }
.modal .secondary { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.prices { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; }
.prices .field { margin: 0; }
.prices .input { font-family: var(--serif); font-size: 22px; text-align: center; }
.vin-quick { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.chip { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); font-size: 15px; }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
details.more { margin-top: 10px; }
details.more summary { cursor: pointer; color: var(--brick); min-height: 44px; display: flex; align-items: center; font-weight: 500; }
.spinner { width: 46px; height: 46px; border: 4px solid var(--line); border-top-color: var(--brick); border-radius: 50%; animation: spin .8s linear infinite; margin: 20px auto; }
.center { text-align: center; }
.big-ok { width: 72px; height: 72px; border-radius: 50%; background: var(--ok-wash); color: var(--ok); display: grid; place-items: center; margin: 10px auto 14px; font-size: 38px; }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(30px); opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Notifications ---------- */
#toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--bar-h) + var(--safe-b) + 16px); z-index: 60; display: grid; gap: 8px; width: min(92vw, 520px); pointer-events: none; }
.toast { background: var(--ink); color: #fff; border-radius: 14px; padding: 14px 18px; font-size: 16px; box-shadow: 0 10px 30px rgba(0, 0, 0, .18); display: flex; align-items: center; gap: 12px; pointer-events: auto; animation: up .2s ease-out; }
.toast.err { background: var(--danger); }
.toast .grow { flex: 1; }
.toast button { background: none; border: 0; color: #fff; font-weight: 500; text-decoration: underline; min-height: 36px; }

/* ---------- Listes (archives, administration) ---------- */
.list { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-l); overflow: hidden; }
.item { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.item:first-child { border-top: 0; }
.item .main { flex: 1; min-width: 200px; }
.item .t { font-weight: 500; }
.item .s { color: var(--stone); font-size: 15px; }
.item .acts { display: flex; gap: 8px; flex-wrap: wrap; }
.item .acts .btn { min-height: 46px; padding: 0 16px; font-size: 16px; }
.badge-current { font-size: 13px; font-weight: 500; color: var(--ok); background: var(--ok-wash); border-radius: 6px; padding: 2px 8px; margin-left: 8px; }
.block-title { font-family: var(--serif); font-weight: 400; font-size: 26px; margin: 36px 0 12px; }
.seg { display: inline-flex; background: #EFE6CC; border-radius: 14px; padding: 4px; gap: 4px; margin-bottom: 22px; }
.seg button { border: 0; background: transparent; min-height: 44px; padding: 0 18px; border-radius: 10px; font-weight: 500; color: var(--stone); }
.seg button[aria-selected="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 24px; margin-bottom: 18px; }
.panel h3 { font-family: var(--serif); font-weight: 400; font-size: 26px; margin: 0 0 16px; }
.logo-prev { max-height: 120px; max-width: 200px; display: block; margin-bottom: 12px; }
.role-row { display: grid; grid-template-columns: 1fr 170px; gap: 10px; align-items: center; padding: 6px 0; }

/* ---------- Petits écrans ---------- */
@media (max-width: 640px) {
  body { font-size: 16px; }
  .ed-head .long { display: none; }
  .ed-title h1 { font-size: 24px; }
  .ed-title .muted { display: none; }
  .ed-title .btn-quiet { padding: 0 10px; }
  .ed-sub { font-size: 13px; }
  #pubinfo { display: none; }
  .ed-body { --vint-w: 40px; --act-w: 40px; padding-left: 4px; padding-right: 4px; }
  .sheet-paper { border-radius: 16px; padding-top: 16px; }
  /* sur téléphone, le nom occupe toute la largeur et les prix passent sur une deuxième ligne */
  .grid { grid-template-columns: var(--vint-w) repeat(var(--ncol), minmax(0, 1fr)) var(--act-w); row-gap: 0; }
  .wine .v { grid-row: 1; grid-column: 1; align-self: start; padding-top: 11px; font-size: 14px; padding-right: 4px; }
  .wine .n { grid-row: 1; grid-column: 2 / -2; font-size: 17px; padding: 8px 4px 2px; min-height: 40px; }
  .wine > :last-child { grid-row: 1; grid-column: -2; }
  .wine .n + * { grid-column-start: 2; }
  .wine .p { min-height: 40px; font-size: 17px; }
  .rub-head .t { grid-row: 1; grid-column: 2 / -2; font-size: 19px; }
  .rub-head .tools { grid-row: 1; grid-column: -2; }
  .rub-head .t + .f { grid-column-start: 2; }
  .rub-head .f { font-size: 14px; }
  .sec-title h2 { font-size: 25px; }
  .hello { font-size: 36px; }
  .bar-in .btn { font-size: 16px; padding: 0 12px; }
  .bar-in .long { display: none; }
  .row2 { grid-template-columns: 1fr; }
  .role-row { grid-template-columns: 1fr; }
}

/* ---------- Bandeau de marque ---------- */
.brandbar { max-width: 1040px; margin: 0 auto; padding: 16px 20px 6px; display: flex; align-items: center; gap: 10px; }
.brandbar .brand { display: inline-flex; border-radius: 8px; }
.brandbar .brand img { height: 40px; width: auto; display: block; }
.brandbar .grow { flex: 1; }
.brandbar .btn { min-height: 44px; padding: 0 16px; font-size: 16px; }
.ed-brand { max-width: 1040px; margin: 0 auto; padding: 14px 14px 0; display: flex; align-items: center; }
.ed-brand img { height: 30px; width: auto; display: block; }
.shell { padding-top: 14px; }

/* ---------- Écran de chargement : le logo se dessine puis rejoint sa place ---------- */
#splash { position: fixed; inset: 0; z-index: 100; background: var(--canvas); display: grid; place-items: center; transition: background-color .6s ease; }
#splash .splash-logo { width: min(72vw, 440px); transform-origin: 0 0; will-change: transform; }
#splash svg { display: block; width: 100%; height: auto; overflow: visible; }
#splash.leaving { background-color: rgba(251, 244, 224, 0); pointer-events: none; }
/* 1. le logo se dessine trait par trait, puis se remplit */
#splash .lc-draw { fill: #5F7C5F; fill-opacity: 0; stroke: #5F7C5F; stroke-width: 2.4; stroke-linejoin: round; stroke-dasharray: 1 1; stroke-dashoffset: 1;
  animation: lcDraw 1s cubic-bezier(.45, 0, .2, 1) var(--d) forwards, lcInk .45s ease-out calc(var(--d) + .75s) forwards; }
#splash .lc-t { stroke-width: 1.4; animation-duration: .55s, .3s; animation-delay: var(--d), calc(var(--d) + .4s); }
@keyframes lcDraw { to { stroke-dashoffset: 0; } }
@keyframes lcInk { to { fill-opacity: 1; stroke-opacity: 0; } }

/* 2. le vin est versé, ondule et tangue dans le verre, puis disparaît */
#splash .lc-wave { transform-box: view-box; }
#splash .lc-wave-f { fill: #7A2232; animation: lcWave 1.1s linear infinite; }
#splash .lc-wave-b { fill: #A33B4C; opacity: .55; animation: lcWave 1.6s linear infinite reverse; }
#splash .lc-level { transform-box: view-box; transform: translateY(80px); animation: lcPour 4.3s cubic-bezier(.45, 0, .3, 1) 1.25s forwards; }
#splash .lc-slosh { transform-box: view-box; transform-origin: 572px 110px; animation: lcSlosh 1.15s ease-in-out 1.6s 3 both; }
@keyframes lcWave { from { transform: translateX(0); } to { transform: translateX(-64px); } }
@keyframes lcPour {
  0% { transform: translateY(80px); }
  16% { transform: translateY(0); }
  85% { transform: translateY(2px); }
  100% { transform: translateY(80px); }
}
@keyframes lcSlosh { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-6deg); } 70% { transform: rotate(5deg); } }

/* toucher l'écran passe l'animation */
#splash.skip .lc-draw { animation: none; fill-opacity: 1; stroke-opacity: 0; stroke-dashoffset: 0; }
#splash.skip .lc-wine { display: none; }
@media (prefers-reduced-motion: reduce) {
  #splash .lc-draw { animation: none; fill-opacity: 1; stroke-opacity: 0; stroke-dashoffset: 0; }
  #splash .lc-wine { display: none; }
}
@media (max-width: 640px) {
  .brandbar { padding: 12px 14px 4px; }
  .brandbar .brand img { height: 32px; }
  .ed-brand img { height: 24px; }
}
/* serveur lent : le logo respire en attendant */
#splash.waiting svg { animation: lcBreathe 1.6s ease-in-out infinite; }
@keyframes lcBreathe { 50% { opacity: .55; } }

/* glisser-déposer des rubriques */
.rub-head .t.drag-rub { touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; display: flex; align-items: center; gap: 8px; background: var(--canvas); border-radius: 8px; }
.rub.dragging { opacity: .3; }
.ghost-rub { padding: 6px 0 10px; }
.ghost-count { padding-left: calc(var(--vint-w) + 10px); color: var(--stone); font-size: 14px; }

/* prix remplacé par un texte (« On request ») */
.wine .p .ptext { font-family: var(--sans); font-size: 12px; font-weight: 500; letter-spacing: .02em; line-height: 1.1; display: block; }
.prices .field .chip.onreq { margin-top: 6px; min-height: 34px; font-size: 13px; }

/* catalogue : suggestions et comparaison des prix */
.suggest { display: grid; gap: 4px; margin-top: 6px; }
.suggest:empty { display: none; }
.sug { text-align: left; border: 1px solid var(--line); background: var(--paper); border-radius: 12px; padding: 10px 14px; display: grid; gap: 2px; min-height: 48px; }
.sug:hover, .sug:focus-visible { border-color: var(--brick); background: var(--brick-wash); }
.sug-n { font-family: var(--serif); font-size: 18px; }
.sug-here { font-size: 13px; font-weight: 500; color: var(--warn); }
.sug-o { font-size: 13px; color: var(--stone); }
.cat-linked { font-family: var(--serif); font-size: 21px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--canvas); }
.cat-tag { background: var(--brick-wash); color: var(--brick); margin-left: 6px; }
.cmp { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.cmp-t { font-size: 14px; color: var(--stone); margin-bottom: 6px; }
.cmp-r { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 15px; padding: 4px 0; }
.cmp-n { font-weight: 500; }
.cmp-v { color: var(--brick); }
.cmp-p { color: var(--ink); }
.panel.dup .check { align-items: flex-start; }

.norm-list { max-height: 46vh; overflow: auto; border: 1px solid var(--line); border-radius: 12px; padding: 6px 12px; background: var(--paper); }
.norm-r { padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.norm-r:last-child { border-bottom: 0; }
.norm-b { color: var(--stone); text-decoration: line-through; }
.norm-a { color: var(--ink); }

/* tarifs : basse saison, haute saison, congrès */
.seasons { display: flex; gap: 6px; margin: 4px 0 10px; padding: 4px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; }
.seasons button { flex: 1; min-height: 40px; border: 0; border-radius: 10px; background: transparent; font: inherit; font-weight: 500; color: var(--stone); cursor: pointer; }
.seasons button[aria-selected="true"] { background: var(--brick); color: #fff; }
.season-tag { background: var(--brick-wash); color: var(--brick); margin-left: 6px; font-size: 13px; }

/* glisser-déposer des sections (onglets) en mode Organiser */
.tabs-organize .tab { touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; display: inline-flex; align-items: center; gap: 6px; }
.tabs-organize .tab .grip { width: 14px; height: 14px; opacity: .6; }
.tab.dragging { opacity: .3; }
.tab-ghost { position: fixed; z-index: 60; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; width: auto !important; pointer-events: none; box-shadow: 0 10px 28px rgba(0,0,0,.18); transform: scale(1.04); }
.tab-drop { position: fixed; z-index: 59; width: 3px; border-radius: 2px; background: var(--brick); pointer-events: none; }

/* appellation glissée sur l'onglet d'une autre section */
.tab.tab-target { background: var(--brick); color: #fff; border-color: var(--brick); transform: scale(1.06); transition: transform .12s; }
.ghost.ghost-small { width: auto !important; max-width: 360px; padding: 10px 16px; }
.ghost-label { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
