/* Cave à vin : clair et lisible. Papier crème, encre brune, bois clair pour les casiers, bordeaux pour agir. */
:root {
  --page: #f4eee4;
  --fond: #fffdf8; --surface: #fffdf8; --surface-2: #f1e8d8; --trait: #e0d3bd;
  --texte: #2a1d13; --texte-2: #7a6956;
  --accent: #8f1f3a; --accent-fort: #a52846; --sur-accent: #fff; --or: #8a651c;
  --ok: #2f8f55; --alerte: #a8651a; --danger: #b3412f;
  --v-rouge: #8f1f3a; --v-blanc: #e2cc6a; --v-rose: #f0a0a8; --v-effervescent: #d2ac45; --v-liquoreux: #dd9426; --v-vdn: #7a3b2a; --v-jaune: #c9a233; --v-spiritueux: #a8632a;
  --s-garder: #5b8fb2; --s-jeune: #7fae7a; --s-apogee: #2f9e5b; --s-boire: #e08a2c; --s-passe: #c9604f;
  --bois-1: #f0e0c2; --bois-2: #e6d0a8; --bois-3: #cfa870; --bois-encre: #6b4a22;
  --rayon: 14px;
  --titres: "Didot", "Bodoni 72", "Bodoni MT", "Hoefler Text", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --serif: "Hoefler Text", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; color: var(--texte); font: 16px/1.45 var(--sans); -webkit-text-size-adjust: 100%; overscroll-behavior-y: none;
  background: var(--page); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--or); outline-offset: 2px; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
h1 { font: 500 30px/1.12 var(--titres); letter-spacing: .01em; }
h2 { font: 600 21px/1.2 var(--titres); }
h3 { display: flex; align-items: center; gap: 12px; font: 700 12px var(--sans); color: var(--texte-2); text-transform: uppercase; letter-spacing: .14em; }
h3::after { content: ""; flex: 1; height: 1px; background: var(--trait); }
p { margin: 0; } a { color: var(--or); }
.attente { padding: 40vh 20px 0; text-align: center; color: var(--texte-2); font-family: var(--serif); font-style: italic; }
.discret { color: var(--texte-2); font-size: 14px; }
.chiffres { font-variant-numeric: tabular-nums; }

/* ---------- Structure ---------- */
#app { min-height: 100dvh; display: flex; flex-direction: column; }
main.vue { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 18px 16px calc(104px + env(safe-area-inset-bottom)); }
main.vue.large { max-width: none; }
.entete { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; min-height: 44px; }
.entete h1 { flex: 1; min-width: 0; }
.entete .sous { display: block; font: italic 15px var(--serif); font-variant-numeric: lining-nums; color: var(--texte-2); margin-top: 4px; letter-spacing: 0; text-shadow: none; }

/* Barre du bas */
nav.barre { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; justify-content: center; padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--trait); }
nav.barre .dedans { display: grid; grid-template-columns: 1fr 1fr 80px 1fr 1fr; width: 100%; max-width: 540px; align-items: end; }
nav.barre a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; text-decoration: none; color: var(--texte-2); font-size: 11.5px; border-radius: 10px; }
nav.barre a svg { width: 24px; height: 24px; }
nav.barre a[aria-current="page"] { color: var(--accent); font-weight: 700; }
nav.barre a.scan span.rond { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; margin-top: -28px; color: #fff; background: var(--accent);
  box-shadow: 0 6px 14px rgba(143, 31, 58, .4), 0 0 0 5px var(--page); }
nav.barre a.scan svg { width: 28px; height: 28px; }
nav.barre a.scan small { color: var(--texte-2); font-size: 11.5px; margin-top: 3px; font-weight: 400; }

/* ---------- Boutons, champs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--trait); background: var(--surface); color: var(--texte); font-weight: 600; font-size: 15px; text-decoration: none; box-shadow: 0 1px 2px rgba(60, 40, 20, .08); }
.btn:hover { background: var(--surface-2); }
.btn.plein { background: var(--accent); border-color: var(--accent); color: var(--sur-accent); box-shadow: 0 3px 8px rgba(143, 31, 58, .28); }
.btn.plein:hover { background: var(--accent-fort); }
.btn.bloc { width: 100%; }
.btn.petit { min-height: 38px; padding: 0 13px; font-size: 14px; border-radius: 10px; }
.btn.lien { border: 0; background: none; color: var(--or); padding: 0 4px; min-height: 36px; box-shadow: none; }
.btn.danger { color: var(--danger); }
.btn:disabled { opacity: .5; cursor: default; }
.btn svg { width: 18px; height: 18px; flex: none; }
.rangee { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.rangee.fin { justify-content: flex-end; }
.rangee > .grandit { flex: 1; min-width: 0; }
.icone { width: 42px; height: 42px; border-radius: 50%; border: 0; background: transparent; color: var(--texte-2); display: grid; place-items: center; flex: none; }
.icone:hover { background: color-mix(in srgb, var(--texte) 10%, transparent); color: var(--texte); }
.icone svg { width: 22px; height: 22px; }
label.champ { display: block; margin-bottom: 12px; }
label.champ > span, .libelle { display: block; font-size: 13px; color: var(--texte-2); margin-bottom: 5px; }
input[type=text], input[type=search], input[type=number], input[type=password], input[type=email], input[type=date], select, textarea {
  width: 100%; min-height: 44px; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--trait); background: var(--fond); color: var(--texte); box-shadow: inset 0 1px 3px rgba(0, 0, 0, .12); }
textarea { min-height: 76px; resize: vertical; line-height: 1.4; }
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--texte-2) 75%, transparent); }
.grille2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.grille3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 12px; }
.puces { display: flex; gap: 8px; flex-wrap: wrap; }
.puces.defile { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 8px; scrollbar-width: none; }
.puces.defile::-webkit-scrollbar { display: none; }
.puce { flex: none; display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 13px; border-radius: 18px; border: 1px solid var(--trait); background: var(--surface); color: var(--texte); font-size: 14px; white-space: nowrap; }
.puce[aria-pressed="true"] { background: var(--texte); color: #fff; border-color: var(--texte); font-weight: 700; }
.puce .n { color: var(--texte-2); font-variant-numeric: tabular-nums; }
.puce[aria-pressed="true"] .n { color: inherit; opacity: .75; }
.puce i.pt { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25); }
.segments { display: inline-flex; border: 1px solid var(--trait); border-radius: 10px; overflow: hidden; background: var(--surface); }
.segments button { border: 0; background: none; padding: 0 13px; min-height: 38px; font-size: 14px; color: var(--texte-2); }
.segments button[aria-pressed="true"] { background: var(--texte); color: #fff; font-weight: 700; }
.pas { display: inline-flex; align-items: center; border: 1px solid var(--trait); border-radius: 12px; background: var(--fond); }
.pas button { width: 46px; height: 44px; border: 0; background: none; font-size: 22px; color: var(--texte); }
.pas output { min-width: 44px; text-align: center; font: 700 20px var(--serif); font-variant-numeric: lining-nums tabular-nums; }

/* ---------- Papier : cartes, listes ---------- */
.carte, .liste { background: var(--surface); border: 1px solid var(--trait); border-radius: var(--rayon); box-shadow: 0 2px 8px rgba(60, 40, 20, .06); }
.carte { padding: 16px; }
.carte + .carte, .bloc + .bloc { margin-top: 12px; }
.bloc > h3 { margin: 22px 0 10px; }
.liste { list-style: none; margin: 0; padding: 0; overflow: hidden; }
.liste > li + li { border-top: 1px dashed color-mix(in srgb, var(--texte-2) 38%, transparent); }
.ligne { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 15px; background: none; border: 0; text-align: left; color: inherit; text-decoration: none; min-height: 58px; }
button.ligne:hover, a.ligne:hover { background: color-mix(in srgb, var(--texte) 6%, transparent); }
.ligne .corps { flex: 1; min-width: 0; }
.ligne .titre { font: 600 17.5px/1.22 var(--serif); overflow-wrap: anywhere; }
.ligne .sous { font-size: 13.5px; color: var(--texte-2); margin-top: 2px; }
.ligne .corps > .sous:first-of-type { font-family: var(--serif); font-style: italic; font-size: 14.5px; }
.ligne .corps .etat { margin-top: 6px; }
.ligne .droite { text-align: right; flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.pastille { width: 16px; height: 16px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 34% 30%, rgba(255, 255, 255, .5) 0 9%, transparent 26%), var(--c);
  box-shadow: inset 0 -2px 3px rgba(0, 0, 0, .3), 0 1px 2px rgba(0, 0, 0, .35); }
.pastille.grande { width: 24px; height: 24px; }
.compte { font: 700 17px var(--serif); font-variant-numeric: lining-nums tabular-nums; white-space: nowrap; }
.etat { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 11px; background: color-mix(in srgb, var(--c) 20%, transparent); color: color-mix(in srgb, var(--c) 62%, var(--texte)); white-space: nowrap; }
.etat::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.etat.incertain { background: transparent; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 50%, transparent); }
.vide { text-align: center; padding: 34px 18px; color: var(--texte-2); }
.vide strong { display: block; color: var(--texte); font: 600 20px var(--titres); margin-bottom: 8px; }
.vide .btn { margin-top: 16px; }
.info { display: grid; grid-template-columns: auto 1fr; gap: 7px 16px; font-size: 15px; margin: 0; }
.info dt { color: var(--texte-2); } .info dd { margin: 0; overflow-wrap: anywhere; }
.proprio { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; }
.proprio::before { content: ""; width: 9px; height: 9px; border-radius: 2px; background: var(--c); }

