/**
 * VitaForge Design System — components.css
 * Identité : Night Blue · Violet · Rose · Orange · Vert
 *
 * Usage :
 *   <link rel="stylesheet" href="components.css">
 *   <body class="vf-app"> … </body>
 *
 * Composants : vf-card · vf-btn · vf-input · vf-avatar · vf-progress
 *              vf-stat · vf-bottom-sheet · vf-modal · vf-badge · vf-toast
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Space+Grotesk:wght@500;600&display=swap');

/* ─── Design tokens ─────────────────────────────────────────────── */
:root {
  /* Palette */
  --vf-night: #0b1020;
  --vf-night-elevated: #121829;
  --vf-night-muted: #1a2236;
  --vf-violet: #7c4dff;
  --vf-violet-soft: rgba(124, 77, 255, 0.18);
  --vf-rose: #ff5ea8;
  --vf-rose-soft: rgba(255, 94, 168, 0.18);
  --vf-orange: #ff9f43;
  --vf-orange-soft: rgba(255, 159, 67, 0.18);
  --vf-vert: #3ddc97;
  --vf-vert-soft: rgba(61, 220, 151, 0.18);

  /* Gradients */
  --vf-gradient-brand: linear-gradient(135deg, var(--vf-violet), var(--vf-rose));
  --vf-gradient-warm: linear-gradient(135deg, var(--vf-rose), var(--vf-orange));
  --vf-gradient-success: linear-gradient(135deg, var(--vf-vert), #10b981);

  /* Glass */
  --vf-glass: rgba(255, 255, 255, 0.06);
  --vf-glass-strong: rgba(255, 255, 255, 0.09);
  --vf-glass-border: rgba(255, 255, 255, 0.12);

  /* Typography */
  --vf-font: 'Inter', system-ui, -apple-system, sans-serif;
  --vf-font-display: 'Space Grotesk', var(--vf-font);
  --vf-text: #e8ecf4;
  --vf-text-muted: rgba(232, 236, 244, 0.55);
  --vf-text-subtle: rgba(232, 236, 244, 0.38);

  /* Spacing & shape */
  --vf-radius-sm: 12px;
  --vf-radius: 20px;
  --vf-radius-lg: 28px;
  --vf-radius-full: 9999px;
  --vf-blur: 24px;

  /* Motion */
  --vf-ease: cubic-bezier(0.4, 0, 0.2, 1);
  --vf-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --vf-duration: 0.2s;

  /* Shadows */
  --vf-shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.2);
  --vf-shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.35);
  --vf-shadow-glow-violet: 0 10px 25px -5px rgba(124, 77, 255, 0.4);
  --vf-shadow-sheet: 0 -20px 50px -10px rgba(0, 0, 0, 0.45);

  /* Z-index scale */
  --vf-z-nav: 100;
  --vf-z-header: 108;
  --vf-z-sheet: 110;
  --vf-z-modal: 120;
  --vf-z-drawer: 130;
  --vf-z-toast: 140;

  /* Espace sous Dynamic Island / barre de statut (zone non cliquable) */
  --vf-header-safe-extra: 0px;
  --vf-header-safe-trim: 10px;
}

/* Light theme (optional: html.light or .vf-app--light) */
html.light,
.vf-app--light {
  --vf-glass: rgba(255, 255, 255, 0.88);
  --vf-glass-strong: rgba(255, 255, 255, 0.95);
  --vf-glass-border: rgba(0, 0, 0, 0.08);
  --vf-text: #1e293b;
  --vf-text-muted: #64748b;
  --vf-text-subtle: #94a3b8;
  --vf-night-elevated: #f8fafc;
  --vf-night-muted: #f1f5f9;
}

/* App shell (optional wrapper) */
html {
  height: 100%;
  background-color: #0B1020;
}

.vf-app {
  font-family: var(--vf-font);
  color: var(--vf-text);
  -webkit-font-smoothing: antialiased;
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  background-color: #0B1020;
}

/* Header fixe premier plan — sous Dynamic Island / barre iOS */
.vf-app-header {
  position: fixed !important;
  top: var(--vf-vv-offset-top, 0px);
  left: 0;
  right: 0;
  width: 100%;
  z-index: var(--vf-z-header, 108);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  isolation: isolate;
  pointer-events: auto;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  background-color: rgba(11, 16, 32, 0.9);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  padding-top: 0;
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}

/* Bandeau sous l'îlot / statut : fond seulement, pas de clic */
.vf-app-header__safe {
  flex: 0 0 auto;
  width: 100%;
  height: calc(env(safe-area-inset-top, 0px) + var(--vf-header-safe-extra, 0px));
  min-height: 0;
  pointer-events: none;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

@supports (height: max(0px)) {
  .vf-app-header__safe {
    height: max(
      0px,
      calc(env(safe-area-inset-top, 0px) + var(--vf-header-safe-extra, 0px))
    );
  }
}

@media all and (display-mode: standalone) {
  .vf-app-header__safe {
    height: max(
      0px,
      calc(env(safe-area-inset-top, 0px) + var(--vf-header-safe-extra, 0px))
    );
  }
}

.vf-app-header .vf-app-header__inner {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  min-height: 3rem;
}

body.vf-app {
  padding-top: var(--vf-fixed-header-h, calc(env(safe-area-inset-top, 0px) + 4.25rem));
  padding-bottom: 0;
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
}

body.vf-app > .section {
  position: relative;
  z-index: 0;
}

.vf-bottom-nav-wrap {
  z-index: var(--vf-z-nav, 100);
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  background: #0B1020;
  border-top: 1px solid var(--glass-border, rgba(255, 255, 255, 0.1));
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.vf-bottom-nav-wrap .bottom-nav {
  flex: 0 0 auto;
  padding-top: 0.25rem;
  padding-bottom: 0.5rem;
  background: rgba(11, 16, 32, 0.92);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  border-top: none;
}

.vf-bottom-nav-safe {
  flex: 0 0 auto;
  width: 100%;
  height: env(safe-area-inset-bottom, 0px);
  min-height: 0;
  background: #0B1020;
  pointer-events: none;
}

.vf-section-head {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1rem;
}

@media (min-width: 640px) {
  .vf-section-head {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
  }
}

.vf-section-head--calendar .vf-cal-month-nav {
  width: 100%;
}

@media (min-width: 640px) {
  .vf-section-head--calendar .vf-cal-month-nav {
    width: auto;
  }
}

.vf-app-header__inner {
  gap: 0.5rem;
  min-height: 3rem;
  align-items: center;
}

.vf-header-menu-trigger {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.vf-app-header__actions {
  flex-shrink: 0;
}

.vf-header-auth {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  z-index: 2;
  min-height: 2.5rem;
}

.vf-app-header__inner button,
.vf-app-header__inner [onclick] {
  min-height: 2.5rem;
}

/* Menu latéral — scroll + pied fixe (Se connecter) */
#main-menu-drawer.flex {
  display: flex;
}

.vf-drawer-panel {
  box-sizing: border-box;
  max-height: 100dvh;
  height: 100%;
  padding-top: 0;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.vf-drawer-safe {
  flex-shrink: 0;
}

@supports (padding: max(0px)) {
  .vf-drawer-panel {
    padding-bottom: max(0px, env(safe-area-inset-bottom, 0px));
  }
}

.vf-drawer-panel__scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.vf-drawer-panel__foot {
  flex-shrink: 0;
  padding-bottom: max(0.5rem, env(safe-area-inset-bottom, 0px));
}

.vf-drawer-auth-btn {
  min-height: 3rem;
  touch-action: manipulation;
}

body.vf-menu-open {
  overflow: hidden;
}

.vf-font-display {
  font-family: var(--vf-font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* ─── VFCard ────────────────────────────────────────────────────── */
.vf-card {
  display: block;
  background: var(--vf-glass);
  backdrop-filter: blur(var(--vf-blur));
  -webkit-backdrop-filter: blur(var(--vf-blur));
  border: 1px solid var(--vf-glass-border);
  border-radius: var(--vf-radius-lg);
  padding: 1.25rem 1.5rem;
  transition:
    transform var(--vf-duration) var(--vf-ease),
    box-shadow var(--vf-duration) var(--vf-ease),
    border-color var(--vf-duration) var(--vf-ease);
}

.vf-card--strong {
  background: var(--vf-glass-strong);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
}

.vf-card--flat {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: var(--vf-night-elevated);
}

.vf-card--hover:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: var(--vf-shadow);
}

.vf-card--accent-violet { border-color: rgba(124, 77, 255, 0.35); }
.vf-card--accent-rose { border-color: rgba(255, 94, 168, 0.35); }
.vf-card--accent-orange { border-color: rgba(255, 159, 67, 0.35); }
.vf-card--accent-vert { border-color: rgba(61, 220, 151, 0.35); }

.vf-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.vf-card__title {
  font-family: var(--vf-font-display);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--vf-text);
  margin: 0;
}

.vf-card__subtitle {
  font-size: 0.8125rem;
  color: var(--vf-text-muted);
  margin: 0.25rem 0 0;
}

.vf-card__body {
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--vf-text-muted);
}

.vf-card__footer {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--vf-glass-border);
}

/* ─── VFButton ──────────────────────────────────────────────────── */
.vf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--vf-font);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
  padding: 0.75rem 1.25rem;
  border-radius: var(--vf-radius-full);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition:
    transform var(--vf-duration) var(--vf-ease),
    box-shadow var(--vf-duration) var(--vf-ease),
    background var(--vf-duration) var(--vf-ease),
    border-color var(--vf-duration) var(--vf-ease),
    color var(--vf-duration) var(--vf-ease);
  -webkit-tap-highlight-color: transparent;
}

