/* Carafe — Composants & pages
 * ----------------------------------------------------------------------------
 * Styles extraits des composants React (auparavant inline). Convention :
 *   - classes GÉNÉRIQUES réutilisées partout : .field, .input, .alert, .spinner…
 *   - classes SPÉCIFIQUES à une page préfixées par la page : .login-*, .profile-*…
 * Les valeurs calculées à l'exécution (largeurs en %, positions…) restent en
 * style inline ou passent par des variables CSS — tout le reste vit ici.
 */

/* ════════════════════════════════════════════════════════════════════════
   Génériques — formulaires
   ════════════════════════════════════════════════════════════════════════ */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: var(--wc-ink-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.input {
  height: 48px;
  padding: 0 14px;
  border-radius: 12px;
  background: var(--wc-surface);
  border: 1px solid var(--wc-border);
  box-shadow: none;
  font-size: 15px;
  color: var(--wc-ink);
  outline: 0;
  transition: border-color var(--d-fast) var(--e-out), box-shadow var(--d-fast) var(--e-out);
}
.input--sm { height: 44px; }
.input:focus {
  border-color: var(--wc-primary);
  box-shadow: 0 0 0 3px var(--wc-primary-subtle);
}

/* Message contextuel (erreur / succès / avertissement) */
.alert {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}
.alert--danger  { background: var(--wc-danger-subtle);  color: var(--wc-danger); }
.alert--success { background: var(--wc-success-subtle); color: var(--wc-success); }
.alert--warning { background: var(--wc-warning-subtle); color: var(--wc-warning); }

/* Spinner circulaire (boutons en chargement) */
.spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-top-color: transparent;
  animation: wc-spin 0.7s linear infinite;
}

/* Bouton OAuth (Google / Apple) — générique, réutilisé login + profil */
.oauth-btn {
  height: 50px;
  padding: 0 18px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--wc-surface);
  color: var(--wc-ink);
  border: 1px solid var(--wc-border-strong);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: transform var(--d-fast) var(--e-out), background var(--d-base) var(--e-out);
}
.oauth-btn--apple {
  background: #0A0A0A;
  color: #fff;
  border-color: #0A0A0A;
}
.oauth-btn:active { transform: scale(0.985); }
.oauth-btn:disabled { opacity: 0.6; cursor: not-allowed; }
/* État « déjà lié » : non cliquable + bouton « Délier » à droite. */
.oauth-btn--linked { width: 100%; cursor: default; border-color: var(--wc-success); }
.oauth-btn--linked:active { transform: none; }
.oauth-unlink {
  margin-left: auto;
  background: none;
  border: 0;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--wc-danger);
  padding: 4px;
}
.oauth-btn--linked.oauth-btn--apple .oauth-unlink { color: #ff8a8a; }

/* ════════════════════════════════════════════════════════════════════════
   Page Login (connexion / inscription / mot de passe oublié)
   ════════════════════════════════════════════════════════════════════════ */
.login {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh; /* hauteur visible réelle sur mobile (sans la barre du navigateur) */
  display: flex;
  background: var(--wc-bg);
  position: relative;
  overflow: hidden;
}
.login-form-col {
  flex: 1.42;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  padding: 48px 64px;
  overflow: hidden;
}
.login-form {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.login-brand { display: flex; align-items: center; gap: 20px; }
.login-brand-logo {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 8px 24px rgba(168, 66, 58, 0.20);
  animation: wc-logo-in 3s var(--e-spring, cubic-bezier(0.22, 1, 0.36, 1)) both;
  transform-origin: center bottom;
}
.login-brand-name {
  font-family: var(--ff-display);
  font-size: 44px;
  color: var(--wc-ink);
  letter-spacing: -0.02em;
  font-weight: 600;
  line-height: 1;
}
.login-brand-tag {
  margin-top: 8px;
  font-size: 14px;
  color: var(--wc-ink-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
}

.login-title {
  font-family: var(--ff-display);
  font-weight: var(--display-weight);
  letter-spacing: var(--display-spacing);
  line-height: 1.05;
  font-size: 36px;
  color: var(--wc-ink);
}
.login-title--32 { font-size: 32px; }
.login-title--30 { font-size: 30px; }
.login-subtitle {
  margin-top: 8px;
  font-size: 14.5px;
  color: var(--wc-ink-muted);
  line-height: 1.55;
}

.login-oauth { display: flex; flex-direction: column; gap: 8px; }
.login-form-fields { display: flex; flex-direction: column; gap: 12px; }
.login-form-section { display: flex; flex-direction: column; gap: 18px; }

/* Séparateur « ou par email » */
.divider-text {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  color: var(--wc-ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  white-space: nowrap;
}
.divider-text::before,
.divider-text::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--wc-divider);
}

.login-forgot { font-size: 12px; color: var(--wc-primary); font-weight: 600; }
.login-footer {
  padding-top: 4px;
  font-size: 14px;
  color: var(--wc-ink-muted);
  text-align: center;
}
.login-link { font-size: 14px; color: var(--wc-primary); font-weight: 600; }
.login-legal {
  font-size: 11.5px;
  color: var(--wc-ink-soft);
  text-align: center;
  line-height: 1.5;
  padding-top: 4px;
}
.login-legal a { color: var(--wc-ink-muted); text-decoration: underline; }

/* Vue « mot de passe oublié » */
.login-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  font-size: 13.5px;
  color: var(--wc-ink-muted);
  font-weight: 600;
}
.login-sent-badge {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: var(--wc-success-subtle);
  color: var(--wc-success);
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-resend {
  font-size: 13.5px;
  color: var(--wc-ink-muted);
  font-weight: 500;
  text-align: center;
}

@media (max-width: 900px) {
  .login-form-col { padding: 24px 24px 28px; }
  .login-form { margin: 0; gap: 18px; }
  .login-title { font-size: 30px; }
  .login-brand-logo { width: 64px; height: 64px; }
}

/* ════════════════════════════════════════════════════════════════════════
   Login — panneau décoratif (desktop)
   ════════════════════════════════════════════════════════════════════════ */
.login-hero {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, var(--wc-primary) 0%, #6E1F1A 60%, #2F0F0E 100%);
  color: var(--wc-on-primary);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 56px;
  min-width: 380px;
  max-width: 620px;
}
.login-hero-glow {
  position: absolute;
  top: -120px;
  right: -100px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 210, 180, 0.22) 0%, rgba(255, 210, 180, 0) 70%);
  pointer-events: none;
}
.login-hero-glow--bottom {
  top: auto;
  right: auto;
  bottom: -180px;
  left: -120px;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0) 70%);
}
.login-hero-quote {
  font-family: var(--ff-display);
  font-size: 22px;
  line-height: 1.35;
  max-width: 380px;
  font-style: italic;
  text-wrap: balance;
  color: rgba(255, 253, 247, 0.92);
}
.login-hero-card {
  background: rgba(255, 253, 247, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 253, 247, 0.18);
  border-radius: var(--r-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}
.login-hero-card-head { display: flex; align-items: center; gap: 10px; }
.login-hero-card-text { flex: 1; }
.login-hero-bottle {
  width: 46px;
  height: 58px;
  border-radius: 8px;
  flex-shrink: 0;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.login-hero-bottle img { width: 100%; height: 100%; object-fit: contain; }
.login-hero-appellation {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 253, 247, 0.65);
  padding-left: 1px;
}
.login-hero-cuvee {
  font-family: var(--ff-display);
  font-size: 17px;
  color: #fff;
  letter-spacing: -0.01em;
  margin-top: 2px;
}
.login-hero-domain {
  font-size: 12px;
  color: rgba(255, 253, 247, 0.6);
  margin-top: 2px;
  padding-left: 1px;
}
.login-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.18);
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
}
.login-hero-window { position: relative; }
.login-hero-track {
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  display: flex;
  background: rgba(0, 0, 0, 0.25);
}
.login-hero-seg--garde    { background: var(--wc-phase-garde); }
.login-hero-seg--approche { background: var(--wc-phase-approche); }
.login-hero-seg--apogee   { background: var(--wc-phase-apogee); }
.login-hero-seg--decline  { background: var(--wc-phase-decline); }
.login-hero-cursor {
  position: absolute;
  top: -3px;
  left: calc(38% - 1.5px);
  width: 3px;
  height: 14px;
  background: #fff;
  border-radius: 2px;
  box-shadow: 0 0 0 2px rgba(110, 31, 26, 0.9);
}
.login-hero-years {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: rgba(255, 253, 247, 0.6);
  letter-spacing: 0.04em;
}
.login-hero-years .is-peak { color: #FBEFEB; font-weight: 600; }
.login-hero-props { display: flex; flex-direction: column; gap: 14px; }
.login-hero-prop { display: flex; align-items: center; gap: 12px; }
.login-hero-prop-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.login-hero-prop span { font-size: 14px; color: rgba(255, 253, 247, 0.9); line-height: 1.4; }

/* ════════════════════════════════════════════════════════════════════════
   Pages légales (CGV / confidentialité / mentions)
   ════════════════════════════════════════════════════════════════════════ */
.legal-body { flex: 1; overflow-y: auto; }
.legal-inner {
  max-width: 680px;
  margin: 0 auto;
  padding: 8px 24px 48px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.legal-intro { font-size: 15px; color: var(--wc-ink-2); line-height: 1.6; }
.legal-section { display: flex; flex-direction: column; gap: 6px; }
.legal-section-title {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--wc-ink);
  letter-spacing: -0.01em;
}
.legal-section-text { font-size: 14px; color: var(--wc-ink-muted); line-height: 1.6; }
.legal-updated { font-size: 12px; color: var(--wc-ink-soft); padding-top: 8px; }

/* ════════════════════════════════════════════════════════════════════════
   Page Profil
   ════════════════════════════════════════════════════════════════════════ */
.profile-body {
  padding: 12px 16px 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.profile-body--embedded { padding: 4px 32px 40px; max-width: 640px; }
.profile-scroll { flex: 1; overflow-y: auto; }
.profile-embedded-wrap { padding-top: 8px; padding-bottom: 24px; min-height: 100%; }

.profile-id-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  border-radius: 14px;
  background: var(--wc-surface);
  border: 1px solid var(--wc-divider);
}
.profile-id-avatar {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  flex-shrink: 0;
  background: var(--wc-primary-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--wc-primary-subtle);
}
.profile-id-text { flex: 1; min-width: 0; }
.profile-id-name { font-size: 17px; font-weight: 600; color: var(--wc-ink); letter-spacing: -0.01em; }
.profile-id-email {
  font-size: 13px;
  color: var(--wc-ink-muted);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-section { display: flex; flex-direction: column; gap: 12px; }
.profile-hint { font-size: 12.5px; color: var(--wc-ink-muted); margin-top: -4px; line-height: 1.5; }
.profile-actions { display: flex; justify-content: flex-end; margin-top: 4px; }

.profile-pending {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--wc-warning-subtle);
  border: 1px solid var(--wc-warning);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.profile-pending-row { display: flex; gap: 9px; }
.profile-pending-text { font-size: 13px; color: var(--wc-ink-2); line-height: 1.5; }
.profile-pending-actions { display: flex; gap: 8px; }
.profile-cancel { font-size: 12.5px; font-weight: 600; color: var(--wc-ink-muted); padding: 0 8px; }
.profile-mismatch { font-size: 12.5px; color: var(--wc-warning); }

.profile-signout {
  margin-top: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--wc-divider);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.profile-signout-title { font-size: 14px; font-weight: 600; color: var(--wc-ink); }
.profile-signout-sub { font-size: 12.5px; color: var(--wc-ink-muted); margin-top: 2px; }

/* ════════════════════════════════════════════════════════════════════════
   Primitives partagés
   ════════════════════════════════════════════════════════════════════════ */

/* ── Bouton ── */
.wc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  letter-spacing: -0.01em;
  width: auto;
  transition: transform var(--d-fast) var(--e-out), background var(--d-base) var(--e-out), box-shadow var(--d-base) var(--e-out);
}
.wc-btn--lg { height: 50px; padding: 0 22px; border-radius: 14px; font-size: 15px; }
.wc-btn--md { height: 40px; padding: 0 16px; border-radius: 12px; font-size: 14px; }
.wc-btn--sm { height: 32px; padding: 0 12px; border-radius: 10px; font-size: 13px; }
.wc-btn--full { width: 100%; }
.wc-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.wc-btn:not(:disabled):active { transform: scale(0.97); }
.wc-btn--primary {
  background: var(--wc-primary); color: var(--wc-on-primary); border: 1px solid var(--wc-primary);
  box-shadow: 0 1px 2px rgba(31,22,18,0.08), 0 6px 16px rgba(107,36,52,0.18);
}
.wc-btn--secondary {
  background: var(--wc-surface); color: var(--wc-ink); border: 1px solid var(--wc-border-strong);
  box-shadow: 0 1px 2px rgba(31,22,18,0.04);
}
.wc-btn--ghost { background: transparent; color: var(--wc-ink); border: 1px solid transparent; }
.wc-btn--tonal { background: var(--wc-primary-subtle); color: var(--wc-primary); border: 1px solid transparent; }
.wc-btn--danger {
  background: var(--wc-danger); color: #fff; border: 1px solid var(--wc-danger);
  box-shadow: 0 1px 2px rgba(0,0,0,0.05), 0 4px 12px rgba(163,48,40,0.18);
}
.wc-btn--success {
  background: var(--wc-success); color: #fff; border: 1px solid var(--wc-success);
  box-shadow: 0 1px 2px rgba(0,0,0,0.05), 0 4px 12px rgba(47,107,61,0.18);
}
.spinner--sm { width: 16px; height: 16px; }

/* ── Chip ── */
.wc-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--wc-surface);
  color: var(--wc-ink-2);
  border: 1px solid var(--wc-border);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: all var(--d-fast) var(--e-out);
}
.wc-chip--active { background: var(--wc-ink); color: var(--wc-on-dark); border-color: var(--wc-ink); }