/* ---------- Frise de dégustation ---------- */
.frise { margin: 6px 0 2px; }
.frise .barre { position: relative; display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: var(--surface-2); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .2); }
.frise .barre i { display: block; height: 100%; }
.frise .z-garde { background: color-mix(in srgb, var(--s-garder) 55%, transparent); }
.frise .z-jeune { background: color-mix(in srgb, var(--s-apogee) 45%, transparent); }
.frise .z-apogee { background: var(--s-apogee); }
.frise .z-fin { background: color-mix(in srgb, var(--s-boire) 80%, transparent); }
.frise .z-apres { background: color-mix(in srgb, var(--s-passe) 40%, transparent); }
.frise .curseur { position: relative; height: 0; }
.frise .curseur b { position: absolute; top: -18px; width: 3px; height: 22px; margin-left: -1.5px; background: var(--texte); border-radius: 2px; box-shadow: 0 0 0 2px var(--surface); }
.frise .reperes { position: relative; height: 20px; margin-top: 6px; font-size: 12px; color: var(--texte-2); font-variant-numeric: tabular-nums; }
.frise .reperes span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.frise .reperes span.g { transform: none; } .frise .reperes span.d { transform: translateX(-100%); }
.frise .reperes span.fort { color: var(--texte); font-weight: 600; }

/* ---------- La cave : vue principale, trois meubles ---------- */
.meubles { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.75fr) minmax(0, 1fr); gap: 10px; align-items: stretch; }
.meuble-carte { position: relative; display: flex; flex-direction: column; gap: 5px; padding: 12px 10px 12px; text-decoration: none; color: var(--texte); text-align: center;
  background: var(--surface); border: 1px solid var(--trait); border-radius: 18px; box-shadow: 0 3px 10px rgba(60, 40, 20, .08); }
.meuble-carte:hover { border-color: var(--bois-3); box-shadow: 0 6px 16px rgba(60, 40, 20, .14); }
.meuble-carte .titre { font: 600 20px/1.1 var(--titres); margin-top: 6px; }
.meuble-carte .nb { font: 700 26px/1 var(--serif); font-variant-numeric: lining-nums tabular-nums; }
.meuble-carte .nb small { display: block; font: 400 12.5px var(--sans); color: var(--texte-2); margin-top: 3px; }
.meuble-carte .libres { line-height: 1.25; }
.meuble-carte .barre { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--surface-2); margin-top: 4px; }
.meuble-carte .barre i { display: block; height: 100%; }
.meuble-carte .libres { font-size: 12.5px; color: var(--texte-2); }
.meuble-carte .trouve { position: absolute; top: -9px; right: -5px; min-width: 30px; height: 30px; padding: 0 8px; border-radius: 15px; background: var(--accent); color: #fff; font: 700 15px/30px var(--sans); box-shadow: 0 2px 6px rgba(143, 31, 58, .4); }
.meuble-carte.eteint { opacity: .4; }
.meuble-carte.allume { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent), 0 6px 14px rgba(143, 31, 58, .2); }
.meuble-carte.accueil { border-color: var(--ok); box-shadow: 0 0 0 2px color-mix(in srgb, var(--ok) 70%, transparent); }
/* Silhouette d'un meuble : à l'échelle, chaque module dessiné selon son modèle et teinté par le bas selon son remplissage. */
.silhouette { --trait-bois: rgba(110, 75, 30, .3); display: flex; align-items: flex-end; justify-content: center; gap: 2.5%; height: var(--h, 120px); padding: 0 3%; }
.pile-s { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pile-s i, .pile-s button { display: block; min-height: 0; padding: 0; border: 1px solid var(--bois-3); border-radius: 3px; background-color: var(--bois-1);
  --plein-fond: linear-gradient(0deg, color-mix(in srgb, var(--bois-3) 62%, transparent) 0 var(--plein), transparent var(--plein) 100%); background-image: var(--plein-fond); }
.pile-s button { cursor: pointer; }
/* Soges : dix étages de rails */
.pile-s .m-rails { background-image: repeating-linear-gradient(0deg, var(--trait-bois) 0 1px, transparent 1px 10%), var(--plein-fond); }
/* QUADRI : cinq colonnes de six cases */
.pile-s .m-quadri { background-image: repeating-linear-gradient(90deg, var(--trait-bois) 0 1px, transparent 1px 20%), repeating-linear-gradient(0deg, var(--trait-bois) 0 1px, transparent 1px 16.66%), var(--plein-fond); }
/* Casier à 2 planches : trois compartiments */
.pile-s .m-planches { background-image: linear-gradient(0deg, transparent 33%, var(--trait-bois) 33% calc(33% + 2px), transparent calc(33% + 2px) 66%, var(--trait-bois) 66% calc(66% + 2px), transparent calc(66% + 2px)), var(--plein-fond); }
/* Présentoir : deux tablettes */
.pile-s .m-presentoir { background-image: linear-gradient(0deg, transparent 4%, var(--trait-bois) 4% calc(4% + 2px), transparent calc(4% + 2px) 52%, var(--trait-bois) 52% calc(52% + 2px), transparent calc(52% + 2px)), var(--plein-fond); }
/* Module d'angle, d'un seul tenant et sans perspective : l'aile côté mur (étroite, plus sombre, en tablettes), attachée aux deux
   colonnes du virage et à celle de face. L'angle de droite est le même, retourné. */
.pile-s .m-angle { --montant: rgba(110, 75, 30, .55); background-image:
  linear-gradient(90deg, rgba(90, 60, 20, .3), rgba(90, 60, 20, .14) 25%, transparent 25%),
  linear-gradient(90deg, transparent calc(25% - 1.5px), var(--montant) calc(25% - 1.5px) 25%, transparent 25%),
  linear-gradient(90deg, transparent calc(75% - 1.5px), var(--montant) calc(75% - 1.5px) 75%, transparent 75%),
  linear-gradient(90deg, transparent calc(50% - 1px), var(--trait-bois) calc(50% - 1px) 50%, transparent 50%),
  repeating-linear-gradient(0deg, var(--trait-bois) 0 1px, transparent 1px 16.66%), var(--plein-fond); }
.pile-s.angle.miroir .m-angle { transform: scaleX(-1); }






/* Barre de situation, en haut de la vue d'un meuble : les trois meubles en petit */
.situation { position: sticky; top: 0; z-index: 15; display: flex; align-items: stretch; gap: 10px; margin: -18px -16px 10px; padding: 7px 16px 6px; background: color-mix(in srgb, var(--page) 94%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--trait); }
.situation .retour { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-width: 56px; padding: 4px 8px; border: 1px solid var(--trait); border-radius: 12px; background: var(--surface); color: var(--texte); text-decoration: none; font-size: 12.5px; font-weight: 600; }
.situation .retour svg { width: 20px; height: 20px; }
/* Les trois meubles en miniature, à leurs proportions : de petits repères, pas des bandeaux étirés. */
.situation .minis { flex: none; display: flex; justify-content: center; gap: 8px; }
.situation .mini { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 2px; min-width: 62px; padding: 5px 9px 3px; border: 1px solid var(--trait); border-radius: 12px; background: var(--surface); color: var(--texte-2); text-decoration: none; text-align: center; font-size: 11px; font-weight: 600; opacity: .72; }
.situation .mini .silhouette { --h: 40px; width: calc(var(--h) * var(--ratio, 1) * 1.5); padding: 0; gap: 3px; }
/* À cette taille, un angle est un simple bloc et les modules n'ont plus de quadrillage : on ne garde que leur remplissage. */
.situation .mini .pile-s i, .situation .mini .pile-s button { border-radius: 2.5px; }
.situation .mini .pile-s :is(.m-quadri, .m-angle, .m-planches, .m-presentoir) { background-image: var(--plein-fond); }
.situation a.mini:hover { opacity: 1; border-color: var(--bois-3); }
.situation .mini.actif { opacity: 1; color: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.situation .mini.actif .pile-s .vu { background-color: color-mix(in srgb, var(--accent) 30%, var(--bois-1)); border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.situation .mini .trouve { position: absolute; top: -7px; right: -5px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--accent); color: #fff; font: 700 12px/22px var(--sans); }
.casier { scroll-margin-top: 84px; } .tete-pile { scroll-margin-top: 84px; }
.aranger { margin-top: 22px; }
.aranger .puce { height: auto; min-height: 46px; padding: 6px 12px; white-space: normal; text-align: left; border-radius: 12px; }

/* ---------- Mes vins : les régions en tuiles, chacune avec sa grappe aux couleurs de ses vins ---------- */
.regions { display: flex; gap: 10px; overflow-x: auto; margin: 0 -16px 6px; padding: 3px 16px 8px; scrollbar-width: none; scroll-snap-type: x proximity; }
.regions::-webkit-scrollbar { display: none; }
.regions[hidden], .appellations[hidden] { display: none; }
.tuile-region { position: relative; flex: none; width: 124px; min-height: 100px; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 11px 9px; border: 1px solid var(--trait); border-radius: 14px; background: var(--surface); color: var(--texte); text-align: left; scroll-snap-align: start; box-shadow: 0 2px 6px rgba(60, 40, 20, .06); transition: transform .12s ease, box-shadow .12s ease; cursor: pointer; }
.tuile-region:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(60, 40, 20, .13); }
.tuile-region b { margin-top: auto; padding-top: 6px; font: 600 16px/1.15 var(--serif); }
.tuile-region .pays { position: absolute; top: 9px; right: 10px; font: 600 10px var(--sans); font-style: normal; letter-spacing: .05em; text-transform: uppercase; color: var(--texte-2); }
.tuile-region[aria-pressed="true"] .pays { color: rgba(255, 255, 255, .82); }
.tuile-region small { font-size: 12px; color: var(--texte-2); font-variant-numeric: tabular-nums; }
.tuile-region[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 35%, transparent); }
.tuile-region[aria-pressed="true"] small { color: rgba(255, 255, 255, .82); }
.grappe { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 3px; width: 76px; min-height: 23px; }
.grappe i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: inset 0 -2px 3px rgba(0, 0, 0, .22), 0 0 0 1px rgba(60, 40, 20, .16); }
.tuile-region[aria-pressed="true"] .grappe i { box-shadow: inset 0 -2px 3px rgba(0, 0, 0, .18), 0 0 0 1.5px rgba(255, 255, 255, .9); }
.appellations { margin-top: -2px; }
.tete-region { display: flex; align-items: center; gap: 10px; margin: 24px 2px 2px; padding-bottom: 6px; border-bottom: 2px solid var(--bois-3); font: 600 23px/1.2 var(--serif); }
.tete-region .grappe { flex: none; width: auto; min-height: 0; flex-wrap: nowrap; }
.tete-region .nom { flex: 1; min-width: 0; }
.tete-region .n, .tete-appellation .n { flex: none; font: 400 13px var(--sans); letter-spacing: 0; text-transform: none; color: var(--texte-2); font-variant-numeric: tabular-nums; }
.tete-appellation { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 14px 4px 6px; font: 700 12px var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--bois-encre); }
.tete-appellation em { font-style: normal; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--texte-2); }
.tete-appellation::after, .tete-region::after { display: none; }
/* À la souris, la rangée de tuiles se fait défiler ; une barre fine le rappelle. */
@media (hover: hover) { .regions { scrollbar-width: thin; scrollbar-color: var(--bois-3) transparent; padding-bottom: 10px; } .regions::-webkit-scrollbar { display: block; height: 6px; } .regions::-webkit-scrollbar-thumb { background: var(--bois-3); border-radius: 3px; } }