.vf-btn:focus-visible {
  outline: 2px solid var(--vf-violet);
  outline-offset: 2px;
}

.vf-btn:disabled,
.vf-btn[aria-disabled='true'] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.vf-btn--primary {
  background: var(--vf-gradient-brand);
  color: #fff;
  box-shadow: var(--vf-shadow-glow-violet);
  border-color: rgba(255, 255, 255, 0.2);
}

.vf-btn--primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 16px 32px -6px rgba(124, 77, 255, 0.5);
}

.vf-btn--secondary {
  background: var(--vf-gradient-warm);
  color: #0b1020;
  font-weight: 600;
}

.vf-btn--success {
  background: var(--vf-gradient-success);
  color: #0b1020;
  font-weight: 600;
}

.vf-btn--ghost {
  background: transparent;
  color: var(--vf-text);
  border-color: var(--vf-glass-border);
}

.vf-btn--ghost:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.vf-btn--danger {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.35);
}

.vf-btn--danger:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.28);
}

.vf-btn--violet { background: var(--vf-violet); color: #fff; }
.vf-btn--rose { background: var(--vf-rose); color: #0b1020; font-weight: 600; }
.vf-btn--orange { background: var(--vf-orange); color: #0b1020; font-weight: 600; }
.vf-btn--vert { background: var(--vf-vert); color: #0b1020; font-weight: 600; }

.vf-btn--sm {
  font-size: 0.75rem;
  padding: 0.5rem 0.875rem;
}

.vf-btn--lg {
  font-size: 1rem;
  padding: 0.875rem 1.5rem;
}

.vf-btn--icon {
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border-radius: var(--vf-radius);
}

.vf-btn--block { width: 100%; }

.vf-btn:active:not(:disabled) {
  transform: scale(0.98);
}

/* ─── VFInput ───────────────────────────────────────────────────── */
.vf-field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  width: 100%;
}

.vf-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--vf-text-muted);
  letter-spacing: 0.02em;
}

.vf-label--required::after {
  content: ' *';
  color: var(--vf-rose);
}

.vf-input,
.vf-textarea,
.vf-select {
  width: 100%;
  font-family: var(--vf-font);
  font-size: 0.9375rem;
  color: var(--vf-text);
  background: var(--vf-night);
  border: 1px solid var(--vf-glass-border);
  border-radius: var(--vf-radius);
  padding: 0.75rem 1rem;
  transition:
    border-color var(--vf-duration) var(--vf-ease),
    box-shadow var(--vf-duration) var(--vf-ease);
  appearance: none;
}

html.light .vf-input,
html.light .vf-textarea,
html.light .vf-select,
.vf-app--light .vf-input,
.vf-app--light .vf-textarea,
.vf-app--light .vf-select {
  background: #fff;
}

.vf-input::placeholder,
.vf-textarea::placeholder {
  color: var(--vf-text-subtle);
}

.vf-input:hover:not(:disabled):not(:focus),
.vf-textarea:hover:not(:disabled):not(:focus),
.vf-select:hover:not(:disabled):not(:focus) {
  border-color: rgba(255, 255, 255, 0.2);
}

.vf-input:focus,
.vf-textarea:focus,
.vf-select:focus {
  outline: none;
  border-color: var(--vf-violet);
  box-shadow: 0 0 0 3px var(--vf-violet-soft);
}

.vf-input--error,
.vf-textarea--error,
.vf-select--error {
  border-color: #f87171;
}

.vf-input--error:focus,
.vf-textarea--error:focus {
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.25);
}

.vf-input:disabled,
.vf-textarea:disabled,
.vf-select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.vf-textarea {
  min-height: 5rem;
  resize: vertical;
  line-height: 1.5;
}

.vf-select {
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M3 4.5L6 8l3-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
}

.vf-hint {
  font-size: 0.75rem;
  color: var(--vf-text-subtle);
}

.vf-error {
  font-size: 0.75rem;
  color: #f87171;
}

.vf-input-group {
  display: flex;
  align-items: stretch;
  gap: 0;
}

.vf-input-group .vf-input {
  border-radius: var(--vf-radius) 0 0 var(--vf-radius);
}

.vf-input-group .vf-btn {
  border-radius: 0 var(--vf-radius) var(--vf-radius) 0;
}

/* ─── VFAvatar ──────────────────────────────────────────────────── */
.vf-avatar {
  --vf-avatar-size: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--vf-avatar-size);
  height: var(--vf-avatar-size);
  border-radius: var(--vf-radius);
  font-family: var(--vf-font-display);
  font-size: calc(var(--vf-avatar-size) * 0.38);
  font-weight: 600;
  color: #fff;
  background: var(--vf-gradient-brand);
  border: 2px solid var(--vf-glass-border);
  overflow: hidden;
  flex-shrink: 0;
  user-select: none;
}

.vf-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vf-avatar--sm { --vf-avatar-size: 2rem; border-radius: var(--vf-radius-sm); }
.vf-avatar--lg { --vf-avatar-size: 3.5rem; }
.vf-avatar--xl { --vf-avatar-size: 4.5rem; border-radius: var(--vf-radius-lg); }

.vf-avatar--round { border-radius: var(--vf-radius-full); }