/* ── Filtre déroulant ── */
.filter { position: relative; flex-shrink: 0; }
.filter-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 10px 0 12px;
  border-radius: 999px;
  background: var(--wc-surface);
  color: var(--wc-ink-2);
  border: 1px solid var(--wc-border);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: all var(--d-fast) var(--e-out);
}
.filter-trigger--active { background: var(--wc-ink); color: var(--wc-on-dark); border-color: var(--wc-ink); }
.filter-count {
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--wc-on-dark);
  color: var(--wc-ink);
  font-size: 10.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.filter-chevron { transition: transform var(--d-fast) var(--e-out); }
.filter-chevron--open { transform: rotate(180deg); }
.filter-pop {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 30;
  min-width: 200px;
  padding: 6px;
  border-radius: 14px;
  background: var(--wc-surface);
  border: 1px solid var(--wc-border);
  box-shadow: 0 12px 32px rgba(40,20,10,0.16);
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.filter-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 9px;
  background: transparent;
  color: var(--wc-ink);
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  transition: background var(--d-fast) var(--e-out);
}
.filter-opt--on { background: var(--wc-primary-subtle); font-weight: 600; }
@media (hover: hover) {
  .filter-opt:not(.filter-opt--on):hover { background: var(--wc-surface-tinted); }
}
.filter-opt-label { flex: 1; }
.filter-check {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  flex-shrink: 0;
  border: 1px solid var(--wc-border);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--d-fast) var(--e-out);
}
.filter-check--on { border-color: var(--wc-primary); background: var(--wc-primary); }
.filter-clear {
  margin-top: 3px;
  padding: 8px 10px;
  border-radius: 9px;
  background: transparent;
  color: var(--wc-ink-muted);
  font-size: 12.5px;
  font-weight: 600;
  text-align: left;
  border-top: 1px solid var(--wc-divider);
}

/* ── Photo de vin / placeholder ── */
.wine-photo { overflow: hidden; position: relative; flex-shrink: 0; }
.wine-photo--xs { width: 36px; height: 36px; border-radius: 14px; }
.wine-photo--sm { width: 56px; height: 56px; border-radius: 14px; }
.wine-photo--md { width: 80px; height: 80px; border-radius: 14px; }
.wine-photo--lg { width: 100%; height: 220px; border-radius: 0; }
.wine-photo--xl { width: 100%; height: 320px; border-radius: 0; }
.wine-photo--photo { background: var(--wc-surface-sunken); }
.wine-photo-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.wine-photo-img--contain { object-fit: contain; }
.wine-photo-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0) 35%, rgba(0,0,0,0.15) 100%);
}
.wine-photo-svg { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.85; }

/* ── Fenêtre de dégustation (timeline) ── */
.dw { position: relative; width: 100%; }
.dw-bar {
  height: var(--dw-h, 8px);
  border-radius: 999px;
  overflow: hidden;
  display: flex;
  position: relative;
  background: var(--wc-surface-sunken);
  box-shadow: inset 0 1px 1px rgba(0,0,0,0.04);
}
.dw-peak { position: absolute; top: 0; bottom: 0; background: var(--wc-phase-apogee-peak); }
.dw-now {
  position: absolute;
  top: -3px;
  width: 3px;
  height: calc(var(--dw-h, 8px) + 6px);
  background: var(--wc-ink);
  border-radius: 2px;
  box-shadow: 0 0 0 2px var(--wc-surface), 0 1px 2px rgba(0,0,0,0.15);
}
.dw-crown {
  position: absolute;
  top: -17px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 3px;
  color: var(--wc-phase-apogee-peak);
}
.dw-crown-label {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
}
.dw-periods { position: relative; height: 14px; margin-top: 7px; }
.dw-period {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--wc-ink-muted);
}
.dw-period--peak { color: var(--wc-primary); }
.dw-axis { position: relative; height: 16px; margin-top: 8px; }
.dw-year {
  position: absolute;
  top: 0;
  font-size: 11px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  color: var(--wc-ink-muted);
  font-weight: 400;
}
.dw-year--peak { color: var(--wc-primary); font-weight: 600; }
.dw-year--zenith { color: var(--wc-primary); font-weight: 700; }

/* ── Badge de phase ── */
.phase-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  flex-shrink: 0;
}
.phase-badge--incellar { background: var(--wc-surface-sunken); color: var(--wc-ink-muted); }
.phase-badge--zenith   { background: var(--wc-primary); color: var(--wc-on-primary); }
.phase-badge--apogee   { background: var(--wc-primary-subtle); color: var(--wc-primary); }
.phase-badge--decline  { background: var(--wc-warning-subtle); color: var(--wc-warning); }
.phase-badge--passe    { background: var(--wc-danger-subtle); color: var(--wc-danger); }

/* ── FAB ── */
.wc-fab {
  position: fixed;
  right: 18px;
  bottom: 92px;
  height: 56px;
  min-width: 56px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--wc-primary);
  color: var(--wc-on-primary);
  box-shadow: 0 4px 14px rgba(107,36,52,0.32), 0 12px 24px rgba(107,36,52,0.18);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: transform var(--d-fast) var(--e-out);
  z-index: 40;
}
.wc-fab:active { transform: scale(0.94); }

/* ── Sheet (overlay plein écran) ── */
.wc-sheet {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: wc-fade-in 220ms var(--e-out);
}
.wc-sheet--card { align-items: center; animation-duration: 180ms; }
.wc-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20,14,10,0.42);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.wc-sheet-panel {
  position: relative;
  background: var(--wc-bg);
  box-shadow: var(--sh-3);
  animation: wc-sheet-up var(--d-spring) var(--e-spring);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.wc-sheet-panel--full { width: 100%; height: 100%; max-height: 100%; border-radius: 0; }
.wc-sheet-panel--card {
  width: calc(100% - 36px);
  max-width: 440px;
  height: auto;
  max-height: 80%;
  border-radius: 24px;
}
.wc-sheet-panel--bottom {
  width: 100%;
  max-width: 600px;
  height: auto;
  max-height: 85%;
  border-radius: 20px 20px 0 0;
}

/* ── En-tête de sheet ── */
.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  min-height: 56px;
  background: var(--wc-bg);
  border-bottom: 1px solid var(--wc-divider);
  flex-shrink: 0;
}
.sheet-header--dark { background: transparent; }
.sheet-header-close {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--wc-surface);
  border: 1px solid var(--wc-border);
}
.sheet-header-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--wc-ink);
  flex: 1;
  text-align: center;
  padding: 0 12px;
}
.sheet-header-action { min-width: 38px; height: 38px; display: flex; justify-content: flex-end; }
.sheet-header-spacer { width: 38px; }