/* ---------- Un meuble : ses casiers comme en vrai, ses bouteilles ---------- */
.entete.tete-meuble { min-height: 0; margin-bottom: 8px; }
.entete.tete-meuble h1 { font-size: 24px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; }
.entete.tete-meuble .sous { margin: 0; font-size: 14px; }
.icone.bord { border: 1px solid var(--trait); background: var(--surface); font-size: 24px; line-height: 1; color: var(--texte); text-decoration: none; }
.raccourcis.puces.defile { padding-bottom: 6px; margin-bottom: 4px; }
/* Téléphone : une pile à la fois, choisie par les onglets */
@media (max-width: 819.98px) { .meuble > .hors { display: none; } }
.meuble { display: flex; flex-direction: column; gap: 8px; }
.tete-pile { justify-content: space-between; margin: 12px 0 0; scroll-margin-top: 12px; } .tete-pile:first-child { margin-top: 0; } .tete-pile::after { display: none; }
.tete-pile { container-type: inline-size; white-space: nowrap; gap: 8px; } .tete-pile b { font-weight: inherit; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.tete-pile span { flex: none; font-weight: 400; letter-spacing: 0; text-transform: none; font-size: 12.5px; } .tete-pile span i { font-style: normal; }
@container (max-width: 210px) { .tete-pile span i { display: none; } }
.casier { display: flex; flex-direction: column; min-width: 0; }
.casier .etagere { flex: 1; align-content: stretch; width: 100%; }
.casier > header { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 0 4px 2px; font-size: 12px; color: var(--bois-encre); white-space: nowrap; overflow: hidden; }
.casier > header b { font-weight: 700; letter-spacing: .05em; text-transform: uppercase; font-size: 11px; }
/* (les cotes d'un casier se lisent au survol de son en-tête et dans Réglages) */
/* Les bouteilles d'un casier : un rond, le millésime dedans, le nom dessous */
.etagere { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); padding: 2px 6px 6px; max-width: calc(var(--n) * 84px);
  background: linear-gradient(180deg, var(--bois-1), var(--bois-2)); border: 1px solid var(--bois-3); border-radius: 12px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 2px 6px rgba(90, 60, 20, .1); }
.tete-col { font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--bois-encre); text-align: center; line-height: 1.15; padding-top: 3px; white-space: nowrap; overflow: hidden; }
.btl { container-type: inline-size; text-align: center; min-width: 0; }
.btl .rond { position: relative; display: grid; place-items: center; width: 100%; max-width: 38px; aspect-ratio: 1; margin: 0 auto; padding: 0; border: 0; border-radius: 50%; touch-action: manipulation;
  background: var(--c); color: #fff; font: 700 clamp(11px, 36cqw, 15px) var(--serif); font-variant-numeric: lining-nums;
  box-shadow: inset 0 -5px 8px rgba(0, 0, 0, .22), 0 2px 5px rgba(60, 40, 20, .3); }