.vf-avatar--violet { background: var(--vf-violet); }
.vf-avatar--rose { background: var(--vf-rose); color: #0b1020; }
.vf-avatar--orange { background: var(--vf-orange); color: #0b1020; }
.vf-avatar--vert { background: var(--vf-vert); color: #0b1020; }

.vf-avatar--ring {
  box-shadow: 0 0 0 3px var(--vf-night), 0 0 0 5px var(--vf-violet);
}

.vf-avatar-group {
  display: inline-flex;
  flex-direction: row-reverse;
  align-items: center;
}

.vf-avatar-group .vf-avatar {
  margin-left: -0.65rem;
  border: 2px solid var(--vf-night);
}

.vf-avatar-group .vf-avatar:last-child {
  margin-left: 0;
}

/* ─── VFProgress ─────────────────────────────────────────────────── */
.vf-progress {
  width: 100%;
}

.vf-progress__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.vf-progress__label {
  font-size: 0.8125rem;
  color: var(--vf-text-muted);
}

.vf-progress__value {
  font-family: var(--vf-font-display);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--vf-text);
}

.vf-progress__track {
  height: 0.5rem;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--vf-radius-full);
  overflow: hidden;
}

html.light .vf-progress__track,
.vf-app--light .vf-progress__track {
  background: rgba(0, 0, 0, 0.06);
}

.vf-progress__bar {
  height: 100%;
  width: var(--vf-progress, 0%);
  min-width: 0;
  border-radius: var(--vf-radius-full);
  background: var(--vf-gradient-brand);
  transition: width 0.45s var(--vf-ease);
}

.vf-progress__bar--rose { background: var(--vf-gradient-warm); }
.vf-progress__bar--orange { background: linear-gradient(90deg, var(--vf-orange), #fbbf24); }
.vf-progress__bar--vert { background: var(--vf-gradient-success); }
.vf-progress__bar--violet { background: var(--vf-violet); }

.vf-progress--lg .vf-progress__track { height: 0.75rem; }
.vf-progress--sm .vf-progress__track { height: 0.35rem; }

/* Indeterminate */
.vf-progress--indeterminate .vf-progress__bar {
  width: 40% !important;
  animation: vf-progress-indeterminate 1.2s var(--vf-ease) infinite;
}

@keyframes vf-progress-indeterminate {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

/* ─── VFStat ────────────────────────────────────────────────────── */
.vf-stat {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.vf-stat__label {
  font-size: 0.8125rem;
  color: var(--vf-text-muted);
}

.vf-stat__value {
  font-family: var(--vf-font-display);
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--vf-text);
  line-height: 1.1;
}

.vf-stat__value--violet { color: var(--vf-violet); }
.vf-stat__value--rose { color: var(--vf-rose); }
.vf-stat__value--orange { color: var(--vf-orange); }
.vf-stat__value--vert { color: var(--vf-vert); }

.vf-stat__meta {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: var(--vf-text-subtle);
}

.vf-stat__trend--up { color: var(--vf-vert); }
.vf-stat__trend--down { color: var(--vf-rose); }

.vf-stat--inline {
  flex-direction: row;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

.vf-stat--inline .vf-stat__value {
  font-size: 1.5rem;
}

/* ─── VFModal ───────────────────────────────────────────────────── */
.vf-modal {
  position: fixed;
  inset: 0;
  z-index: var(--vf-z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transition:
    opacity var(--vf-duration) var(--vf-ease),
    visibility var(--vf-duration) var(--vf-ease);
}

.vf-modal--open {
  pointer-events: auto;
  visibility: visible;
  opacity: 1;
}

.vf-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.vf-modal__dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 28rem;
  max-height: min(90vh, 640px);
  display: flex;
  flex-direction: column;
  background: var(--vf-glass-strong);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--vf-glass-border);
  border-radius: var(--vf-radius-lg);
  box-shadow: var(--vf-shadow);
  transform: scale(0.96) translateY(8px);
  transition: transform var(--vf-duration) var(--vf-ease-spring);
  overflow: hidden;
}

.vf-modal--open .vf-modal__dialog {
  transform: scale(1) translateY(0);
}

.vf-modal__dialog--sm { max-width: 22rem; }
.vf-modal__dialog--lg { max-width: 36rem; }

.vf-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem 0;
}

.vf-modal__title {
  font-family: var(--vf-font-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
  color: var(--vf-text);
}

.vf-modal__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: none;
  border-radius: var(--vf-radius-full);
  background: transparent;
  color: var(--vf-text-muted);
  cursor: pointer;
  transition: background var(--vf-duration) var(--vf-ease), color var(--vf-duration) var(--vf-ease);
}

.vf-modal__close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--vf-text);
}

.vf-modal__body {
  padding: 1.25rem 1.5rem;
  overflow-y: auto;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--vf-text-muted);
}

.vf-modal__footer {
  display: flex;
  gap: 0.75rem;
  padding: 0 1.5rem 1.5rem;
}

.vf-modal__footer .vf-btn { flex: 1; }

/* ─── VFBottomSheet ─────────────────────────────────────────────── */
.vf-bottom-sheet {
  position: fixed;
  inset: 0;
  z-index: var(--vf-z-sheet);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transition:
    opacity var(--vf-duration) var(--vf-ease),
    visibility var(--vf-duration) var(--vf-ease);
}

.vf-bottom-sheet--open {
  pointer-events: auto;
  visibility: visible;
  opacity: 1;
}

.vf-bottom-sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.vf-bottom-sheet__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 28rem;
  margin: 0 auto;
  padding: 0.5rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
  background: var(--vf-glass-strong);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  border: 1px solid var(--vf-glass-border);
  border-bottom: none;
  border-radius: var(--vf-radius-lg) var(--vf-radius-lg) 0 0;
  box-shadow: var(--vf-shadow-sheet);
  transform: translateY(100%);
  transition: transform 0.32s var(--vf-ease-spring);
  max-height: 85vh;
  overflow-y: auto;
}

.vf-bottom-sheet--open .vf-bottom-sheet__panel {
  transform: translateY(0);
}

.vf-bottom-sheet__handle {
  width: 2.5rem;
  height: 0.25rem;
  margin: 0.5rem auto 1rem;
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--vf-radius-full);
}

.vf-bottom-sheet__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.vf-bottom-sheet__title {
  font-family: var(--vf-font-display);
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
}

.vf-bottom-sheet__subtitle {
  font-size: 0.75rem;
  color: var(--vf-text-muted);
  margin: 0.25rem 0 0;
}

.vf-bottom-sheet__body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Desktop: sheet peut devenir panneau flottant */
@media (min-width: 768px) {
  .vf-bottom-sheet {
    align-items: flex-start;
    justify-content: center;
    padding-top: 4rem;
  }

  .vf-bottom-sheet__panel {
    border-radius: var(--vf-radius-lg);
    border-bottom: 1px solid var(--vf-glass-border);
    margin-bottom: auto;
    transform: translateY(16px);
    opacity: 0;
  }

  .vf-bottom-sheet--open .vf-bottom-sheet__panel {
    transform: translateY(0);
    opacity: 1;
  }

  .vf-bottom-sheet__handle {
    display: none;
  }
}

/* ─── VFBadge ───────────────────────────────────────────────────── */
.vf-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.25rem 0.625rem;
  border-radius: var(--vf-radius-full);
  border: 1px solid transparent;
  line-height: 1.2;
  white-space: nowrap;
}

.vf-badge--violet {
  background: var(--vf-violet-soft);
  color: #c4b5fd;
  border-color: rgba(124, 77, 255, 0.3);
}

.vf-badge--rose {
  background: var(--vf-rose-soft);
  color: #fda4cf;
  border-color: rgba(255, 94, 168, 0.3);
}

.vf-badge--orange {
  background: var(--vf-orange-soft);
  color: #fdba74;
  border-color: rgba(255, 159, 67, 0.3);
}

.vf-badge--vert {
  background: var(--vf-vert-soft);
  color: #6ee7b7;
  border-color: rgba(61, 220, 151, 0.3);
}

.vf-badge--neutral {
  background: rgba(255, 255, 255, 0.08);
  color: var(--vf-text-muted);
  border-color: var(--vf-glass-border);
}

.vf-badge--solid-violet {
  background: var(--vf-violet);
  color: #fff;
  border-color: transparent;
}

.vf-badge--dot::before {
  content: '';
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background: currentColor;
}

.vf-badge--sm {
  font-size: 0.625rem;
  padding: 0.15rem 0.45rem;
}