/* ── État vide ── */
.empty {
  flex: 1;
  min-height: 60vh;
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 14px;
}
.empty-icon {
  width: 96px;
  height: 96px;
  border-radius: 999px;
  background: radial-gradient(120% 120% at 50% 22%, var(--wc-primary-tint) 0%, var(--wc-surface) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  border: 1px solid var(--wc-primary-subtle);
  box-shadow: 0 18px 38px -16px var(--wc-primary), inset 0 1px 0 rgba(255,255,255,0.6);
}
.empty-title { font-size: 25px; max-width: 320px; text-wrap: balance; }
.empty-body { color: var(--wc-ink-muted); max-width: 340px; text-wrap: pretty; line-height: 1.55; }
.empty-cta { margin-top: 16px; }

/* ── Skeleton ── */
.skeleton {
  background: linear-gradient(90deg, var(--wc-surface-sunken) 0%, var(--wc-divider) 50%, var(--wc-surface-sunken) 100%);
  background-size: 200% 100%;
  animation: wc-shimmer 1.6s linear infinite;
}

/* ── Note étoilée ── */
.star-rating { display: inline-flex; gap: 2px; align-items: center; }
.star-half { position: relative; display: inline-block; }
.star-half-fill { position: absolute; inset: 0; overflow: hidden; }

/* ── Barre d'onglets ── */
.tabbar {
  display: flex;
  align-items: center;
  position: fixed;
  left: 0;
  right: 0;
  z-index: 30;
}
.tabbar--bottom {
  bottom: 0;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  height: calc(52px + env(safe-area-inset-bottom, 0px));
  background: rgba(255,253,247,0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-top: 0.5px solid var(--wc-border);
  padding-top: 5px;
}
.tabbar--top {
  top: 56px;
  height: 50px;
  background: var(--wc-primary);
  padding: 0 8px;
}
.tabbar-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 2px 0;
  color: var(--wc-ink-muted);
}
.tabbar-item--active { color: var(--wc-primary); }
.tabbar-item-label { font-size: 11.5px; font-weight: 500; letter-spacing: 0.01em; white-space: nowrap; }
.tabbar-item--active .tabbar-item-label { font-weight: 600; }
.tabbar-top-item {
  flex: 1;
  position: relative;
  height: 100%;
  color: rgba(255,255,255,0.7);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.tabbar-top-item--active { color: #fff; }
.tabbar-top-underline {
  position: absolute;
  left: 25%;
  right: 25%;
  bottom: 0;
  height: 2.5px;
  background: var(--wc-accent);
  border-radius: 2px;
}

/* ── En-tête d'écran ── */
.screen-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 32px 16px;
}
.screen-header-row--mobile { padding: 8px 20px 8px; }
.screen-header-row--desktop { position: sticky; top: 0; z-index: 20; background: var(--wc-bg); }
.screen-header-title { font-size: 38px; color: var(--wc-ink); flex: 1; min-width: 0; }
.screen-header-title--mobile { font-size: 32px; }
.screen-header-actions { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
.screen-header-meta { padding: 0 32px 20px; display: flex; flex-direction: column; gap: 6px; }
.screen-header-meta--mobile { padding: 0 20px 16px; }
.screen-header-subtitle { font-size: 13px; color: var(--wc-ink-muted); letter-spacing: 0.01em; }
.screen-header-stats { display: flex; gap: 18px; color: var(--wc-ink-muted); font-size: 12.5px; font-weight: 500; }
.screen-header-stat { display: inline-flex; align-items: baseline; gap: 5px; white-space: nowrap; }
.screen-header-stat b { color: var(--wc-ink); font-weight: 600; font-size: 13.5px; }

/* ── Bouton icône rond ── */
.icon-btn {
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--wc-surface);
  border: 1px solid var(--wc-border);
  color: var(--wc-ink-2);
  position: relative;
  transition: all var(--d-fast) var(--e-out);
}
.icon-btn-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  background: var(--wc-primary);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* ── Bouton d'action d'en-tête (label + icône) ── */
.header-action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  background: var(--wc-surface);
  color: var(--wc-ink);
  border: 1px solid var(--wc-border);
  white-space: nowrap;
  transition: transform var(--d-fast) var(--e-out), background var(--d-fast) var(--e-out);
}
.header-action--primary {
  background: var(--wc-primary);
  color: var(--wc-on-primary);
  border-color: var(--wc-primary);
  box-shadow: 0 2px 8px rgba(107,36,52,0.20);
}
.header-action:active { transform: scale(0.96); }

/* ── Toast ── */
.toast {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 12px);
  left: 16px;
  right: 16px;
  bottom: auto;
  z-index: 200;
  color: #fff;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--sh-3);
  animation: wc-rise var(--d-base) var(--e-out);
}
/* Tablette / desktop : confiné à la zone principale (à droite de la barre
   latérale de 248px), en haut. */
@media (min-width: 900px) {
  .toast { top: 16px; left: calc(248px + 16px); right: 16px; }
}
.toast--success { background: var(--wc-success); }
.toast--error   { background: var(--wc-danger); }
.toast--info    { background: var(--wc-ink); }

/* ── Visionneuse photo plein écran ── */
.photo-viewer {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: #0a0706;
  display: flex;
  flex-direction: column;
  animation: wc-fade-in var(--d-base) var(--e-out);
}
.photo-viewer-bar {
  position: absolute;
  top: 56px;
  left: 14px;
  right: 14px;
  z-index: 2;
  display: flex;
  justify-content: space-between;
}
.photo-viewer-close {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff;
}
.photo-viewer-caption {
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}
.photo-viewer-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 16px 60px;
}
.photo-viewer-frame {
  width: 100%;
  max-width: 340px;
  aspect-ratio: 3 / 4;
  animation: wc-rise var(--d-spring) var(--e-spring);
}

/* ════════════════════════════════════════════════════════════════════════
   Variantes de champ (édition) — réutilisées cave + extraction
   ════════════════════════════════════════════════════════════════════════ */
.field--tight { gap: 4px; }
.field-label--xs {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--wc-ink-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.input--md { height: 44px; border-radius: 10px; padding: 0 12px; font-size: 15px; }
.input--xs { height: 38px; border-radius: 9px; padding: 0 10px; font-size: 14px; background: var(--wc-bg); }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
/* Les items de grille ont min-width:auto par défaut → l'input (largeur
   intrinsèque) empêche la colonne de rétrécir et déborde. On autorise le shrink. */
.form-grid-2 > * { min-width: 0; }

/* Pas-à-pas quantité (+ / −) */
.stepper-btn {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--wc-surface);
  border: 1px solid var(--wc-border-strong);
  color: var(--wc-ink);
}
.stepper-btn--sm { width: 34px; height: 34px; }
.stepper-value { font-family: var(--ff-display); font-size: 22px; color: var(--wc-ink); min-width: 20px; text-align: center; }
.stepper-value--sm { font-size: 20px; }

/* ════════════════════════════════════════════════════════════════════════
   Ma cave — liste
   ════════════════════════════════════════════════════════════════════════ */
.wine-card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.wine-card-appellation-row { display: flex; align-items: center; gap: 6px; min-width: 0; }
.wine-card-appellation {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--wc-ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wine-card-cuvee {
  font-size: 15.5px;
  font-weight: 600;
  color: var(--wc-ink);
  letter-spacing: -0.01em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wine-card--compact .wine-card-cuvee { font-size: 14.5px; }
.wine-card-domain {
  font-size: 14px;
  color: var(--wc-ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wine-card-right { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 6px; }
.wine-card-vintage { font-family: var(--ff-display); font-size: 22px; color: var(--wc-ink); letter-spacing: -0.01em; line-height: 1; }
.wine-card-tags { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.wine-card-tagrow { display: inline-flex; align-items: center; gap: 4px; }
.wine-card-format {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--wc-ink-muted);
  border: 1px solid var(--wc-border);
  padding: 1px 5px;
  border-radius: 999px;
}
.wine-card-count {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--wc-ink-2);
  background: var(--wc-surface-sunken);
  padding: 2px 8px;
  border-radius: 999px;
}

/* Recherche */
.cave-search-wrap { padding: 6px 32px 12px; }
.cave-search-wrap--mobile { padding: 6px 20px 12px; position: sticky; top: 0; z-index: 5; }
.cave-search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 14px;
  border-radius: 14px;
  background: var(--wc-surface);
  border: 1px solid var(--wc-border);
  box-shadow: none;
  transition: box-shadow var(--d-base) var(--e-out);
}
.cave-search:focus-within { box-shadow: 0 0 0 3px var(--wc-primary-subtle); }
.cave-search-input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 15px; color: var(--wc-ink); }
.cave-search-clear {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--wc-surface-sunken);
  color: var(--wc-ink-muted);
}

/* Filtres / tri */
.cave-filters {
  display: flex;
  gap: 6px;
  padding: 0 32px 12px;
  flex-wrap: wrap;
  align-items: center;
}
.cave-filters--mobile { padding: 0 20px 12px; }
.cave-sort-label { font-size: 13px; font-weight: 600; color: var(--wc-ink-muted); align-self: center; margin-right: 2px; }
.cave-seg { display: flex; gap: 4px; background: var(--wc-surface-sunken); padding: 3px; border-radius: 999px; }
.cave-seg-btn {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--wc-ink-muted);
  background: transparent;
  box-shadow: none;
  transition: all var(--d-fast) var(--e-out);
  white-space: nowrap;
}
.cave-seg-btn--active { font-weight: 600; color: var(--wc-ink); background: var(--wc-surface); box-shadow: 0 1px 3px rgba(40,20,10,0.1); }
.cave-filters-break { flex-basis: 100%; height: 0; }
.cave-filters-sep { width: 1px; height: 24px; align-self: center; background: var(--wc-divider); margin: 0 4px; }