.btl .rond.clair { color: #3a2a12; }
/* Format : une pastille dans le coin, M pour magnum, ½ pour demie, J pour jéroboam, G pour plus grand */
.btl .rond .fmt { position: absolute; right: -5px; bottom: -4px; min-width: 17px; height: 17px; padding: 0 3px; border-radius: 9px; background: var(--texte); color: #fff; font: 700 10.5px/17px var(--sans); text-align: center; box-shadow: 0 0 0 2px var(--bois-1); }
.btl .rond u { position: absolute; top: 0; right: 0; width: 26%; min-width: 9px; aspect-ratio: 1; border-radius: 50%; background: var(--s); border: 2px solid var(--bois-1); }
.btl .rond i.prop { position: absolute; bottom: 0; left: 0; width: 26%; min-width: 9px; aspect-ratio: 1; border-radius: 4px; background: var(--p); border: 2px solid var(--bois-1); }
.btl .rond.sel { outline: 3px solid var(--texte); outline-offset: 3px; }
.btl .rond.enmain { outline: 3px dashed var(--texte); outline-offset: 3px; opacity: .55; }
.btl .rond.cible { outline: 4px solid var(--accent); outline-offset: 3px; animation: pouls 1.2s ease-in-out infinite; }
.btl .rond.estompe { opacity: .22; }
.btl .rond.survol { outline: 3px solid var(--ok); outline-offset: 3px; }
.btl > span { display: block; margin-top: 2px; font-size: clamp(9.5px, 17cqw, 11px); line-height: 1.2; height: 1.2em; color: var(--bois-encre); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btl > span.groupe { position: relative; align-self: flex-start; flex: none; width: calc(var(--g) * 100% + (var(--g) - 1) * 4px); }
.btl.libre .rond { max-width: 26px; margin: auto; background: rgba(110, 75, 30, .08); box-shadow: none; border: 2px dashed rgba(110, 75, 30, .4); color: rgba(110, 75, 30, .65); font: 400 clamp(12px, 30cqw, 16px) var(--sans); }
.btl.libre .rond::after { content: ""; position: absolute; inset: -9px; border-radius: 50%; }
.etagere.pose .btl.libre .rond { border: 2px solid var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
/* La structure de chaque modèle, comme sur la photo. Les cases se touchent : la tablette court d'un bord à l'autre. */
.etagere { --planche: #c49a5f; --planche-ombre: rgba(90, 60, 20, .28); column-gap: 0; row-gap: 0; grid-auto-rows: 1fr; }
.etagere .btl { display: flex; flex-direction: column; justify-content: flex-end; padding: 5px 2px 3px; }
/* Casier à 2 planches et présentoir : de vraies tablettes, épaisses, sous chaque rangée */
.etagere.m-planches:not(.vrac) .btl, .etagere.m-presentoir .btl { border-bottom: 6px solid var(--planche); box-shadow: 0 2px 0 var(--planche-ombre); padding-bottom: 4px; }
/* Cases sans limite : chaque case est une tablette où les bouteilles s'ajoutent les unes à côté des autres */
.etagere.vrac { display: flex; flex-direction: column; }
.etagere.vrac .case { flex: 1 1 auto; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); align-content: end; min-height: 60px; padding-top: 2px; border-bottom: 6px solid var(--planche); box-shadow: 0 2px 0 var(--planche-ombre); }
/* Soges : un rail fin sous chaque étage */
.etagere.m-rails .btl { border-bottom: 2px solid var(--planche); }
/* QUADRI : des montants entre les colonnes, un petit appui sous chaque bouteille */
.etagere.m-quadri .btl { border-right: 2px solid var(--planche); border-bottom: 1px solid color-mix(in srgb, var(--planche) 55%, transparent); }
.etagere.m-quadri .btl:nth-child(5n) { border-right: 0; }
/* Module d'angle : l'aile gauche, les deux colonnes du centre, l'aile droite, séparées par des montants */
/* (la rangée des repères, quand elle existe, est dimensionnée par le script) */
.etagere.m-angle .btl { border-bottom: 1px solid color-mix(in srgb, var(--planche) 55%, transparent); }
.etagere.m-angle > .montant { border-right: 2px solid var(--planche); }
.etagere.m-angle .tete-col { border-bottom: 2px solid var(--planche); padding: 0 2px 2px; }
/* Présentoir : bouteilles debout, étiquette de face. Le millésime est écrit sur l'étiquette. */
.btl.debout .rond, .btl.couche .rond { isolation: isolate; background: none; box-shadow: none; border-radius: 6px; color: #2a1d13; --verre: color-mix(in srgb, var(--c) 30%, #1e2a22); }
.btl.debout .rond { aspect-ratio: 1 / 2.7; max-width: 38px; margin-bottom: 3px; padding-top: 81%; font-size: clamp(10px, 24cqw, 14px); }
.btl.debout .rond::before, .btl.couche .rond::before { content: ""; position: absolute; inset: 0; z-index: -1; filter: drop-shadow(0 2px 2px rgba(60, 40, 20, .35)); }
.btl.debout .rond::before { clip-path: polygon(36% 0, 64% 0, 64% 20%, 68% 26%, 88% 35%, 92% 40%, 92% 98%, 88% 100%, 12% 100%, 8% 98%, 8% 40%, 12% 35%, 32% 26%, 36% 20%);
  background: linear-gradient(90deg, rgba(255, 255, 255, .25) 0 20%, transparent 38%, rgba(0, 0, 0, .22) 100%), linear-gradient(180deg, var(--c) 0 14%, var(--verre) 14% 46%, #f6efdf 46% 84%, var(--verre) 84% 100%); }
/* Aile d'un angle : bouteilles couchées, vues de profil, le goulot vers l'allée */
.btl.couche .rond { aspect-ratio: 3 / 1; max-width: 92px; margin: auto; padding-right: 34%; font-size: clamp(10px, 14cqw, 13px); }
.btl.couche.vers-gauche .rond { padding-right: 0; padding-left: 34%; }
.btl.couche .rond::before { clip-path: polygon(1% 12%, 3% 8%, 58% 8%, 63% 12%, 74% 34%, 80% 37%, 100% 37%, 100% 63%, 80% 63%, 74% 66%, 63% 88%, 58% 92%, 3% 92%, 1% 88%);
  background: linear-gradient(180deg, rgba(255, 255, 255, .25) 0 22%, transparent 42%, rgba(0, 0, 0, .22) 100%), linear-gradient(90deg, var(--verre) 0 13%, #f6efdf 13% 53%, var(--verre) 53% 86%, var(--c) 86% 100%); }
.btl.couche.vers-gauche .rond::before { transform: scaleX(-1); }
.btl.debout .rond u, .btl.couche .rond u, .btl.debout .rond i.prop, .btl.couche .rond i.prop { width: 13px; min-width: 0; }
.btl.debout .rond .fmt { right: -7px; bottom: 2px; }
.btl.debout.libre .rond, .btl.couche.libre .rond { background: rgba(110, 75, 30, .08); border: 2px dashed rgba(110, 75, 30, .4); padding: 0; color: rgba(110, 75, 30, .65); }
.btl.debout.libre .rond { margin: 0 auto 3px; }
.btl.debout.libre .rond::before, .btl.couche.libre .rond::before { display: none; }
/* Angle : toutes les bouteilles en ronds. Le virage se lit dans l'ombre côté mur et dans les petits repères du haut de la pile
   (une bouteille couchée sur l'aile, tournée de 60 puis 30 degrés dans le virage, un point de face). */
.etagere.m-angle { background: linear-gradient(90deg, rgba(110, 75, 30, .2), transparent 62%), linear-gradient(180deg, var(--bois-1), var(--bois-2)); }
.etagere.m-angle.miroir { background: linear-gradient(270deg, rgba(110, 75, 30, .2), transparent 62%), linear-gradient(180deg, var(--bois-1), var(--bois-2)); }
.tete-col.picto { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px; padding-top: 5px; }
.tete-col.picto i { display: block; width: 24px; height: 8px; margin: 5px 0 6px; background: var(--bois-encre); clip-path: polygon(1% 12%, 3% 8%, 58% 8%, 63% 12%, 74% 34%, 80% 37%, 100% 37%, 100% 63%, 80% 63%, 74% 66%, 63% 88%, 58% 92%, 3% 92%, 1% 88%); }
.tete-col.picto i.b1 { transform: rotate(30deg); } .tete-col.picto i.b2 { transform: rotate(60deg); }
.tete-col.picto i.b0.vers-gauche { transform: rotate(180deg); } .tete-col.picto i.b1.vers-gauche { transform: rotate(150deg); } .tete-col.picto i.b2.vers-gauche { transform: rotate(120deg); }
.tete-col.picto i.b3 { width: 9px; height: 9px; margin: 4.5px 0 5.5px; border-radius: 50%; clip-path: none; }
/* Bouteille trop petite pour porter un nom lisible : on ne garde que le millésime (le nom s'affiche au toucher). */
@container (max-width: 43px) { .btl > span:not(.groupe) { visibility: hidden; } .btl .rond u, .btl .rond i.prop { border-width: 1px; } }
@keyframes pouls { 50% { outline-offset: 7px; } }
@media (prefers-reduced-motion: reduce) { .btl .rond.cible { animation: none; } }

/* Bandeau du bas : bouteille choisie, bouteilles à ranger */
.main { position: fixed; left: 12px; right: 12px; bottom: calc(92px + env(safe-area-inset-bottom)); z-index: 25; max-width: 620px; margin: 0 auto; background: var(--surface); border: 1px solid var(--trait); border-radius: 16px; padding: 12px 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; box-shadow: 0 12px 32px rgba(60, 40, 20, .28); }
.main .corps { flex: 1 1 100%; min-width: 0; font-size: 14px; line-height: 1.3; color: var(--texte-2); }
.main .corps b { display: block; font: 600 18px/1.2 var(--serif); color: var(--texte); margin-bottom: 2px; }
.main .btn { flex: 1 1 0; min-height: 46px; padding: 0 10px; font-size: 15px; }
.main.choisie .btn.plein { flex: 1.4 1 0; }
.main.choisie { transition: transform .18s ease, opacity .18s ease; }
.main.choisie .corps { padding-right: 34px; }
.main .fermer { position: absolute; top: 5px; right: 5px; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--texte-2); font: 400 26px/1 var(--sans); cursor: pointer; }
.main .fermer:hover { background: color-mix(in srgb, var(--texte) 8%, transparent); color: var(--texte); }
@media (hover: none) { .main.choisie { padding-top: 17px; } .main.choisie::before { content: ""; position: absolute; top: 6px; left: 50%; width: 38px; height: 4px; margin-left: -19px; border-radius: 2px; background: var(--trait); } }
main.vue:has(.main) { padding-bottom: calc(250px + env(safe-area-inset-bottom)); }

/* ---------- Feuille (panneau du bas) : une grande étiquette ---------- */
.voile { position: fixed; inset: 0; z-index: 40; background: rgba(42, 29, 19, .45); display: flex; align-items: flex-end; justify-content: center; animation: fondu .15s ease-out; }
.feuille { width: 100%; max-width: 560px; max-height: 92dvh; display: flex; flex-direction: column; background: var(--surface); border-radius: 18px 18px 0 0; border: 1px solid var(--trait); border-bottom: 0; box-shadow: 0 -10px 40px rgba(60, 40, 20, .25); animation: monte .2s ease-out; }
.feuille > header { display: flex; align-items: center; gap: 8px; padding: 16px 10px 8px 20px; border-bottom: 1px solid color-mix(in srgb, var(--texte-2) 25%, transparent); margin-bottom: 4px; }
.feuille > header h2 { flex: 1; min-width: 0; }
.feuille > .contenu { overflow-y: auto; padding: 12px 20px calc(22px + env(safe-area-inset-bottom)); overscroll-behavior: contain; }
.feuille .actions { display: grid; gap: 10px; margin-top: 16px; }
.feuille .actions.deux { grid-template-columns: 1fr 1fr; }
@media (min-width: 700px) { .voile { align-items: center; } .feuille { border-radius: 18px; border-bottom: 1px solid var(--trait); max-height: 86dvh; } }
@keyframes fondu { from { opacity: 0; } } @keyframes monte { from { transform: translateY(24px); opacity: .6; } }
@media (prefers-reduced-motion: reduce) { .voile, .feuille { animation: none; } }

/* ---------- Fiche vin ---------- */
.fiche-tete { display: flex; gap: 14px; align-items: flex-start; }
.fiche-tete button.etiquette { width: 86px; height: 114px; border-radius: 6px; border: 1px solid var(--trait); flex: none; background: var(--surface-2); padding: 0; overflow: hidden; box-shadow: 0 4px 10px rgba(0, 0, 0, .25); }
.fiche-tete button.etiquette img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fiche-tete .etiquette.dessinee { position: relative; flex: none; width: 86px; height: 114px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  padding: 14px 7px 9px; overflow: hidden; border-radius: 4px; border: 1px solid #d9c9a8; color: #2a1d13; text-align: center; font-family: var(--serif);
  background: radial-gradient(ellipse at 50% 40%, #fffdf6, #f3e9d3 75%, #e9dcc0); box-shadow: 0 4px 10px rgba(60, 40, 20, .2), inset 0 0 0 3px #fffdf6, inset 0 0 0 4px color-mix(in srgb, var(--c) 45%, #c9b58e); }
.fiche-tete button.etiquette.dessinee { cursor: pointer; }
.etiquette.dessinee .capsule { position: absolute; top: 0; left: 0; right: 0; height: 6px; background: var(--c); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .2); }
.etiquette.dessinee .domaine { font-weight: 700; line-height: 1.05; font-size: clamp(9.5px, calc(150px / var(--l)), 14px); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.etiquette.dessinee .cuvee { font-style: italic; font-size: 9.5px; line-height: 1.1; color: #5a4632; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.etiquette.dessinee .filet { width: 26px; height: 1px; margin: 2px 0; background: color-mix(in srgb, var(--c) 60%, #8a7650); }
.etiquette.dessinee .app { font: 600 7.5px/1.15 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: #6b5638; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.etiquette.dessinee .annee { font-weight: 700; font-size: 12px; font-variant-numeric: lining-nums; margin-top: 1px; }
.etiquette.dessinee .ajout { position: absolute; left: 0; right: 0; bottom: 0; padding: 2px 0 3px; font: 600 9.5px var(--sans); color: #fff; background: rgba(42, 29, 19, .62); opacity: 0; transition: opacity .15s; }
.etiquette.dessinee:hover .ajout, .etiquette.dessinee:focus-visible .ajout { opacity: 1; }
@media (hover: none) { .etiquette.dessinee .ajout { opacity: 1; } }
.fiche-tete button.etiquette.web { background: #fff; } .fiche-tete button.etiquette.web img { object-fit: contain; }
.fiche-tete .corps { flex: 1; min-width: 0; }
.fiche-tete .appellation { font: italic 17px var(--serif); color: var(--texte-2); margin-top: 2px; }
.etiquettes { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 9px; }
.tag { font-size: 12.5px; padding: 3px 9px; border-radius: 9px; background: var(--surface-2); color: var(--texte-2); display: inline-flex; align-items: center; gap: 6px; }
.tag .pastille { width: 11px; height: 11px; }
.plats { display: flex; flex-wrap: wrap; gap: 6px; }
.plats span { font: 15px var(--serif); padding: 5px 12px; border-radius: 14px; background: var(--surface-2); }
.etoiles { display: inline-flex; gap: 2px; }
.etoiles button { border: 0; background: none; padding: 4px; font-size: 28px; line-height: 1; color: color-mix(in srgb, var(--texte-2) 35%, transparent); }
.etoiles button[aria-pressed="true"] { color: #c8962a; }
.photo-plein { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .92); display: grid; place-items: center; padding: 16px; }
.photo-plein img { max-width: 100%; max-height: 100%; border-radius: 8px; }
.vignettes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.vignettes button { position: relative; padding: 0; border: 1px solid var(--trait); border-radius: 8px; overflow: hidden; background: #fff; aspect-ratio: 3 / 4; }
.vignettes button:hover { border-color: var(--accent); }
.vignettes img { width: 100%; height: 100%; object-fit: contain; display: block; }
.vignettes span { position: absolute; left: 0; right: 0; bottom: 0; font-size: 11px; font-weight: 600; padding: 3px 4px; background: var(--ok); color: #fff; }

/* ---------- Scanner ---------- */
.viseur { position: relative; background: #000; border-radius: var(--rayon); overflow: hidden; aspect-ratio: 3 / 4; max-height: 62dvh; margin: 0 auto; width: 100%; max-width: 520px; box-shadow: 0 8px 22px rgba(60, 40, 20, .2); }
.viseur video { width: 100%; height: 100%; object-fit: cover; display: block; }
.viseur .cadre { position: absolute; inset: 13% 9% 20%; border: 2px solid rgba(255, 236, 200, .8); border-radius: 14px; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .34); pointer-events: none; }
.viseur .aide { position: absolute; left: 0; right: 0; top: 12px; text-align: center; color: #fff; font-size: 14px; text-shadow: 0 1px 3px #000; padding: 0 12px; pointer-events: none; }
.viseur .declencheur { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); width: 70px; height: 70px; border-radius: 50%; border: 4px solid #fff; background: rgba(255, 255, 255, .25); padding: 0; }
.viseur .declencheur::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: #fff; }
.viseur .declencheur:active::after { inset: 9px; }
.viseur .travail { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .6); color: #fff; text-align: center; padding: 20px; }
.tourne { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .3); border-top-color: #fff; animation: tourne .8s linear infinite; margin: 0 auto 12px; }
@keyframes tourne { to { transform: rotate(360deg); } }
.lus { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 14px; }
/* Suggestions à la saisie d'un nouveau vin : une liste qui flotte sous le champ, sans déplacer le reste de la fiche */
.ancre-suggestions { position: relative; }
.suggestions { position: absolute; left: 0; right: 0; top: calc(100% - 3px); z-index: 8; display: flex; flex-direction: column; max-height: min(336px, 46dvh); overflow-y: auto; overscroll-behavior: contain;
  border: 1px solid var(--trait); border-radius: 12px; background: var(--fond); box-shadow: 0 12px 28px rgba(60, 40, 20, .22); }
.suggestions[hidden] { display: none; }
.suggestions button { flex: none; display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 0; background: none; color: var(--texte); text-align: left; cursor: pointer; }
.suggestions button + button { border-top: 1px dashed color-mix(in srgb, var(--texte-2) 35%, transparent); }
.suggestions button:hover, .suggestions button.actif { background: var(--surface-2); }
.suggestions b { display: block; font: 600 15.5px/1.2 var(--serif); } .suggestions small { display: block; font-size: 12.5px; color: var(--texte-2); }
.lus button { font: 14.5px var(--serif); padding: 5px 11px; border-radius: 8px; border: 1px dashed color-mix(in srgb, var(--texte-2) 60%, transparent); background: var(--fond); color: var(--texte); text-align: left; }
.auto { display: flex; align-items: center; gap: 10px; margin: 12px auto 0; max-width: 760px; font-size: 14.5px; flex-wrap: wrap; }
.auto select { width: auto; flex: 1; min-width: 0; }

/* ---------- Divers ---------- */
#toasts { position: fixed; left: 0; right: 0; bottom: calc(100px + env(safe-area-inset-bottom)); z-index: 70; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 12px; }
body:has(.main) #toasts { bottom: calc(290px + env(safe-area-inset-bottom)); }
.toast { pointer-events: auto; max-width: 520px; background: var(--texte); color: #fff; border: 1px solid var(--texte); padding: 11px 15px; border-radius: 12px; font-size: 14.5px; display: flex; align-items: center; gap: 14px; box-shadow: 0 10px 28px rgba(60, 40, 20, .3); animation: monte .2s ease-out; }
.toast.erreur { background: #8f2434; border-color: #6d1826; color: #fff3ec; }
.toast button { border: 0; background: none; color: #ffd9a0; font-weight: 700; text-decoration: underline; padding: 4px; flex: none; }
.connexion { min-height: 100dvh; display: grid; place-items: center; padding: 20px; }
.connexion .arche { width: 100%; max-width: 380px; text-align: center; background: var(--surface); border: 1px solid var(--trait); border-radius: 180px 180px 16px 16px; padding: 56px 28px 30px; box-shadow: 0 18px 44px rgba(60, 40, 20, .18); }
.connexion .logo { width: 76px; height: 76px; margin: 0 auto 14px; border-radius: 20px; box-shadow: 0 6px 16px rgba(0, 0, 0, .3); }
.connexion h1 { margin-bottom: 4px; color: var(--texte); } .connexion p { color: var(--texte-2); font: italic 15px var(--serif); margin-bottom: 22px; }
.connexion .erreur { color: var(--danger); min-height: 22px; margin: 10px 0 0; font-size: 14px; font-style: normal; font-family: var(--sans); }
.tableau { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tableau th { text-align: left; color: var(--texte-2); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--trait); white-space: nowrap; }
.tableau td { padding: 7px 8px; border-bottom: 1px solid var(--trait); vertical-align: top; }
.defilant { overflow-x: auto; margin: 0 -14px; padding: 0 14px; }
.alerte { color: var(--alerte); font-size: 12.5px; }
code.copie { display: block; padding: 10px 12px; border-radius: 10px; background: var(--fond); border: 1px solid var(--trait); font: 13px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; user-select: all; }
details > summary { cursor: pointer; color: var(--or); font-weight: 600; padding: 8px 0; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: "+ "; } details[open] > summary::before { content: "- "; }
hr { border: 0; border-top: 1px solid var(--trait); margin: 16px 0; }

/* ---------- Écran large (tablette, ordinateur) ---------- */
@media (min-width: 820px) {
  main.vue { padding-top: 26px; }
  main.vue.large { max-width: 1320px; margin: 0 auto; padding-left: 28px; padding-right: 28px; }
  h1 { font-size: 36px; }
  .meubles { gap: 22px; max-width: 1100px; margin: 6px auto 0; }
  .meuble-carte { padding: 22px 20px 20px; gap: 7px; }
  .meuble-carte .titre { font-size: 28px; } .meuble-carte .nb { font-size: 34px; } .meuble-carte .nb small, .meuble-carte .libres { font-size: 14px; }
  .silhouette { --h: 220px; }
  .situation { margin: -26px -28px 10px; padding: 7px 28px 6px; justify-content: center; }
  /* Les piles du meuble côte à côte, posées au sol comme dans la cave, bouteilles de même taille partout. */
  .raccourcis { display: none; }
  .meuble { display: grid; grid-template-columns: var(--gabarit); gap: 8px 18px; align-items: stretch; margin: 0 auto;
    max-width: calc(var(--total) * 70px + var(--piles) * 18px); }
  .tete-pile { grid-column: var(--col); grid-row: 1; margin: 0; align-self: end; }
  .casier { grid-column: var(--col); grid-row: var(--rang); }
  .etagere { max-width: none; }
  .casier .etagere { width: calc(100% * var(--part, 1)); margin: 0 auto; }
  .viseur { aspect-ratio: 4 / 3; max-width: 760px; max-height: 64dvh; }
}

/* Critique et cote */
.notes-critique { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 4px; }
.notes-critique b { display: inline-block; min-width: 64px; }
.notes-critique a, .critique p a { color: inherit; }
.plats.annees span.le-sien { background: var(--accent, #8f1f3a); color: #fff; border-color: transparent; }

/* Mes vins : filtres sur le côté (tablette, ordinateur), dans une feuille sur téléphone. */
main.vue.moyen { max-width: 1180px; }
.vins-cadre { display: block; }
.cote-filtres { display: none; }
.barre-recherche { margin-bottom: 10px; flex-wrap: wrap; }
.barre-recherche input[type=search] { flex: 1 1 100%; }
@media (min-width: 600px) { .barre-recherche { flex-wrap: nowrap; } .barre-recherche input[type=search] { flex: 1 1 auto; } }
.barre-recherche select { width: auto; flex: none; }
.ouvrir-filtres { flex: none; min-height: 44px; }
.ouvrir-filtres svg { width: 18px; height: 18px; }
.puces-actives { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.puces-actives[hidden] { display: none; }
@media (min-width: 900px) {
  .vins-cadre { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 24px; align-items: start; }
  .cote-filtres { display: block; position: sticky; top: 12px; max-height: calc(100dvh - 130px - env(safe-area-inset-bottom)); overflow-y: auto; scrollbar-width: thin;
    background: var(--surface); border: 1px solid var(--trait); border-radius: var(--rayon); padding: 14px 14px 10px; }
  .ouvrir-filtres { display: none; }
}
.tete-filtres { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 4px; }
.tete-filtres h2 { margin: 0; font: 600 20px/1.2 var(--titres); }
.groupe-filtre { padding: 12px 0 8px; border-top: 1px solid var(--trait); }
.groupe-filtre:first-of-type { border-top: 0; }
.groupe-filtre h3 { margin: 0 0 6px; font: 700 11.5px var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--texte-2); }
.liste-choix { display: grid; gap: 1px; }
.choix { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 36px; padding: 4px 6px; border: 0; border-radius: 8px; background: none; text-align: left; font-size: 15px; }
.choix:hover:not(:disabled) { background: var(--surface-2); }
.choix:disabled { opacity: .4; cursor: default; }
.choix .case { flex: none; width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--bois-3); background: var(--fond); display: grid; place-items: center; }
.choix[aria-pressed="true"] .case { background: var(--accent); border-color: var(--accent); }
.choix[aria-pressed="true"] .case::after { content: ""; width: 9px; height: 5px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); }
.choix[aria-pressed="true"] .lib { font-weight: 700; }
.choix i.pt { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25); }
.choix .lib { flex: 1; min-width: 0; }
.choix .n { color: var(--texte-2); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.carte-france { display: block; width: 100%; max-width: 300px; height: auto; margin: 2px auto 8px; }
.carte-france .contour path { fill: none; stroke: var(--bois-3); stroke-width: 2.2; stroke-linejoin: round; }
.carte-france path { stroke-linejoin: round; }
.carte-france .neutre { fill: var(--surface-2); stroke: var(--surface-2); stroke-width: .6; }
.carte-france .vignoble { fill: #eadcc4; stroke: #eadcc4; stroke-width: .6; }
.carte-france .present { fill: color-mix(in srgb, var(--accent) var(--force, 50%), #f3e7d3); stroke: color-mix(in srgb, var(--accent) var(--force, 50%), #f3e7d3); stroke-width: .6; cursor: pointer; transition: filter .12s; }
.carte-france .present:hover { filter: brightness(1.12); }
.carte-france .choisi { fill: var(--texte); stroke: var(--texte); stroke-width: .6; cursor: pointer; }
.carte-france .bulles g { cursor: pointer; }
.carte-france .bulles circle { fill: var(--fond); stroke: var(--accent); stroke-width: 1.4; }
.carte-france .bulles text { font: 700 10px var(--sans); fill: var(--accent); pointer-events: none; }
.carte-france .bulles g.choisi circle { fill: var(--accent); stroke: #fff; }
.carte-france .bulles g.choisi text { fill: #fff; }
.feuille .filtres .tete-filtres h2 { display: none; }
.filtres .voir-resultats { position: sticky; bottom: 0; padding: 12px 0 2px; background: linear-gradient(transparent, var(--surface) 30%); }

/* Glisser-déposer des bouteilles */
.btl .rond { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.btl .rond.glisse { opacity: .3; }
.rond.fantome { position: fixed; left: 0; top: 0; z-index: 1000; pointer-events: none; margin: 0; display: grid; place-items: center; border-radius: 50%;
  box-shadow: 0 10px 24px rgba(40, 20, 10, .35); transition: none; }
body.en-glisse, body.en-glisse * { cursor: grabbing !important; -webkit-user-select: none; user-select: none; }
.btl .rond.survol { outline: 3px solid var(--accent); outline-offset: 3px; }
.situation .mini.survol { opacity: 1; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent); transform: scale(1.06); }

/* Tableau de bord de la cave */
.tableau-bord { margin-top: 26px; }
.tb-titre { margin: 0 2px 12px; font: 600 24px/1.2 var(--titres); }
.tb-tuiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
@media (min-width: 820px) { .tb-tuiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tb-tuile { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--trait); border-radius: var(--rayon); background: var(--surface); }
.tb-tuile .lib { font: 700 11.5px var(--sans); letter-spacing: .07em; text-transform: uppercase; color: var(--texte-2); }
.tb-tuile b { font: 600 30px/1.15 var(--titres); color: var(--texte); }
.tb-tuile .detail { font-size: 13px; color: var(--texte-2); }
.tb-grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; align-items: start; }
.tb-carte header { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.tableau-bord .tb-carte h3 { margin: 0; font: 600 18px/1.2 var(--serif); text-transform: none; letter-spacing: 0; color: var(--texte); white-space: nowrap; }
.tb-carte header .discret { font-size: 12.5px; text-align: right; }
.tb-carte > .discret { margin-top: 8px; font-size: 13px; }
.barres { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.barres .ligne-barre { display: grid; grid-template-columns: minmax(110px, 46%) 1fr 34px; align-items: center; gap: 10px; width: 100%; padding: 3px 4px; margin: 0 -4px; border: 0; border-radius: 6px; background: none; text-align: left; font-size: 14px; color: inherit; }
button.ligne-barre:hover { background: var(--surface-2); }
.barres .nom { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.barres .piste { height: 12px; display: flex; align-items: center; }
.barres .piste i { display: block; height: 10px; border-radius: 0 4px 4px 0; background: var(--c); }
.barres .piste i.clair { box-shadow: inset 0 0 0 1px rgba(60, 40, 20, .28); }
button.ligne-barre:hover .nom { font-weight: 600; }
.barres .val { text-align: right; color: var(--texte-2); }
.tb-millesimes .colonnes { display: flex; align-items: flex-end; gap: 3px; height: 150px; padding-top: 14px; border-bottom: 1px solid var(--trait); }
.tb-millesimes .col { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; }
.tb-millesimes .col i { display: block; width: 100%; max-width: 22px; border-radius: 4px 4px 0 0; background: var(--accent); }
.tb-millesimes .col:hover i { background: var(--accent-fort); }
.tb-millesimes .col .n { font-size: 11px; color: var(--texte-2); line-height: 1.2; }
.tb-millesimes .col .an { position: absolute; bottom: -18px; font-size: 10px; color: var(--texte-2); white-space: nowrap; }
.tb-millesimes .colonnes { margin-bottom: 22px; }
.tb-precieuses { margin: 0; padding: 0; list-style: none; counter-reset: rang; display: grid; gap: 8px; }
.tb-precieuses li { counter-increment: rang; display: grid; grid-template-columns: 22px 1fr auto auto; gap: 8px; align-items: baseline; font-size: 14.5px; }
.tb-precieuses li::before { content: counter(rang); font: 600 15px var(--titres); color: var(--or); }
.tb-precieuses a { color: var(--texte); text-decoration: none; }
.tb-precieuses a:hover { text-decoration: underline; }
.tb-note { margin: 12px 2px 0; font-size: 12.5px; }
.tb-precieuses a small { display: block; font-size: 12.5px; color: var(--texte-2); }
button.tb-tuile { text-align: left; font: inherit; cursor: pointer; }
button.tb-tuile:hover { border-color: var(--bois-3); box-shadow: 0 4px 12px rgba(60, 40, 20, .08); }
.tb-millesimes .col { border: 0; background: none; padding: 0; cursor: pointer; }
.tb-anneau { display: grid; grid-template-columns: 150px 1fr; gap: 14px; align-items: center; }
.tb-anneau .anneau { width: 150px; height: 150px; }
.anneau .part { cursor: pointer; transition: stroke-width .12s; }
.anneau .part:hover { stroke-width: 24; }
.anneau .part.clair { filter: drop-shadow(0 0 .5px rgba(60, 40, 20, .6)); }
.anneau .centre-n { font: 600 26px var(--titres); fill: var(--texte); }
.anneau .centre-l { font: 600 10px var(--sans); fill: var(--texte-2); letter-spacing: .06em; text-transform: uppercase; }
.legende { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.legende button { display: grid; grid-template-columns: 12px 1fr auto 40px; align-items: center; gap: 8px; width: 100%; padding: 3px 4px; border: 0; border-radius: 6px; background: none; text-align: left; font-size: 14px; }
.legende button:hover { background: var(--surface-2); }
.legende .pt { width: 11px; height: 11px; border-radius: 50%; background: var(--c); }
.legende .pt.clair { box-shadow: inset 0 0 0 1px rgba(60, 40, 20, .3); }
.legende .val { font-weight: 600; }
.legende .pc { color: var(--texte-2); text-align: right; font-size: 12.5px; }
.tb-frise .segments { display: flex; gap: 2px; height: 34px; margin-bottom: 12px; }
.tb-frise .seg { flex-basis: 0; min-width: 6px; border: 0; padding: 0; background: var(--c); color: #fff; font: 700 13px var(--sans); cursor: pointer; }
.tb-frise .seg:first-child { border-radius: 6px 0 0 6px; } .tb-frise .seg:last-child { border-radius: 0 6px 6px 0; }
.tb-frise .seg:hover { filter: brightness(1.1); }
.tb-carte-france { max-width: 230px; margin: 0 auto 10px; }
.tb-carte-france .present { cursor: pointer; }
@media (max-width: 420px) { .tb-anneau { grid-template-columns: 1fr; justify-items: center; } .tb-anneau .legende { width: 100%; } }

/* Points de position des piles (téléphone) */
.points-piles { display: flex; justify-content: center; gap: 10px; margin: -2px 0 10px; }
.points-piles .point { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 50%; background: var(--bois-3); opacity: .45; box-sizing: content-box; background-clip: content-box; padding: 8px 4px; }
.points-piles .point[aria-selected="true"] { opacity: 1; background-color: var(--accent); width: 22px; border-radius: 5px; }
.points-piles .point.signale { box-shadow: inset 0 0 0 2px var(--or); }
.tb-nm { display: block; margin-top: 6px; padding: 0; text-align: left; font-size: 13.5px; white-space: normal; }

/* Carte des vignobles à zoom (filtres de « Mes vins », tableau de bord) */
.carte-vignobles { margin: 2px 0 8px; }
.fil-carte { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-bottom: 4px; font-size: 13px; }
.fil-carte button { border: 0; background: none; padding: 2px 4px; border-radius: 5px; color: var(--or); font-weight: 600; }
.fil-carte button[aria-current="true"] { color: var(--texte); cursor: default; }
.fil-carte .sep { color: var(--texte-2); }
.cadre-carte { position: relative; }
svg.vignobles { display: block; width: 100%; height: auto; aspect-ratio: 308 / 297; background: color-mix(in srgb, #cfe0e6 35%, var(--surface)); border-radius: 10px; }
svg.vignobles path { vector-effect: non-scaling-stroke; stroke-linejoin: round; }
svg.vignobles .pays .neutre { fill: #ece4d6; stroke: #d8cbb4; stroke-width: .6; }
svg.vignobles .pays .present { fill: color-mix(in srgb, var(--accent) var(--force, 50%), #f3e7d3); stroke: #d8cbb4; stroke-width: .6; cursor: pointer; }
svg.vignobles .contour path { fill: none; stroke: var(--bois-3); stroke-width: 2.2; }
svg.vignobles .france .neutre { fill: var(--surface-2); stroke: var(--surface-2); stroke-width: .6; }
svg.vignobles .france .vignoble { fill: #eadcc4; stroke: #eadcc4; stroke-width: .6; }
svg.vignobles .france .present { fill: color-mix(in srgb, var(--accent) var(--force, 50%), #f3e7d3); stroke: color-mix(in srgb, var(--accent) var(--force, 50%), #f3e7d3); stroke-width: .6; cursor: pointer; }
svg.vignobles .france .choisi { fill: var(--texte); stroke: var(--texte); stroke-width: .6; cursor: pointer; }
svg.vignobles .france .estompe { fill: #efe6d6; stroke: #e2d5bf; stroke-width: .6; }
svg.vignobles.niveau-region .france path:not(.estompe) { stroke: #fff; stroke-width: 1; }
svg.vignobles .france .present:hover, svg.vignobles .pays .present:hover { filter: brightness(1.1); }
svg.vignobles .bulle { cursor: pointer; }
svg.vignobles .bulle circle { fill: var(--fond); stroke: var(--accent); stroke-width: 1.4; vector-effect: non-scaling-stroke; }
svg.vignobles .bulle text { font-family: var(--sans); font-weight: 700; fill: var(--accent); pointer-events: none; }
svg.vignobles .bulle text.nom { font-weight: 600; fill: var(--texte); paint-order: stroke; stroke: var(--fond); stroke-width: 2.5px; stroke-linejoin: round; }
svg.vignobles .bulle.choisi circle { fill: var(--accent); stroke: #fff; }
svg.vignobles .bulle.choisi text:not(.nom) { fill: #fff; }
svg.vignobles .bulle:hover circle { stroke-width: 2.4; }
.encarts { position: absolute; left: 6px; top: 6px; display: flex; gap: 6px; }
.encart { display: flex; flex-direction: row; align-items: center; gap: 6px; padding: 4px 8px 4px 5px; border: 1px solid var(--trait); border-radius: 8px; background: var(--fond); font-size: 10.5px; font-weight: 600; color: var(--texte-2); box-shadow: 0 2px 6px rgba(60, 40, 20, .12); }
.encart.choisi { border-color: var(--accent); color: var(--accent); }
.encart svg { display: block; }
.encart path { vector-effect: non-scaling-stroke; fill: color-mix(in srgb, var(--accent) 55%, #f3e7d3); stroke: #d8cbb4; stroke-width: .6; }
.encart path.choisi { fill: var(--texte); }
.encart .bulle circle { fill: var(--fond); stroke: var(--accent); stroke-width: 1.2; }
.encart .bulle text { font-family: var(--sans); font-weight: 700; fill: var(--accent); }
.voir-zone { display: block; margin: 6px 0 0; padding: 0; font-size: 14px; }

/* Meubles de l'accueil : une pastille par place, à la couleur du vin qui l'occupe */
.silhouette.detaille .pile-s > i { position: relative; display: block; overflow: hidden; background: linear-gradient(180deg, var(--bois-1), var(--bois-2)) !important; padding: 4% 5%; }
.silhouette.detaille .pile-s > i::before, .silhouette.detaille .pile-s > i::after { display: none !important; }
.silhouette.detaille .pile-s.angle.miroir .m-angle { transform: none; }
.silhouette.detaille .places { display: grid; width: 100%; height: 100%; }
.silhouette.detaille .places b { display: block; min-width: 0; min-height: 0; }
.silhouette.detaille .places b.p-pleine { background: radial-gradient(circle closest-side, color-mix(in srgb, var(--c) 82%, #fff) 0 30%, var(--c) 62%, color-mix(in srgb, var(--c) 78%, #000) 80%, transparent 84%); }
.silhouette.detaille .places b.p-vide { background: radial-gradient(circle closest-side, transparent 0 66%, rgba(110, 75, 30, .32) 70% 78%, transparent 82%); }
.silhouette.detaille.anime .places b.p-pleine { animation: pastille .45s cubic-bezier(.3, 1.6, .5, 1) both; animation-delay: calc(var(--r) * 3ms); }
@keyframes pastille { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .silhouette.detaille.anime .places b.p-pleine { animation: none; } }
.silhouette.detaille .pile-s > i { flex-basis: 0 !important; }
.silhouette.detaille .places.vrac { display: flex; flex-direction: column; gap: 0; }
.silhouette.detaille .places.vrac .case { flex: 1; min-height: 0; display: flex; flex-wrap: wrap-reverse; align-content: flex-start; align-items: flex-end; justify-content: center; gap: 4% 6%; padding: 6% 12% 1px;
  border-bottom: 3px solid var(--bois-3); box-shadow: 0 1px 0 rgba(110, 75, 30, .25); }
.silhouette.detaille .places.vrac .case b { flex: none; width: 24%; max-width: 13px; aspect-ratio: 1; }
svg.vignobles { touch-action: pan-y; cursor: grab; }
svg.vignobles.niveau-region, svg.vignobles.niveau-pays, svg.vignobles.libre { touch-action: none; }
svg.vignobles.deplace { cursor: grabbing; }
svg.vignobles .france .zoomee, svg.vignobles .pays .zoomee { fill: color-mix(in srgb, var(--accent) 16%, #f6ecdc); stroke: #fff; stroke-width: 1; }
svg.vignobles .bulle.groupe .halo { fill: none; stroke: var(--accent); stroke-width: 1; stroke-dasharray: 2 2; vector-effect: non-scaling-stroke; }
.zoom-carte { position: absolute; right: 6px; top: 6px; display: flex; flex-direction: column; gap: 4px; }
.zoom-carte button { width: 30px; height: 30px; padding: 0; border: 1px solid var(--trait); border-radius: 8px; background: var(--fond); color: var(--texte); font: 600 18px/1 var(--sans); box-shadow: 0 1px 3px rgba(60, 40, 20, .12); }
.zoom-carte button:hover { border-color: var(--bois-3); }
svg.vignobles .eaux path { fill: none; stroke: #8db4cc; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; pointer-events: none; }
svg.vignobles .eaux .r1 { stroke-width: 1.4; }
svg.vignobles .eaux .r2 { stroke-width: .8; opacity: .85; }
svg.vignobles.detail .france path { stroke: rgba(110, 75, 30, .38); stroke-width: .8; }
svg.vignobles.detail .france path.zoomee { stroke: rgba(110, 75, 30, .45); }
svg.vignobles .noms-dep text { font-family: var(--sans); font-weight: 600; letter-spacing: .08em; fill: rgba(90, 65, 35, .55); pointer-events: none; }
svg.vignobles .villes circle { fill: var(--texte-2); }
svg.vignobles .villes text { font-family: var(--sans); font-weight: 500; fill: var(--texte-2); paint-order: stroke; stroke: rgba(255, 253, 248, .85); stroke-linejoin: round; pointer-events: none; }
.carte-plein-ecran { position: fixed; inset: 0; z-index: 900; display: grid; place-items: center; padding: 16px; background: rgba(42, 29, 19, .45); }
.carte-plein-ecran .boite-carte { max-width: 100%; padding: 10px 12px 12px; border-radius: 16px; background: var(--surface); box-shadow: 0 20px 50px rgba(30, 15, 5, .35); }
.carte-plein-ecran header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; font: 600 18px var(--titres); }
.carte-plein-ecran .fermer { width: 36px; height: 36px; border: 0; background: none; font-size: 26px; line-height: 1; color: var(--texte-2); }
.carte-plein-ecran .zoom-carte button { width: 36px; height: 36px; }
svg.vignobles .aires path { vector-effect: non-scaling-stroke; stroke-linejoin: round; }
svg.vignobles .aires .aire { fill: none; stroke: rgba(110, 75, 30, .22); stroke-width: .5; pointer-events: none; }
svg.vignobles .aires .aire.presente { fill: color-mix(in srgb, var(--accent) var(--force, 45%), transparent); stroke: none; pointer-events: visiblePainted; cursor: pointer; }
svg.vignobles .aires .aire.presente.grande { fill: color-mix(in srgb, var(--accent) 9%, transparent); pointer-events: none; }
svg.vignobles .aires .aire.presente:not(.grande):hover { fill: color-mix(in srgb, var(--accent) 85%, transparent); }
svg.vignobles .aires .aire.choisie { stroke: var(--texte); stroke-width: 1.2; }
.etagere.vrac .case.case-vide { align-content: center; }
.etagere.vrac .case.case-vide > .btl { grid-column: 2; }
@media (min-width: 820px) { .points-piles { display: none; } }
.tb-carte { container-type: inline-size; overflow: hidden; }
@container (max-width: 430px) { .tb-anneau { grid-template-columns: 1fr; justify-items: center; } .tb-anneau .legende { width: 100%; } }
.pour-plat { margin-bottom: 14px; }
/* Ligne d'un vin proposé pour un plat */
.ligne-accord .raison { margin-top: 4px; font-size: 14px; color: var(--texte); }
.ligne-accord .pct { display: inline-block; min-width: 46px; padding: 1px 8px; border-radius: 10px; background: var(--surface-2); color: var(--texte-2); font: 700 13px var(--sans); text-align: center; font-variant-numeric: tabular-nums; }
.ligne-accord .pct.fort { background: color-mix(in srgb, var(--accent) 14%, var(--fond)); color: var(--accent); }
.ligne-accord .plat-cite { font-style: italic; }
.ligne-accord .faits { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 7px; }
.ligne-accord .fait { padding: 2px 8px; border-radius: 10px; background: var(--surface-2); color: var(--texte-2); font-size: 12.5px; white-space: nowrap; }
.fiche-tete .assemblage { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; margin: 10px 0 0; font-size: 14.5px; }
.fiche-tete .assemblage dt { color: var(--texte-2); font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding-top: 2px; }
.fiche-tete .assemblage dd { margin: 0; }
.plats-filtre summary { display: flex; align-items: baseline; gap: 8px; cursor: pointer; list-style: none; }
.plats-filtre summary::-webkit-details-marker { display: none; }
.plats-filtre summary h3 { margin: 0; }
.plats-filtre summary::after { content: "›"; margin-left: auto; color: var(--texte-2); transition: transform .15s; }
.plats-filtre[open] summary::after { transform: rotate(90deg); }
.plats-filtre .choisi { font-size: 13px; color: var(--accent); font-weight: 600; }
.plats-filtre .groupe-plats { margin-top: 8px; }
.plats-filtre .puces { display: flex; flex-wrap: wrap; gap: 6px; }
.plats-filtre .puce { min-height: 30px; padding: 0 10px; font-size: 13px; }
.priorite { margin-bottom: 14px; }
.liste-regions summary { cursor: pointer; font-size: 13.5px; color: var(--or); font-weight: 600; margin: 2px 0 4px; }
.etat .estime { font-weight: 500; opacity: .8; }
/* Fin de page : rien ne disparaît sous la barre du bas et son bouton Scanner. */
main.vue { padding-bottom: calc(132px + env(safe-area-inset-bottom)); }
/* Appui long au doigt : un anneau se remplit en 260 ms, puis la bouteille suit le doigt. */
.btl .rond.appui::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; pointer-events: none;
  background: conic-gradient(var(--accent) calc(var(--p, 0) * 1%), transparent 0); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px)); mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
  animation: appui-anneau .26s linear forwards; }
@property --p { syntax: "<number>"; inherits: false; initial-value: 0; }
@keyframes appui-anneau { to { --p: 100; } }
.btl .rond.appui { transform: scale(.94); transition: transform .26s; }
.cette-bouteille .carte { border-color: color-mix(in srgb, var(--accent) 35%, var(--trait)); }
.a-verifier { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 12px 0; padding: 12px 14px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--alerte) 45%, var(--trait)); background: color-mix(in srgb, var(--alerte) 9%, var(--fond)); }
.a-verifier .texte { flex: 1 1 260px; display: flex; flex-direction: column; gap: 2px; font-size: 14.5px; }
.a-verifier .texte b { font-size: 11.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--alerte); }
.verifier li { padding-bottom: 6px; }
.verifier .a-verifier { margin: 0 12px 6px; }
.alerte-verifier { display: block; margin: -6px 0 14px; padding: 10px 14px; border-radius: 12px; background: color-mix(in srgb, var(--alerte) 10%, var(--fond)); border: 1px solid color-mix(in srgb, var(--alerte) 40%, var(--trait)); color: var(--texte); text-decoration: none; font-size: 14.5px; }
.alerte-verifier b { color: var(--alerte); font-size: 16px; }
/* Proposition d'accueil : raccourcis d'action */
.raccourcis-accueil { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin: -4px 0 16px; }
.raccourci-accueil { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--trait); background: var(--surface); color: var(--texte); text-decoration: none; font-size: 14.5px; line-height: 1.25; }
.raccourci-accueil b { font: 600 28px/1 var(--titres); min-width: 34px; }
.raccourci-accueil span { flex: 1; }
.raccourci-accueil i { font-style: normal; color: var(--texte-2); font-size: 20px; }
.raccourci-accueil.boire b { color: var(--s-boire); }
.raccourci-accueil.verifier b { color: var(--alerte); }
.raccourci-accueil.ranger b { color: var(--or); }
.raccourci-accueil:hover { border-color: var(--bois-3); }

/* Balayage entre colonnes et meubles : le navigateur garde le défilement vertical, le doigt pilote l'horizontal. */
.meuble { touch-action: pan-y pinch-zoom; }
.meuble.balaye { will-change: transform; user-select: none; -webkit-user-select: none; }
.vue.large { overflow-x: clip; }

/* Écrans d'accès : connexion, mot de passe oublié, invitation. */
.champs-acces { display: grid; gap: 10px; }
.champs-acces .btn { margin-top: 4px; }
.champs-acces input[readonly] { color: var(--texte-2); background: var(--surface-2); }
.connexion .lien-acces { display: inline-block; margin-top: 12px; font: 500 14px var(--sans); color: var(--accent); background: none; border: 0; padding: 4px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.connexion p.message-acces { font: 15px/1.5 var(--sans); font-style: normal; color: var(--texte); text-align: left; margin: 0 0 6px; }
.connexion .arche > p { margin-bottom: 18px; }

/* Cave partagée en lecture seule. */
.lecture-seule { display: flex; gap: 8px; align-items: center; margin: -6px 0 12px; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); color: var(--texte-2); font-size: 14px; }
.choix-cave { display: inline-flex; align-items: center; gap: 4px; background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.choix-cave::after { content: ""; width: 9px; height: 9px; margin-left: 6px; border-right: 2px solid var(--texte-2); border-bottom: 2px solid var(--texte-2); transform: translateY(-4px) rotate(45deg); }
.membre-role { min-height: 36px; padding: 4px 8px; font-size: 14px; }
/* Cave à un seul meuble (cave neuve) : la carte reste à une largeur lisible. */
.meubles.seul { grid-template-columns: minmax(0, 420px); justify-content: center; }
/* Membres d'une cave : sur téléphone, le rôle et « Retirer » passent sous le nom. */
.ligne-membre { flex-wrap: wrap; row-gap: 8px; }
.ligne-membre .corps { flex: 1 1 200px; min-width: 0; overflow-wrap: anywhere; }
.invitation-membre { margin-top: 12px; align-items: flex-end; flex-wrap: wrap; }
.invitation-membre .champ { flex: 1 1 100%; margin: 0; }
.invitation-membre select { flex: 1 1 auto; width: auto; }