.vf-badge--lg {
  font-size: 0.75rem;
  padding: 0.35rem 0.75rem;
  text-transform: none;
  letter-spacing: 0;
}

/* ─── Centre de commandement (dashboard) ─────────────────────────── */
.vf-command {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.vf-command__hero {
  position: relative;
  overflow: hidden;
  padding: 1.75rem 1.5rem;
  background: var(--vf-glass-strong);
  border: 1px solid var(--vf-glass-border);
  border-radius: var(--vf-radius-lg);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
}

.vf-command__hero::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -10%;
  width: 55%;
  height: 140%;
  background: radial-gradient(ellipse, rgba(124, 77, 255, 0.22) 0%, transparent 70%);
  pointer-events: none;
}

.vf-command__hero-title {
  font-family: var(--vf-font-display);
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  margin: 0;
  position: relative;
}

.vf-command__hero-sub {
  margin: 0.5rem 0 0;
  font-size: 0.9375rem;
  color: var(--vf-text-muted);
  position: relative;
}

.vf-command__grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 640px) {
  .vf-command__grid--2 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .vf-command__grid--main {
    grid-template-columns: repeat(3, 1fr);
  }
}

.vf-command__widget-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--vf-font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  margin: 0 0 1rem;
  color: var(--vf-text);
}

.vf-command__widget-title i {
  font-size: 1rem;
  opacity: 0.85;
}

.vf-command__list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.vf-command__list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--vf-radius);
  font-size: 0.875rem;
}

html.light .vf-command__list-item,
.vf-app--light .vf-command__list-item {
  background: rgba(0, 0, 0, 0.04);
}

.vf-command__list-item--empty {
  color: var(--vf-text-subtle);
  justify-content: center;
  font-size: 0.8125rem;
}

.vf-command__couple-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--vf-glass-border);
}

.vf-command__couple-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.vf-command__couple-name {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 500;
}

.vf-command__couple-stat {
  font-size: 0.8125rem;
  color: var(--vf-text-muted);
}

.vf-command__couple-stat strong {
  color: var(--vf-vert);
  font-weight: 600;
}

.vf-command__goal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.vf-command__goal-name {
  font-family: var(--vf-font-display);
  font-weight: 600;
  font-size: 1.0625rem;
}

.vf-command__challenge-amount {
  font-family: var(--vf-font-display);
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--vf-orange);
  margin: 0;
  line-height: 1.1;
}

.vf-command__timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: 280px;
  overflow-y: auto;
}

.vf-command__timeline-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem 0;
  position: relative;
}

.vf-command__timeline-item:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 0.9rem;
  top: 2.25rem;
  bottom: -0.25rem;
  width: 2px;
  background: var(--vf-glass-border);
}

.vf-command__timeline-dot {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: var(--vf-radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.65rem;
  z-index: 1;
}

.vf-command__timeline-dot--rose { background: var(--vf-rose-soft); color: var(--vf-rose); }
.vf-command__timeline-dot--vert { background: var(--vf-vert-soft); color: var(--vf-vert); }
.vf-command__timeline-dot--orange { background: var(--vf-orange-soft); color: var(--vf-orange); }
.vf-command__timeline-dot--violet { background: var(--vf-violet-soft); color: #c4b5fd; }
.vf-command__timeline-dot--emerald { background: rgba(16, 185, 129, 0.15); color: #6ee7b7; }

.vf-command__timeline-body {
  flex: 1;
  min-width: 0;
  padding-top: 0.1rem;
}

.vf-command__timeline-text {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--vf-text);
  margin: 0;
  line-height: 1.35;
}

.vf-command__timeline-text strong {
  color: var(--vf-rose);
  font-weight: 600;
}

.vf-command__timeline-detail {
  font-size: 0.75rem;
  color: var(--vf-text-muted);
  margin: 0.2rem 0 0;
}

.vf-command__timeline-time {
  font-size: 0.6875rem;
  color: var(--vf-text-subtle);
  margin-top: 0.15rem;
}

.vf-command__timeline-item--empty {
  justify-content: center;
  padding: 1.5rem 0;
  color: var(--vf-text-subtle);
  font-size: 0.8125rem;
}

.vf-command__timeline-item--empty::after {
  display: none;
}

/* Vie à deux (dashboard humain) */
.vf-command__human {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.vf-command__section-head {
  margin-bottom: 0.25rem;
}

.vf-command__section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--vf-font-display);
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
  color: var(--vf-text);
}

.vf-command__section-sub {
  margin: 0.35rem 0 0;
  font-size: 0.8125rem;
  color: var(--vf-text-muted);
}

.vf-command__mini-stats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.vf-command__mini-stat {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.15rem 0.75rem;
  align-items: baseline;
  padding: 0.55rem 0.75rem;
  background: rgba(0, 0, 0, 0.18);
  border-radius: var(--vf-radius-sm);
}

html.light .vf-command__mini-stat,
.vf-app--light .vf-command__mini-stat {
  background: rgba(0, 0, 0, 0.04);
}

.vf-command__mini-stat-label {
  grid-column: 1;
  font-size: 0.75rem;
  color: var(--vf-text-muted);
}

.vf-command__mini-stat-value {
  grid-column: 2;
  grid-row: 1 / span 2;
  font-family: var(--vf-font-display);
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--vf-text);
  text-align: right;
  white-space: nowrap;
}

.vf-command__mini-stat-sub {
  grid-column: 1;
  font-size: 0.6875rem;
  color: var(--vf-text-subtle);
}

.vf-command__savings-total {
  font-family: var(--vf-font-display);
  font-size: clamp(1.75rem, 5vw, 2.35rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--vf-vert);
  margin: 0;
  line-height: 1.1;
}

.vf-command__savings-meta {
  font-size: 0.8125rem;
  color: var(--vf-text-muted);
  margin: 0.35rem 0 0;
  line-height: 1.4;
}

.vf-command__challenges {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.vf-command__challenge-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.vf-command__challenge-item-label {
  font-family: var(--vf-font-display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--vf-orange);
}

.vf-command__challenge-item-name {
  font-size: 0.8125rem;
  color: var(--vf-text-muted);
  margin: 0 0 0.5rem;
}

.vf-command__successes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-height: 220px;
  overflow-y: auto;
}

.vf-command__success-item {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  padding: 0.6rem 0.75rem;
  background: rgba(0, 0, 0, 0.18);
  border-radius: var(--vf-radius-sm);
}

html.light .vf-command__success-item,
.vf-app--light .vf-command__success-item {
  background: rgba(0, 0, 0, 0.04);
}

.vf-command__success-icon {
  width: 2rem;
  height: 2rem;
  border-radius: var(--vf-radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.75rem;
}

.vf-command__success-icon--trophy {
  background: var(--vf-orange-soft);
  color: var(--vf-orange);
}

.vf-command__success-icon--check {
  background: var(--vf-vert-soft);
  color: var(--vf-vert);
}

.vf-command__success-title {
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0;
  color: var(--vf-text);
}

.vf-command__success-detail {
  font-size: 0.75rem;
  color: var(--vf-text-muted);
  margin: 0.15rem 0 0;
}

.vf-command__success-who {
  font-size: 0.6875rem;
  color: var(--vf-text-subtle);
  margin: 0.2rem 0 0;
}

/* ─── Budget intelligent ─────────────────────────────────────────── */
.vf-budget-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (min-width: 768px) {
  .vf-budget-kpi-grid { grid-template-columns: repeat(4, 1fr); }
}

.vf-budget-kpi {
  padding: 1rem 1.15rem;
  border-radius: var(--vf-radius);
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--vf-glass-border);
}

html.light .vf-budget-kpi,
.vf-app--light .vf-budget-kpi {
  background: rgba(0, 0, 0, 0.03);
}

.vf-budget-kpi__label {
  font-size: 0.75rem;
  color: var(--vf-text-muted);
  margin: 0 0 0.35rem;
}