/* Libellé de section + colonne */
.section-label {
  padding: 20px 32px 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--wc-ink-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.section-label--mobile { padding: 8px 20px 6px; font-size: 11px; }
.list-col { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 12px; padding: 0 32px 24px; }
.list-col--mobile { display: flex; flex-direction: column; gap: 8px; padding: 0 16px 12px; }

/* Conteneur d'écran scrollable */
.screen-pad { padding-top: 8px; padding-bottom: 24px; min-height: 100%; }
.screen-pad--empty { padding-top: 8px; min-height: 100%; display: flex; flex-direction: column; }

/* Carte de provenance */
.region-map { width: 100%; height: 220px; border-radius: var(--r-sm); margin-top: 12px; overflow: hidden; background: var(--wc-surface-sunken); }
.region-map-frame { width: 100%; height: 220px; border: 0; border-radius: var(--r-sm); margin-top: 12px; display: block; }

/* ════════════════════════════════════════════════════════════════════════
   Fiche vin (détail)
   ════════════════════════════════════════════════════════════════════════ */
.detail-close {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 5;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0,0,0,0.06);
}
.detail-scroll { flex: 1; overflow-y: auto; }
.detail-inner { max-width: 640px; margin: 0 auto; position: relative; }
/* Largeur du contenu d'une feuille (enfant direct de .detail-scroll). Classe
   réutilisable pour remplacer les style={{ maxWidth: 640, margin: '0 auto' }}. */
.sheet-inner { max-width: 640px; margin: 0 auto; }
/* Desktop : contenu un peu plus large. */
@media (min-width: 900px) {
  .detail-inner, .sheet-inner { max-width: 740px; }
}
.detail-hero { position: relative; margin: 0 20px; border-radius: 0 0 var(--r-md) var(--r-md); overflow: hidden; }
.detail-hero-btn { display: block; width: 100%; padding: 0; cursor: zoom-in; }
.detail-note-badge {
  position: absolute;
  left: 16px;
  bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}
.detail-hero-actions { position: absolute; right: 14px; bottom: 14px; display: flex; gap: 8px; }
.detail-img-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255,253,247,0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--wc-ink);
  border: 1px solid rgba(0,0,0,0.08);
  font-weight: 600;
  font-size: 13.5px;
}
.detail-img-btn--primary {
  padding: 0 16px;
  background: var(--wc-primary);
  color: var(--wc-on-primary);
  border: 0;
  box-shadow: 0 2px 8px rgba(107,36,52,0.28);
}
.detail-title-block { padding: 20px 20px 8px; }
.detail-appellation-row { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.detail-appellation { font-weight: 700; letter-spacing: 0.08em; color: var(--wc-ink-muted); text-transform: uppercase; font-size: 16px; }
.detail-cuvee { font-size: 30px; color: var(--wc-ink); }
.detail-domain { margin-top: 6px; font-size: 16px; font-weight: 600; color: var(--wc-ink-2); }

.detail-alt {
  display: flex;
  align-items: center;
  gap: 10px;
  width: calc(100% - 40px);
  margin: 14px 20px 0;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--wc-primary-subtle);
  border: 1px solid var(--wc-primary-subtle);
  text-align: left;
}
.detail-alt-icon {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  flex-shrink: 0;
  background: var(--wc-primary);
  color: var(--wc-on-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.detail-alt-text { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; color: var(--wc-ink); }
.detail-alt-cta { display: inline-flex; align-items: center; gap: 3px; color: var(--wc-primary); font-weight: 600; font-size: 13.5px; flex-shrink: 0; }

.detail-block {
  margin: 16px 20px 0;
  padding: 14px 16px;
  background: var(--wc-surface);
  border: 1px solid var(--wc-divider);
  border-radius: var(--r-md);
}
.detail-window {
  margin: 12px 20px 4px;
  padding: 18px 18px 14px;
  background: var(--wc-surface);
  border: 1px solid var(--wc-divider);
  border-radius: var(--r-md);
}
.detail-window-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.detail-region-row { display: flex; align-items: baseline; gap: 6px; }
.detail-region-name { font-size: 15px; font-weight: 700; color: var(--wc-ink); }
.detail-notes-text { font-size: 14px; color: var(--wc-ink-2); line-height: 1.5; }

.detail-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  margin: 12px 20px 0;
  background: var(--wc-divider);
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--wc-divider);
}
.detail-meta-tile { padding: 12px 10px; background: var(--wc-surface); display: flex; flex-direction: column; align-items: center; gap: 2px; }
.detail-meta-label { font-size: 10.5px; color: var(--wc-ink-muted); letter-spacing: 0.04em; text-transform: uppercase; font-weight: 600; white-space: nowrap; }
.detail-meta-value { font-family: var(--ff-display); font-size: 22px; color: var(--wc-ink); }

/* Tuile pleine largeur (2 colonnes) pour un champ à texte long, ex. « Occasion ». */
.detail-meta-tile--wide { grid-column: 1 / -1; align-items: center; }
.detail-meta-tile--wide .detail-meta-value {
  font-size: 16px;
  line-height: 1.35;
  text-align: center;
  white-space: pre-wrap;
  word-break: break-word;
}

.detail-note-btn {
  width: calc(100% - 40px);
  margin: 16px 20px 0;
  padding: 14px 16px;
  background: var(--wc-surface);
  border: 1px solid var(--wc-divider);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  text-align: left;
}
.detail-note-value { display: inline-flex; align-items: center; gap: 8px; }
.detail-note-num { font-family: var(--ff-display); font-size: 22px; color: var(--wc-ink); }
.detail-note-num small { font-size: 13px; color: var(--wc-ink-muted); }
.detail-note-empty { font-size: 14px; color: var(--wc-ink-soft); font-weight: 600; }

