/* VETTER Réappro — téléphone d'abord (375 px). Couleurs : vetter-theme.css. */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--v-encre); background: var(--v-fond); background-image: var(--v-halos); background-attachment: fixed; min-height: 100vh; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.boot { padding: 40px 20px; color: var(--v-encre-3); text-align: center; }

/* Bandeau prune */
header.top { background: var(--v-prune); color: #fff; padding: 14px 18px 20px; box-shadow: 0 2px 10px rgba(103,32,70,.18); }
.marque { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.marque img { width: 40px; height: 40px; border-radius: 11px; background: #fff; padding: 4px; }
.marque span { font-weight: 800; font-size: 17px; line-height: 1.1; }
.marque small { display: block; font-weight: 400; font-size: 13px; color: var(--v-bandeau-texte); }
header.top h1 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
header.top p { margin: 2px 0 0; color: var(--v-bandeau-texte); font-weight: 600; }

main { padding: 16px 14px calc(170px + env(safe-area-inset-bottom)); max-width: 720px; margin: 0 auto; }
h2 { font-size: 19px; font-weight: 800; letter-spacing: -.01em; margin: 22px 4px 10px; }
h2:first-child { margin-top: 4px; }
.aide { color: var(--v-encre-2); margin: 0 4px 12px; }

/* Cartes et lignes */
.carte { background: var(--v-verre-leger); border: 1px solid var(--v-verre-bord); border-radius: var(--v-rayon); box-shadow: var(--v-verre-ombre); padding: 14px 16px; margin-bottom: 10px; }
.carte.ouvrable { display: block; width: 100%; text-align: left; border: 1px solid var(--v-verre-bord); }
.carte.ouvrable:active { transform: scale(.99); }
.carte .titre { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.carte .titre b { font-size: 17px; font-weight: 800; white-space: nowrap; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.carte .titre .pastille { flex: none; }
[hidden] { display: none !important; }
.carte .sous { color: var(--v-encre-2); font-size: 14px; margin-top: 3px; }
.liste { background: var(--v-verre-leger); border: 1px solid var(--v-verre-bord); border-radius: var(--v-rayon); box-shadow: var(--v-verre-ombre); overflow: hidden; }
.ligne { display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 16px; border-bottom: 1px solid var(--v-sep); min-height: 64px; }
.ligne:last-child { border-bottom: 0; }
.ligne .nom { flex: 1; min-width: 0; }
.ligne .nom b { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.ligne .nom small { display: block; color: var(--v-encre-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ligne.pris { background: var(--v-magenta-doux); }
.ligne.change { background: var(--v-alerte-doux); }
.ligne.change .nom small { color: var(--v-alerte); font-weight: 600; }

/* Compteur − 12 + */
.compteur { display: flex; align-items: center; gap: 6px; flex: none; }
.compteur button { width: 44px; height: 44px; border-radius: 14px; border: 1px solid var(--v-trait); background: #fff; font-size: 24px; font-weight: 700; line-height: 1; color: var(--v-prune); display: grid; place-items: center; }
.compteur button:active { background: var(--v-prune-doux); }
.compteur input { width: 52px; height: 44px; border-radius: 12px; border: 1px solid var(--v-trait); background: #fff; text-align: center; font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; }
.compteur input:focus { outline: 2px solid var(--v-magenta); border-color: transparent; }

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px; border-radius: 16px; border: 1px solid var(--v-trait); background: #fff; font-weight: 700; white-space: nowrap; }
.btn.primaire { background: var(--v-magenta); color: #fff; border-color: transparent; box-shadow: var(--v-bouton-ombre); }
.btn.primaire:active { background: var(--v-prune); }
.btn.large { width: 100%; min-height: 56px; font-size: 17px; border-radius: 18px; }
.btn:disabled { opacity: .45; box-shadow: none; }
.btn.primaire:disabled { opacity: 1; background: #EAD7E1; color: var(--v-encre-2); }
.btn.discret { background: transparent; border-color: transparent; color: var(--v-prune); min-height: 44px; }
.btn.danger { color: var(--v-erreur); }
.rangee { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

/* Barre d'action fixe au-dessus des onglets */
.action { position: fixed; left: 14px; right: 14px; bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 5; max-width: 692px; margin: 0 auto; }

/* Onglets du bas */
nav.bas { position: fixed; left: 14px; right: 14px; bottom: max(16px, calc(env(safe-area-inset-bottom) + 8px)); height: 64px; padding: 6px; border-radius: 32px; display: flex; gap: 6px; z-index: 6; max-width: 692px; margin: 0 auto;
  background: var(--v-verre); border: 1px solid var(--v-verre-bord); box-shadow: var(--v-verre-ombre); -webkit-backdrop-filter: var(--v-verre-flou); backdrop-filter: var(--v-verre-flou); }
nav.bas button { flex: 1; border: 0; background: transparent; border-radius: 26px; font-weight: 700; font-size: 15px; white-space: nowrap; color: var(--v-encre-2); }
nav.bas button.on { background: var(--v-pastille); color: var(--v-magenta); box-shadow: inset 0 1px 0 #fff, 0 2px 8px rgba(103,32,70,.1); }
nav.bas .nb { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; margin-left: 6px; border-radius: 11px; background: var(--v-magenta); color: #fff; font-size: 13px; }

/* Pastilles d'état */
.pastille { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 13px; font-size: 13px; font-weight: 700; white-space: nowrap; background: var(--v-prune-doux); color: var(--v-prune); }
.pastille.ok { background: var(--v-ok-doux); color: var(--v-ok); }
.pastille.alerte { background: var(--v-alerte-doux); color: var(--v-alerte); }
.pastille.erreur { background: var(--v-erreur-doux); color: var(--v-erreur); }

/* Tableau d'une commande */
table.detail { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 15px; }
table.detail th { text-align: left; font-size: 12px; color: var(--v-encre-3); font-weight: 600; padding: 4px 4px 6px; }
table.detail td { padding: 8px 4px; border-top: 1px solid var(--v-sep); }
table.detail td.n, table.detail th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.detail td.moins { color: var(--v-erreur); font-weight: 800; }
table.detail td.plus { color: var(--v-alerte); font-weight: 800; }

/* Messages */
.info { border-radius: 18px; padding: 12px 14px; margin-bottom: 10px; font-weight: 600; background: var(--v-prune-doux); color: var(--v-prune); }
.info.ok { background: var(--v-ok-doux); color: var(--v-ok); }
.info.alerte { background: var(--v-alerte-doux); color: var(--v-alerte); }
.info.erreur { background: var(--v-erreur-doux); color: var(--v-erreur); }
.vide { text-align: center; color: var(--v-encre-3); padding: 28px 16px; }
#toast { position: fixed; left: 50%; bottom: calc(176px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(20px); opacity: 0; transition: .25s var(--v-ease); background: var(--v-encre); color: #fff; padding: 12px 18px; border-radius: 16px; font-weight: 600; z-index: 9; pointer-events: none; max-width: calc(100% - 32px); }
#toast.vu { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Formulaires (patron) */
label.champ { display: block; margin: 10px 0; font-weight: 600; color: var(--v-encre-2); font-size: 14px; }
label.champ input, label.champ select { display: block; width: 100%; margin-top: 6px; min-height: 48px; padding: 0 14px; border-radius: var(--v-rayon-champ); border: 1px solid var(--v-trait); background: #fff; font-size: 16px; color: var(--v-encre); }
.filtres { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; margin: 0 -2px; }
.filtres button { flex: none; min-height: 44px; padding: 0 14px; border-radius: 20px; border: 1px solid var(--v-trait); background: #fff; font-weight: 700; }
.filtres button.on { background: var(--v-prune); color: #fff; border-color: transparent; }
.lienbox { word-break: break-all; font-size: 13px; background: #fff; border: 1px dashed var(--v-trait); border-radius: 14px; padding: 10px 12px; margin-top: 8px; color: var(--v-encre-2); }
.petits { display: flex; gap: 6px; flex: none; }
.petits button { width: 44px; height: 44px; border-radius: 14px; border: 1px solid var(--v-trait); background: #fff; font-size: 18px; font-weight: 700; color: var(--v-prune); }
.masque { opacity: .5; }
.ligne button.nom { justify-content: flex-start; text-align: left; padding: 0; min-height: 44px; color: inherit; font-weight: inherit; }
.ligne .nom label.champ { margin-top: 0; }
.petits .btn { width: auto; min-height: 44px; padding: 0 12px; font-size: 14px; }

/* Page du labo */
.choix { display: grid; gap: 10px; margin-top: 14px; }
.liste > .aide { padding: 0 16px 12px; margin: 0; }