.vf-budget-kpi__value {
  font-family: var(--vf-font-display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
}

.vf-budget-kpi__value--positive { color: var(--vf-vert); }
.vf-budget-kpi__value--negative { color: #f87171; }
.vf-budget-kpi__value--income { color: var(--vf-violet); }
.vf-budget-kpi__value--expense { color: var(--vf-rose); }

.vf-budget-forecast {
  text-align: center;
  padding: 1.25rem 1rem;
}

.vf-budget-forecast__amount {
  font-family: var(--vf-font-display);
  font-size: clamp(2rem, 6vw, 2.75rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  margin: 0.25rem 0 0;
}

.vf-budget-income-types {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

@media (min-width: 640px) {
  .vf-budget-income-types { grid-template-columns: repeat(4, 1fr); }
}

.vf-budget-income-type {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.65rem 0.5rem;
  border-radius: var(--vf-radius);
  border: 1px solid var(--vf-glass-border);
  background: rgba(0, 0, 0, 0.15);
  font-size: 0.75rem;
  color: var(--vf-text-muted);
}

.vf-budget-income-type strong {
  font-size: 0.9375rem;
  color: var(--vf-text);
  font-weight: 600;
}

.vf-budget-recurring-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .vf-budget-recurring-grid { grid-template-columns: repeat(4, 1fr); }
}

.vf-budget-recurring-item {
  padding: 0.85rem 1rem;
  border-radius: var(--vf-radius);
  border: 1px solid var(--vf-glass-border);
  background: rgba(0, 0, 0, 0.18);
}

.vf-budget-recurring-item__name {
  font-size: 0.8125rem;
  color: var(--vf-text-muted);
  margin: 0 0 0.25rem;
}

.vf-budget-recurring-item__amount {
  font-family: var(--vf-font-display);
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
}

.vf-budget-analysis {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.vf-budget-analysis-row {
  display: grid;
  grid-template-columns: minmax(4.5rem, 9rem) 1fr 3.5rem;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8125rem;
}

.vf-budget-analysis-row__label {
  font-weight: 500;
  color: var(--vf-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vf-budget-analysis-row__bar {
  height: 0.5rem;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--vf-radius-full);
  overflow: hidden;
}

.vf-budget-analysis-row__fill {
  height: 100%;
  border-radius: var(--vf-radius-full);
  transition: width 0.4s var(--vf-ease);
}

.vf-budget-analysis-row__fill--maison { background: linear-gradient(90deg, var(--vf-violet), #a78bfa); }
.vf-budget-analysis-row__fill--transport { background: linear-gradient(90deg, #38bdf8, #0ea5e9); }
.vf-budget-analysis-row__fill--loisirs { background: linear-gradient(90deg, var(--vf-rose), var(--vf-orange)); }
.vf-budget-analysis-row__fill--alimentation { background: var(--vf-gradient-success); }

.vf-budget-analysis-row__amount {
  text-align: right;
  color: var(--vf-text-muted);
  font-variant-numeric: tabular-nums;
}

.vf-budget-income-list {
  max-height: 200px;
  overflow-y: auto;
}

/* ─── Moteur de motivation (objectifs) ───────────────────────────── */
.vf-goal-card {
  border-radius: var(--vf-radius-lg);
  padding: 1.35rem 1.5rem;
}

.vf-goal-card--done {
  opacity: 0.85;
  border-color: rgba(52, 211, 153, 0.35);
}

.vf-goal-motivation {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
  margin: 1rem 0;
}

@media (min-width: 480px) {
  .vf-goal-motivation { grid-template-columns: repeat(4, 1fr); }
}

.vf-goal-motivation__cell {
  padding: 0.75rem 0.65rem;
  border-radius: var(--vf-radius);
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--vf-glass-border);
  text-align: center;
}

html.light .vf-goal-motivation__cell,
.vf-app--light .vf-goal-motivation__cell {
  background: rgba(0, 0, 0, 0.04);
}

.vf-goal-motivation__label {
  display: block;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--vf-text-muted);
  margin-bottom: 0.35rem;
}

.vf-goal-motivation__value {
  font-family: var(--vf-font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--vf-text);
  line-height: 1.25;
}

.vf-goal-motivation__value--accent {
  color: var(--vf-orange);
}

.vf-goal-motivation__value--success {
  color: var(--vf-vert);
}

.vf-goal-motivation__value--warn {
  color: #fbbf24;
}

.vf-goal-projection {
  padding: 0.85rem 1rem;
  border-radius: var(--vf-radius);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.12), rgba(244, 114, 182, 0.08));
  border: 1px solid rgba(139, 92, 246, 0.25);
  margin-bottom: 1rem;
}

.vf-goal-projection__text {
  font-size: 0.875rem;
  font-weight: 500;
  margin: 0;
  color: var(--vf-text);
}

.vf-goal-projection__text i {
  color: var(--vf-violet);
  margin-right: 0.35rem;
}

.vf-goal-deposits {
  border-top: 1px solid var(--vf-glass-border);
  padding-top: 0.85rem;
  margin-top: 0.25rem;
}

.vf-goal-deposits__title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--vf-text-muted);
  margin: 0 0 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.vf-goal-deposit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8125rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.vf-goal-deposit-row:last-child {
  border-bottom: none;
}

/* ─── Productivité (tâches) ─────────────────────────────────────── */
.vf-productivity-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

@media (max-width: 640px) {
  .vf-productivity-stats { grid-template-columns: 1fr; }
}

.vf-productivity-stat {
  padding: 1rem 1.15rem;
  border-radius: var(--vf-radius);
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--vf-glass-border);
  text-align: center;
}

.vf-productivity-stat__label {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--vf-text-muted);
  margin: 0 0 0.35rem;
}

.vf-productivity-stat__value {
  font-family: var(--vf-font-display);
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
}

.vf-productivity-stat__value--ok { color: var(--vf-vert); }
.vf-productivity-stat__value--warn { color: #fbbf24; }
.vf-productivity-stat__value--bad { color: #f87171; }

.vf-productivity-stat__sub {
  font-size: 0.6875rem;
  color: var(--vf-text-subtle);
  margin: 0.35rem 0 0;
}

.vf-productivity-breakdown {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--vf-text-muted);
  padding-top: 0.25rem;
}

.vf-task-row {
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.vf-task-row--late {
  background: rgba(248, 113, 113, 0.06);
  border-left: 3px solid #f87171;
}

.vf-task-row--done {
  opacity: 0.65;
}

.vf-task-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.vf-task-priority {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: var(--vf-radius-full);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.vf-task-assignee {
  font-size: 0.6875rem;
  padding: 0.2rem 0.55rem;
  border-radius: var(--vf-radius-full);
  background: var(--vf-violet-soft);
  color: #c4b5fd;
}

.vf-task-priority--urgent {
  background: var(--vf-rose-soft);
  color: var(--vf-rose);
}

.vf-task-priority--normal {
  background: var(--vf-orange-soft);
  color: var(--vf-orange);
}

.vf-task-priority--faible {
  background: var(--vf-vert-soft);
  color: var(--vf-vert);
}

/* ─── Modales formulaire (tâche, budget, objectif) ───────────────── */
.vf-form-modal__dialog,
.vf-task-modal__dialog {
  background: var(--vf-night-elevated);
  border: 1px solid var(--vf-glass-border);
  box-shadow: var(--vf-shadow), 0 0 0 1px rgba(124, 77, 255, 0.08);
  /* Menu natif du select : ne pas couper la liste déroulante */
  overflow: visible;
}

.vf-form-modal__dialog .vf-modal__body {
  overflow-x: visible;
}

.vf-form-modal__dialog::before,
.vf-task-modal__dialog::before {
  content: '';
  display: block;
  height: 3px;
  background: var(--vf-gradient-brand);
  flex-shrink: 0;
}

.vf-form-modal__dialog--expense::before {
  background: var(--vf-gradient-success);
}

.vf-form-modal__dialog--income::before {
  background: linear-gradient(135deg, var(--vf-violet), #5b8def);
}

.vf-form-modal__dialog--goal::before {
  background: var(--vf-gradient-warm);
}

.vf-form-modal__dialog--settings::before {
  background: linear-gradient(135deg, #64748b, var(--vf-violet));
}

.vf-form-modal__dialog--event::before {
  background: linear-gradient(135deg, #5b8def, var(--vf-violet));
}

.vf-form-modal__dialog--deposit::before {
  background: var(--vf-gradient-success);
}

.vf-form-modal__dialog--recurring::before {
  background: var(--vf-gradient-warm);
}

.vf-form-modal__dialog--space::before {
  background: var(--vf-gradient-brand);
}

.vf-form-modal__dialog--auth::before {
  background: linear-gradient(135deg, var(--vf-violet), #5b8def);
}

.vf-form-modal__icon--settings {
  background: rgba(100, 116, 139, 0.2);
  color: #94a3b8;
}

.vf-form-modal__icon--event {
  background: rgba(91, 141, 239, 0.15);
  color: #5b8def;
}

.vf-form-modal__icon--deposit {
  background: var(--vf-vert-soft);
  color: var(--vf-vert);
}

.vf-form-modal__icon--recurring {
  background: var(--vf-orange-soft);
  color: var(--vf-orange);
}

.vf-form-modal__icon--space {
  background: var(--vf-violet-soft);
  color: var(--vf-violet);
}

.vf-form-modal__icon--auth {
  background: var(--vf-violet-soft);
  color: var(--vf-violet);
}

.vf-settings__code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.6875rem;
  line-height: 1.45;
  padding: 0.65rem 0.75rem;
  border-radius: var(--vf-radius-sm);
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--vf-glass-border);
  color: var(--vf-vert);
  word-break: break-all;
}

html.light .vf-settings__code,
.vf-app--light .vf-settings__code {
  background: rgba(0, 0, 0, 0.05);
}

.vf-settings__logout {
  padding-top: 0.5rem;
  border-top: 1px solid var(--vf-glass-border);
}

.vf-hint--inline {
  margin-top: 0.15rem;
  margin-bottom: 0;
}

.vf-theme-picker {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.vf-segment-picker--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.vf-modal__scroll-panel {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 280px;
  overflow: auto;
  padding: 0.5rem;
  border-radius: var(--vf-radius-sm);
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid var(--vf-glass-border);
}

html.light .vf-modal__scroll-panel,
.vf-app--light .vf-modal__scroll-panel {
  background: rgba(0, 0, 0, 0.04);
}

.vf-modal__scroll-panel--events {
  gap: 0.35rem;
}

.vf-modal__footer--stack {
  flex-direction: column;
}

.vf-icon-picker__grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.65rem;
}

.vf-icon-picker__option {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  min-height: 4.5rem;
  padding: 0.5rem 0.35rem;
  border-radius: var(--vf-radius-sm);
  border: 1px solid var(--vf-glass-border);
  background: rgba(0, 0, 0, 0.12);
  cursor: pointer;
  transition: border-color var(--vf-duration) var(--vf-ease), background var(--vf-duration) var(--vf-ease), transform var(--vf-duration) var(--vf-ease);
}

.vf-icon-picker__option:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(124, 77, 255, 0.35);
}

.vf-icon-picker__option--selected {
  border-color: var(--vf-violet);
  background: var(--vf-violet-soft);
  box-shadow: 0 0 0 1px rgba(124, 77, 255, 0.25);
}

.vf-icon-picker__emoji {
  font-size: 1.75rem;
  line-height: 1;
}

.vf-icon-picker__fa {
  font-size: 1.35rem;
  color: var(--vf-violet);
}

.vf-icon-picker__label {
  font-size: 0.625rem;
  color: var(--vf-text-subtle);
  text-align: center;
  line-height: 1.2;
}

.vf-space-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: var(--vf-radius-sm);
  background: rgba(0, 0, 0, 0.14);
  border: 1px solid transparent;
  transition: background var(--vf-duration) var(--vf-ease), border-color var(--vf-duration) var(--vf-ease);
}

.vf-space-item--current {
  background: var(--vf-violet-soft);
  border-color: rgba(124, 77, 255, 0.35);
}

.vf-space-item__main {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.vf-space-item__icon {
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
  width: 1.75rem;
  text-align: center;
  color: var(--vf-violet);
}

.vf-space-item__name {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--vf-text);
}

.vf-space-item__meta {
  font-size: 0.6875rem;
  color: var(--vf-text-subtle);
}

.vf-space-item__actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

.vf-recurring-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: var(--vf-radius-sm);
  background: rgba(0, 0, 0, 0.14);
}

.vf-recurring-item__name {
  font-weight: 600;
  font-size: 0.875rem;
}

.vf-recurring-item__meta {
  font-size: 0.6875rem;
  color: var(--vf-text-subtle);
}

.vf-checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--vf-text-muted);
  cursor: pointer;
  user-select: none;
}

.vf-checkbox {
  width: 1rem;
  height: 1rem;
  accent-color: var(--vf-orange);
}

.vf-input--textarea {
  min-height: 5rem;
  resize: vertical;
  line-height: 1.45;
}

.vf-auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem;
  padding: 0.25rem;
  border-radius: var(--vf-radius-sm);
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--vf-glass-border);
}