/* Historique (fiche) */
.detail-history { padding: 20px 20px 0; }
.detail-history-list { background: var(--wc-surface); border-radius: var(--r-md); border: 1px solid var(--wc-divider); overflow: hidden; }
.detail-history-row { display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.detail-history-row + .detail-history-row { border-top: 1px solid var(--wc-divider); }
.detail-history-icon {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.detail-history-icon--in { background: var(--wc-success-subtle); color: var(--wc-success); }
.detail-history-icon--note { background: var(--wc-accent-subtle); color: var(--wc-accent); }
.detail-history-icon--out { background: var(--wc-primary-subtle); color: var(--wc-primary); }
.detail-history-main { flex: 1; min-width: 0; }
.detail-history-label { font-size: 13.5px; font-weight: 600; color: var(--wc-ink); }
.detail-history-sub { font-size: 12px; color: var(--wc-ink-muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.detail-history-meta { text-align: right; flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.detail-history-date { font-size: 12px; color: var(--wc-ink-muted); white-space: nowrap; }
.detail-history-rating { display: inline-flex; align-items: center; gap: 5px; }
.detail-history-rating span { font-size: 11.5px; font-weight: 600; color: var(--wc-ink-2); }

/* Édition de fiche / formulaire en sheet */
.sheet-scroll { flex: 1; overflow-y: auto; }
.sheet-form { max-width: 640px; margin: 0 auto; padding: 16px 20px 40px; display: flex; flex-direction: column; gap: 12px; }
.chip-row { display: flex; gap: 6px; flex-wrap: wrap; }
.form-actions { display: flex; gap: 8px; margin-top: 4px; }

/* Popin de notation /10 */
.note-popin-head { padding: 24px 22px 6px; text-align: center; }
.note-popin-head .t-h2 { font-size: 20px; margin-bottom: 6px; }
.note-popin-sub { font-size: 13px; color: var(--wc-ink-muted); }
.note-grid { padding: 10px 16px 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.note-num {
  height: 46px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 16px;
  background: var(--wc-surface-sunken);
  color: var(--wc-ink);
  border: 1px solid var(--wc-divider);
}
.note-num--sel { background: var(--wc-primary); color: var(--wc-on-primary); border-color: var(--wc-primary); }
.note-actions { padding: 14px 16px 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* ════════════════════════════════════════════════════════════════════════
   Flux d'ajout / sortie
   ════════════════════════════════════════════════════════════════════════ */
.capture-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.capture-thumb { position: relative; width: calc((100% - 20px) / 3); aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden; background: #1A0D11; }
.capture-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.capture-thumb-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.capture-add {
  width: calc((100% - 20px) / 3);
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  background: var(--wc-surface);
  border: 1.5px dashed var(--wc-border-strong);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--wc-ink-muted);
}
.capture-add span { font-size: 16.5px; font-weight: 500; }
.capture-caption { text-align: center; }
.capture-error { font-size: 13px; color: var(--wc-danger); font-weight: 500; margin-top: 4px; }

.flow-scroll { flex: 1; overflow-y: auto; }
.flow-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--wc-primary);
  color: var(--wc-on-primary);
  border: 1px solid var(--wc-primary);
  box-shadow: 0 2px 8px rgba(107,36,52,0.20);
  font-weight: 600;
  font-size: 13.5px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.flow-add-btn:disabled { opacity: 0.6; }
.flow-intro { padding: 40px 24px; display: flex; flex-direction: column; gap: 12px; max-width: 620px; margin: 0 auto; }
.flow-intro-title { text-align: center; margin-bottom: 8px; }
.flow-intro-sub { text-align: center; color: var(--wc-ink-muted); margin-bottom: 20px; font-size: 14px; line-height: 1.55; }
.flow-preview { padding: 24px 20px; display: flex; flex-direction: column; gap: 12px; max-width: 480px; margin: 0 auto; width: 100%; }
.flow-analyze { padding: 60px 32px; display: flex; flex-direction: column; align-items: center; gap: 20px; }
.flow-analyze-title { text-align: center; }
.flow-analyze-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--wc-primary-subtle);
  color: var(--wc-primary);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.flow-analyze-sub { text-align: center; color: var(--wc-ink-muted); font-size: 14px; max-width: 280px; }
.flow-analyze-steps { width: 100%; max-width: 320px; padding: 0; margin: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.flow-analyze-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--wc-surface);
  border: 1px solid var(--wc-divider);
  font-size: 13.5px;
  color: var(--wc-ink-2);
}
.spinner--primary { border-color: var(--wc-primary); border-top-color: transparent; }
.spinner--14 { width: 14px; height: 14px; }
.flow-validate { padding: 12px 20px 100px; display: flex; flex-direction: column; gap: 12px; max-width: 640px; width: 100%; margin: 2px auto 0; }

/* Carte « source » (caméra / galerie / saisie) */
.source-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border-radius: 16px;
  background: var(--wc-surface);
  color: var(--wc-ink);
  border: 1px solid var(--wc-border);
  box-shadow: var(--sh-1);
  text-align: left;
}
.source-card--primary {
  background: var(--wc-primary);
  color: var(--wc-on-primary);
  border-color: var(--wc-primary);
  box-shadow: 0 4px 14px rgba(107,36,52,0.18);
}
.source-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--wc-primary-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
}
.source-card--primary .source-card-icon { background: rgba(255,255,255,0.18); }
.source-card-text { flex: 1; }
.source-card-title { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.source-card-sub { font-size: 13px; margin-top: 2px; opacity: 0.7; }

/* Viz d'analyse */
.analyzing-viz { position: relative; width: 120px; height: 120px; }
.analyzing-halo {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: radial-gradient(circle, var(--wc-primary-subtle) 0%, transparent 70%);
  animation: wc-pulse 1.6s var(--e-in-out) infinite;
}
.analyzing-svg { position: absolute; inset: 0; }
.analyzing-spin { transform-origin: center; animation: wc-spin 1.4s linear infinite; }
.analyzing-center { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }

/* Carte extraite (validation) */
.extract-edit {
  padding: 14px;
  border-radius: 14px;
  background: var(--wc-surface);
  border: 1px solid var(--wc-primary);
  box-shadow: 0 0 0 3px var(--wc-primary-subtle);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.extract-edit-head { display: flex; align-items: center; justify-content: space-between; }
.extract-edit-head span { font-size: 13px; font-weight: 700; color: var(--wc-ink); }
.extract-edit-close {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--wc-surface-sunken);
  color: var(--wc-ink-muted);
}
.extract-row { display: flex; align-items: center; justify-content: space-between; }
.extract-err { font-size: 12.5px; color: var(--wc-danger); font-weight: 500; }
.extract-view {
  padding: 14px;
  border-radius: 14px;
  background: var(--wc-surface);
  border: 1px solid var(--wc-divider);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.extract-view-head { display: flex; gap: 12px; }
.extract-view-body { flex: 1; min-width: 0; }
.extract-view-appellation-row { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.extract-view-appellation { font-size: 13px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--wc-ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.extract-view-cuvee { font-size: 15.5px; font-weight: 600; color: var(--wc-ink); letter-spacing: -0.01em; }
.extract-view-domain { font-size: 12.5px; color: var(--wc-ink-muted); margin-top: 2px; }
.extract-view-side { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; align-self: stretch; gap: 6px; }
.extract-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--wc-primary);
  color: var(--wc-on-primary);
  border: 1px solid var(--wc-primary);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(107,36,52,0.18);
}
.extract-view-count { font-size: 11.5px; font-weight: 600; color: var(--wc-ink-2); background: var(--wc-surface-sunken); padding: 2px 8px; border-radius: 999px; }
.extract-view-stats {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px solid var(--wc-divider);
}
.extract-stat-label { font-size: 10.5px; color: var(--wc-ink-muted); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; white-space: nowrap; }
.extract-stat-value { font-size: 14px; font-weight: 600; color: var(--wc-ink); margin-top: 2px; white-space: nowrap; }

/* Sortie de bouteille */
.exit-step { padding: 16px 20px 120px; display: flex; flex-direction: column; gap: 18px; }
.exit-intro { padding: 32px 24px 40px; display: flex; flex-direction: column; gap: 12px; max-width: 620px; margin: 0 auto; }
.exit-pick { padding: 16px 20px 40px; display: flex; flex-direction: column; gap: 12px; }
.exit-search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 14px;
  border-radius: 14px;
  background: var(--wc-surface);
  border: 1px solid var(--wc-border);
}
.exit-qty-row { display: flex; align-items: center; justify-content: space-between; }
.exit-qty-title { font-size: 14.5px; font-weight: 600; color: var(--wc-ink); }
.exit-qty-sub { font-size: 12.5px; color: var(--wc-ink-muted); margin-top: 2px; }
.exit-qty-ctrl { display: flex; align-items: center; gap: 14px; }
.fate-list { display: flex; flex-direction: column; gap: 8px; }
.fate-card {
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--wc-surface);
  border: 1px solid var(--wc-divider);
  transition: all var(--d-fast) var(--e-out);
}
.fate-card--on { background: var(--wc-primary-subtle); border-color: var(--wc-primary); }
.fate-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  flex-shrink: 0;
  background: var(--wc-primary-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
}
.fate-card--on .fate-icon { background: var(--wc-primary); }
.fate-text { flex: 1; }
.fate-title { font-size: 15.5px; font-weight: 600; color: var(--wc-ink); }
.fate-sub { font-size: 12.5px; color: var(--wc-ink-muted); margin-top: 2px; }
.rate-block { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 14px; background: var(--wc-accent-subtle); border: 1px solid var(--wc-divider); }
.rate-title { font-size: 14.5px; font-weight: 600; color: var(--wc-ink); }
.rate-row { display: flex; align-items: center; gap: 12px; }
.rate-stars { display: flex; gap: 4px; }
.rate-score { font-family: var(--ff-display); font-size: 20px; color: var(--wc-ink); }
.rate-score small { font-size: 13px; color: var(--wc-ink-muted); }
.star-pick { position: relative; }
.star-pick-fill { position: absolute; top: 0; left: 0; overflow: hidden; }
.star-pick-half { position: absolute; top: 0; left: 0; width: 50%; height: 100%; background: transparent; }
.star-pick-full { position: absolute; top: 0; right: 0; width: 50%; height: 100%; background: transparent; }
.exit-note {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  box-sizing: border-box;
  border: 1px solid var(--wc-border);
  background: var(--wc-surface);
  font-size: 14.5px;
  line-height: 1.5;
  resize: none;
  outline: 0;
  font-family: inherit;
  transition: border-color var(--d-fast) var(--e-out), box-shadow var(--d-fast) var(--e-out);
}
.exit-note:focus { border-color: var(--wc-primary); box-shadow: 0 0 0 3px var(--wc-primary-subtle); }
.exit-confirm-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 16px 22px;
  background: linear-gradient(180deg, rgba(248,243,234,0) 0%, var(--wc-bg) 30%);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.exit-confirm-err { font-size: 13px; color: var(--wc-danger); font-weight: 500; text-align: center; }

/* ════════════════════════════════════════════════════════════════════════
   Découvertes
   ════════════════════════════════════════════════════════════════════════ */
.screen-pad--tasted { padding-top: 8px; padding-bottom: 20px; }
.tasted-sort { padding: 0 32px 18px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tasted-sort--mobile { padding: 0 16px 14px; }
.tasted-sort-label { font-size: 12.5px; color: var(--wc-ink-muted); font-weight: 500; }
.tasted-grid {
  padding: 0 32px 24px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  align-items: stretch;
  gap: 14px;
}
.tasted-grid--mobile { padding: 0 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

.disc-card {
  width: 100%;
  height: 100%;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--wc-surface);
  border: 1px solid var(--wc-divider);
  display: flex;
  flex-direction: column;
  text-align: left;
}
.disc-media { position: relative; aspect-ratio: 1 / 1; }
.disc-badge {
  position: absolute;
  top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}
.disc-badge--tl { left: 8px; }
.disc-badge--tr { right: 8px; }
.disc-occasion {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 26px 10px 9px;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.74) 100%);
  display: flex;
  align-items: center;
  gap: 5px;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}
.disc-occasion span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.disc-info { padding: 12px; display: flex; flex-direction: column; gap: 3px; }
.disc-appellation-row { display: flex; align-items: center; gap: 5px; }
.disc-appellation {
  font-size: 12px;
  font-weight: 700;
  color: var(--wc-ink-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.disc-cuvee {
  font-size: 14px;
  font-weight: 600;
  color: var(--wc-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: -0.01em;
}
.disc-cuvee small { color: var(--wc-ink-muted); font-weight: 500; font-size: 14px; }
.disc-domain { font-size: 11.5px; color: var(--wc-ink-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Détail découverte */
.disc-detail-close { top: 20px; left: 10px; }
.disc-actions { display: flex; gap: 8px; padding: 14px 20px 0; }
.disc-rating {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border-radius: var(--r-md);
  background: var(--wc-accent-subtle);
  border: 1px solid var(--wc-divider);
}
.disc-rating-score { font-family: var(--ff-display); font-size: 24px; color: var(--wc-ink); margin-left: auto; }
.disc-rating-score small { font-size: 14px; color: var(--wc-ink-muted); }
.disc-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 16px;
  background: var(--wc-divider);
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--wc-divider);
}
.disc-meta-tile { padding: 12px 10px; background: var(--wc-surface); display: flex; flex-direction: column; align-items: center; gap: 2px; }
.disc-meta-label { font-size: 10.5px; color: var(--wc-ink-muted); letter-spacing: 0.04em; text-transform: uppercase; font-weight: 600; }
.disc-meta-value { font-family: var(--ff-display); font-size: 18px; color: var(--wc-ink); }
.disc-occasion-block { margin-top: 18px; }
.disc-occasion-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--wc-surface);
  border: 1px solid var(--wc-divider);
  font-size: 13.5px;
}

/* ════════════════════════════════════════════════════════════════════════
   Statistiques
   ════════════════════════════════════════════════════════════════════════ */
.stats-body { padding: 12px 16px 40px; display: flex; flex-direction: column; gap: 18px; }
.stats-body--embedded { padding: 4px 32px 40px; }
.stats-numbers { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stats-numbers--embedded { grid-template-columns: repeat(4, 1fr); }
.stats-scroll { flex: 1; overflow-y: auto; }

.stat-card { padding: 16px; border-radius: 14px; background: var(--wc-surface); border: 1px solid var(--wc-divider); }
.stat-card-value { font-family: var(--ff-display); font-size: 36px; color: var(--wc-ink); line-height: 1; margin-top: 6px; }
.stat-card-value--sm { font-size: 26px; }
.stat-card-hint { margin-top: 4px; font-size: 11.5px; color: var(--wc-ink-muted); }

.stats-card { padding: 16px; border-radius: 14px; background: var(--wc-surface); border: 1px solid var(--wc-divider); }
.stats-card-head { display: flex; align-items: center; gap: 7px; margin-bottom: 12px; }
.stats-rank-list { display: flex; flex-direction: column; gap: 2px; }
.stats-rank-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 10px 4px;
  background: transparent;
  border-radius: 8px;
  transition: background var(--d-fast) var(--e-out);
}
.stats-rank-row + .stats-rank-row { border-top: 1px solid var(--wc-divider); }
@media (hover: hover) {
  .stats-rank-row:hover { background: var(--wc-surface-tinted); }
}
.stats-rank-num { font-family: var(--ff-display); font-size: 15px; color: var(--wc-ink-muted); width: 18px; text-align: center; flex-shrink: 0; }
.stats-rank-main { flex: 1; min-width: 0; }
.stats-rank-wine { font-size: 14px; color: var(--wc-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -0.01em; }
.stats-rank-wine .reg { font-weight: 400; }
.stats-rank-wine .cuvee { font-weight: 600; }
.stats-rank-wine .vint { color: var(--wc-ink-muted); font-weight: 500; }
.stats-rank-domain { font-size: 13px; color: var(--wc-ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stats-rank-rating { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.stats-rank-rating-score { font-family: var(--ff-display); font-size: 15px; color: var(--wc-ink); }
.stats-rank-rating-score small { font-size: 11px; color: var(--wc-ink-muted); }
.stats-rank-count {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  flex-shrink: 0;
  font-family: var(--ff-display);
  font-size: 16px;
  color: var(--wc-ink);
}
.stats-rank-count small { font-family: var(--ff-ui); font-size: 11px; color: var(--wc-ink-muted); font-weight: 500; }

.chart-card { padding: 16px; border-radius: 14px; background: var(--wc-surface); border: 1px solid var(--wc-divider); }
.chart-card-rows { display: flex; flex-direction: column; gap: 8px; }
.bar-row { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.bar-row-label { width: 110px; color: var(--wc-ink-2); flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { flex: 1; height: 6px; border-radius: 999px; background: var(--wc-surface-sunken); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; transition: width var(--d-slow) var(--e-out); }
.bar-value { width: 24px; text-align: right; font-weight: 600; color: var(--wc-ink); font-size: 12.5px; }

.callout { padding: 16px; border-radius: 14px; border: 1px solid var(--wc-divider); }
.callout--warning { background: var(--wc-warning-subtle); }
.callout--accent { background: var(--wc-accent-subtle); }
.callout--info { background: var(--wc-info-subtle); }
.callout-head { display: flex; align-items: center; gap: 8px; }
.callout-title { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.callout-title--warning { color: var(--wc-warning); }
.callout-title--accent { color: var(--wc-accent); }
.callout-title--info { color: var(--wc-info); }
.callout-body { margin-top: 8px; font-size: 13.5px; color: var(--wc-ink-2); }

.rank-row { display: flex; align-items: center; gap: 10px; font-size: 13.5px; }
.rank-badge {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--wc-surface-sunken);
  color: var(--wc-ink-muted);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.rank-badge--first { background: var(--wc-accent); color: #fff; }
.rank-name { flex: 1; color: var(--wc-ink); }
.rank-count { padding: 2px 8px; border-radius: 999px; background: var(--wc-surface-sunken); font-size: 11.5px; font-weight: 600; color: var(--wc-ink-2); }

.histo-bars { position: relative; display: flex; align-items: flex-end; gap: 4px; height: 100px; margin-bottom: 6px; }
.histo-col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; cursor: pointer; }
.histo-col--on { opacity: 0.85; }
/* Tooltip au survol d'une colonne : entrées / sorties du mois. */
.histo-tip {
  position: absolute; bottom: calc(100% + 6px); transform: translateX(-50%);
  background: var(--wc-ink); color: #fff; padding: 7px 10px; border-radius: 8px;
  font-size: 11.5px; line-height: 1.45; white-space: nowrap; pointer-events: none;
  box-shadow: 0 6px 18px rgba(0,0,0,0.18); z-index: 5;
}
.histo-tip-title { font-weight: 700; margin-bottom: 3px; text-transform: capitalize; }
.histo-tip-row { display: flex; align-items: center; gap: 6px; }
.histo-tip .histo-key { width: 8px; height: 8px; }
.histo-bar-in { background: var(--wc-success); border-radius: 2px; }
.histo-bar-out { background: var(--wc-primary); border-radius: 2px; }
.histo-months { display: flex; gap: 4px; }
.histo-month { flex: 1; font-size: 9.5px; color: var(--wc-ink-muted); text-align: center; text-transform: uppercase; letter-spacing: 0.04em; }
.histo-legend { display: flex; gap: 14px; margin-top: 12px; font-size: 12px; }
.histo-legend span { display: inline-flex; align-items: center; gap: 5px; }
.histo-key { width: 10px; height: 10px; border-radius: 2px; }
.histo-key--in { background: var(--wc-success); }
.histo-key--out { background: var(--wc-primary); }

/* ════════════════════════════════════════════════════════════════════════
   Historique
   ════════════════════════════════════════════════════════════════════════ */
.history-body { padding: 8px 16px 40px; }
.history-body--embedded { padding: 4px 32px 40px; }
.history-month { margin-bottom: 18px; }
.history-month-label { padding: 8px 4px; }
.history-list { background: var(--wc-surface); border-radius: 14px; border: 1px solid var(--wc-divider); overflow: hidden; }
.history-row { display: flex; align-items: center; gap: 10px; padding: 12px 14px; transition: background var(--d-fast) var(--e-out); }
.history-row + .history-row { border-top: 1px solid var(--wc-divider); }
.history-row--clickable { cursor: pointer; }
@media (hover: hover) { .history-row--clickable:hover { background: var(--wc-surface-tinted); } }
.history-icon {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.history-icon--in { background: var(--wc-success-subtle); color: var(--wc-success); }
.history-icon--out { background: var(--wc-primary-subtle); color: var(--wc-primary); }
.history-main { flex: 1; min-width: 0; }
.history-wine { font-size: 13.5px; color: var(--wc-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -0.01em; }
.history-wine .reg { font-weight: 400; }
.history-wine .cuvee { font-weight: 600; }
.history-wine .vint { color: var(--wc-ink-muted); font-weight: 500; }
.history-sub { font-size: 12px; color: var(--wc-ink-muted); margin-top: 1px; display: flex; align-items: center; gap: 4px; }
.history-sub span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-meta { text-align: right; flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.history-date { font-size: 12px; color: var(--wc-ink-muted); white-space: nowrap; }
.history-rating { display: inline-flex; align-items: center; gap: 5px; }
.history-rating span { font-size: 11.5px; font-weight: 600; color: var(--wc-ink-2); }

/* ════════════════════════════════════════════════════════════════════════
   Onboarding
   ════════════════════════════════════════════════════════════════════════ */
.onboard {
  position: absolute;
  inset: 0;
  z-index: 200;
  background: var(--wc-bg);
  display: flex;
  flex-direction: column;
  animation: wc-fade-in var(--d-base) var(--e-out);
}
.onboard-top { padding: 52px 24px 0; display: flex; justify-content: space-between; }
.onboard-dots { display: flex; gap: 6px; }
.onboard-dot { width: 8px; height: 4px; border-radius: 999px; background: var(--wc-border); transition: all var(--d-base) var(--e-out); }
.onboard-dot--active { width: 22px; background: var(--wc-primary); }
.onboard-skip { font-size: 13px; font-weight: 500; color: var(--wc-ink-muted); }
.onboard-main { flex: 1; padding: 24px 24px 40px; display: flex; flex-direction: column; justify-content: center; }
.onboard-text { margin-top: 36px; }
.onboard-title { font-size: 40px; white-space: pre-line; line-height: 1.05; }
.onboard-body { margin-top: 16px; font-size: 15.5px; line-height: 1.55; color: var(--wc-ink-2); max-width: 320px; }
.onboard-actions { padding: 0 24px 36px; display: flex; gap: 10px; }
.disc-detail-domain { margin-top: 6px; font-size: 14px; color: var(--wc-ink-2); }

/* ════════════════════════════════════════════════════════════════════════
   App shell (layout général)
   ════════════════════════════════════════════════════════════════════════ */
.wc-app--auth { width: 100%; min-height: 100vh; position: relative; background: var(--wc-bg); overflow: hidden; }
.wc-app--mobile { width: 100%; min-height: 100%; position: relative; }
.wc-app--topnav { padding-top: 106px; padding-bottom: 34px; }
.wc-app--bottomnav { padding-bottom: calc(52px + env(safe-area-inset-bottom, 0px)); }
/* Desktop : shell ancré au viewport (scroll interne) → barre latérale pleine
   hauteur et fixe. (#root n'a plus de hauteur définie depuis le scroll natif
   mobile, d'où le 100vh explicite ici.) */
.wc-app--desktop { width: 100%; height: 100vh; position: relative; background: var(--wc-bg); overflow: hidden; }
.app-page { animation: wc-fade-in var(--d-base) var(--e-out); }

.app-header {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: var(--wc-bg);
  border-bottom: 1px solid var(--wc-divider);
}
.app-brand { display: flex; align-items: center; gap: 8px; background: none; border: 0; cursor: pointer; padding: 0; }
.app-brand img { width: 30px; height: 30px; border-radius: 8px; object-fit: cover; }
.app-brand-name { font-family: var(--ff-display); font-weight: 600; font-size: 19px; color: var(--wc-ink); letter-spacing: -0.02em; }

/* Petit label « BÊTA » à droite du logo (header mobile + sidebar desktop). */
.brand-beta {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 5px;
  font-family: var(--ff-text, inherit);
  font-weight: 700;
  font-size: 8.5px;
  line-height: 1.4;
  letter-spacing: 0.08em;
  vertical-align: middle;
  color: var(--wc-primary);
  background: color-mix(in srgb, var(--wc-primary) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--wc-primary) 32%, transparent);
  border-radius: 999px;
  text-transform: uppercase;
}
.app-profile-btn {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  flex-shrink: 0;
  background: var(--wc-primary-subtle);
  border: 1px solid var(--wc-primary-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab-exit {
  position: fixed;
  right: 86px;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--wc-surface);
  color: var(--wc-ink);
  border: 1px solid var(--wc-border-strong);
  box-shadow: 0 4px 14px rgba(31,22,18,0.10);
  z-index: 40;
}

/* ════════════════════════════════════════════════════════════════════════
   Shell desktop / tablette (barre latérale)
   ════════════════════════════════════════════════════════════════════════ */
.sidebar {
  width: 248px;
  flex-shrink: 0;
  height: 100%;
  background: var(--wc-surface);
  border-right: 1px solid var(--wc-divider);
  display: flex;
  flex-direction: column;
  padding: 28px 14px 18px;
}
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 0 10px 28px; background: none; border: 0; cursor: pointer; text-align: left; }
.sidebar-brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(168,66,58,0.18);
  animation: wc-logo-in 3s var(--e-spring, cubic-bezier(0.22,1,0.36,1)) both;
  transform-origin: center bottom;
}
.sidebar-brand-name { font-family: var(--ff-display); color: var(--wc-ink); letter-spacing: -0.02em; font-weight: 600; font-size: 20px; }
.sidebar-brand-tag { font-size: 11px; color: var(--wc-ink-muted); letter-spacing: 0.04em; text-transform: uppercase; font-weight: 600; }
.sidebar-nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar-tab {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: transparent;
  color: var(--wc-ink-2);
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: background var(--d-fast) var(--e-out);
}
@media (hover: hover) { .sidebar-tab:not(.sidebar-tab--active):hover { background: var(--wc-surface-tinted); } }
.sidebar-tab--active { background: var(--wc-primary-subtle); color: var(--wc-primary); font-weight: 600; }
.sidebar-subnav { display: flex; flex-direction: column; gap: 1px; margin: 2px 0 6px 18px; padding-left: 12px; border-left: 1.5px solid var(--wc-divider); }
.sidebar-subitem {
  display: flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 8px;
  background: transparent;
  color: var(--wc-ink-muted);
  font-size: 13.5px;
  font-weight: 500;
  text-align: left;
  letter-spacing: -0.01em;
  transition: background var(--d-fast) var(--e-out);
}
@media (hover: hover) { .sidebar-subitem:hover { background: var(--wc-surface-tinted); } }
.sidebar-subitem--active { background: var(--wc-surface-tinted); color: var(--wc-ink); font-weight: 600; }
.sidebar-spacer { flex: 1; }
.sidebar-secondary { display: flex; flex-direction: column; gap: 2px; padding-top: 18px; border-top: 1px solid var(--wc-divider); }
.sidebar-secondary-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: transparent;
  color: var(--wc-ink-2);
  font-size: 14px;
  font-weight: 500;
  transition: background var(--d-fast) var(--e-out);
}
@media (hover: hover) { .sidebar-secondary-btn:hover { background: var(--wc-surface-tinted); } }
.sidebar-user {
  margin-top: 14px;
  border-top: 1px solid var(--wc-divider);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 12px;
  text-align: left;
  background: transparent;
  transition: background var(--d-fast) var(--e-out);
}
@media (hover: hover) { .sidebar-user:not(.sidebar-user--active):hover { background: var(--wc-surface-tinted); } }
.sidebar-user--active { background: var(--wc-surface-tinted); }
.sidebar-user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  flex-shrink: 0;
  background: var(--wc-primary-subtle);
  color: var(--wc-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--wc-primary-subtle);
}
.sidebar-user-name { flex: 1; min-width: 0; font-size: 15.5px; font-weight: 600; color: var(--wc-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: -0.01em; }

.desktop-shell { width: 100%; height: 100%; display: flex; background: var(--wc-bg); position: relative; overflow: hidden; }
.desktop-main { flex: 1; min-width: 0; height: 100%; overflow-y: auto; position: relative; transition: margin-right var(--d-base) var(--e-out); }
.desktop-main-inner { max-width: 1080px; margin: 0 auto; }
.desktop-main-inner--wide { max-width: none; margin: 0; }
.desktop-fab { position: fixed; right: 32px; bottom: 32px; z-index: 40; }
.desktop-fab--wide { right: auto; }
.desktop-right {
  width: 460px;
  flex-shrink: 0;
  height: 100%;
  background: var(--wc-surface);
  border-left: 1px solid var(--wc-divider);
  overflow-y: auto;
  animation: wc-slide-right var(--d-base) var(--e-out);
}

/* ════════════════════════════════════════════════════════════════════════
   Dégustations
   ════════════════════════════════════════════════════════════════════════ */
.confirm-head { padding: 24px 22px 18px; text-align: center; }
.confirm-head .t-h2 { font-size: 20px; margin-bottom: 10px; }
.confirm-body { font-size: 14px; color: var(--wc-ink-muted); line-height: 1.55; }
.confirm-actions { padding: 0 16px 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.action-sheet { padding: 20px 16px 28px; display: flex; flex-direction: column; gap: 4px; }
.action-sheet-title { padding: 4px 12px 12px; font-size: 13px; color: var(--wc-ink-muted); letter-spacing: 0.02em; text-align: center; }
.action-sheet-list { background: var(--wc-surface); border-radius: var(--r-md); border: 1px solid var(--wc-divider); overflow: hidden; }
.action-sheet-btn { width: 100%; display: flex; align-items: center; gap: 12px; padding: 14px 16px; text-align: left; color: var(--wc-ink); font-size: 15px; font-weight: 500; background: transparent; }
.action-sheet-btn + .action-sheet-btn { border-top: 1px solid var(--wc-divider); }
.action-sheet-btn--danger { color: var(--wc-danger); }
.action-sheet-cancel { margin-top: 8px; height: 50px; border-radius: var(--r-md); background: var(--wc-surface); border: 1px solid var(--wc-divider); font-size: 15px; font-weight: 600; color: var(--wc-ink); }

.sessions-list { padding: 0 16px; display: flex; flex-direction: column; gap: 12px; }
.session-card { width: 100%; padding: 16px; border-radius: var(--r-md); background: var(--wc-surface); border: 1px solid var(--wc-divider); display: flex; flex-direction: column; gap: 14px; text-align: left; cursor: pointer; }
.session-card-head { display: flex; align-items: flex-start; gap: 12px; }
.session-date { width: 48px; flex-shrink: 0; padding: 6px 0; border-radius: 10px; background: var(--wc-primary-subtle); display: flex; flex-direction: column; align-items: center; }
.session-date-month { font-size: 10px; font-weight: 700; color: var(--wc-primary); text-transform: uppercase; letter-spacing: 0.06em; }
.session-date-day { font-family: var(--ff-display); font-size: 22px; color: var(--wc-primary); line-height: 1; }
.session-card-main { flex: 1; min-width: 0; }
.session-name { font-size: 19px; color: var(--wc-ink); }
.session-reasoning { margin-top: 4px; font-size: 13px; color: var(--wc-ink-muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.session-more { width: 30px; height: 30px; border-radius: 999px; color: var(--wc-ink-muted); display: flex; align-items: center; justify-content: center; }
.session-wines { display: flex; flex-direction: column; gap: 6px; padding-top: 12px; border-top: 1px dashed var(--wc-divider); }
.session-wine { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 4px 6px; margin: -4px -6px; border-radius: 8px; text-align: left; background: transparent; cursor: pointer; transition: background var(--d-fast) var(--e-out); }
@media (hover: hover) { .session-wine:hover { background: var(--wc-surface-tinted); } }
.session-wine-num { width: 18px; height: 18px; border-radius: 999px; background: var(--wc-surface-sunken); color: var(--wc-ink-muted); display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; flex-shrink: 0; }
.session-wine-text { flex: 1; min-width: 0; color: var(--wc-ink-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.session-wine-text .cuvee { color: var(--wc-ink); font-weight: 600; }
.session-wine-domain { color: var(--wc-ink-muted); font-size: 12.5px; flex-shrink: 0; margin-left: 8px; }

.add-bottle-search-wrap { padding: 4px 16px 12px; }
.add-bottle-hint { font-size: 12px; color: var(--wc-ink-muted); margin-top: 10px; padding: 0 4px; }
.add-bottle-list { padding: 0 16px 24px; display: flex; flex-direction: column; gap: 6px; }
.add-bottle-item { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--wc-surface); border: 1px solid var(--wc-divider); text-align: left; cursor: pointer; transition: background var(--d-fast) var(--e-out), transform var(--d-fast) var(--e-out); }
@media (hover: hover) { .add-bottle-item:hover { background: var(--wc-surface-tinted); } }
.add-bottle-item:active { transform: scale(0.99); }
.add-bottle-appellation { font-size: 10.5px; font-weight: 700; color: var(--wc-ink-muted); letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.add-bottle-cuvee { font-size: 14px; font-weight: 600; color: var(--wc-ink); letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.add-bottle-cuvee small { color: var(--wc-ink-muted); font-weight: 500; }
.add-bottle-domain { font-size: 12px; color: var(--wc-ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.add-bottle-count { font-size: 11px; color: var(--wc-ink-muted); flex-shrink: 0; }
.add-bottle-empty { padding: 32px; text-align: center; color: var(--wc-ink-muted); font-size: 13.5px; }

.rename-head { padding: 24px 22px 14px; }
.rename-sub { font-size: 13px; color: var(--wc-ink-muted); margin-bottom: 16px; }
.rename-label { display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--wc-ink-muted); margin-bottom: 6px; }
.rename-label--mt { margin: 14px 0 6px; }

.session-flow-intro { padding: 32px 24px 100px; max-width: 620px; margin: 0 auto; }
.mode-list { display: flex; flex-direction: column; gap: 12px; }
.mode-card { padding: 18px; border-radius: 16px; background: var(--wc-surface); color: var(--wc-ink); border: 1px solid var(--wc-border); box-shadow: var(--sh-1); display: flex; align-items: center; gap: 14px; text-align: left; position: relative; overflow: hidden; }
.mode-card--accent { background: linear-gradient(135deg, var(--wc-primary) 0%, var(--wc-primary-hover) 100%); color: var(--wc-on-primary); border: none; box-shadow: 0 8px 24px rgba(107,36,52,0.20); }
.mode-card-glow { position: absolute; right: -30px; top: -30px; width: 140px; height: 140px; border-radius: 999px; background: radial-gradient(circle, rgba(255,255,255,0.12) 0%, transparent 60%); }
.mode-card-icon { width: 48px; height: 48px; border-radius: 12px; flex-shrink: 0; background: var(--wc-primary-subtle); display: flex; align-items: center; justify-content: center; }
.mode-card--accent .mode-card-icon { background: rgba(255,255,255,0.18); }
.mode-card-body { flex: 1; position: relative; }
.mode-card-title { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.mode-card-badge { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: var(--wc-accent-subtle); color: var(--wc-accent); letter-spacing: 0.04em; text-transform: uppercase; }
.mode-card--accent .mode-card-badge { background: rgba(255,255,255,0.18); color: #fff; }
.mode-card-sub { font-size: 13px; margin-top: 3px; opacity: 0.65; line-height: 1.4; }
.mode-card--accent .mode-card-sub { opacity: 0.8; }

.session-flow-photo { padding: 24px 20px; display: flex; flex-direction: column; gap: 12px; max-width: 480px; margin: 0 auto; width: 100%; }
.pairing-form { padding: 24px 20px 120px; display: flex; flex-direction: column; gap: 18px; }
.pairing-section-sub { font-size: 13px; color: var(--wc-ink-muted); margin-bottom: 12px; }
.pairing-textarea-wrap { position: relative; }
.pairing-textarea { width: 100%; padding: 14px; padding-right: 52px; border-radius: 14px; border: 1px solid var(--wc-border); background: var(--wc-surface); font-size: 14.5px; line-height: 1.5; resize: none; outline: 0; font-family: inherit; transition: box-shadow var(--d-fast) var(--e-out); }
.pairing-textarea:focus { box-shadow: 0 0 0 3px var(--wc-primary-subtle); }
.pairing-mic { position: absolute; right: 10px; bottom: 10px; width: 38px; height: 38px; border-radius: 999px; display: flex; align-items: center; justify-content: center; background: var(--wc-surface); color: var(--wc-primary); border: 1px solid var(--wc-border-strong); }
.pairing-mic--on { background: var(--wc-primary); color: var(--wc-on-primary); border-color: var(--wc-primary); box-shadow: 0 0 0 4px var(--wc-primary-subtle); animation: wc-pulse 1s ease-in-out infinite; }
.pairing-listening { margin-top: 8px; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--wc-primary); font-weight: 600; }
.pairing-listening-dot { width: 7px; height: 7px; border-radius: 999px; background: var(--wc-primary); animation: wc-pulse 1s ease-in-out infinite; }
.pairing-colorseg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 4px; border-radius: 14px; background: var(--wc-surface-sunken); border: 1px solid var(--wc-divider); }
.pairing-color { padding: 10px 8px; border-radius: 10px; background: transparent; color: var(--wc-ink); font-size: 13.5px; font-weight: 500; display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: all var(--d-fast) var(--e-out); }
.pairing-color--on { background: var(--wc-surface); box-shadow: var(--sh-1); }
.pairing-tip { padding: 14px; border-radius: 14px; background: var(--wc-primary-tint); display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--wc-primary-subtle); }
.pairing-tip-text { font-size: 12.5px; color: var(--wc-ink-2); line-height: 1.5; }
.pairing-err { font-size: 13px; color: var(--wc-danger); font-weight: 500; }
.pairing-results { padding: 12px 16px 100px; }
.pairing-results-intro { padding: 12px 14px; margin-bottom: 16px; border-radius: 12px; background: var(--wc-surface-tinted); border: 1px solid var(--wc-divider); font-size: 13.5px; color: var(--wc-ink-2); line-height: 1.5; font-style: italic; }

.pair-card { padding: 14px; border-radius: 14px; margin-bottom: 10px; background: var(--wc-surface); border: 1px solid var(--wc-divider); box-shadow: var(--sh-1); transition: all var(--d-base) var(--e-out); }
.pair-card--picked { border: 1.5px solid var(--wc-primary); box-shadow: 0 0 0 3px var(--wc-primary-subtle); }
.pair-card-head { display: flex; gap: 12px; margin-bottom: 12px; }
.pair-photo { position: relative; }
.pair-rank { position: absolute; top: -6px; left: -6px; width: 24px; height: 24px; border-radius: 999px; background: var(--wc-ink); color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(0,0,0,0.15); }
.pair-rank--first { background: var(--wc-accent); }
.pair-body { flex: 1; min-width: 0; }
.pair-appellation-row { display: flex; align-items: center; gap: 6px; margin-bottom: 3px; }
.pair-appellation { font-size: 10.5px; font-weight: 700; color: var(--wc-ink-muted); letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pair-cuvee { font-size: 15px; font-weight: 600; color: var(--wc-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pair-meta { font-size: 12.5px; color: var(--wc-ink-muted); margin-top: 2px; margin-bottom: 6px; }
.pair-score-row { display: flex; align-items: center; gap: 8px; }
.pair-score-track { flex: 1; height: 5px; border-radius: 999px; background: var(--wc-surface-sunken); overflow: hidden; }
.pair-score-fill { height: 100%; transition: width var(--d-slow) var(--e-out); }
.pair-score-value { font-size: 12px; font-weight: 700; color: var(--wc-ink); font-family: var(--ff-display); min-width: 28px; }
.pair-reasoning { font-size: 13px; color: var(--wc-ink-2); line-height: 1.55; padding: 10px 12px; background: var(--wc-surface-tinted); border-radius: 10px; margin-bottom: 10px; }
.pair-toggle { width: 100%; height: 38px; border-radius: 12px; background: var(--wc-surface); color: var(--wc-primary); border: 1px solid var(--wc-border-strong); font-weight: 600; font-size: 13.5px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: all var(--d-fast) var(--e-out); }
.pair-toggle--picked { background: var(--wc-primary); color: #fff; border-color: var(--wc-primary); }

.search-cave { padding: 16px 20px 120px; display: flex; flex-direction: column; gap: 12px; max-width: 740px; margin: 0 auto; }
@media (max-width: 900px) { .search-cave { padding: 16px 0 10px; } }
.search-cave-list { display: flex; flex-direction: column; gap: 8px; }
.search-cave-item { position: relative; border-radius: var(--r-md); outline-offset: -1px; }
.search-cave-item--on { outline: 2px solid var(--wc-primary); }
.session-flow-scroll { flex: 1; overflow-y: auto; }

/* Lien cliquable dans un encart (callout) — ex. « Fenêtre la plus longue ». */
.callout-link {
  color: var(--wc-ink);
  font-weight: 700;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Valeur de méta en alerte (ex. « Aucune » bouteille en stock). */
.detail-meta-value--danger { color: var(--wc-danger); }

/* ── Capture webcam (desktop) ── */
.webcam-overlay {
  position: fixed; inset: 0; z-index: 400;
  background: rgba(10, 8, 8, 0.72);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; animation: wc-fade-in 160ms var(--e-out, ease) both;
}
.webcam-modal {
  width: 100%; max-width: 620px;
  background: var(--wc-surface); border-radius: var(--r-lg, 18px);
  overflow: hidden; box-shadow: 0 24px 60px rgba(0,0,0,0.4);
  display: flex; flex-direction: column;
}
.webcam-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; font-family: var(--ff-display); font-weight: 600;
  border-bottom: 1px solid var(--wc-divider);
}
.webcam-close { background: none; border: 0; cursor: pointer; color: var(--wc-ink); padding: 4px; display: flex; }
.webcam-stage { position: relative; background: #000; aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; }
.webcam-video { width: 100%; height: 100%; object-fit: cover; display: block; }
.webcam-loading, .webcam-err { color: var(--wc-ink-muted); font-size: 14px; padding: 28px; text-align: center; }
.webcam-loading { position: absolute; color: #fff; }
.webcam-err { background: var(--wc-surface); }
.webcam-actions { display: flex; gap: 10px; padding: 14px 18px; justify-content: flex-end; }

/* ── Pagination de l'historique (> 100 entrées) ── */
.history-pager {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin: 18px 4px 8px;
}
.history-pager-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 9px 14px; border-radius: 10px;
  background: var(--wc-surface); border: 1px solid var(--wc-border-strong);
  color: var(--wc-ink); font-size: 13px; font-weight: 600; cursor: pointer;
}
.history-pager-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.history-pager-info { font-size: 12.5px; color: var(--wc-ink-muted); font-weight: 600; }

/* Empêche le scroll de la feuille de "chaîner" vers le fond (iOS), sans
   position:fixed sur le body. */
.detail-scroll, .stats-scroll, .flow-scroll, .sheet-scroll,
.profile-scroll, .session-flow-scroll, .wc-sheet {
  overscroll-behavior: contain;
}