.vf-auth-tabs__btn {
  border: none;
  border-radius: calc(var(--vf-radius-sm) - 2px);
  padding: 0.55rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--vf-text-muted);
  background: transparent;
  cursor: pointer;
  transition: background var(--vf-duration) var(--vf-ease), color var(--vf-duration) var(--vf-ease);
}

.vf-auth-tabs__btn:hover {
  color: var(--vf-text);
  background: rgba(255, 255, 255, 0.05);
}

.vf-auth-tabs__btn--active {
  color: #fff;
  background: var(--vf-violet);
}

.vf-alert {
  padding: 0.65rem 0.75rem;
  border-radius: var(--vf-radius-sm);
  font-size: 0.8125rem;
  line-height: 1.4;
}

.vf-alert--error {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.vf-invite-code {
  text-align: center;
  padding: 1rem;
  border-radius: var(--vf-radius-sm);
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--vf-glass-border);
}

.vf-invite-code__label {
  font-size: 0.6875rem;
  color: var(--vf-text-subtle);
  margin-bottom: 0.35rem;
}

.vf-invite-code__value {
  font-family: var(--vf-font-display);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--vf-text);
}

.vf-invite-code__name {
  font-size: 0.8125rem;
  color: var(--vf-text-muted);
  margin-top: 0.35rem;
}

.vf-form-modal__header,
.vf-task-modal__header {
  padding-top: 1rem;
}

.vf-form-modal__icon,
.vf-task-modal__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
  border-radius: var(--vf-radius-sm);
  background: var(--vf-violet-soft);
  color: var(--vf-violet);
  font-size: 1rem;
}

.vf-form-modal__icon--expense {
  background: var(--vf-vert-soft);
  color: var(--vf-vert);
}

.vf-form-modal__icon--income {
  background: var(--vf-violet-soft);
  color: var(--vf-violet);
}

.vf-form-modal__icon--goal {
  background: var(--vf-orange-soft);
  color: var(--vf-orange);
}

.vf-field-row {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
  width: 100%;
}

.vf-field-row .vf-select,
.vf-field-row .vf-input {
  flex: 1 1 auto;
  min-width: 0;
}

.vf-field-row__action {
  flex-shrink: 0;
}

/* Catégorie dépense : pleine largeur, libellés lisibles */
.vf-field-row--category {
  min-width: 0;
}

.vf-select--category {
  width: 100%;
  max-width: 100%;
  padding-right: 2.75rem;
}

.vf-field--category {
  min-width: 0;
}

.vf-form-modal__body .vf-field--category .vf-select--category {
  font-size: 0.9375rem;
}

.vf-hint {
  font-size: 0.75rem;
  color: var(--vf-text-subtle);
  margin-top: 0.35rem;
  line-height: 1.4;
}

.vf-input--amount {
  font-size: 1.125rem;
  font-weight: 600;
  font-family: var(--vf-font-display);
}

/* Segmented control (ex. Payé par) */
.vf-segment-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  width: 100%;
}

.vf-segment-picker__option {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.5rem 0.35rem;
  border-radius: var(--vf-radius-sm);
  border: 1px solid var(--vf-glass-border);
  background: var(--vf-night-muted);
  color: var(--vf-text-muted);
  cursor: pointer;
  transition:
    border-color var(--vf-duration) var(--vf-ease),
    background var(--vf-duration) var(--vf-ease),
    color var(--vf-duration) var(--vf-ease),
    box-shadow var(--vf-duration) var(--vf-ease);
}

.vf-segment-picker__option:hover {
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--vf-text);
}

.vf-segment-picker__input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.vf-segment-picker__label {
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
  padding: 0 0.15rem;
}

.vf-segment-picker__option--me:has(.vf-segment-picker__input:checked) {
  border-color: rgba(61, 220, 151, 0.5);
  background: var(--vf-vert-soft);
  color: var(--vf-vert);
}

.vf-segment-picker__option--partner:has(.vf-segment-picker__input:checked) {
  border-color: rgba(124, 77, 255, 0.55);
  background: var(--vf-violet-soft);
  color: #c4b5fd;
}

.vf-segment-picker__option--shared:has(.vf-segment-picker__input:checked) {
  border-color: rgba(255, 159, 67, 0.5);
  background: var(--vf-orange-soft);
  color: var(--vf-orange);
}

.vf-segment-picker__option:has(.vf-segment-picker__input:focus-visible) {
  outline: 2px solid var(--vf-violet);
  outline-offset: 2px;
}

.vf-field--priority {
  margin-top: 0.15rem;
}

/* Priorité : 3 colonnes égales, ordre Urgent → Normal → Faible */
.vf-priority-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  width: 100%;
}

.vf-priority-picker__option {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 4.25rem;
  padding: 0.65rem 0.4rem;
  border-radius: var(--vf-radius-sm);
  border: 1px solid var(--vf-glass-border);
  background: var(--vf-night-muted);
  color: var(--vf-text-muted);
  cursor: pointer;
  transition:
    border-color var(--vf-duration) var(--vf-ease),
    background var(--vf-duration) var(--vf-ease),
    color var(--vf-duration) var(--vf-ease),
    box-shadow var(--vf-duration) var(--vf-ease),
    transform var(--vf-duration) var(--vf-ease-spring);
}

.vf-priority-picker__option:hover {
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--vf-text);
}

.vf-priority-picker__input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.vf-priority-picker__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: var(--vf-radius-full);
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.06);
  transition: background var(--vf-duration) var(--vf-ease);
}

.vf-priority-picker__label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-align: center;
  line-height: 1.2;
}

.vf-priority-picker__option--urgent:has(.vf-priority-picker__input:checked) {
  border-color: rgba(255, 94, 168, 0.55);
  background: var(--vf-rose-soft);
  color: var(--vf-rose);
  box-shadow: 0 0 0 1px rgba(255, 94, 168, 0.25);
}

.vf-priority-picker__option--urgent:has(.vf-priority-picker__input:checked) .vf-priority-picker__icon {
  background: rgba(255, 94, 168, 0.28);
  color: #fff;
}

.vf-priority-picker__option--normal:has(.vf-priority-picker__input:checked) {
  border-color: rgba(124, 77, 255, 0.55);
  background: var(--vf-violet-soft);
  color: #c4b5fd;
  box-shadow: 0 0 0 1px rgba(124, 77, 255, 0.25);
}

.vf-priority-picker__option--normal:has(.vf-priority-picker__input:checked) .vf-priority-picker__icon {
  background: rgba(124, 77, 255, 0.35);
  color: #fff;
}

.vf-priority-picker__option--faible:has(.vf-priority-picker__input:checked) {
  border-color: rgba(61, 220, 151, 0.5);
  background: var(--vf-vert-soft);
  color: var(--vf-vert);
  box-shadow: 0 0 0 1px rgba(61, 220, 151, 0.22);
}

.vf-priority-picker__option--faible:has(.vf-priority-picker__input:checked) .vf-priority-picker__icon {
  background: rgba(61, 220, 151, 0.3);
  color: #0b1020;
}

.vf-priority-picker__option:has(.vf-priority-picker__input:focus-visible) {
  outline: 2px solid var(--vf-violet);
  outline-offset: 2px;
}

.vf-assignee-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.vf-assignee-picker__option {
  cursor: pointer;
}

.vf-assignee-picker__input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.vf-assignee-picker__label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.45rem 0.85rem;
  border-radius: var(--vf-radius-full);
  border: 1px solid var(--vf-glass-border);
  background: var(--vf-night-muted);
  color: var(--vf-text-muted);
  transition:
    background var(--vf-duration) var(--vf-ease),
    border-color var(--vf-duration) var(--vf-ease),
    color var(--vf-duration) var(--vf-ease);
}

.vf-assignee-picker__option:hover .vf-assignee-picker__label {
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--vf-text);
}

.vf-assignee-picker__option:has(.vf-assignee-picker__input:checked) .vf-assignee-picker__label {
  border-color: rgba(124, 77, 255, 0.55);
  background: var(--vf-violet-soft);
  color: #e9d5ff;
}

.vf-task-modal__recur {
  padding: 0.85rem 1rem;
  border-radius: var(--vf-radius-sm);
  background: var(--vf-night-muted);
  border: 1px solid var(--vf-glass-border);
}

.vf-task-modal__recur-toggle {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--vf-text);
  cursor: pointer;
}

.vf-task-modal__checkbox {
  width: 1.125rem;
  height: 1.125rem;
  accent-color: var(--vf-violet);
  cursor: pointer;
}

.vf-task-modal__recur-panel {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--vf-glass-border);
}

html.light .vf-task-modal__dialog,
.vf-app--light .vf-task-modal__dialog {
  background: var(--vf-night-elevated);
}

html.light .vf-priority-picker__option,
.vf-app--light .vf-priority-picker__option {
  background: rgba(0, 0, 0, 0.04);
}

@media (max-width: 380px) {
  .vf-priority-picker__label {
    font-size: 0.625rem;
  }

  .vf-priority-picker__option {
    min-height: 3.75rem;
    padding: 0.5rem 0.25rem;
  }
}

/* ─── Calendrier unifié ──────────────────────────────────────────── */
.vf-cal-dots {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
}

.vf-cal-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 0.35rem;
  vertical-align: middle;
}

.vf-cal-dot--event { background: #38bdf8; }
.vf-cal-dot--task { background: #fbbf24; }
.vf-cal-dot--goal { background: #a78bfa; }

.vf-cal-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: auto;
  padding-top: 2px;
}

.vf-cal-counts .vf-cal-dot {
  width: 6px;
  height: 6px;
  margin-right: 0;
}

.vf-day-timeline-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  border-radius: var(--vf-radius-lg);
  background: rgba(0, 0, 0, 0.2);
  font-size: 0.8125rem;
}

html.light .vf-day-timeline-item,
.vf-app--light .vf-day-timeline-item {
  background: rgba(0, 0, 0, 0.04);
}

.vf-day-timeline-item--event { border-left: 3px solid #38bdf8; }
.vf-day-timeline-item--task { border-left: 3px solid #fbbf24; }
.vf-day-timeline-item--goal { border-left: 3px solid #a78bfa; }

.vf-day-timeline-item__time {
  font-size: 0.6875rem;
  color: var(--vf-text-subtle);
  min-width: 2.5rem;
}

.vf-day-timeline-item__body { flex: 1; min-width: 0; }
.vf-day-timeline-item__title { font-weight: 500; }
.vf-day-timeline-item__meta { font-size: 0.6875rem; color: var(--vf-text-muted); margin-top: 0.15rem; }

/* ─── Utilities (layout helpers, optional) ───────────────────────── */
.vf-stack { display: flex; flex-direction: column; gap: 1rem; }
.vf-stack--sm { gap: 0.5rem; }
.vf-stack--lg { gap: 1.5rem; }
.vf-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
.vf-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }

/* ─── VFToast (confirmations & feedback) ─────────────────────────── */
.vf-toast-stack {
  position: fixed;
  top: max(1rem, env(safe-area-inset-top, 0px));
  right: max(1rem, env(safe-area-inset-right, 0px));
  left: auto;
  z-index: var(--vf-z-toast);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.65rem;
  width: min(22rem, calc(100vw - 2rem));
  pointer-events: none;
}

@media (max-width: 480px) {
  .vf-toast-stack {
    left: 1rem;
    right: 1rem;
    width: auto;
    align-items: stretch;
  }
}

.vf-toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: var(--vf-glass-strong);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--vf-glass-border);
  border-radius: var(--vf-radius);
  box-shadow: var(--vf-shadow);
  color: var(--vf-text);
  transform: translateX(110%);
  opacity: 0;
  transition:
    transform 0.35s var(--vf-ease-spring),
    opacity 0.25s var(--vf-ease);
}

.vf-toast--visible {
  transform: translateX(0);
  opacity: 1;
}

.vf-toast--leaving {
  transform: translateX(110%);
  opacity: 0;
}

.vf-toast__icon {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--vf-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.vf-toast--success .vf-toast__icon {
  background: var(--vf-vert-soft);
  color: var(--vf-vert);
}

.vf-toast--error .vf-toast__icon {
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
}

.vf-toast--info .vf-toast__icon {
  background: var(--vf-violet-soft);
  color: var(--vf-violet);
}

.vf-toast__body {
  flex: 1;
  min-width: 0;
  padding-top: 0.1rem;
}

.vf-toast__title {
  font-family: var(--vf-font-display);
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.3;
}

.vf-toast__message {
  font-size: 0.8125rem;
  color: var(--vf-text-muted);
  margin: 0.2rem 0 0;
  line-height: 1.4;
  word-break: break-word;
}

.vf-toast__close {
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  border: none;
  border-radius: var(--vf-radius-sm);
  background: transparent;
  color: var(--vf-text-subtle);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--vf-duration) var(--vf-ease), color var(--vf-duration) var(--vf-ease);
}

.vf-toast__close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--vf-text);
}

.vf-toast--success {
  border-color: rgba(61, 220, 151, 0.35);
}

.vf-toast--error {
  border-color: rgba(248, 113, 113, 0.35);
}

.vf-toast--info {
  border-color: rgba(124, 77, 255, 0.35);
}

.vf-toast--removed .vf-toast__icon {
  background: rgba(251, 113, 133, 0.15);
  color: #fb7185;
}

.vf-toast--removed {
  border-color: rgba(251, 113, 133, 0.32);
}

/* ——— Confirmation dialog (remplace window.confirm) ——— */
.vf-confirm {
  position: fixed;
  inset: 0;
  z-index: calc(var(--vf-z-toast, 130) + 10);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s var(--vf-ease);
}

.vf-confirm--visible {
  opacity: 1;
  pointer-events: auto;
}

.vf-confirm__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
}

.vf-confirm__dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  margin: 0;
}

.vf-confirm__icon {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--vf-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  background: rgba(251, 113, 133, 0.12);
  color: #fb7185;
}

.vf-confirm__message {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--vf-text-muted);
}

.vf-confirm .vf-modal__header {
  gap: 0.75rem;
  align-items: center;
}

.vf-prompt .vf-modal__body .vf-field {
  margin-top: 0.75rem;
}

.vf-prompt .vf-modal__body .vf-field:first-of-type {
  margin-top: 0.5rem;
}

.vf-prompt__hint {
  margin: 0 0 0.25rem;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--vf-text-muted);
}

.vf-alert__footer .vf-btn--block {
  width: 100%;
}

.vf-date-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.35rem;
}

.vf-date-quick__btn {
  font-size: 0.72rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--vf-border-subtle, rgba(255, 255, 255, 0.12));
  background: rgba(255, 255, 255, 0.04);
  color: var(--vf-text-muted);
  cursor: pointer;
}

.vf-date-quick__btn--active {
  border-color: rgba(99, 102, 241, 0.55);
  background: rgba(99, 102, 241, 0.18);
  color: var(--vf-text);
}

.vf-due-picker__custom-title {
  width: 100%;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--vf-text-muted);
  margin-bottom: 0.1rem;
}

.vf-due-picker__custom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.vf-due-picker__custom-label {
  font-size: 0.75rem;
  color: var(--vf-text-muted);
}

.vf-due-picker__offset {
  width: 4.25rem;
  text-align: center;
}

.vf-due-picker__clear {
  margin-top: 0.45rem;
  font-size: 0.72rem;
  color: var(--vf-text-muted);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.vf-due-picker__clear:hover {
  color: var(--vf-text);
}

.vf-date-quick__btn:hover,
.vf-date-quick__btn:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.22);
  color: var(--vf-text);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Balance couple — interrupteur glissant (Paramètres) */
.vf-settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.vf-settings-row__text {
  flex: 1;
  min-width: 0;
}
.vf-switch {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  cursor: pointer;
}
.vf-switch__input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}
.vf-switch__track {
  display: block;
  width: 3rem;
  height: 1.625rem;
  border-radius: 999px;
  background: var(--vf-night-muted, rgba(255,255,255,0.12));
  border: 1px solid var(--vf-glass-border, rgba(255,255,255,0.15));
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  position: relative;
}
.vf-switch__thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.35);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.vf-switch__input:checked + .vf-switch__track {
  background: var(--vf-violet, #7c3aed);
  border-color: rgba(167, 139, 250, 0.6);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
}
.vf-switch__input:checked + .vf-switch__track .vf-switch__thumb {
  transform: translateX(1.375rem);
}
.vf-switch__input:focus-visible + .vf-switch__track {
  outline: 2px solid var(--vf-violet);
  outline-offset: 2px;
}

/* Défis automatiques (dashboard) */
.vf-command__challenge-badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: #fbbf24;
  margin: 0 0 0.35rem;
  letter-spacing: 0.02em;
}
.vf-command__challenge-item-meta {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.45);
  margin: 0.15rem 0 0.5rem;
}
.vf-command__challenge-item--done {
  border-color: rgba(52, 211, 153, 0.35);
  background: rgba(16, 185, 129, 0.06);
}
.vf-command__challenge-done {
  font-size: 0.8rem;
  color: #6ee7b7;
  margin: 0.5rem 0 0;
  font-weight: 600;
}
.vf-command__challenge-cta {
  margin-top: 0.5rem;
  width: 100%;
}

.vf-command__challenge-item--fail {
  border-color: rgba(244, 63, 94, 0.45);
  background: rgba(244, 63, 94, 0.08);
}
.vf-command__challenge-fail {
  font-size: 0.8rem;
  color: #fda4af;
  margin: 0.5rem 0 0;
  font-weight: 600;
}
.vf-badge--rose {
  background: rgba(244, 63, 94, 0.25);
  color: #fda4af;
}
.vf-progress__bar--rose {
  background: linear-gradient(90deg, #f43f5e, #fb7185);
}
