/* assets/css/v4.css */
/* Freev Valeur 4.2 — graphiques, planificateur, recherche et installation. */
.v4-new-badge {
  margin-left: auto;
  padding: .15rem .4rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #14b8a6, #2563eb);
  color: #fff;
  font-size: .58rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.v4-new-badge.maintenance { background: linear-gradient(135deg, #d97706, #ea580c); }
#planner-view > [hidden] { display: none !important; }

.v4-maintenance {
  display: flex;
  min-height: min(34rem, calc(100dvh - 9rem));
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: .75rem;
  padding: clamp(2rem, 7vw, 5rem) 1.25rem;
  border: 1px solid rgba(245, 158, 11, .3);
  border-radius: 1.25rem;
  background: radial-gradient(circle at top, rgba(245, 158, 11, .13), transparent 42%), var(--bg-card, #fff);
  color: var(--text-primary, #0f172a);
  text-align: center;
}
.v4-maintenance[hidden] { display: none; }
.v4-maintenance-icon { display: grid; width: 4.5rem; height: 4.5rem; place-items: center; border-radius: 1.25rem; background: linear-gradient(135deg, #f59e0b, #ea580c); color: #fff; box-shadow: 0 14px 30px rgba(234, 88, 12, .2); font-size: 1.75rem; }
.v4-maintenance h2 { margin: 0; font-size: clamp(1.55rem, 4vw, 2.25rem); }
.v4-maintenance > p { max-width: 40rem; margin: 0; color: var(--text-muted, #64748b); font-size: .9rem; line-height: 1.65; }
.v4-maintenance-note { display: flex; max-width: 36rem; align-items: center; gap: .55rem; margin: .35rem 0 .5rem; padding: .7rem .9rem; border: 1px solid rgba(37, 99, 235, .2); border-radius: .75rem; background: rgba(37, 99, 235, .06); color: var(--text-secondary, #475569); font-size: .72rem; line-height: 1.45; }
.v4-maintenance-note i { color: #2563eb; }

.dashboard-chart-card { min-width: 0; }
.dashboard-chart-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: .75rem; }
.dashboard-chart-head h3 { margin: 0; }
.dashboard-chart-head p { margin: .2rem 0 0; color: var(--text-muted, #64748b); font-size: .7rem; line-height: 1.4; }
.dashboard-chart-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; margin-bottom: .75rem; }
.dashboard-chart-segment { display: flex; padding: .2rem; border: 1px solid var(--border-color, #e2e8f0); border-radius: .65rem; background: var(--bg-input, #f8fafc); }
.dashboard-chart-segment button { padding: .38rem .58rem; border: 0; border-radius: .45rem; background: transparent; color: var(--text-muted, #64748b); cursor: pointer; font: 700 .65rem/1 Inter, sans-serif; }
.dashboard-chart-segment button.active { background: var(--bg-card, #fff); color: #2563eb; box-shadow: 0 2px 8px rgba(15, 23, 42, .08); }
.dashboard-chart-toggle { display: inline-flex; align-items: center; gap: .4rem; margin-left: auto; color: var(--text-secondary, #475569); cursor: pointer; font-size: .65rem; font-weight: 600; }
.dashboard-chart-toggle input { width: 1rem; height: 1rem; accent-color: #2563eb; }
.dashboard-chart-summary { min-height: 1rem; margin: .55rem 0 0; color: var(--text-muted, #64748b); font-size: .65rem; line-height: 1.4; }
.dashboard-chart-empty { display: flex; position: absolute; inset: 0; align-items: center; justify-content: center; flex-direction: column; gap: .45rem; padding: 1rem; color: var(--text-muted, #64748b); text-align: center; }
.dashboard-chart-empty.hidden { display: none; }
.dashboard-chart-empty > i { color: #94a3b8; font-size: 2rem; }
.dashboard-chart-empty strong { color: var(--text-primary, #0f172a); font-size: .8rem; }
.dashboard-chart-empty span { max-width: 22rem; font-size: .68rem; line-height: 1.45; }
.dashboard-chart-card .chart-container { position: relative; min-height: 18rem; }

.v4-search-trigger kbd,
.v4-search-box kbd {
  padding: .15rem .35rem;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: .35rem;
  background: var(--bg-card, #fff);
  color: var(--text-muted, #64748b);
  font: 600 .65rem/1.2 Inter, sans-serif;
}

.v4-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  overflow: hidden;
  position: relative;
  margin-bottom: 1.5rem;
  padding: clamp(1.4rem, 3vw, 2.4rem);
  border: 1px solid rgba(37, 99, 235, .18);
  border-radius: 1.35rem;
  background:
    radial-gradient(circle at 85% 20%, rgba(20, 184, 166, .24), transparent 30%),
    radial-gradient(circle at 10% 100%, rgba(37, 99, 235, .18), transparent 36%),
    var(--bg-card, #fff);
  box-shadow: 0 18px 45px rgba(15, 23, 42, .06);
}

.v4-hero::after {
  content: '';
  position: absolute;
  right: -4rem;
  bottom: -7rem;
  width: 17rem;
  height: 17rem;
  border: 1px solid rgba(37, 99, 235, .14);
  border-radius: 50%;
  box-shadow: 0 0 0 2.5rem rgba(20, 184, 166, .05), 0 0 0 5rem rgba(37, 99, 235, .04);
  pointer-events: none;
}

.v4-eyebrow {
  display: inline-block;
  margin-bottom: .55rem;
  color: #0d9488;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .14em;
}

.v4-hero h2,
.v4-dialog h2 {
  margin: 0;
  color: var(--text-primary, #0f172a);
  font-size: clamp(1.65rem, 4vw, 2.5rem);
  line-height: 1.1;
}

.v4-hero p,
.v4-dialog > p {
  max-width: 48rem;
  margin: .75rem 0 0;
  color: var(--text-muted, #64748b);
  line-height: 1.65;
}

.v4-hero-actions { display: flex; gap: .65rem; z-index: 1; }

.v4-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.v4-summary-card {
  display: flex;
  align-items: center;
  gap: .85rem;
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 1rem;
  background: var(--bg-card, #fff);
}

.v4-summary-icon {
  display: grid;
  flex: 0 0 2.75rem;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border-radius: .8rem;
  background: rgba(37, 99, 235, .1);
  color: #2563eb;
}

.v4-summary-card.success .v4-summary-icon { background: rgba(16, 185, 129, .12); color: #059669; }
.v4-summary-card.warning .v4-summary-icon { background: rgba(245, 158, 11, .14); color: #d97706; }
.v4-summary-card.danger .v4-summary-icon { background: rgba(244, 63, 94, .12); color: #e11d48; }
.v4-summary-card div { display: flex; min-width: 0; flex-direction: column; }
.v4-summary-card div > span { color: var(--text-muted, #64748b); font-size: .75rem; font-weight: 600; }
.v4-summary-card strong { overflow: hidden; color: var(--text-primary, #0f172a); font-size: 1.22rem; text-overflow: ellipsis; white-space: nowrap; }
.v4-summary-card small { overflow: hidden; color: var(--text-muted, #64748b); font-size: .68rem; text-overflow: ellipsis; white-space: nowrap; }

.v4-intelligence-grid {
  display: grid;
  grid-template-columns: 1.15fr .9fr .9fr;
  gap: 1rem;
  margin-bottom: 1rem;
}
.v4-intelligence-grid > .card { min-width: 0; margin: 0; }
.v41-live { display: inline-flex; align-items: center; gap: .3rem; padding: .3rem .5rem; border-radius: 999px; background: rgba(16, 185, 129, .1); color: #059669; font-size: .6rem; font-weight: 700; white-space: nowrap; }
.v41-live i { font-size: .4rem; }
.v41-health-overview { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.v41-score-ring { --ring-color: #f59e0b; display: grid; flex: 0 0 5.5rem; width: 5.5rem; height: 5.5rem; place-items: center; border-radius: 50%; background: conic-gradient(var(--ring-color) calc(var(--score) * 1%), var(--border-color, #e2e8f0) 0); position: relative; }
.v41-score-ring::after { content: ''; position: absolute; inset: .52rem; border-radius: inherit; background: var(--bg-card, #fff); }
.v41-score-ring > div { display: flex; z-index: 1; align-items: baseline; flex-direction: column; text-align: center; }
.v41-score-ring strong { color: var(--text-primary, #0f172a); font-size: 1.45rem; line-height: 1; }
.v41-score-ring span { color: var(--text-muted, #64748b); font-size: .58rem; }
.v41-score-ring.excellent { --ring-color: #10b981; }
.v41-score-ring.solid { --ring-color: #14b8a6; }
.v41-score-ring.warning { --ring-color: #f59e0b; }
.v41-score-ring.danger { --ring-color: #e11d48; }
.v41-health-copy { display: flex; min-width: 0; flex-direction: column; }
.v41-health-copy > span { color: #0d9488; font-size: .64rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.v41-health-copy strong { color: var(--text-primary, #0f172a); font-size: .88rem; }
.v41-health-copy small { color: var(--text-muted, #64748b); font-size: .65rem; line-height: 1.4; }
.v41-breakdown { display: grid; gap: .5rem; }
.v41-breakdown article { padding-top: .5rem; border-top: 1px solid var(--border-color, #e2e8f0); }
.v41-metric-head,
.v41-metric-foot { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.v41-metric-head strong { color: var(--text-primary, #0f172a); font-size: .67rem; }
.v41-metric-head span { color: #2563eb; font-size: .62rem; font-weight: 800; }
.v41-breakdown .v4-progress { height: .3rem; margin: .35rem 0; }
.v41-metric-foot > span { flex: 0 0 auto; color: var(--text-secondary, #475569); font-size: .62rem; font-weight: 700; }
.v41-metric-foot small { color: var(--text-muted, #64748b); font-size: .57rem; line-height: 1.3; text-align: right; }


.v41-action { display: grid; grid-template-columns: 1.45rem 1.75rem minmax(0, 1fr); align-items: center; gap: .5rem; padding: .65rem; border: 1px solid var(--border-color, #e2e8f0); border-radius: .7rem; background: var(--bg-input, #f8fafc); }
.v41-action-index { display: grid; width: 1.35rem; height: 1.35rem; place-items: center; border-radius: 50%; background: rgba(37, 99, 235, .1); color: #2563eb; font-size: .58rem; font-weight: 800; }
.v41-action > i { color: #2563eb; text-align: center; }
.v41-action.urgent > i { color: #e11d48; }
.v41-action.urgent .v41-action-index { background: rgba(225, 29, 72, .1); color: #e11d48; }
.v41-action.important > i { color: #d97706; }
.v41-action.important .v41-action-index { background: rgba(245, 158, 11, .14); color: #b45309; }
.v41-action > div { display: flex; min-width: 0; flex-direction: column; }
.v41-action strong { color: var(--text-primary, #0f172a); font-size: .68rem; }
.v41-action div span { color: var(--text-muted, #64748b); font-size: .59rem; line-height: 1.35; }

/* Tableau de bord : une hiérarchie calme et des indicateurs qui s'animent sans masquer les données. */
.v4-summary-card,.v4-intelligence-grid>.card,.v4-intelligence-grid .v41-action {box-shadow:0 3px 8px rgba(20,36,62,.025),0 18px 44px rgba(20,36,62,.035);transition:transform .24s ease,box-shadow .24s ease,border-color .24s ease;}
.v4-summary-card:hover,.v4-intelligence-grid>.card:hover {transform:translateY(-3px);box-shadow:0 8px 18px rgba(20,36,62,.045),0 24px 56px rgba(20,36,62,.075);}
.v4-summary-card {position:relative;overflow:hidden;min-height:6.4rem;border-radius:1.15rem;padding:1.15rem;}
.v4-summary-card::after {content:'';position:absolute;inset:auto 1.15rem 0;height:2px;background:linear-gradient(90deg,#2563eb,#16b896);transform:scaleX(0);transform-origin:left;animation:v4-indicator-in .8s .18s ease-out forwards;}
.v4-intelligence-grid {grid-template-columns:minmax(0,1.25fr) minmax(0,.85fr);align-items:start;gap:1.1rem;}
.v4-intelligence-grid>.card {border-radius:1.25rem;padding:1.4rem;}
.v41-health-card {grid-row:span 1;}
.v41-score-ring {width:6.3rem;height:6.3rem;flex-basis:6.3rem;animation:v4-score-in .85s cubic-bezier(.2,.8,.2,1) both;}
.v41-score-ring strong {font-size:1.65rem;font-variant-numeric:tabular-nums;}
.v41-breakdown .v4-progress {height:.38rem;overflow:hidden;border-radius:999px;}
.v41-breakdown .v4-progress>* {transform-origin:left;animation:v4-indicator-in .8s .12s ease-out both;}
.v41-action {grid-template-columns:1.6rem 2rem minmax(0,1fr);min-height:4.25rem;padding:.85rem;border-radius:.85rem;background:var(--bg-card,#fff);}
.v41-action:hover {transform:translateY(-2px);border-color:rgba(37,99,235,.22);box-shadow:0 10px 24px rgba(20,36,62,.07);}
.v41-action strong {font-size:.76rem;line-height:1.35;text-wrap:balance;}
.v41-action div span {font-size:.66rem;line-height:1.45;text-wrap:pretty;}
.v4-section-head h3 {font-size:1.1rem;letter-spacing:-.025em;text-wrap:balance;}
.v4-section-head p {font-size:.78rem;line-height:1.45;text-wrap:pretty;}
@keyframes v4-indicator-in {from {transform:scaleX(0)}to {transform:scaleX(1)}}
@keyframes v4-score-in {from {opacity:.35;transform:scale(.88)}to {opacity:1;transform:scale(1)}}
@media (max-width:850px){.v4-intelligence-grid{grid-template-columns:1fr;}.v4-intelligence-grid>.card{padding:1.1rem;}}
@media (prefers-reduced-motion:reduce){.v4-summary-card,.v4-intelligence-grid>.card,.v4-intelligence-grid .v41-action{transition:none;}.v4-summary-card::after,.v41-score-ring,.v41-breakdown .v4-progress>*{animation:none;transform:none;}.v4-summary-card::after{transform:scaleX(1);}}

.v4-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(18rem, .75fr);
  gap: 1rem;
  margin-bottom: 1rem;
}
.v4-layout-three { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
.v4-layout .card { min-width: 0; margin: 0; }
.v4-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.v4-section-head h3 { margin: 0; color: var(--text-primary, #0f172a); font-size: 1rem; }
.v4-section-head p { margin: .2rem 0 0; color: var(--text-muted, #64748b); font-size: .75rem; }
.v4-count { display: grid; min-width: 2rem; height: 2rem; place-items: center; border-radius: 999px; background: rgba(245, 158, 11, .15); color: #b45309; font-size: .78rem; font-weight: 800; }

.v43-forecast-controls { display: flex; align-items: flex-end; gap: .65rem; }
.v43-projection-scope { display: flex; min-width: 16rem; flex-direction: column; gap: .25rem; color: var(--text-secondary, #475569); font-size: .62rem; font-weight: 700; }
.v43-projection-scope .form-input { width: 100%; min-height: 2rem; padding: .4rem 2rem .4rem .55rem; font-size: .68rem; }
.v4-horizon { display: flex; padding: .2rem; border: 1px solid var(--border-color, #e2e8f0); border-radius: .7rem; background: var(--bg-input, #f8fafc); }
.v4-horizon button { padding: .38rem .6rem; border: 0; border-radius: .5rem; background: transparent; color: var(--text-muted, #64748b); cursor: pointer; font: 700 .68rem/1 Inter, sans-serif; }
.v4-horizon button.active { background: var(--bg-card, #fff); color: #2563eb; box-shadow: 0 2px 8px rgba(15, 23, 42, .08); }

@media (min-width: 768px) and (max-width: 1050px) {
  .v4-forecast-card .v4-section-head { align-items: stretch; flex-direction: column; gap: .75rem; }
  .v4-forecast-card .v43-forecast-controls {
    width: 100%; align-items: flex-start; flex-wrap: wrap; gap: .75rem;
  }
  .v4-forecast-card .v43-projection-scope { min-width: 0; max-width: 100%; flex: 1 1 14rem; }
  .v4-forecast-card .v43-projection-scope .form-input { min-width: 0; }
  .v4-forecast-card .v4-horizon { max-width: 100%; flex: 0 1 auto; flex-wrap: wrap; }
}

.v4-simulator { display: block; margin-bottom: 1rem; padding: .85rem; border: 1px dashed rgba(37, 99, 235, .3); border-radius: .8rem; background: rgba(37, 99, 235, .035); }
.v4-simulator > span { display: block; margin-bottom: .45rem; color: var(--text-primary, #0f172a); font-size: .78rem; font-weight: 700; }
.v4-simulator > div { display: flex; align-items: center; gap: .45rem; }
.v4-simulator input { max-width: 9rem; }
.v4-simulator small { display: block; margin-top: .4rem; color: var(--text-muted, #64748b); font-size: .65rem; }

.v42-simulator { margin-bottom: 1rem; padding: 1rem; border: 1px solid rgba(37, 99, 235, .25); border-radius: 1rem; background: linear-gradient(135deg, rgba(37, 99, 235, .055), rgba(20, 184, 166, .04)); }
.v42-simulator-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: .8rem; }
.v42-simulator-head > div:first-child { display: flex; flex-direction: column; }
.v42-simulator-head strong { color: var(--text-primary, #0f172a); font-size: .82rem; }
.v42-simulator-head span { color: var(--text-muted, #64748b); font-size: .65rem; }
.v42-presets { display: flex; flex-wrap: wrap; gap: .35rem; }
.v42-presets button { padding: .38rem .52rem; border: 1px solid var(--border-color, #e2e8f0); border-radius: 999px; background: var(--bg-card, #fff); color: var(--text-secondary, #475569); cursor: pointer; font: 700 .58rem/1 Inter, sans-serif; }
.v42-presets button:hover,
.v42-presets button:focus-visible { border-color: #2563eb; color: #2563eb; outline: 0; }
.v42-simulator-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .55rem; }
.v42-simulator-grid label { display: flex; min-width: 0; flex-direction: column; gap: .3rem; color: var(--text-secondary, #475569); font-size: .61rem; font-weight: 700; }
.v42-simulator-grid label > div { display: flex; align-items: center; gap: .25rem; }
.v42-simulator-grid label > div > span { flex: 0 0 auto; color: var(--text-muted, #64748b); font-size: .57rem; }
.v42-simulator-grid .form-input { width: 100%; min-width: 0; padding: .52rem; font-size: .68rem; }
.v42-simulator-grid small { color: var(--text-muted, #64748b); font-size: .53rem; font-weight: 400; line-height: 1.3; }

.v42-forecast-insights { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .55rem; margin-bottom: .75rem; }
.v42-forecast-insights article { display: flex; align-items: center; gap: .55rem; padding: .65rem; border: 1px solid var(--border-color, #e2e8f0); border-radius: .75rem; background: var(--bg-input, #f8fafc); }
.v42-forecast-insights article > i { display: grid; flex: 0 0 2rem; width: 2rem; height: 2rem; place-items: center; border-radius: .6rem; background: rgba(22, 131, 107, .1); color: #16836b; }
.v42-forecast-insights article.success > i { background: rgba(16, 185, 129, .12); color: #059669; }
.v42-forecast-insights article.warning > i { background: rgba(245, 158, 11, .14); color: #d97706; }
.v42-forecast-insights article.danger > i { background: rgba(225, 29, 72, .1); color: #e11d48; }
.v42-forecast-insights article div { display: flex; min-width: 0; flex-direction: column; }
.v42-forecast-insights span,
.v42-forecast-insights small { color: var(--text-muted, #64748b); font-size: .56rem; }
.v42-forecast-insights strong { overflow: hidden; color: var(--text-primary, #0f172a); font-size: .68rem; text-overflow: ellipsis; white-space: nowrap; }

.v43-forecast-breakdown { margin-bottom: .9rem; padding: .8rem; border: 1px solid rgba(22, 131, 107, .2); border-radius: .85rem; background: rgba(22, 131, 107, .035); }
.v43-forecast-breakdown[hidden] { display: none; }
.v43-recurring-costs { margin-bottom: .9rem; padding: .8rem; border: 1px solid rgba(20, 184, 166, .28); border-radius: .85rem; background: rgba(20, 184, 166, .045); }
.v43-recurring-costs[hidden] { display: none; }
.v43-recurring-costs-head { display: flex; justify-content: space-between; gap: .75rem; margin-bottom: .55rem; }
.v43-recurring-costs-head > div { display: flex; flex-direction: column; gap: .15rem; }
.v43-recurring-costs-head strong { color: var(--text-primary, #0f172a); font-size: .75rem; }
.v43-recurring-costs-head span { color: var(--text-muted, #64748b); font-size: .61rem; line-height: 1.4; }
.v43-recurring-costs-list { display: grid; gap: .4rem; }
.v43-recurring-costs-list article { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding-top: .45rem; border-top: 1px solid rgba(20, 184, 166, .18); }
.v43-recurring-costs-list article > div { display: flex; min-width: 0; flex-direction: column; }
.v43-recurring-costs-list strong { color: var(--text-primary, #0f172a); font-size: .67rem; }
.v43-recurring-costs-list small { color: var(--text-muted, #64748b); font-size: .58rem; }
.v43-recurring-costs-list b { flex: 0 0 auto; color: #0f766e; font-size: .72rem; white-space: nowrap; }
.v43-breakdown-head { margin-bottom: .65rem; }
.v43-breakdown-head > div { display: flex; flex-direction: column; gap: .18rem; }
.v43-breakdown-head strong { color: var(--text-primary, #0f172a); font-size: .875rem; }
.v43-breakdown-head span { color: var(--text-muted, #64748b); font-size: .75rem; line-height: 1.45; }
.v43-breakdown-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem; margin: 0; }
.v43-breakdown-row { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: .65rem; margin: 0; padding: .58rem .65rem; border: 1px solid var(--border-color, #e2e8f0); border-radius: .7rem; background: var(--bg-card, #fff); }
.v43-breakdown-row dt { display: flex; min-width: 0; align-items: center; gap: .5rem; }
.v43-breakdown-row dt > i { display: grid; flex: 0 0 1.75rem; width: 1.75rem; height: 1.75rem; place-items: center; border-radius: .55rem; background: rgba(22, 131, 107, .1); color: #16836b; font-size: .68rem; }
.v43-breakdown-row dt > span { display: flex; min-width: 0; flex-direction: column; gap: .12rem; }
.v43-breakdown-row strong { color: var(--text-primary, #0f172a); font-size: .78rem; }
.v43-breakdown-row small { color: var(--text-muted, #64748b); font-size: .7rem; line-height: 1.4; }
.v43-breakdown-row dd { flex: 0 0 auto; margin: 0; font-size: .8rem; font-weight: 800; white-space: nowrap; }
.v43-breakdown-row.total { grid-column: 1 / -1; border-color: rgba(22, 131, 107, .32); background: rgba(22, 131, 107, .06); }
.v43-breakdown-row.total dt > i { background: #16836b; color: #fff; }
.v43-breakdown-row.total strong,
.v43-breakdown-row.total dd { font-size: .85rem; }
.v43-breakdown-row.excluded { opacity: .58; }
.v43-breakdown-row.excluded dd { color: var(--text-muted, #64748b) !important; }

.v42-forecast-visual { margin-bottom: .9rem; padding: .75rem; border: 1px solid var(--border-color, #e2e8f0); border-radius: .85rem; background: var(--bg-input, #f8fafc); }
.v42-chart-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .35rem; color: var(--text-primary, #0f172a); font-size: .7rem; }
.v42-chart-head .v4-text-button { margin: 0; color: #16836b; }
.v42-forecast-chart { min-height: 11rem; }
.v42-forecast-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.v42-forecast-chart text { fill: var(--text-muted, #64748b); font: 600 10px Inter, sans-serif; text-transform: capitalize; }
.v42-forecast-line { fill: none; stroke: #16836b; stroke-linecap: round; stroke-linejoin: round; stroke-width: 4; }
.v42-forecast-area { fill: url(#v42ForecastGradient); }
.v42-forecast-chart circle { fill: var(--bg-card, #fff); stroke: #16836b; stroke-width: 3; }
.v42-zero-line { stroke: #e11d48; stroke-dasharray: 5 5; stroke-opacity: .4; }

.v4-forecast { display: grid; gap: .55rem; }
.v4-forecast-row { display: grid; grid-template-columns: 4.2rem minmax(4rem, 1fr) 6.7rem 5.7rem; align-items: center; gap: .65rem; font-size: .7rem; }
.v4-forecast-row > span { color: var(--text-muted, #64748b); text-transform: capitalize; }
.v4-forecast-row > strong { color: var(--text-primary, #0f172a); text-align: right; }
.v4-forecast-row > small { text-align: right; }
.v4-forecast-track { overflow: hidden; height: .5rem; border-radius: 999px; background: var(--bg-input, #f1f5f9); }
.v4-forecast-track span { display: block; height: 100%; border-radius: inherit; transition: width .35s ease; }
.v4-forecast-track .positive { background: linear-gradient(90deg, #16836b, #61b991); }
.v4-forecast-track .negative { background: linear-gradient(90deg, #fb7185, #e11d48); }
.positive-text { color: #059669 !important; }
.negative-text { color: #e11d48 !important; }

.v4-list { display: grid; gap: .65rem; }
.v4-alert { display: flex; align-items: flex-start; gap: .65rem; padding: .75rem; border: 1px solid var(--border-color, #e2e8f0); border-radius: .75rem; background: var(--bg-input, #f8fafc); }
.v4-alert > i { margin-top: .12rem; }
.v4-alert.danger > i { color: #e11d48; }
.v4-alert.warning > i { color: #d97706; }
.v4-alert.info > i { color: #2563eb; }
.v4-alert div { display: flex; min-width: 0; flex-direction: column; }
.v4-alert strong { color: var(--text-primary, #0f172a); font-size: .75rem; }
.v4-alert span { color: var(--text-muted, #64748b); font-size: .68rem; }

.v4-inline-form { display: grid; grid-template-columns: 1fr .7fr .8fr auto; gap: .45rem; margin-bottom: 1rem; }
.v4-inline-form-short { grid-template-columns: 1fr .7fr auto; }
.v4-inline-form .form-input { min-width: 0; padding: .6rem; font-size: .7rem; }
.v4-inline-form .btn { padding: .6rem .7rem; font-size: .68rem; }

.v4-goal,
.v4-envelope { padding: .8rem; border: 1px solid var(--border-color, #e2e8f0); border-radius: .8rem; background: var(--bg-input, #f8fafc); }
.v4-goal-head,
.v4-envelope-head,
.v4-goal-numbers { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.v4-goal-head > div { display: flex; min-width: 0; flex-direction: column; }
.v4-goal-head strong,
.v4-envelope-head strong { color: var(--text-primary, #0f172a); font-size: .76rem; }
.v4-goal-head span,
.v4-envelope-head span { color: #2563eb; font-size: .68rem; font-weight: 800; }
.v4-goal-head div span { color: var(--text-muted, #64748b); font-weight: 400; }
.v4-progress { overflow: hidden; height: .45rem; margin: .65rem 0 .45rem; border-radius: 999px; background: var(--border-color, #e2e8f0); }
.v4-progress > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2563eb, #14b8a6); }
.v4-progress.warning > span { background: #f59e0b; }
.v4-progress.danger > span { background: #e11d48; }
.v4-goal-numbers { color: var(--text-muted, #64748b); font-size: .65rem; }
.v4-goal > small { display: block; margin-top: .3rem; color: #0d9488; font-size: .65rem; font-weight: 600; }
.v4-row-actions { display: flex; justify-content: flex-end; gap: .35rem; margin-top: .6rem; }
.v4-text-button { display: block; margin: .5rem 0 0 auto; padding: 0; border: 0; background: transparent; color: var(--text-muted, #64748b); cursor: pointer; font-size: .62rem; text-decoration: underline; }

.v4-calendar { max-height: 29rem; overflow: auto; overscroll-behavior: contain; }
.v4-calendar-item { display: grid; grid-template-columns: 2.45rem minmax(0, 1fr) auto; align-items: center; gap: .65rem; padding: .58rem 0; border-bottom: 1px solid var(--border-color, #e2e8f0); }
.v4-calendar-item:last-child { border-bottom: 0; }
.v4-calendar-item time { display: grid; height: 2.45rem; place-content: center; border-radius: .65rem; background: rgba(37, 99, 235, .09); color: #2563eb; text-align: center; }
.v4-calendar-item time strong { font-size: .78rem; line-height: 1; }
.v4-calendar-item time span { font-size: .56rem; text-transform: uppercase; }
.v4-calendar-item > div { display: flex; min-width: 0; flex-direction: column; }
.v4-calendar-item > div strong { overflow: hidden; color: var(--text-primary, #0f172a); font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
.v4-calendar-item > div span { overflow: hidden; color: var(--text-muted, #64748b); font-size: .62rem; text-overflow: ellipsis; white-space: nowrap; }
.v4-calendar-item > b { font-size: .67rem; }

.v4-empty { margin: 0; padding: 1rem; border: 1px dashed var(--border-color, #e2e8f0); border-radius: .75rem; color: var(--text-muted, #64748b); font-size: .72rem; line-height: 1.5; text-align: center; }
.v4-empty-success { display: flex; align-items: center; flex-direction: column; gap: .25rem; padding: 2rem 1rem; }
.v4-empty-success i { color: #10b981; font-size: 1.6rem; }
.v4-empty-success strong { color: var(--text-primary, #0f172a); }
.transaction-load-more { display: flex; align-items: center; justify-content: center; gap: 1rem; padding: 1rem; color: var(--text-muted, #64748b); font-size: .75rem; }

.v4-overlay[hidden] { display: none !important; }
.v4-overlay {
  display: grid;
  position: fixed;
  z-index: 10000;
  inset: 0;
  place-items: center;
  padding: 1rem;
  background: rgba(2, 6, 23, .72);
  backdrop-filter: blur(8px);
  animation: v4Fade .18s ease;
}
.v4-dialog { width: min(46rem, 100%); max-height: min(90vh, 54rem); overflow: auto; padding: 1.5rem; border: 1px solid var(--border-color, #e2e8f0); border-radius: 1.2rem; background: var(--bg-card, #fff); box-shadow: 0 30px 80px rgba(2, 6, 23, .3); animation: v4Pop .22s ease; }
.v4-search-dialog { width: min(42rem, 100%); padding: 1rem; }
.v4-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.v4-dialog-head h2 { font-size: 1.35rem; }
.v4-search-box { display: flex; align-items: center; gap: .65rem; padding: .75rem .85rem; border: 1.5px solid rgba(22, 131, 107, .48); border-radius: .8rem; background: var(--bg-input, #f8fafc); color: #16836b; box-shadow: 0 0 0 3px rgba(22, 131, 107, .06); }
.v4-search-box input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--text-primary, #0f172a); font: 500 .85rem/1.4 Inter, sans-serif; }
.v4-search-results { display: grid; max-height: 26rem; margin-top: .75rem; overflow: auto; }
.v4-search-result { display: grid; grid-template-columns: 2.25rem minmax(0, 1fr) auto; align-items: center; gap: .65rem; padding: .72rem; border: 0; border-bottom: 1px solid var(--border-color, #e2e8f0); background: transparent; color: inherit; cursor: pointer; text-align: left; }
.v4-search-result:hover,
.v4-search-result:focus-visible { background: var(--bg-input, #f8fafc); outline: 0; }
.v4-search-result-icon { display: grid; width: 2.2rem; height: 2.2rem; place-items: center; border-radius: .65rem; background: rgba(37, 99, 235, .1); color: #2563eb; }
.v4-search-result > span:nth-child(2) { display: flex; min-width: 0; flex-direction: column; }
.v4-search-result strong { overflow: hidden; color: var(--text-primary, #0f172a); font-size: .76rem; text-overflow: ellipsis; white-space: nowrap; }
.v4-search-result small { overflow: hidden; color: var(--text-muted, #64748b); font-size: .65rem; text-overflow: ellipsis; white-space: nowrap; }
.v4-search-result b { font-size: .7rem; }

.v4-whats-new { position: relative; overflow-x: hidden; text-align: center; }
.v4-release-icon { display: grid; width: 4rem; height: 4rem; margin: 0 auto 1rem; place-items: center; border-radius: 1.2rem; background: linear-gradient(135deg, #2563eb, #14b8a6); color: #fff; box-shadow: 0 12px 30px rgba(37, 99, 235, .25); font-size: 1.5rem; }
.v4-whats-new > p { margin-right: auto; margin-left: auto; }
.v4-feature-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; margin: 1.35rem 0; text-align: left; }
.v4-feature-grid article { display: flex; align-items: flex-start; gap: .7rem; padding: .85rem; border: 1px solid var(--border-color, #e2e8f0); border-radius: .8rem; background: var(--bg-input, #f8fafc); }
.v4-feature-grid article > i { width: 1.1rem; margin-top: .15rem; color: #2563eb; text-align: center; }
.v4-feature-grid article div { display: flex; flex-direction: column; }
.v4-feature-grid strong { color: var(--text-primary, #0f172a); font-size: .72rem; }
.v4-feature-grid span { color: var(--text-muted, #64748b); font-size: .65rem; line-height: 1.45; }
.v4-dialog-actions { display: flex; justify-content: center; }
.v4-modal-open { overflow: hidden; }

.pwa-install-nav { width: 100%; border: 0; font: inherit; text-align: left; }
.pwa-install-nav.is-installed { opacity: .72; }
.pwa-install-dialog { position: relative; width: min(31rem, 100%); text-align: center; }
.pwa-install-close { position: absolute; top: 1rem; right: 1rem; }
.pwa-install-icon { display: block; margin: 0 auto .9rem; border-radius: 1.35rem; box-shadow: 0 12px 28px rgba(30, 58, 138, .25); }
.pwa-install-steps { display: grid; gap: .6rem; margin: 1.1rem 0; padding: 0; counter-reset: pwa-step; list-style: none; text-align: left; }
.pwa-install-steps li { display: grid; grid-template-columns: 2rem minmax(0, 1fr); align-items: center; gap: .7rem; padding: .75rem; border: 1px solid var(--border-color, #e2e8f0); border-radius: .8rem; background: var(--bg-input, #f8fafc); color: var(--text-secondary, #475569); font-size: .74rem; line-height: 1.45; }
.pwa-install-steps li::before { display: grid; width: 2rem; height: 2rem; place-items: center; border-radius: .6rem; background: #2563eb; color: #fff; content: counter(pwa-step); counter-increment: pwa-step; font-weight: 800; }
.pwa-install-banner { display: grid; position: fixed; z-index: 9000; right: 1.1rem; bottom: 1.1rem; grid-template-columns: 3rem minmax(0, 1fr) auto auto; align-items: center; gap: .7rem; width: min(31rem, calc(100vw - 2rem)); padding: .75rem; border: 1px solid rgba(37, 99, 235, .24); border-radius: 1rem; background: var(--bg-card, #fff); box-shadow: 0 20px 55px rgba(15, 23, 42, .22); animation: v4Pop .22s ease; }
.pwa-install-banner[hidden] { display: none; }
.pwa-install-banner img { border-radius: .75rem; }
.pwa-install-banner > div { display: flex; min-width: 0; flex-direction: column; }
.pwa-install-banner strong { color: var(--text-primary, #0f172a); font-size: .72rem; }
.pwa-install-banner span { color: var(--text-muted, #64748b); font-size: .6rem; line-height: 1.35; }

body.dark-mode .v4-hero,
body.dark-mode .v4-summary-card,
body.dark-mode .v4-dialog { background-color: var(--bg-card); border-color: var(--border-color); }
body.dark-mode .v4-alert,
body.dark-mode .v4-goal,
body.dark-mode .v4-envelope,
body.dark-mode .v4-feature-grid article,
body.dark-mode .v4-search-result:hover { background-color: var(--bg-input); }
body.dark-mode .v41-score-ring::after { background: var(--bg-card); }
body.dark-mode .v41-action { background: var(--bg-input); }
body.dark-mode .v42-simulator,
body.dark-mode .v42-forecast-visual,
body.dark-mode .v42-forecast-insights article,
body.dark-mode .v43-forecast-breakdown,
body.dark-mode .pwa-install-steps li { background-color: var(--bg-input); }
body.dark-mode .v43-breakdown-row { background-color: var(--bg-card); }
body.dark-mode .v43-breakdown-row.total { background-color: rgba(37, 99, 235, .12); }

@keyframes v4Fade { from { opacity: 0; } }
@keyframes v4Pop { from { opacity: 0; transform: translateY(10px) scale(.985); } }

@media (max-width: 1180px) {
  .v4-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v4-layout-three { grid-template-columns: 1fr 1fr; }
  .v4-layout-three > :last-child { grid-column: 1 / -1; }
  .v4-inline-form { grid-template-columns: 1fr 1fr; }
  .v4-intelligence-grid { grid-template-columns: 1fr 1fr; }
  .v41-health-card { grid-row: span 2; }
  .v42-simulator-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  #planner-view { content-visibility: auto; contain-intrinsic-size: 900px; }
  .v4-search-trigger span,
  .v4-search-trigger kbd { display: none; }
  .v4-hero { align-items: stretch; flex-direction: column; gap: 1rem; padding: 1.15rem; }
  .v4-hero-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .v4-hero-actions .btn { justify-content: center; min-height: 2.75rem; padding: .65rem; font-size: .68rem; }
  .v4-summary-grid { grid-template-columns: 1fr 1fr; gap: .65rem; }
  .v4-summary-card { align-items: flex-start; flex-direction: column; gap: .55rem; padding: .8rem; }
  .v4-summary-icon { width: 2.25rem; height: 2.25rem; flex-basis: 2.25rem; }
  .v4-summary-card strong { font-size: 1rem; }
  .v4-layout,
  .v4-layout-three { grid-template-columns: 1fr; }
  .v4-intelligence-grid { grid-template-columns: 1fr; }
  .v41-health-card { grid-row: auto; }
  .v4-layout-three > :last-child { grid-column: auto; }
  .v4-section-head { align-items: stretch; flex-direction: column; }
  .v43-forecast-controls { align-items: stretch; flex-direction: column; }
  .v43-projection-scope { min-width: 0; }
  .v4-horizon { align-self: flex-start; }
  .v4-forecast-row { grid-template-columns: 3.6rem minmax(3rem, 1fr) 5.7rem; gap: .4rem; }
  .v4-forecast-row small { display: none; }
  .v4-inline-form,
  .v4-inline-form-short { grid-template-columns: 1fr; }
  .v4-inline-form .form-input,
  .v4-inline-form .btn { min-height: 2.65rem; font-size: .78rem; }
  .v4-overlay { align-items: end; padding: 0; }
  .v4-dialog { width: 100%; max-height: 92dvh; padding: 1.1rem; border-width: 1px 0 0; border-radius: 1.25rem 1.25rem 0 0; }
  .v4-feature-grid { grid-template-columns: 1fr; }
  .v4-search-result { grid-template-columns: 2.1rem minmax(0, 1fr); }
  .v4-search-result > b { grid-column: 2; }
  .transaction-load-more { flex-direction: column; }
  .dashboard-chart-toolbar { align-items: stretch; }
  .dashboard-chart-segment { flex: 1; }
  .dashboard-chart-segment button { flex: 1; }
  .dashboard-chart-toggle { width: 100%; margin-left: 0; padding: .3rem 0; }
  .dashboard-chart-card .chart-container { min-height: 16rem; }
  .v42-simulator-head { flex-direction: column; }
  .v42-presets { width: 100%; }
  .v42-presets button { min-height: 2.25rem; flex: 1 1 auto; }
  .v42-simulator-grid { grid-template-columns: 1fr 1fr; }
  .v42-forecast-insights { grid-template-columns: 1fr; }
  .v43-breakdown-grid { grid-template-columns: 1fr; }
  .v43-breakdown-row.total { grid-column: auto; }
  .v42-forecast-chart { min-height: 7.5rem; overflow: visible; }
  .v42-forecast-chart svg { width: 100%; max-width: 100%; transform: none; }
  .pwa-install-banner { right: .6rem; bottom: calc(4.8rem + env(safe-area-inset-bottom)); grid-template-columns: 2.6rem minmax(0, 1fr) auto; width: calc(100vw - 1.2rem); }
  .pwa-install-banner img { width: 42px; height: 42px; }
  .pwa-install-banner > .btn-icon { position: absolute; top: -.55rem; right: -.25rem; }
}

@media (max-width: 430px) {
  .v4-maintenance { min-height: calc(100dvh - 7rem); }
  .v42-simulator-grid { grid-template-columns: 1fr; }
  .pwa-install-banner > .btn { padding: .55rem .65rem; }
  .pwa-install-banner span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .v4-overlay,
  .v4-dialog,
  .v4-forecast-track span,
  .pwa-install-banner { animation: none; transition: none; }
}

/* Planificateur 4.3 : conseils de sécurité et fourchette de risque. */
.v43-planner-intelligence {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: .75rem;
  margin-bottom: 1rem;
}
.v43-planner-intelligence article {
  display: grid;
  grid-template-columns: 2.35rem minmax(0, 1fr);
  align-items: center;
  gap: .65rem;
  min-width: 0;
  padding: .8rem;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: .85rem;
  background: var(--bg-card, #fff);
}
.v43-planner-intelligence article > i {
  display: grid;
  width: 2.35rem;
  height: 2.35rem;
  place-items: center;
  border-radius: .7rem;
  background: rgba(37, 99, 235, .1);
  color: #2563eb;
}
.v43-planner-intelligence article > div { display: flex; min-width: 0; flex-direction: column; }
.v43-planner-intelligence span { color: var(--text-muted, #64748b); font-size: .58rem; }
.v43-planner-intelligence strong { color: var(--text-primary, #0f172a); font-size: .72rem; }
.v43-planner-intelligence small { color: var(--text-muted, #64748b); font-size: .55rem; line-height: 1.35; }
.v43-planner-intelligence .success > i { background: rgba(16, 185, 129, .12); color: #059669; }
.v43-planner-intelligence .warning > i { background: rgba(245, 158, 11, .14); color: #b45309; }
.v43-planner-intelligence .danger > i { background: rgba(225, 29, 72, .1); color: #e11d48; }
.v43-risk-band { fill: rgba(245, 158, 11, .13); stroke: rgba(245, 158, 11, .3); stroke-width: 1; }
.v4-goal.overdue { border-color: rgba(225, 29, 72, .32); background: rgba(225, 29, 72, .045); }
.v4-goal.overdue > small { color: #e11d48; }

body.dark-mode .v43-planner-intelligence article { background-color: var(--bg-card); border-color: var(--border-color); }

@media (max-width: 1180px) {
  .v43-planner-intelligence { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
}

@media (max-width: 600px) {
  .v43-planner-intelligence { grid-template-columns: 1fr; gap: .55rem; }
  .v43-planner-intelligence article { padding: .7rem; }
}

/* REC 01 à REC 03 : recherche unique interprétée */
.v4-search-scope { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .5rem; color: var(--text-muted, #64748b); font-size: .7rem; }
.v4-search-scope-toggle { display: inline-flex; align-items: center; gap: .4rem; cursor: pointer; color: var(--text-primary, #0f172a); }
.v4-search-label { margin: .25rem 0; color: var(--text-muted, #64748b); font-size: .68rem; font-weight: 600; }
.v4-search-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.v4-search-chip { display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .3rem .25rem .65rem; border-radius: 999px; background: rgba(37, 99, 235, .1); color: #1d4ed8; font-size: .7rem; font-weight: 600; }
.v4-search-chip-remove { display: grid; width: 1.4rem; height: 1.4rem; place-items: center; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; font-size: 1rem; line-height: 1; }
.v4-search-chip-remove:hover, .v4-search-chip-remove:focus-visible { background: rgba(37, 99, 235, .2); outline: 0; }
.v4-search-editors { display: flex; flex-wrap: wrap; gap: .6rem; margin: .6rem 0; }
.v4-search-editor { display: flex; flex-direction: column; gap: .15rem; color: var(--text-muted, #64748b); font-size: .65rem; }
.v4-search-editor input, .v4-search-editor select { min-height: 2rem; padding: .2rem .5rem; border: 1px solid var(--border-color, #e2e8f0); border-radius: .5rem; background: var(--bg-input, #f8fafc); color: var(--text-primary, #0f172a); font-size: .75rem; }
.v4-search-editor input[type="number"] { width: 6.5rem; }
.v4-search-note, .v4-search-count { margin: .4rem 0; color: var(--text-muted, #64748b); font-size: .7rem; }
.v4-search-heading { margin: .75rem 0 .25rem; font-size: .72rem; font-weight: 700; color: var(--text-primary, #0f172a); }
.v4-search-section { display: flex; flex-direction: column; align-items: flex-start; gap: .4rem; }
.v4-search-section > .v4-search-result { width: 100%; }
.v4-search-suggestion { white-space: normal; text-align: left; }
.v4-search-result small.v4-search-status { color: var(--text-muted, #64748b); }
.v4-search-result small.v4-search-explain { color: #b45309; white-space: normal; }
.v4-search-result > span:nth-child(2) small { white-space: normal; }

/* Planner redesign: visual narrative, not a wall of equally weighted cards. */
#planner-view .v4-hero {min-height:15rem;align-items:center;padding:clamp(1.5rem,3vw,2.8rem);border:1px solid rgba(255,255,255,.12);border-radius:1.65rem;background:radial-gradient(circle at 78% 16%,rgba(42,203,174,.22),transparent 30%),radial-gradient(circle at 12% 92%,rgba(71,113,255,.23),transparent 38%),linear-gradient(130deg,#101d35,#172b48 65%,#123a42);box-shadow:0 18px 48px rgba(17,34,58,.19);overflow:hidden;}
#planner-view .v4-hero::after {content:'';position:absolute;right:-5rem;bottom:-12rem;width:29rem;height:29rem;border:1px solid rgba(255,255,255,.11);border-radius:50%;box-shadow:0 0 0 4rem rgba(255,255,255,.025),0 0 0 8rem rgba(255,255,255,.018);pointer-events:none;}
#planner-view .v4-hero h2 {max-width:15ch;font-size:clamp(2rem,3.4vw,3.4rem);line-height:1.08;letter-spacing:-.055em;color:#fff;text-wrap:balance;}
#planner-view .v4-hero p {max-width:50ch;font-size:.95rem;line-height:1.65;color:#cbd9e7;}
#planner-view .v4-hero .v4-eyebrow {color:#73e4d2;}
#planner-view .v4-hero-actions {align-self:flex-end;flex-wrap:wrap;}
#planner-view .v4-hero-actions .btn {border-color:rgba(255,255,255,.24);border-radius:.8rem;}
#planner-view .v4-hero-actions #v4HelpButton,#planner-view .v4-hero-actions .btn-primary {display:none;}
.v4-story-heading {display:flex;align-items:end;justify-content:space-between;gap:1rem;margin:2rem 0 1rem;}
.v4-story-heading .v4-eyebrow {color:#0e9685;font-size:.68rem;letter-spacing:.14em;}
.v4-story-heading h3 {margin:.3rem 0 0;color:var(--text-primary,#142338);font-size:clamp(1.3rem,2vw,1.85rem);letter-spacing:-.035em;text-wrap:balance;}
.v4-story-heading p {max-width:25rem;color:var(--text-muted,#64748b);font-size:.82rem;text-align:right;}
#planner-view .v4-summary-grid {gap:.85rem;}
#planner-view .v4-summary-card {min-height:8.4rem;align-items:flex-start;flex-direction:column;justify-content:space-between;padding:1.15rem 1.25rem;border-radius:1.15rem;background:linear-gradient(160deg,var(--bg-card,#fff),var(--bg-input,#f6f9fc));}
#planner-view .v4-summary-card:first-child {background:linear-gradient(145deg,#205de2,#1744ac);border-color:#1d55c5;color:#fff;box-shadow:0 16px 32px rgba(31,88,200,.2);}
#planner-view .v4-summary-card:first-child .v4-summary-icon {background:rgba(255,255,255,.17);color:#fff;}
#planner-view .v4-summary-card:first-child :is(span,strong,small) {color:#fff;}
#planner-view .v4-summary-card strong {font-size:clamp(1.25rem,1.8vw,1.75rem);font-variant-numeric:tabular-nums;}
#planner-view .v43-planner-intelligence {grid-template-columns:repeat(3,minmax(0,1fr));gap:.8rem;}
#planner-view .v43-planner-intelligence article {min-height:8.7rem;align-items:flex-start;padding:1.1rem;border-radius:1.1rem;background:var(--bg-card,#fff);box-shadow:0 9px 26px rgba(20,36,62,.035);}
#planner-view .v43-planner-intelligence article:nth-child(n+4) {min-height:7.2rem;}
#planner-view .v43-planner-intelligence article:nth-child(4) {grid-column:span 1;}
#planner-view .v43-planner-intelligence article:nth-child(5) {grid-column:span 2;}
#planner-view .v43-planner-intelligence span {font-size:.7rem;font-weight:650;}
#planner-view .v43-planner-intelligence strong {font-size:1rem;line-height:1.25;letter-spacing:-.02em;}
#planner-view .v43-planner-intelligence small {font-size:.68rem;line-height:1.48;}
#planner-view .v4-intelligence-grid {margin-top:1.35rem;}
#planner-view .v4-forecast-card {border-radius:1.3rem;box-shadow:0 14px 42px rgba(18,37,65,.06);}
#planner-view .v42-forecast-chart svg {filter:drop-shadow(0 8px 12px rgba(22,131,107,.09));}
@media (max-width:1050px){#planner-view .v43-planner-intelligence{grid-template-columns:repeat(2,minmax(0,1fr));}#planner-view .v43-planner-intelligence article:nth-child(5){grid-column:span 2;}}
@media (max-width:650px){#planner-view .v4-hero{min-height:0;padding:1.5rem;}#planner-view .v4-hero h2{font-size:2.15rem;}#planner-view .v4-hero-actions{align-self:auto;}#planner-view .v4-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr));}#planner-view .v4-summary-card{min-height:7.5rem;padding:.9rem;}#planner-view .v43-planner-intelligence{grid-template-columns:1fr;}#planner-view .v43-planner-intelligence article:nth-child(5){grid-column:auto;}.v4-story-heading{align-items:flex-start;flex-direction:column;}.v4-story-heading p{text-align:left;}}
@media (prefers-reduced-motion:reduce){#planner-view .v4-summary-card::after{animation:none;transform:scaleX(1);}}

/* The rest of the planner follows the same visual system. */
#planner-view .v4-layout:not(.v4-layout-three) {grid-template-columns:minmax(0,1fr);gap:1.1rem;}
#planner-view .v4-layout:not(.v4-layout-three)>.card:last-child {max-width:none;}
#planner-view .v4-forecast-card {padding:clamp(1.1rem,2.4vw,2rem);}
#planner-view .v4-forecast-card>.v4-section-head {align-items:center;padding-bottom:1rem;border-bottom:1px solid var(--border-color,#e2e8f0);}
#planner-view .v4-forecast-card>.v4-section-head h3 {font-size:clamp(1.35rem,2vw,1.8rem);}
#planner-view .v4-horizon {gap:.15rem;padding:.25rem;border-radius:999px;}
#planner-view .v4-horizon button {min-width:3.6rem;border-radius:999px;font-size:.75rem;transition:background .18s ease,transform .18s ease;}
#planner-view .v4-horizon button:active {transform:scale(.95);}
#planner-view .v42-forecast-insights {grid-template-columns:repeat(3,minmax(0,1fr));gap:.85rem;margin:1.2rem 0;}
#planner-view .v42-forecast-insights article {min-height:5.2rem;padding:1rem;border-radius:1rem;background:var(--bg-card,#fff);}
#planner-view .v42-forecast-insights strong {font-size:.92rem;}
#planner-view .v42-forecast-insights :is(span,small) {font-size:.68rem;}
#planner-view .v42-forecast-visual {padding:clamp(1rem,2vw,1.5rem);border-radius:1.2rem;background:linear-gradient(180deg,var(--bg-card,#fff),var(--bg-input,#f6f9fc));}
#planner-view .v42-chart-head {align-items:center;margin-bottom:1.1rem;}
#planner-view .v42-chart-head strong {font-size:1.05rem;letter-spacing:-.02em;}
#planner-view .v42-forecast-chart {min-height:16rem;}
#planner-view .v42-forecast-line {stroke-width:4.5;}
#planner-view .v4-detail-panel {margin:1.1rem 0;padding:clamp(1rem,2vw,1.5rem);border:1px solid var(--border-color,#e2e8f0);border-radius:1.2rem;background:var(--bg-card,#fff);box-shadow:0 9px 28px rgba(20,36,62,.035);}
#planner-view .v4-detail-panel :is(h3,h4) {letter-spacing:-.025em;}
#planner-view .v4-detail-panel table {font-variant-numeric:tabular-nums;}
#planner-view .v4-simulator-disclosure {margin:1rem 0;padding:0;border:1px solid var(--border-color,#dce5ef);border-radius:1rem;background:var(--bg-input,#f7fafc);overflow:hidden;}
#planner-view .v4-simulator-disclosure>summary {display:flex;align-items:center;gap:.8rem;padding:1rem 1.2rem;cursor:pointer;list-style:none;}
#planner-view .v4-simulator-disclosure>summary::-webkit-details-marker {display:none;}
#planner-view .v4-simulator-disclosure>summary>i:first-child {display:grid;width:2.4rem;height:2.4rem;place-items:center;border-radius:.75rem;background:rgba(37,99,235,.1);color:#2563eb;}
#planner-view .v4-simulator-disclosure>summary>span {display:flex;flex:1;flex-direction:column;gap:.15rem;}
#planner-view .v4-simulator-disclosure>summary strong {font-size:.9rem;color:var(--text-primary,#142338);}
#planner-view .v4-simulator-disclosure>summary small {font-size:.7rem;color:var(--text-muted,#64748b);}
#planner-view .v4-simulator-disclosure>summary>i:last-child {color:var(--text-muted,#64748b);transition:transform .2s ease;}
#planner-view .v4-simulator-disclosure[open]>summary>i:last-child {transform:rotate(180deg);}
#planner-view .v4-simulator-disclosure .v42-simulator-head,#planner-view .v4-simulator-disclosure .v42-simulator-grid {margin-inline:1.2rem;}
#planner-view .v4-simulator-disclosure .v42-simulator-grid {margin-bottom:1.2rem;}
#planner-view .v4-layout-three {grid-template-columns:repeat(3,minmax(0,1fr));gap:1.1rem;}
#planner-view .v4-layout-three>.card,#planner-view .v4-layout:not(.v4-layout-three)>.card:last-child {padding:clamp(1.1rem,2vw,1.5rem);border-radius:1.2rem;box-shadow:0 10px 32px rgba(20,36,62,.04);}
#planner-view .v4-layout-three .v4-section-head {padding-bottom:.85rem;border-bottom:1px solid var(--border-color,#e2e8f0);}
#planner-view .v4-layout-three .v4-section-head h3 {font-size:1.12rem;}
#planner-view .v4-inline-form {gap:.55rem;margin-bottom:1.2rem;}
#planner-view .v4-inline-form .form-input {min-height:2.65rem;border-radius:.75rem;}
#planner-view .v4-inline-form .btn {min-height:2.65rem;border-radius:.75rem;}
#planner-view .v4-goal,#planner-view .v4-envelope {padding:1rem;border-radius:.9rem;}
#planner-view .v4-calendar-item {padding:.8rem .2rem;}
#planner-view .v4-calendar-item time {border-radius:.8rem;}
@media (max-width:1050px){#planner-view .v4-layout-three{grid-template-columns:repeat(2,minmax(0,1fr));}#planner-view .v4-layout-three>.card:last-child{grid-column:1/-1;}}
@media (max-width:700px){#planner-view .v4-layout-three{grid-template-columns:1fr;}#planner-view .v4-layout-three>.card:last-child{grid-column:auto;}#planner-view .v42-forecast-insights{grid-template-columns:1fr;}#planner-view .v42-forecast-chart{min-height:9rem;}#planner-view .v42-chart-head{flex-wrap:wrap;gap:.5rem;}#planner-view .v43-forecast-controls{width:100%;flex-wrap:wrap;}#planner-view .v4-horizon{max-width:100%;overflow-x:auto;}}
@media (prefers-reduced-motion:reduce){#planner-view .v4-simulator-disclosure>summary>i:last-child,#planner-view .v4-horizon button{transition:none;}}

#planner-view .v4-forecast-details {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.8rem;margin:1.15rem 0;align-items:start;}
#planner-view .v4-detail-disclosure {min-width:0;border:1px solid var(--border-color,#dce5ef);border-radius:1rem;background:var(--bg-card,#fff);box-shadow:0 8px 25px rgba(20,36,62,.035);overflow:hidden;transition:border-color .2s ease,box-shadow .2s ease;}
#planner-view .v4-detail-disclosure[open] {grid-column:1/-1;border-color:rgba(37,99,235,.32);box-shadow:0 14px 34px rgba(20,36,62,.065);}
#planner-view .v4-detail-disclosure>summary {display:flex;align-items:center;gap:.85rem;min-height:5.1rem;padding:1rem 1.15rem;cursor:pointer;list-style:none;}
#planner-view .v4-detail-disclosure>summary::-webkit-details-marker {display:none;}
#planner-view .v4-detail-disclosure>summary:focus-visible {outline:2px solid #2563eb;outline-offset:-3px;border-radius:1rem;}
#planner-view .v4-detail-icon {display:grid;flex:0 0 2.6rem;width:2.6rem;height:2.6rem;place-items:center;border-radius:.8rem;background:rgba(37,99,235,.09);color:#2563eb;}
#planner-view .v4-detail-disclosure:nth-child(2) .v4-detail-icon {background:rgba(20,184,166,.11);color:#078e7b;}
#planner-view .v4-detail-disclosure>summary>span:nth-child(2) {display:flex;flex:1;min-width:0;flex-direction:column;gap:.15rem;}
#planner-view .v4-detail-disclosure>summary strong {color:var(--text-primary,#142338);font-size:.85rem;text-wrap:balance;}
#planner-view .v4-detail-disclosure>summary small {color:var(--text-muted,#64748b);font-size:.68rem;line-height:1.35;text-wrap:pretty;}
#planner-view .v4-detail-disclosure>summary>i {color:var(--text-muted,#64748b);transition:transform .2s ease;}
#planner-view .v4-detail-disclosure[open]>summary>i {transform:rotate(180deg);}
#planner-view .v4-detail-disclosure .v4-detail-panel {margin:0 .85rem .85rem;box-shadow:none;border-radius:.8rem;background:var(--bg-input,#f8fafc);}
#planner-view .v4-detail-disclosure .v4-detail-panel :is(table,.table-container) {max-width:100%;}
#planner-view .v4-detail-disclosure .v4-detail-panel .table-container {overflow-x:auto;}
@media (max-width:700px){#planner-view .v4-forecast-details{grid-template-columns:1fr;}#planner-view .v4-detail-disclosure[open]{grid-column:auto;}}
@media (min-width:768px) and (max-width:900px) {
  #planner-view .v42-forecast-insights article { padding:.75rem; }
  #planner-view .v42-forecast-insights article > i { flex-basis:1.5rem; width:1.5rem; height:1.5rem; }
}
@media (prefers-reduced-motion:reduce){#planner-view .v4-detail-disclosure,#planner-view .v4-detail-disclosure>summary>i{transition:none;}}
#planner-view .v4-forecast-list-disclosure {margin:1rem 0;}
#planner-view .v4-forecast-list-disclosure .v4-forecast {margin:.15rem .85rem .85rem;padding:.5rem .75rem;border:1px solid var(--border-color,#dce5ef);border-radius:.8rem;background:var(--bg-input,#f8fafc);}
/* Les totaux ne mélangent jamais des devises de base différentes. */
.v4-currency-scope-notice {
  margin: 12px 0;
  padding: 12px 16px;
  border: 1px solid #f5d68c;
  border-radius: 14px;
  background: #fff9e9;
  color: #78520c;
  font-size: 13px;
  line-height: 1.5;
}
.v4-currency-scope-notice[hidden] { display: none; }
body.dark-mode .v4-currency-scope-notice {
  border-color: #8b6a30;
  background: #302919;
  color: #f7d99d;
}
/* Les aperçus gardent toutes leurs colonnes, même lorsque les opérations
   ordinaires deviennent des cartes sur téléphone. Défilement local au tableau. */
:is(#budgetProposalDialog,#statementImportDialog) .table {display:table;min-width:660px;width:100%;}
:is(#budgetProposalDialog,#statementImportDialog) .table thead {display:table-header-group;}
:is(#budgetProposalDialog,#statementImportDialog) .table tbody {display:table-row-group;}
:is(#budgetProposalDialog,#statementImportDialog) .table tr {display:table-row;}
:is(#budgetProposalDialog,#statementImportDialog) .table tbody tr {border:0;border-radius:0;box-shadow:none;}
:is(#budgetProposalDialog,#statementImportDialog) .table :is(td,th) {display:table-cell;white-space:normal;}
:is(#budgetProposalDialog,#statementImportDialog) .table tbody td {padding:.85rem;border-bottom:1px solid var(--border-color);font-size:.83rem;text-align:left;font-weight:400;color:var(--text-primary);}


/* assets/css/v5.css */
/* Freev Valeur 5.1 — centre intelligent, imports, patrimoine et sécurité. */
.v5-new-badge {
  margin-left: auto;
  padding: .15rem .42rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #7c3aed, #2563eb);
  color: #fff;
  font-size: .56rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.v5-hero {
  display: flex;
  position: relative;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  overflow: hidden;
  margin-bottom: 1rem;
  padding: clamp(1.35rem, 3vw, 2.35rem);
  border: 1px solid rgba(124, 58, 237, .2);
  border-radius: 1.3rem;
  background:
    radial-gradient(circle at 88% 18%, rgba(37, 99, 235, .24), transparent 28%),
    radial-gradient(circle at 12% 100%, rgba(124, 58, 237, .17), transparent 36%),
    var(--bg-card, #fff);
  box-shadow: 0 18px 45px rgba(15, 23, 42, .07);
}

.v5-hero::after {
  content: '';
  position: absolute;
  right: -3.5rem;
  bottom: -7rem;
  width: 16rem;
  height: 16rem;
  border: 1px solid rgba(124, 58, 237, .16);
  border-radius: 50%;
  box-shadow: 0 0 0 2.5rem rgba(37, 99, 235, .045), 0 0 0 5rem rgba(124, 58, 237, .03);
  pointer-events: none;
}

.v5-eyebrow {
  display: inline-block;
  margin-bottom: .5rem;
  color: #7c3aed;
  font-size: .68rem;
  font-weight: 850;
  letter-spacing: .14em;
}

.v5-hero h2 {
  margin: 0;
  color: var(--text-primary, #0f172a);
  font-size: clamp(1.65rem, 4vw, 2.55rem);
  line-height: 1.08;
}

.v5-hero p {
  max-width: 46rem;
  margin: .75rem 0 0;
  color: var(--text-muted, #64748b);
  line-height: 1.6;
}

.v5-hero-status {
  display: flex;
  z-index: 1;
  align-items: center;
  gap: .65rem;
  flex: 0 0 auto;
}

.v5-hero-status > span {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .45rem .65rem;
  border-radius: 999px;
  background: rgba(16, 185, 129, .11);
  color: #059669;
  font-size: .65rem;
  font-weight: 800;
  white-space: nowrap;
}

.v5-hero-status > span::before {
  content: '';
  width: .42rem;
  height: .42rem;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 .2rem rgba(16, 185, 129, .1);
}

.v5-hero-status > span[data-offline='true'] { background: rgba(245, 158, 11, .12); color: #b45309; }

.v5-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .8rem;
  margin-bottom: 1rem;
}

.v5-summary article {
  display: grid;
  grid-template-columns: 2.65rem minmax(0, 1fr);
  align-items: center;
  gap: .75rem;
  min-width: 0;
  padding: .9rem;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: .95rem;
  background: var(--bg-card, #fff);
}

.v5-summary article > i {
  display: grid;
  width: 2.65rem;
  height: 2.65rem;
  place-items: center;
  border-radius: .75rem;
  background: rgba(37, 99, 235, .1);
  color: #2563eb;
}

.v5-summary article.success > i { background: rgba(16, 185, 129, .12); color: #059669; }
.v5-summary article.warning > i { background: rgba(245, 158, 11, .14); color: #b45309; }
.v5-summary article.danger > i { background: rgba(225, 29, 72, .1); color: #e11d48; }
.v5-summary article > div { display: flex; min-width: 0; flex-direction: column; }
.v5-summary span { color: var(--text-muted, #64748b); font-size: .65rem; font-weight: 650; }
.v5-summary strong { overflow: hidden; color: var(--text-primary, #0f172a); font-size: 1rem; text-overflow: ellipsis; white-space: nowrap; }

.v5-tabs {
  display: flex;
  gap: .35rem;
  overflow-x: auto;
  margin-bottom: 1rem;
  padding: .28rem;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: .85rem;
  background: var(--bg-card, #fff);
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.v5-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  min-height: 2.55rem;
  padding: .55rem .7rem;
  border: 0;
  border-radius: .65rem;
  background: transparent;
  color: var(--text-muted, #64748b);
  cursor: pointer;
  font: 750 .67rem/1.1 Inter, sans-serif;
  white-space: nowrap;
}

.v5-tabs button:hover { background: rgba(37, 99, 235, .06); color: #2563eb; }
.v5-tabs button.active { background: linear-gradient(135deg, #2563eb, #7c3aed); color: #fff; box-shadow: 0 4px 12px rgba(37, 99, 235, .2); }
.v5-tabs button:focus-visible { outline: 3px solid rgba(37, 99, 235, .3); outline-offset: 2px; }

.v5-panel { min-width: 0; }
.v5-panel[hidden] { display: none !important; }

.v5-card,
.v5-panel[data-v5-panel='overview'] {
  min-width: 0;
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 1rem;
  background: var(--bg-card, #fff);
}

.v5-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .9rem;
}

.v5-section-head h3 { margin: 0; color: var(--text-primary, #0f172a); font-size: .95rem; }
.v5-section-head p { margin: .2rem 0 0; color: var(--text-muted, #64748b); font-size: .68rem; line-height: 1.45; }
.v5-section-head .v5-eyebrow { margin-bottom: .28rem; }

.v5-grid-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.v5-form { display: grid; gap: .75rem; }
.v5-form > label { display: grid; gap: .3rem; color: var(--text-secondary, #475569); font-size: .65rem; font-weight: 700; }
.v5-check { display: flex !important; align-items: flex-start; grid-template-columns: auto 1fr; cursor: pointer; }
.v5-check input { width: 1rem; height: 1rem; margin-top: .08rem; accent-color: #2563eb; }
.v5-check span { line-height: 1.4; }
.v5-inline-form { display: flex; align-items: center; gap: .65rem; margin-bottom: 1rem; }
.v5-inline-form .form-input { flex: 1 1 auto; min-width: 10rem; }

.v5-list { display: grid; gap: .55rem; }
.v5-list > article,
.v5-rule,
.v5-subscription {
  display: flex;
  align-items: center;
  gap: .7rem;
  min-width: 0;
  padding: .72rem;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: .75rem;
  background: var(--bg-input, #f8fafc);
}

.v5-list article > div { display: flex; min-width: 0; flex: 1 1 auto; flex-direction: column; }
.v5-list strong { color: var(--text-primary, #0f172a); font-size: .7rem; }
.v5-list span,
.v5-list small { color: var(--text-muted, #64748b); font-size: .6rem; line-height: 1.4; }
.v5-list article > b { color: #2563eb; font-size: .63rem; white-space: nowrap; }
.v5-empty { margin: .3rem 0; padding: 1rem; border: 1px dashed var(--border-color, #cbd5e1); border-radius: .75rem; color: var(--text-muted, #64748b); font-size: .68rem; line-height: 1.5; text-align: center; }
.v5-list > .v5-learning-suggestion { align-items: flex-start; border-color: color-mix(in srgb, #087f5b 22%, var(--border-color, #e2e8f0)); background: color-mix(in srgb, #087f5b 4%, var(--bg-card, #fff)); }
.v5-learning-suggestion > div { gap: .28rem; }
.v5-learning-suggestion > div > strong { font-size: .78rem; }
.v5-learning-suggestion > div > span { font-size: .68rem; line-height: 1.5; }
.v5-learning-suggestion > div > small { font-size: .62rem; }
.v5-learning-suggestion > button { flex: 0 0 auto; }
.v5-learning-suggestion details { margin-top: .2rem; color: var(--text-secondary, #475569); font-size: .65rem; }
.v5-learning-suggestion details summary { min-height: 36px; display: flex; align-items: center; cursor: pointer; font-weight: 700; }
.v5-learning-evidence { display: grid; gap: .35rem; padding-bottom: .35rem; }
.v5-learning-evidence > div { display: flex; align-items: center; justify-content: space-between; gap: .7rem; padding: .45rem .55rem; border-radius: .55rem; background: var(--bg-card, #fff); }
.v5-learning-evidence > div > span { font-size: .63rem; }
.v5-learning-undo { min-height: 34px; padding: .3rem .55rem; border: 1px solid var(--border-color, #dbe3ec); border-radius: .55rem; background: var(--bg-card, #fff); color: var(--text-secondary, #475569); cursor: pointer; font: 650 .62rem Inter, sans-serif; }
.v5-learning-undo:hover { border-color: #b42318; color: #b42318; }
.v5-learning-pending { flex: 0 0 auto; padding: .38rem .55rem; border-radius: 999px; background: var(--bg-card, #fff); color: var(--text-muted, #64748b); font-size: .6rem; text-align: center; }

.v5-insights { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
.v5-insights article { display: grid; grid-template-columns: 2.4rem minmax(0, 1fr) auto; align-items: center; gap: .65rem; padding: .8rem; border: 1px solid var(--border-color, #e2e8f0); border-radius: .8rem; background: var(--bg-input, #f8fafc); }
.v5-insights article > i { display: grid; width: 2.4rem; height: 2.4rem; place-items: center; border-radius: .68rem; background: rgba(37, 99, 235, .1); color: #2563eb; }
.v5-insights article.success > i { background: rgba(16, 185, 129, .12); color: #059669; }
.v5-insights article.warning > i { background: rgba(245, 158, 11, .14); color: #b45309; }
.v5-insights article.danger > i { background: rgba(225, 29, 72, .1); color: #e11d48; }
.v5-insights article > div { display: flex; min-width: 0; flex-direction: column; }
.v5-insights strong { color: var(--text-primary, #0f172a); font-size: .72rem; }
.v5-insights span { color: var(--text-muted, #64748b); font-size: .61rem; line-height: 1.4; }
.v5-insights button { border: 0; background: transparent; color: #2563eb; cursor: pointer; font-size: .62rem; font-weight: 800; white-space: nowrap; }

.v5-switch { display: inline-flex; position: relative; flex: 0 0 2.4rem; width: 2.4rem; height: 1.35rem; }
.v5-switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.v5-switch > span { width: 100%; border-radius: 999px; background: #cbd5e1; transition: background .2s ease; }
.v5-switch > span::after { content: ''; position: absolute; top: .18rem; left: .18rem; width: .99rem; height: .99rem; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(15, 23, 42, .2); transition: transform .2s ease; }
.v5-switch input:checked + span { background: #2563eb; }
.v5-switch input:checked + span::after { transform: translateX(1.04rem); }
.v5-switch input:focus-visible + span { outline: 3px solid rgba(37, 99, 235, .28); outline-offset: 2px; }

.v5-total { display: flex; flex-direction: column; text-align: right; }
.v5-total span { color: var(--text-muted, #64748b); font-size: .6rem; }
.v5-total strong { color: #2563eb; font-size: 1.05rem; }
.v5-subscription-icon,
.v5-asset-icon { display: grid; flex: 0 0 2.35rem; width: 2.35rem; height: 2.35rem; place-items: center; border-radius: .65rem; background: rgba(124, 58, 237, .1); color: #7c3aed; }
.v5-subscription-price { display: flex; flex: 0 0 auto !important; align-items: flex-end; flex-direction: column; }
.v5-subscription-price strong { font-size: .72rem; }
.v5-subscription-price strong small { margin-left: .15rem; font-weight: 500; }
.v5-subscription-price b { padding: .1rem .3rem; border-radius: 999px; background: rgba(225, 29, 72, .1); color: #e11d48; font-size: .52rem; }
.v5-row-actions { display: flex !important; flex: 0 0 auto !important; align-items: center; flex-direction: row !important; gap: .35rem; }

.v5-asset-card { align-items: flex-start !important; flex-wrap: wrap; }
.v5-asset-card .v5-asset-main { min-width: min(100%, 15rem); }
.v5-asset-card .v5-asset-main > strong { font-size: .82rem; }
.v5-asset-card .v5-asset-change { margin-top: .3rem; font-size: .7rem; }
.v5-asset-card .v5-asset-change.is-positive { color: #047857; }
.v5-asset-card .v5-asset-change.is-negative { color: #b42318; }
.v5-asset-sparkline { display: block; width: min(100%, 260px); height: 46px; margin-top: .65rem; overflow: visible; color: #087f5b; }
.v5-asset-sparkline polyline { stroke-dasharray: 240; stroke-dashoffset: 240; animation: v5AssetLineIn 900ms cubic-bezier(.2,.7,.2,1) forwards; }
.v5-asset-history-range { display: flex !important; width: min(100%, 260px); flex-direction: row !important; justify-content: space-between; }
.v5-asset-history-empty { margin: .5rem 0 0; font-size: .68rem; }
.v5-asset-history { width: 100%; margin-top: .55rem; color: var(--text-secondary, #475569); font-size: .72rem; }
.v5-asset-history summary { min-height: 36px; display: flex; align-items: center; cursor: pointer; font-weight: 650; }
.v5-asset-history ul { display: grid; gap: .25rem; max-height: 170px; overflow: auto; margin: .25rem 0 0; padding: 0; list-style: none; }
.v5-asset-history li { display: flex; justify-content: space-between; gap: .75rem; padding: .4rem .55rem; border-radius: .55rem; background: var(--bg-card, #fff); }
.v5-asset-history li strong { white-space: nowrap; }
.v5-asset-card .v5-asset-value { padding-top: .55rem; font-size: .78rem; }
.v5-asset-value-dialog { width: min(480px, calc(100% - 2rem)); max-width: none; max-height: min(90dvh, 640px); padding: 0; border: 1px solid var(--border-color, #dbe3ec); border-radius: 22px; background: var(--bg-card, #fff); color: var(--text-primary, #1e293b); box-shadow: 0 28px 90px rgba(10, 20, 35, .28); }
.v5-asset-value-dialog::backdrop { background: rgba(20, 28, 39, .46); backdrop-filter: blur(5px); }
.v5-asset-value-sheet { display: grid; gap: .7rem; padding: clamp(1rem, 4vw, 1.5rem); }
.v5-asset-value-sheet header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.v5-asset-value-sheet header span { color: #087f5b; font-size: .63rem; font-weight: 800; letter-spacing: .1em; }
.v5-asset-value-sheet h2 { margin: .3rem 0 0; font-size: 1.25rem; }
.v5-asset-value-sheet p { margin: 0; color: var(--text-secondary, #64748b); font-size: .86rem; line-height: 1.5; }
.v5-asset-value-sheet label { margin-top: .2rem; font-size: .78rem; font-weight: 700; }
.v5-asset-value-sheet .form-input { min-height: 46px; }
.v5-asset-value-sheet footer { display: flex; justify-content: flex-end; gap: .55rem; flex-wrap: wrap; margin-top: .5rem; padding-top: .85rem; border-top: 1px solid var(--border-color, #e2e8f0); }
.v5-asset-value-error { padding: .65rem .8rem; border-radius: 10px; background: #fff1f0; color: #b42318 !important; }
@keyframes v5AssetLineIn { to { stroke-dashoffset: 0; } }


.v5-wealth-summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .7rem; margin-bottom: 1rem; }
.v5-wealth-summary article { display: flex; flex-direction: column; padding: .8rem; border: 1px solid var(--border-color, #e2e8f0); border-radius: .8rem; background: var(--bg-card, #fff); }
.v5-wealth-summary span { color: var(--text-muted, #64748b); font-size: .58rem; }
.v5-wealth-summary strong { overflow: hidden; color: var(--text-primary, #0f172a); font-size: .85rem; text-overflow: ellipsis; white-space: nowrap; }
.v5-wealth-summary .danger strong { color: #e11d48; }
.v5-wealth-summary .primary { border-color: rgba(37, 99, 235, .3); background: linear-gradient(135deg, rgba(37, 99, 235, .1), rgba(124, 58, 237, .08)); }
.v5-wealth-summary .primary strong { color: #2563eb; }

.v5-security-option { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .8rem; padding: .8rem; border: 1px solid var(--border-color, #e2e8f0); border-radius: .8rem; background: var(--bg-input, #f8fafc); cursor: pointer; }
.v5-security-option > div { display: flex; align-items: center; gap: .65rem; }
.v5-security-option i { display: grid; flex: 0 0 2.35rem; width: 2.35rem; height: 2.35rem; place-items: center; border-radius: .65rem; background: rgba(37, 99, 235, .1); color: #2563eb; }
.v5-security-option div > span { display: flex; flex-direction: column; }
.v5-security-option strong { color: var(--text-primary, #0f172a); font-size: .7rem; }
.v5-security-option small { color: var(--text-muted, #64748b); font-size: .58rem; line-height: 1.35; }
.v5-security-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: .45rem; margin-bottom: .75rem; }
.v5-security-metrics article { display: flex; min-width: 0; flex-direction: column; padding: .55rem; border-radius: .65rem; background: var(--bg-input, #f8fafc); }
.v5-security-metrics span { color: var(--text-muted, #64748b); font-size: .55rem; }
.v5-security-metrics strong { overflow: hidden; color: var(--text-primary, #0f172a); font-size: .68rem; text-overflow: ellipsis; white-space: nowrap; }
.v5-security-note { display: flex; align-items: center; gap: .7rem; padding: .85rem; border: 1px solid rgba(16, 185, 129, .25); border-radius: .85rem; background: rgba(16, 185, 129, .055); }
.v5-security-note > i { color: #059669; font-size: 1.4rem; }
.v5-security-note > div { display: flex; flex-direction: column; }
.v5-security-note strong { color: var(--text-primary, #0f172a); font-size: .7rem; }
.v5-security-note span { color: var(--text-muted, #64748b); font-size: .61rem; line-height: 1.4; }

.v5-whats-new { max-width: 52rem; }
.v5-whats-new .v4-release-icon { background: linear-gradient(135deg, #2563eb, #7c3aed); }

html.dark .v5-hero,
html.dark .v5-card,
html.dark .v5-panel[data-v5-panel='overview'],
html.dark .v5-tabs,
html.dark .v5-summary article,
html.dark .v5-wealth-summary article { box-shadow: none; }

@media (max-width: 1100px) {
  .v5-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v5-wealth-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  .v5-hero { align-items: stretch; flex-direction: column; padding: 1.15rem; }
  .v5-hero-status { align-items: stretch; justify-content: space-between; }
  .v5-hero-status .btn { min-height: 2.75rem; }
  .v5-tabs { margin-inline: -.15rem; padding-bottom: .38rem; }
  .v5-tabs button { flex: 0 0 auto; min-height: 2.75rem; }
  .v5-grid-two,
  .v5-insights { grid-template-columns: 1fr; }
  .v5-wealth-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v5-wealth-summary .primary { grid-column: 1 / -1; }
  .v5-inline-form { align-items: stretch; flex-direction: column; }
  .v5-inline-form .form-input { width: 100%; min-width: 0; }
  .v5-inline-form .btn { min-height: 2.75rem; }
  .v5-subscription { align-items: flex-start; flex-wrap: wrap; }
  .v5-subscription-price { margin-left: auto; }
  .v5-subscription .v5-row-actions { flex-basis: 100% !important; justify-content: flex-end; }
  .v5-list .btn,
  .v5-insights button { min-height: 2.6rem; }
  .v5-asset-card { align-items: center !important; }
  .v5-asset-card .v5-asset-main { flex-basis: calc(100% - 3.1rem); }
  .v5-asset-card .v5-asset-value { margin-left: 3.05rem; }
}

@media (max-width: 480px) {
  .v5-summary { grid-template-columns: 1fr; }
  .v5-hero-status { flex-direction: column; }
  .v5-hero-status > span { align-self: flex-start; }
  .v5-section-head { flex-direction: column; }
  .v5-total { text-align: left; }
  .v5-insights article { grid-template-columns: 2.4rem minmax(0, 1fr); }
  .v5-insights button { grid-column: 2; justify-self: start; padding: 0; }
  .v5-rule,
  .v5-rule > div,
  .v5-security-metrics { grid-template-columns: 1fr; }
  .v5-wealth-summary { grid-template-columns: 1fr; }
  .v5-wealth-summary .primary { grid-column: auto; }
  .v5-security-option { align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .v5-switch > span,
  .v5-switch > span::after,
  .v5-asset-sparkline polyline { transition: none; animation: none; stroke-dashoffset: 0; }
}

/* Freev Valeur 5.1 : lecture locale expliquée et comparaison mensuelle. */
.v51-intelligence-brief {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
  margin-bottom: .8rem;
  padding: 1rem;
  border: 1px solid rgba(37, 99, 235, .2);
  border-radius: 1rem;
  background: linear-gradient(135deg, rgba(37, 99, 235, .08), rgba(124, 58, 237, .055));
}
.v51-intelligence-brief > div:not(.v51-score) { display: flex; min-width: 0; flex-direction: column; }
.v51-intelligence-brief span { color: var(--text-muted, #64748b); font-size: .6rem; font-weight: 650; }
.v51-intelligence-brief strong { color: var(--text-primary, #0f172a); font-size: .9rem; }
.v51-intelligence-brief small { color: var(--text-muted, #64748b); font-size: .58rem; line-height: 1.4; }
.v51-confidence { padding-left: 1rem; border-left: 1px solid rgba(37, 99, 235, .18); }
.v51-score {
  --score: 0;
  position: relative;
  display: grid;
  width: 4.3rem;
  height: 4.3rem;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(#2563eb calc(var(--score) * 1%), rgba(148, 163, 184, .2) 0);
}
.v51-score::before { position: absolute; inset: .38rem; border-radius: inherit; background: var(--bg-card, #fff); content: ''; }
.v51-score > div { position: relative; display: flex; align-items: baseline; }
.v51-score strong { font-size: 1rem; }
.v51-score span { font-size: .5rem; }
.v51-change-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .65rem; margin-bottom: 1.1rem; }
.v51-change-grid article { display: grid; grid-template-columns: 2.15rem minmax(0, 1fr); align-items: center; gap: .55rem; padding: .7rem; border: 1px solid var(--border-color, #e2e8f0); border-radius: .8rem; background: var(--bg-input, #f8fafc); }
.v51-change-grid article > i { display: grid; width: 2.15rem; height: 2.15rem; place-items: center; border-radius: .62rem; background: rgba(37, 99, 235, .1); color: #2563eb; }
.v51-change-grid article > div { display: flex; min-width: 0; flex-direction: column; }
.v51-change-grid span, .v51-change-grid small { color: var(--text-muted, #64748b); font-size: .55rem; }
.v51-change-grid strong { overflow: hidden; color: var(--text-primary, #0f172a); font-size: .75rem; text-overflow: ellipsis; white-space: nowrap; }
.v51-change-grid .success > i { background: rgba(16, 185, 129, .12); color: #059669; }
.v51-change-grid .warning > i { background: rgba(245, 158, 11, .14); color: #b45309; }
.v51-change-grid .danger > i { background: rgba(225, 29, 72, .1); color: #e11d48; }
.v51-priority-head { margin-top: .2rem; }
.v5-insights article > div small { margin-top: .18rem; color: #2563eb; font-size: .55rem; font-weight: 650; }
.v5-tabs { scroll-snap-type: x proximity; }
.v5-tabs button { scroll-snap-align: start; }

html.dark .v51-score::before { background: var(--bg-card, #0f172a); }

@media (max-width: 1000px) {
  .v51-change-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  #smart-view { content-visibility: auto; contain-intrinsic-size: 1000px; }
  .v51-intelligence-brief { grid-template-columns: auto minmax(0, 1fr); gap: .75rem; padding: .8rem; }
  .v51-confidence { grid-column: 1 / -1; padding: .65rem 0 0; border-top: 1px solid rgba(37, 99, 235, .18); border-left: 0; }
  .v51-change-grid { grid-template-columns: 1fr 1fr; gap: .5rem; }
}

@media (max-width: 390px) {
  .v51-change-grid { grid-template-columns: 1fr; }
}

/* QUO 07 : vérification du mois */
.mc-month { display: flex; flex-direction: column; gap: .2rem; font-size: .7rem; color: var(--text-muted, #64748b); }
.mc-root { display: grid; gap: .75rem; }
.mc-status { margin: 0; font-size: .85rem; font-weight: 600; }
.mc-status-validated { color: #047857; }
.mc-status-reopened { color: #b45309; }
.mc-item { padding: .85rem; border: 1px solid var(--border-color, #e2e8f0); border-radius: .85rem; background: var(--bg-input, #f8fafc); }
.mc-item-head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.mc-badge { padding: .1rem .5rem; border-radius: 999px; background: rgba(245, 158, 11, .15); color: #b45309; font-size: .65rem; font-weight: 700; }
.mc-cause { margin: .35rem 0 0; font-size: .78rem; }
.mc-uncertainty, .mc-note { margin: .2rem 0 0; font-size: .68rem; color: var(--text-muted, #64748b); }
.mc-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
.mc-validate { justify-self: start; }
.mc-hidden { font-size: .75rem; }
.mc-hidden ul { margin: .4rem 0 0 1rem; padding: 0; }
.v5-rule-undo{display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap;margin:0 0 1rem;padding:.9rem 1rem;border:1px solid var(--border-color,#cbd5e1);border-radius:14px;background:var(--bg-secondary,#f8fafc)}
.v5-rule-undo[hidden]{display:none!important}
.v5-rule-undo strong{display:block;color:var(--text-primary,#1e293b)}
.v5-rule-undo p{margin:.25rem 0 0;color:var(--text-secondary,#64748b);font-size:.84rem}
.v5-rule-undo button:disabled{cursor:not-allowed;opacity:.55}
.v5-rule-preview{position:fixed;inset:0;z-index:10050;display:flex;align-items:center;justify-content:center;padding:1rem;background:rgba(15,23,42,.58)}
.v5-rule-preview[hidden]{display:none!important}
.v5-rule-preview-dialog{display:flex;flex-direction:column;width:min(760px,100%);max-height:min(88dvh,900px);padding:clamp(1rem,3vw,1.5rem);border:1px solid var(--border-color,#dbe3ec);border-radius:20px;background:var(--bg-card,#fff);color:var(--text-primary,#1e293b);box-shadow:0 24px 80px rgba(0,0,0,.24)}
.v5-rule-preview-head{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;margin-bottom:.65rem}
.v5-rule-preview-head h2{margin:.2rem 0 0;font-size:clamp(1.2rem,3vw,1.55rem)}
.v5-rule-preview-summary{flex:none;color:var(--text-secondary,#475569);font-size:.9rem}
.v5-rule-preview-summary p{margin:.4rem 0}
.v5-preview-conflict{padding:.65rem .8rem;border-radius:10px;background:#fff7ed;color:#9a3412}
.v5-rule-preview-select-all{display:flex;align-items:center;gap:.65rem;min-height:48px;padding:.45rem .2rem;font-weight:650}
.v5-rule-preview-select-all strong{margin-left:auto;color:var(--text-secondary,#64748b);font-size:.82rem;white-space:nowrap}
.v5-rule-preview-select-all input,.v5-rule-preview-row input{width:20px;height:20px;flex:none;accent-color:#0069d3}
.v5-rule-preview-rows{display:grid;gap:.45rem;min-height:0;overflow:auto;overscroll-behavior:contain;padding:.1rem .15rem .5rem}
.v5-rule-preview-pagination{display:flex;align-items:center;justify-content:center;gap:.75rem;flex-wrap:wrap;padding:.55rem 0;color:var(--text-secondary,#64748b);font-size:.82rem}
.v5-rule-preview-row{display:flex;align-items:flex-start;gap:.75rem;padding:.75rem;border:1px solid var(--border-color,#e2e8f0);border-radius:12px;background:var(--bg-card,#fff);cursor:pointer}
.v5-rule-preview-row:hover{border-color:#93c5fd}
.v5-rule-preview-row.is-possible-duplicate{border-color:#fbbf24;background:color-mix(in srgb,#fef3c7 30%,var(--bg-card,#fff))}
.v5-rule-preview-main{display:grid;gap:.25rem;min-width:0}
.v5-rule-preview-main strong{overflow-wrap:anywhere;color:var(--text-primary,#1e293b)}
.v5-rule-preview-main small{color:var(--text-secondary,#64748b);font-size:.82rem;line-height:1.45}
.v5-rule-preview-main em{color:#92400e;font-size:.8rem;font-style:normal}
.v5-rule-preview-actions{display:flex;justify-content:flex-end;gap:.65rem;flex-wrap:wrap;padding-top:.85rem;border-top:1px solid var(--border-color,#e2e8f0)}
@media(max-width:600px){.v5-rule-preview{padding:0;align-items:stretch}.v5-rule-preview-dialog{width:100%;max-height:100dvh;border-radius:0}.v5-rule-preview-actions>*{flex:1 1 100%}}
.duplicate-month-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr)) auto;align-items:end;gap:.6rem .8rem;padding:.75rem 0;border-bottom:1px solid var(--border-color,#e2e8f0);margin-bottom:.75rem}
.duplicate-month-form label{display:grid;gap:.35rem;font-size:.82rem;font-weight:650;color:var(--text-secondary,#475569)}
.duplicate-month-form input{min-width:0}
@media(max-width:600px){.duplicate-month-form{grid-template-columns:1fr 1fr}.duplicate-month-form button{grid-column:1/-1}}
@media(prefers-reduced-motion:reduce){.v5-rule-preview *{scroll-behavior:auto!important;animation:none!important;transition:none!important}}

/* Centre intelligent: a calmer hierarchy with deliberate emphasis. */
#smart-view .v5-hero {min-height:15rem;align-items:center;padding:clamp(1.5rem,3vw,2.8rem);border:1px solid rgba(255,255,255,.13);border-radius:1.65rem;background:radial-gradient(circle at 77% 12%,rgba(117,111,255,.24),transparent 30%),radial-gradient(circle at 12% 90%,rgba(22,184,166,.18),transparent 38%),linear-gradient(130deg,#171e38,#242846 61%,#1b3b4a);box-shadow:0 18px 48px rgba(24,29,62,.18);overflow:hidden;}
#smart-view .v5-hero::after {content:'';position:absolute;right:-5rem;bottom:-12rem;width:29rem;height:29rem;border:1px solid rgba(255,255,255,.12);border-radius:50%;box-shadow:0 0 0 4rem rgba(255,255,255,.025),0 0 0 8rem rgba(255,255,255,.018);pointer-events:none;}
#smart-view .v5-hero h2 {max-width:17ch;font-size:clamp(2rem,3.4vw,3.35rem);line-height:1.08;letter-spacing:-.055em;color:#fff;text-wrap:balance;}
#smart-view .v5-hero p {max-width:53ch;font-size:.95rem;line-height:1.65;color:#d4d9ec;text-wrap:pretty;}
#smart-view .v5-hero .v5-eyebrow {color:#a9a5ff;}
#smart-view .v5-hero-status {z-index:1;align-self:flex-end;flex-wrap:wrap;}
#smart-view .v5-hero-status .btn {border-color:rgba(255,255,255,.25);border-radius:.8rem;}
#smart-view .v5-hero-status #v5HelpButton {display:none;}
.v5-story-heading {display:flex;align-items:end;justify-content:space-between;gap:1rem;margin:2rem 0 1rem;}
.v5-story-heading .v5-eyebrow {font-size:.68rem;letter-spacing:.14em;}
.v5-story-heading h3 {margin:.3rem 0 0;color:var(--text-primary,#142338);font-size:clamp(1.35rem,2vw,1.9rem);letter-spacing:-.035em;text-wrap:balance;}
.v5-story-heading p {max-width:25rem;color:var(--text-muted,#64748b);font-size:.82rem;text-align:right;}
#smart-view .v5-summary {gap:.85rem;}
#smart-view .v5-summary article {position:relative;min-height:8.35rem;align-items:flex-start;flex-direction:column;justify-content:space-between;padding:1.15rem 1.25rem;border-radius:1.15rem;background:linear-gradient(160deg,var(--bg-card,#fff),var(--bg-input,#f6f9fc));box-shadow:0 10px 30px rgba(20,36,62,.04);transition:transform .22s ease,box-shadow .22s ease;overflow:hidden;}
#smart-view .v5-summary article:hover {transform:translateY(-3px);box-shadow:0 18px 38px rgba(20,36,62,.08);}
#smart-view .v5-summary article:first-child {background:linear-gradient(145deg,#4744d5,#275cce);border-color:#454bd3;box-shadow:0 16px 34px rgba(62,70,201,.2);}
#smart-view .v5-summary article:first-child :is(span,strong,small) {color:#fff;}
#smart-view .v5-summary article:first-child>i {background:rgba(255,255,255,.17);color:#fff;}
#smart-view .v5-summary strong {font-size:clamp(1.25rem,1.8vw,1.75rem);font-variant-numeric:tabular-nums;}
#smart-view .v5-tabs {position:sticky;top:0;z-index:5;gap:.2rem;margin:1.4rem 0 1rem;padding:.35rem;border:1px solid var(--border-color,#dce5ef);border-radius:1rem;background:var(--bg-card,#fff);box-shadow:0 9px 27px rgba(20,36,62,.055);backdrop-filter:blur(16px);}
#smart-view .v5-tabs button {min-height:2.6rem;padding:.55rem .8rem;border-radius:.7rem;font-size:.72rem;transition:background .18s ease,color .18s ease,transform .18s ease;}
#smart-view .v5-tabs button.active {background:linear-gradient(135deg,#3e55d8,#6150d8);box-shadow:0 5px 14px rgba(70,77,207,.23);}
#smart-view .v5-tabs button:active {transform:scale(.97);}
#smart-view .v5-panel[data-v5-panel='overview'] {padding:clamp(1.1rem,2vw,1.7rem);border-radius:1.3rem;box-shadow:0 14px 38px rgba(20,36,62,.045);}
#smart-view .v5-section-head h3 {font-size:clamp(1.15rem,1.6vw,1.45rem);letter-spacing:-.025em;text-wrap:balance;}
#smart-view .v51-intelligence-brief {padding:1.2rem;border-radius:1.1rem;background:linear-gradient(120deg,rgba(66,89,220,.075),rgba(118,82,218,.065));}
#smart-view .v51-intelligence-brief strong {font-size:1rem;}
#smart-view .v51-change-grid {gap:.75rem;}
#smart-view .v51-change-grid article {min-height:6rem;padding:.9rem;border-radius:.95rem;background:var(--bg-card,#fff);transition:transform .2s ease,border-color .2s ease;}
#smart-view .v51-change-grid article:hover {transform:translateY(-2px);border-color:rgba(72,83,212,.25);}
#smart-view .v51-change-grid strong {font-size:.9rem;}
#smart-view .v51-change-grid :is(span,small) {font-size:.66rem;line-height:1.4;}
@media (max-width:800px){#smart-view .v5-hero{min-height:0;align-items:flex-start;flex-direction:column;}#smart-view .v5-hero-status{align-self:auto;}#smart-view .v5-summary{grid-template-columns:repeat(2,minmax(0,1fr));}#smart-view .v5-tabs{top:.3rem;}}
@media (max-width:560px){#smart-view .v5-hero h2{font-size:2.1rem;}#smart-view .v5-summary article{min-height:7.4rem;padding:.9rem;}#smart-view .v5-tabs{margin-inline:0;overflow-x:auto;}.v5-story-heading{align-items:flex-start;flex-direction:column;}.v5-story-heading p{text-align:left;}#smart-view .v51-change-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media (prefers-reduced-motion:reduce){#smart-view .v5-summary article,#smart-view .v5-tabs button,#smart-view .v51-change-grid article{transition:none;}#smart-view .v5-summary article:hover,#smart-view .v51-change-grid article:hover{transform:none;}}

/* Keep the same rhythm through every tool panel. */
#smart-view .v5-panel>.v5-card,#smart-view .v5-grid-two>.v5-card {padding:clamp(1.1rem,2vw,1.65rem);border:1px solid var(--border-color,#dce5ef);border-radius:1.25rem;background:var(--bg-card,#fff);box-shadow:0 13px 38px rgba(20,36,62,.045);}
#smart-view .v5-panel>.v5-grid-two {gap:1rem;}
#smart-view .v5-panel>.v5-card+.v5-card,#smart-view .v5-panel>.v5-grid-two+.v5-card {margin-top:1rem;}
#smart-view .v5-section-head {align-items:center;gap:1.2rem;margin-bottom:1.25rem;padding-bottom:1rem;border-bottom:1px solid var(--border-color,#e2e8f0);}
#smart-view .v5-section-head h3 {font-size:clamp(1.1rem,1.55vw,1.4rem);letter-spacing:-.025em;line-height:1.2;text-wrap:balance;}
#smart-view .v5-section-head p {max-width:68ch;font-size:.76rem;line-height:1.5;text-wrap:pretty;}
#smart-view .v51-priority-head {margin-top:1.6rem;}
#smart-view .v5-insights {gap:.85rem;}
#smart-view .v5-insights article {min-height:6.2rem;padding:1rem;border-radius:1rem;background:var(--bg-card,#fff);box-shadow:0 7px 22px rgba(20,36,62,.03);transition:transform .2s ease,border-color .2s ease,box-shadow .2s ease;}
#smart-view .v5-insights article:hover {transform:translateY(-2px);border-color:rgba(70,80,210,.23);box-shadow:0 14px 28px rgba(20,36,62,.07);}
#smart-view .v5-insights article>i {width:2.7rem;height:2.7rem;border-radius:.82rem;}
#smart-view .v5-insights strong {font-size:.84rem;line-height:1.35;text-wrap:balance;}
#smart-view .v5-insights span {font-size:.7rem;line-height:1.5;text-wrap:pretty;}
#smart-view .v5-insights button {min-height:2.25rem;padding:.4rem .65rem;border:1px solid var(--border-color,#dce5ef);border-radius:.7rem;background:var(--bg-card,#fff);font-size:.7rem;}
#smart-view .v5-insights button:hover {border-color:#5f5bdd;background:rgba(87,79,214,.06);}
#smart-view .v5-form {gap:.8rem;}
#smart-view .v5-form :is(.form-input,.form-select),#smart-view .v5-inline-form .form-input {min-height:2.75rem;border-radius:.75rem;font-size:.82rem;}
#smart-view .v5-form .btn,#smart-view .v5-inline-form .btn {min-height:2.7rem;border-radius:.75rem;}
#smart-view .v5-list {gap:.7rem;}
#smart-view .v5-list>article,#smart-view .v5-rule,#smart-view .v5-subscription {padding:1rem;border-radius:.95rem;background:var(--bg-card,#fff);transition:border-color .2s ease,box-shadow .2s ease;}
#smart-view .v5-list>article:hover,#smart-view .v5-rule:hover,#smart-view .v5-subscription:hover {border-color:rgba(70,80,210,.24);box-shadow:0 11px 24px rgba(20,36,62,.045);}
#smart-view .v5-list strong {font-size:.8rem;line-height:1.35;}
#smart-view .v5-list :is(span,small) {font-size:.68rem;line-height:1.5;}
#smart-view .v5-total {padding:.65rem .85rem;border-radius:.8rem;background:rgba(70,80,210,.07);}
#smart-view .v5-total strong {font-size:1.25rem;font-variant-numeric:tabular-nums;}
#smart-view .v5-wealth-summary {gap:.7rem;}
#smart-view .v5-wealth-summary article {min-height:5.3rem;justify-content:space-between;padding:1rem;border-radius:.95rem;}
#smart-view .v5-wealth-summary strong {font-size:1.05rem;font-variant-numeric:tabular-nums;}
#smart-view .v5-security-option {min-height:4.5rem;padding:1rem;border-radius:.95rem;background:var(--bg-card,#fff);}
@media (max-width:780px){#smart-view .v5-insights{grid-template-columns:1fr;}#smart-view .v5-section-head{align-items:flex-start;flex-direction:column;}#smart-view .v5-wealth-summary{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media (max-width:530px){#smart-view .v5-summary{grid-template-columns:repeat(2,minmax(0,1fr));}#smart-view .v5-summary article{min-width:0;}#smart-view .v5-summary strong{white-space:normal;overflow-wrap:anywhere;font-size:1.15rem;}#smart-view .v5-insights article{grid-template-columns:2.5rem minmax(0,1fr);}#smart-view .v5-insights button{grid-column:2;justify-self:start;}#smart-view .v5-wealth-summary{grid-template-columns:1fr 1fr;}}
@media (prefers-reduced-motion:reduce){#smart-view .v5-insights article,#smart-view .v5-list>article,#smart-view .v5-rule,#smart-view .v5-subscription{transition:none;}#smart-view .v5-insights article:hover{transform:none;}}

/* A data-backed visual cue in the overview, with legible detail at every size. */
#smart-view .v51-intelligence-brief {grid-template-columns:7rem minmax(0,1fr) minmax(13rem,.9fr);gap:1.5rem;min-height:10rem;padding:1.5rem;border:1px solid rgba(76,83,211,.17);border-radius:1.25rem;background:radial-gradient(circle at 12% 35%,rgba(82,101,237,.13),transparent 26%),linear-gradient(120deg,var(--bg-card,#fff),rgba(94,92,215,.055));box-shadow:0 12px 32px rgba(26,34,79,.045);}
#smart-view .v51-score {width:6.2rem;height:6.2rem;box-shadow:0 8px 22px rgba(47,83,199,.1);animation:v51-score-enter .7s cubic-bezier(.2,.8,.2,1) both;}
#smart-view .v51-score::before {inset:.55rem;}
#smart-view .v51-score strong {font-size:1.55rem;font-variant-numeric:tabular-nums;}
#smart-view .v51-score span {font-size:.65rem;}
#smart-view .v51-intelligence-brief>div:not(.v51-score) {gap:.22rem;}
#smart-view .v51-intelligence-brief>div:not(.v51-score)>span {font-size:.7rem;letter-spacing:.015em;}
#smart-view .v51-intelligence-brief>div:not(.v51-score)>strong {font-size:1.2rem;letter-spacing:-.025em;text-wrap:balance;}
#smart-view .v51-intelligence-brief small {font-size:.72rem;line-height:1.5;text-wrap:pretty;}
#smart-view .v51-confidence {padding-left:1.5rem;border-left:1px solid var(--border-color,#dce5ef);}
.v51-coverage-meter {height:.5rem;max-width:18rem;margin-top:.75rem;border-radius:999px;background:rgba(108,123,160,.17);overflow:hidden;}
.v51-coverage-meter>span {display:block;width:var(--coverage);height:100%;border-radius:inherit;background:linear-gradient(90deg,#465fe0,#19b69d);transform-origin:left;animation:v51-meter-enter .8s .14s ease-out both;}
@keyframes v51-meter-enter {from {transform:scaleX(0)}to {transform:scaleX(1)}}
@keyframes v51-score-enter {from {opacity:.2;transform:scale(.86)}to {opacity:1;transform:scale(1)}}
#smart-view .v51-change-grid article {position:relative;overflow:hidden;}
#smart-view .v51-change-grid article::after {content:'';position:absolute;right:0;top:0;bottom:0;width:3px;background:var(--v51-tone,#4e67df);}
#smart-view .v51-change-grid article.success {--v51-tone:#11a98c;}
#smart-view .v51-change-grid article.warning {--v51-tone:#e7a129;}
#smart-view .v51-change-grid article.danger {--v51-tone:#df6473;}
#smart-view .v51-change-grid article strong {font-variant-numeric:tabular-nums;}
@media (max-width:850px){#smart-view .v51-intelligence-brief{grid-template-columns:auto minmax(0,1fr);gap:1rem;}#smart-view .v51-confidence{grid-column:1/-1;padding:1rem 0 0;border-left:0;border-top:1px solid var(--border-color,#dce5ef);}}
@media (max-width:520px){#smart-view .v51-intelligence-brief{padding:1rem;}#smart-view .v51-score{width:4.7rem;height:4.7rem;}#smart-view .v51-score strong{font-size:1.25rem;}#smart-view .v51-change-grid{grid-template-columns:1fr 1fr;}#smart-view .v51-change-grid article{min-height:5.6rem;padding:.7rem;}}
@media (prefers-reduced-motion:reduce){#smart-view .v51-score,.v51-coverage-meter>span{animation:none;transform:none;}}


/* assets/css/free-trial.css */
.freev-trial-section,.freev-trial-smart{margin:1.15rem 0 1.5rem;padding:1.3rem;border:1px solid #d9e8e6;border-radius:22px;background:linear-gradient(135deg,#f4fbf9 0%,#fff 65%,#f4f7ff 100%);box-shadow:0 12px 34px rgba(18,61,77,.055)}
.freev-trial-heading{display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap}
.freev-trial-heading h3{font-size:1.24rem;font-weight:750;letter-spacing:-.025em;margin:.25rem 0}
.freev-trial-heading p{color:#66758a;font-size:.88rem;margin:0}
.freev-trial-kicker{color:#076c5c;font-size:.7rem;font-weight:800;letter-spacing:.1em;text-transform:uppercase}
.freev-trial-list{display:grid;gap:.7rem;margin-top:1rem}
.freev-trial-empty{color:#66758a;font-size:.88rem;padding:.95rem 1rem;border:1px dashed #cfe3de;border-radius:14px;background:rgba(255,255,255,.7)}
.freev-trial-item{display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap;padding:1rem;border:1px solid #dce9e6;border-radius:16px;background:#fff;box-shadow:0 7px 22px rgba(14,52,64,.045);animation:freevTrialIn .38s both}
.freev-trial-item-main{display:grid;gap:.27rem;min-width:175px;flex:1}.freev-trial-item-main strong{font-size:1rem;color:#172c38}.freev-trial-item-main span,.freev-trial-item-main small{font-size:.8rem;color:#65768a}
.freev-trial-item-main .freev-trial-status{color:#096b58;font-weight:700}.freev-trial-item-main .freev-trial-urgent{color:#9a4315;font-weight:700}
.freev-trial-item-actions{display:flex;align-items:center;gap:.45rem;flex-wrap:wrap}.freev-trial-item-actions .btn{min-height:38px}
.freev-trial-modal{max-width:630px}.freev-trial-intro{margin:0 0 1.2rem;color:#56677b}.freev-trial-preview{padding:.85rem 1rem;border:1px solid #bce2d7;border-radius:12px;background:#effaf6;color:#0c705c;font-weight:700}.freev-trial-preview.is-warning{border-color:#f1d3a4;background:#fff8ec;color:#985c14}.freev-trial-disclaimer{font-size:.77rem;color:#66758a}
#freeTrialModal > .modal-content{max-width:min(630px,calc(100vw - 1rem))}
#freeTrialModal .freev-trial-close{font-size:1.35rem;line-height:1}
body.dark-mode .freev-trial-section,body.dark-mode .freev-trial-smart{background:var(--bg-card);border-color:var(--border-color)}
body.dark-mode .freev-trial-item,body.dark-mode .freev-trial-empty{background:var(--bg-input);border-color:var(--border-color)}
body.dark-mode .freev-trial-item-main strong,body.dark-mode .freev-trial-heading h3{color:var(--text-primary)}
body.dark-mode .freev-trial-item-main .freev-trial-status{color:#9ce8d0}
body.dark-mode .freev-trial-item-main .freev-trial-urgent{color:#ffc599}
body.dark-mode .freev-trial-heading p,body.dark-mode .freev-trial-item-main span,body.dark-mode .freev-trial-empty,body.dark-mode .freev-trial-intro,body.dark-mode .freev-trial-disclaimer{color:var(--text-muted)}
body.dark-mode .freev-trial-preview{background:#10352e;border-color:#286b5b;color:#b0efdc}
body.dark-mode .freev-trial-preview.is-warning{background:#3d2a15;border-color:#765323;color:#f4cc90}
body.dark-mode #freeTrialModal .freev-trial-kicker{color:#86efac}
@keyframes freevTrialIn{from{opacity:0;transform:translateY(7px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:650px){.freev-trial-section,.freev-trial-smart{padding:1rem;border-radius:18px}.freev-trial-heading .btn{width:100%;justify-content:center}.freev-trial-item-actions{width:100%}.freev-trial-item-actions .btn{flex:1}}
@media(prefers-reduced-motion:reduce){.freev-trial-item{animation:none}}


/* assets/css/reconciliation-ui.css */
.rc-panel {
  --rc-accent: #16836b;
  --rc-ink: #17212b;
  --rc-muted: #667085;
  --rc-border: rgba(27, 47, 64, 0.11);
  margin-top: 1rem;
  overflow: hidden;
  border: 1px solid var(--rc-border);
  border-radius: 1.25rem;
  background: linear-gradient(145deg, #fff 0%, #fbfdfc 100%);
  box-shadow: 0 14px 36px rgba(22, 45, 58, 0.055);
}

.rc-head,
.rc-candidates-head,
.rc-footer,
.rc-dialog-head,
.rc-dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.rc-head { align-items: flex-start; }
.rc-head h2 { margin: 0.25rem 0 0.45rem; color: var(--rc-ink); font-size: clamp(1.2rem, 2vw, 1.55rem); letter-spacing: -0.035em; }
.rc-head p,
.rc-candidates-head p,
.rc-settings > p { margin: 0; color: var(--rc-muted); line-height: 1.55; }
.rc-account { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 0.5rem; padding: 0.55rem 0.8rem; border: 1px solid var(--rc-border); border-radius: 999px; color: #344054; background: #fff; font-size: 0.82rem; font-weight: 650; }
.rc-account i { color: var(--rc-accent); }

.rc-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.7rem; margin: 1.25rem 0; }
.rc-summary > div { display: grid; gap: 0.3rem; min-width: 0; padding: 0.8rem 0.9rem; border: 1px solid var(--rc-border); border-radius: 0.9rem; background: rgba(255, 255, 255, 0.84); }
.rc-summary small { color: var(--rc-muted); font-size: 0.75rem; }
.rc-summary strong { color: var(--rc-ink); font-size: 1.28rem; font-variant-numeric: tabular-nums; }

.rc-alert { display: flex; align-items: flex-start; gap: 0.7rem; margin: 0.8rem 0; padding: 0.85rem 0.95rem; border: 1px solid #f1d4aa; border-radius: 0.9rem; color: #7a4c12; background: #fff8eb; line-height: 1.45; }
.rc-alert i { margin-top: 0.15rem; }
.rc-settings { margin: 1rem 0; padding: 0.85rem 0.95rem; border: 1px solid var(--rc-border); border-radius: 0.9rem; background: #fff; }
.rc-settings > summary,
.rc-linked > summary { color: #344054; cursor: pointer; font-weight: 650; }
.rc-settings[open] > summary,
.rc-linked[open] > summary { margin-bottom: 0.75rem; }
.rc-settings-grid { display: grid; gap: 0.6rem; margin: 0.85rem 0; }
.rc-settings-row { display: grid; grid-template-columns: minmax(5.5rem, 0.65fr) repeat(2, minmax(8rem, 1fr)) minmax(12rem, 1.2fr); align-items: center; gap: 0.8rem; padding: 0.7rem 0; border-top: 1px solid var(--rc-border); }
.rc-settings-row > strong { color: var(--rc-ink); font-size: 0.88rem; }
.rc-settings-row label { display: grid; gap: 0.3rem; color: var(--rc-muted); font-size: 0.76rem; }
.rc-setting-input { display: inline-flex; align-items: center; gap: 0.45rem; max-width: 12rem; padding: 0.45rem 0.65rem; border: 1px solid var(--rc-border); border-radius: 0.7rem; background: #fff; }
.rc-setting-input:focus-within { border-color: color-mix(in srgb, var(--rc-accent), #fff 35%); box-shadow: 0 0 0 3px color-mix(in srgb, var(--rc-accent), transparent 88%); }
.rc-setting-input input { width: 100%; min-width: 0; border: 0; outline: 0; color: var(--rc-ink); background: transparent; font: inherit; font-variant-numeric: tabular-nums; }
.rc-setting-input small { flex: 0 0 auto; color: var(--rc-muted); }
.rc-setting-check { display: flex !important; align-items: center; gap: 0.55rem !important; }
.rc-setting-check input,
.rc-option-select input { accent-color: var(--rc-accent); width: 1.05rem; height: 1.05rem; }

.rc-candidates-head { margin: 1.2rem 0 0.75rem; }
.rc-candidates-head h3 { margin: 0 0 0.25rem; color: var(--rc-ink); font-size: 1.02rem; }
.rc-candidate-count { display: inline-grid; min-width: 2rem; height: 2rem; place-items: center; border-radius: 999px; color: #126550; background: #e6f6f0; font-size: 0.83rem; font-weight: 700; }
.rc-candidate-list { display: grid; gap: 0.65rem; }
.rc-option { display: grid; grid-template-columns: 1.15rem minmax(0, 1fr); gap: 0.8rem; min-width: 0; margin: 0; padding: 0.9rem; border: 1px solid var(--rc-border); border-radius: 0.95rem; background: #fff; transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease; }
.rc-option:has([data-rc-select]:checked) { border-color: color-mix(in srgb, var(--rc-accent), #fff 45%); box-shadow: 0 5px 18px rgba(22, 131, 107, 0.09); }
.rc-option-select { display: flex; justify-content: center; padding-top: 0.25rem; cursor: pointer; }
.rc-option-main { min-width: 0; }
.rc-option-operations { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 0.9rem; }
.rc-option-operations > div { display: grid; gap: 0.22rem; min-width: 0; }
.rc-option-operations small { color: var(--rc-muted); font-size: 0.72rem; }
.rc-option-operations strong { overflow: hidden; color: var(--rc-ink); font-size: 0.9rem; text-overflow: ellipsis; white-space: nowrap; }
.rc-option-operations span { color: var(--rc-muted); font-size: 0.78rem; font-variant-numeric: tabular-nums; }
.rc-option-operations > i { color: #98a2b3; }
.rc-evidence { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem 0.65rem; margin: 0.65rem 0; color: var(--rc-muted); font-size: 0.75rem; line-height: 1.4; }
.rc-badge { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.28rem 0.55rem; border-radius: 999px; color: #126550; background: #e8f6f0; font-size: 0.7rem; font-weight: 650; }
.rc-badge-warning { color: #8a4f08; background: #fff2d8; }
.rc-allocation-amount { display: flex; align-items: center; justify-content: space-between; gap: 1rem; color: #344054; font-size: 0.78rem; font-weight: 600; }
.rc-allocation-amount .rc-setting-input { width: 9rem; }
.rc-empty { display: grid; justify-items: center; gap: 0.45rem; padding: 2rem 1rem; border: 1px dashed var(--rc-border); border-radius: 1rem; background: rgba(255, 255, 255, 0.6); text-align: center; }
.rc-empty-icon { display: grid; width: 2.6rem; height: 2.6rem; place-items: center; border-radius: 50%; color: var(--rc-accent); background: #e9f6f1; }
.rc-empty strong { color: var(--rc-ink); }
.rc-empty p { max-width: 34rem; margin: 0; color: var(--rc-muted); font-size: 0.86rem; line-height: 1.5; }
.rc-muted { margin: 0.55rem 0; color: var(--rc-muted); font-size: 0.82rem; line-height: 1.45; }
.rc-footer { margin-top: 1rem; padding-top: 0.9rem; border-top: 1px solid var(--rc-border); }
.rc-footer > div { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.55rem; }
.rc-selected-count { color: var(--rc-muted); font-size: 0.8rem; }
.rc-undo { border-color: #f1d4d0 !important; color: #9f3029 !important; }
.rc-status { min-height: 1.2em; margin: 0.6rem 0 0; color: #126550; font-size: 0.82rem; }
.rc-status.is-error { color: #b42318; }
.rc-linked { margin-top: 0.8rem; padding-top: 0.8rem; border-top: 1px solid var(--rc-border); }
.rc-linked ul { display: grid; gap: 0.45rem; margin: 0; padding: 0; list-style: none; }
.rc-linked li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.55rem 0; color: #475467; font-size: 0.8rem; }
.rc-linked li strong { color: var(--rc-ink); font-variant-numeric: tabular-nums; }
.rc-duplicate-review { margin-top: 1.15rem; padding-top: 0.9rem; border-top: 1px solid var(--rc-border); }
.rc-duplicate-review .rc-candidates-head { align-items: flex-start; }
.rc-duplicates-list { display: grid; gap: 0.65rem; }
.rc-duplicate-card { display: grid; gap: 0.55rem; padding: 0.85rem; border: 1px solid var(--rc-border); border-radius: 0.9rem; background: #fff; }
.rc-duplicate-pair { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 0.8rem; }
.rc-duplicate-pair > span { display: grid; gap: 0.2rem; min-width: 0; }
.rc-duplicate-pair strong { overflow: hidden; color: var(--rc-ink); font-size: 0.85rem; text-overflow: ellipsis; white-space: nowrap; }
.rc-duplicate-pair small { color: var(--rc-muted); font-size: 0.75rem; }
.rc-duplicate-pair > i { color: #98a2b3; }
.rc-duplicate-card > p { margin: 0; color: var(--rc-muted); font-size: 0.78rem; line-height: 1.45; }
.rc-duplicate-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.rc-dialog { width: min(38rem, calc(100vw - 2rem)); max-height: min(88vh, 45rem); padding: 1.25rem; border: 1px solid rgba(255,255,255,0.65); border-radius: 1.25rem; color: var(--rc-ink); background: #fff; box-shadow: 0 30px 100px rgba(17, 24, 39, 0.25); }
.rc-dialog::backdrop { background: rgba(17, 24, 39, 0.48); backdrop-filter: blur(5px); }
.rc-dialog-head { margin-bottom: 0.65rem; }
.rc-dialog h2 { margin: 0 0 0.45rem; font-size: 1.25rem; letter-spacing: -0.025em; }
.rc-dialog-rows { display: grid; gap: 0.4rem; max-height: 38vh; overflow: auto; margin: 1rem 0; padding-right: 0.2rem; }
.rc-dialog-rows > div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.65rem 0.75rem; border: 1px solid var(--rc-border); border-radius: 0.75rem; background: #fbfcfd; color: #475467; font-size: 0.82rem; }
.rc-dialog-rows strong { flex: 0 0 auto; color: var(--rc-ink); font-variant-numeric: tabular-nums; }
.rc-dialog-warning { margin: 0.8rem 0; padding: 0.7rem 0.8rem; border-radius: 0.75rem; color: #6941c6; background: #f4f0ff; font-size: 0.8rem; line-height: 1.45; }
.rc-dialog-actions { justify-content: flex-end; margin-top: 1rem; padding-top: 0.9rem; border-top: 1px solid var(--rc-border); }
.rc-dialog :focus-visible,
.rc-panel :focus-visible { outline: 3px solid color-mix(in srgb, var(--rc-accent), transparent 55%); outline-offset: 2px; }

@media (max-width: 760px) {
  .rc-panel { padding: 1rem; border-radius: 1rem; }
  .rc-settings-row { grid-template-columns: minmax(5.5rem, 0.7fr) repeat(2, minmax(0, 1fr)); }
  .rc-setting-check { grid-column: 2 / -1; }
  .rc-option { padding: 0.75rem; }
  .rc-option-operations { grid-template-columns: minmax(0, 1fr); gap: 0.45rem; }
  .rc-option-operations > i { transform: rotate(90deg); justify-self: center; }
  .rc-duplicate-pair { grid-template-columns: minmax(0, 1fr); gap: 0.4rem; }
  .rc-duplicate-pair > i { display: none; }
  .rc-footer { align-items: flex-start; flex-direction: column; }
  .rc-footer > div { width: 100%; justify-content: stretch; }
  .rc-footer > div > button { flex: 1 1 auto; }
}

@media (max-width: 480px) {
  .rc-head { flex-direction: column; }
  .rc-summary { gap: 0.45rem; }
  .rc-summary > div { padding: 0.65rem 0.55rem; }
  .rc-summary small { font-size: 0.67rem; }
  .rc-summary strong { font-size: 1.1rem; }
  .rc-settings-row { grid-template-columns: 1fr 1fr; }
  .rc-settings-row > strong { grid-column: 1 / -1; }
  .rc-setting-check { grid-column: 1 / -1; }
  .rc-allocation-amount { align-items: flex-start; flex-direction: column; gap: 0.35rem; }
  .rc-dialog { padding: 1rem; }
  .rc-dialog-actions { align-items: stretch; flex-direction: column-reverse; }
  .rc-dialog-actions button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .rc-option { transition: none; }
}


/* assets/css/layout-preferences.css */
.freev-layout-settings-head{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;flex-wrap:wrap}
.freev-layout-account{display:inline-flex;align-items:center;min-height:36px;max-width:100%;padding:.35rem .7rem;border:1px solid var(--border-color,#dbe2ea);border-radius:999px;color:var(--text-secondary,#526071);font-size:.78rem;font-weight:650;overflow-wrap:anywhere}
.freev-layout-controls{display:grid;grid-template-columns:minmax(0,1fr);gap:.55rem;max-width:880px}
.freev-layout-controls>#freevLayoutScope{max-width:380px;min-height:44px}
.freev-layout-list,.freev-layout-group>ol{display:grid;grid-template-columns:minmax(0,1fr);gap:.6rem;margin:0;padding:0;list-style:none}
.freev-layout-group{display:grid;grid-template-columns:minmax(0,1fr);gap:.45rem}
.freev-layout-group>h3{margin:.85rem 0 0;color:var(--text-secondary,#526071);font-size:.78rem;font-weight:700;text-transform:uppercase;letter-spacing:.045em}
.freev-layout-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:.8rem;padding:.65rem .75rem;border:1px solid var(--border-color,#dbe2ea);border-radius:14px;background:var(--bg-card,#fff)}
.freev-layout-visibility{display:flex;align-items:center;gap:.5rem;min-height:44px;color:var(--text-secondary,#526071);font-size:.8rem;font-weight:650;cursor:pointer}
.freev-layout-visibility input{width:20px;height:20px;margin:0;accent-color:#0069d3}
.freev-layout-label{display:grid;grid-template-columns:minmax(0,1fr);gap:.2rem;min-width:0;overflow-wrap:anywhere}
.freev-layout-label strong{color:var(--text-primary,#1e293b);font-size:.9rem}
.freev-layout-label small{color:var(--text-secondary,#64748b);font-size:.75rem}
.freev-layout-move{display:flex;gap:.4rem}
.freev-layout-move button{min-width:44px;min-height:44px;font-size:1.1rem;font-weight:700}
.freev-layout-move button:disabled{cursor:not-allowed;opacity:.45}
.freev-layout-footer{display:flex;align-items:center;justify-content:space-between;gap:.8rem;flex-wrap:wrap;margin-top:.55rem;padding-top:.85rem;border-top:1px solid var(--border-color,#e2e8f0)}
.freev-layout-footer p{min-height:1.25rem;margin:0;color:var(--text-secondary,#64748b);font-size:.82rem}
.freev-layout-empty{padding:.8rem;color:var(--text-secondary,#64748b)}
.freev-layout-hidden{display:none!important}
@media(max-width:560px){.freev-layout-row{grid-template-columns:minmax(0,1fr) auto}.freev-layout-visibility{grid-column:1 / -1;min-height:38px}.freev-layout-label{grid-column:1}.freev-layout-move{grid-column:2;grid-row:2}.freev-layout-footer>*{width:100%}}
@media(max-width:360px){.freev-layout-row{grid-template-columns:minmax(0,1fr)}.freev-layout-move{grid-column:1;grid-row:auto}}


/* assets/css/recurrence-priority1.css */
/* FREEV Gestion — visualisation mensuelle récurrente */
.rec-calendar-wrap { margin: 1.2rem 0 2rem; padding: clamp(1rem,2.2vw,1.6rem); background: var(--bg-card,var(--bg-secondary,#fff)); border:1px solid var(--border-color,#dbe2eb); border-radius: 1.1rem; box-shadow:0 12px 38px rgba(21,35,56,.06); }
.rec-calendar-wrap[hidden] { display:none; }
.rec-calendar-head { display:flex; align-items:flex-start; justify-content:space-between; gap:1rem; flex-wrap:wrap; margin-bottom:1.3rem; }
.rec-calendar-head h3 {font-size:1.3rem;font-weight:750; margin:.18rem 0 .3rem;}
.rec-calendar-head p { font-size:.84rem;opacity:.75; }
.rec-eyebrow {font-size:.7rem; font-weight:800; letter-spacing:.09em; color:var(--accent,#059669); }
.rec-year-controls{display:flex;align-items:center;gap:.7rem;}
.rec-year-controls strong{font-variant-numeric:tabular-nums;font-size:1.1rem;}
.rec-month-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:.68rem; }
.rec-month {background:var(--bg-secondary,#f7fafc); color:inherit; text-align:left; border:1px solid var(--border-color,#dbe2eb); border-radius:.7rem; padding:.8rem; display:flex; flex-direction:column; gap:.22rem; cursor:pointer; transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease; }
.rec-month:hover { transform:translateY(-2px); border-color:var(--accent,#059669); }
.rec-month:focus-visible,.rec-month.is-selected { outline:2px solid var(--accent,#059669); outline-offset:1px; }
.rec-month-name{font-size:.81rem;text-transform:capitalize;font-weight:650;}
.rec-month strong{font-size:1.03rem;font-variant-numeric:tabular-nums;}
.rec-month small{font-size:.72rem;opacity:.75;}
.rec-month.is-past {opacity:.75;}
.rec-detail-card,.rec-history-card {margin-top:1.3rem;padding:1rem;border:1px solid var(--border-color,#dbe2eb);border-radius:.8rem;}
.rec-detail-card h4,.rec-history-card h4 {font-weight:750;margin-bottom:.9rem;}
.rec-month-detail,.rec-history-entry {display:flex;justify-content:space-between;align-items:center;gap:1rem;padding:.75rem 0;border-bottom:1px solid var(--border-color,#e2e8f0);}
.rec-month-detail:last-child,.rec-history-entry:last-child {border-bottom:0;}
.rec-month-detail>div,.rec-history-entry>div{display:flex;flex-direction:column;gap:.3rem;min-width:0;}
.rec-month-detail span,.rec-history-entry span,.rec-history-entry small,.rec-empty-hint{font-size:.78rem;opacity:.75;}
.rec-impact-preview{padding:.75rem 1rem;background:var(--bg-secondary,#f0fdf4);border:1px solid var(--border-color,#a7f3d0);border-left:3px solid var(--accent,#059669);border-radius:.7rem;margin:.8rem 0;}
.rec-impact-preview strong{font-size:.86rem;}
.rec-impact-preview p{font-size:.78rem;margin:.35rem 0 0;line-height:1.5;}
@media (max-width:850px){.rec-month-grid{grid-template-columns:repeat(3,minmax(0,1fr));}}
@media (max-width:580px){.rec-month-grid{grid-template-columns:repeat(2,minmax(0,1fr));}.rec-month-detail,.rec-history-entry{align-items:flex-start;flex-wrap:wrap;}.rec-calendar-wrap{padding:.85rem;}}
@media (prefers-reduced-motion:reduce){.rec-month{transition:none;}.rec-month:hover{transform:none;}}

.everyday-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem;}
.income-profile-months{display:grid;gap:.45rem;margin:.8rem 0;}
.income-profile-month{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:.65rem;padding:.7rem .8rem;border:1px solid var(--border-color,#dbe2eb);border-radius:.65rem;background:var(--bg-secondary,#f8fafc);cursor:pointer;}
.income-profile-month input{width:1.15rem;height:1.15rem;accent-color:var(--accent,#0069d3);}
.income-profile-month>span:nth-child(2){display:flex;flex-direction:column;gap:.2rem;min-width:0;}
.income-profile-month small{font-size:.75rem;line-height:1.4;opacity:.76;}
.income-profile-coverage{font-size:.74rem;opacity:.75;}
.income-profile-controls{display:flex;align-items:end;gap:.75rem;flex-wrap:wrap;margin:.8rem 0;}
.income-profile-controls>label{display:grid;gap:.3rem;min-width:min(150px,100%);font-size:.8rem;font-weight:650;}
.income-profile-suggestion{display:grid;gap:.2rem;flex:1;min-width:min(230px,100%);font-size:.83rem;}
.income-profile-suggestion span{font-size:.78rem;opacity:.75;}
.income-profile-manual{display:flex;align-items:end;gap:.6rem;flex-wrap:wrap;margin:.8rem 0;}
.income-profile-manual label{font-size:.8rem;font-weight:650;}
.income-profile-manual input{width:min(220px,100%);}
.income-profile-warning{padding:.65rem .8rem;border:1px solid #f59e0b;border-radius:.6rem;background:#fffbeb;color:#92400e;font-size:.84rem;}
.recurring-scope-guide{display:flex;align-items:flex-start;gap:.55rem;max-width:70ch;margin:.55rem 0 0;color:var(--text-secondary,#64748b);font-size:.8rem;line-height:1.5;text-wrap:pretty;}
.recurring-scope-guide>i{margin-top:.18rem;color:var(--apple-accent,var(--v4-teal,#0f8a70));}
.recurring-scope-picker{display:grid;gap:.55rem;padding:0;border:0;margin:0 0 .95rem;}
.recurring-scope-picker legend{margin-bottom:.1rem;}
.recurring-scope-choice{display:grid;grid-template-columns:1.1rem minmax(0,1fr);align-items:flex-start;gap:.7rem;padding:.78rem .9rem;border:1px solid var(--border-color,#dbe2eb);border-radius:.85rem;background:var(--bg-card,#fff);cursor:pointer;transition-property:border-color,background-color,box-shadow,transform;transition-duration:160ms;transition-timing-function:ease-out;}
.recurring-scope-choice>input{width:1rem;height:1rem;margin:.16rem 0 0;accent-color:var(--apple-accent,var(--v4-teal,#0f8a70));}
.recurring-scope-choice>span{display:grid;gap:.18rem;min-width:0;}
.recurring-scope-choice strong{color:var(--text-primary,#0f172a);font-size:.86rem;line-height:1.35;}
.recurring-scope-choice small{color:var(--text-secondary,#64748b);font-size:.76rem;line-height:1.45;text-wrap:pretty;}
.recurring-scope-choice.is-selected{border-color:var(--apple-accent,var(--v4-teal,#0f8a70));background:var(--apple-tint,rgba(15,138,112,.06));box-shadow:0 0 0 2px color-mix(in srgb,var(--apple-accent,#0f8a70) 10%,transparent);}
.recurring-scope-choice:focus-within{outline:2px solid var(--apple-accent,var(--v4-teal,#0f8a70));outline-offset:2px;}
.recurring-scope-choice.is-disabled{opacity:.52;cursor:not-allowed;}
.recurring-tariff-panel[hidden]{display:none!important;}
.recurring-tariff-panel:not([hidden]){animation:recurringScopeEnter .2s ease-out both;}
.recurring-tariff-scope-hint{margin:-.15rem 0 .5rem;color:var(--text-secondary,#64748b);font-size:.78rem;line-height:1.45;}
@keyframes recurringScopeEnter{from{opacity:0;transform:translateY(4px);}to{opacity:1;transform:translateY(0);}}
@media(hover:hover){.recurring-scope-choice:not(.is-disabled):hover{transform:translateY(-1px);border-color:var(--apple-accent,var(--v4-teal,#0f8a70));}}
@media(prefers-reduced-motion:reduce){.recurring-scope-choice,.recurring-tariff-panel:not([hidden]){transition:none;animation:none;}.recurring-scope-choice:hover{transform:none;}}
@media(max-width:580px){.everyday-form-grid{grid-template-columns:1fr;}.income-profile-month{grid-template-columns:auto minmax(0,1fr);}.income-profile-coverage{grid-column:2;}}
[data-theme="dark"] .income-profile-warning{background:#422006;color:#fde68a;border-color:#92400e;}

/* Liste des opérations régulières : une action évidente, les réglages à la demande. */
#recurring-view .recurring-header h2{letter-spacing:-.025em;text-wrap:balance;}
#recurring-view .recurring-help{margin:.55rem 0 0;color:var(--text-secondary,#64748b);font-size:.8rem;line-height:1.45;}
#recurring-view .recurring-help summary{display:list-item;width:max-content;max-width:100%;cursor:pointer;font-weight:650;color:var(--text-primary,#334155);}
#recurring-view .recurring-help p{max-width:60ch;margin:.35rem 0 0;text-wrap:pretty;}
#recurring-view .recurring-summary{grid-template-columns:repeat(3,minmax(0,1fr));gap:.7rem;}
#recurring-view .recurring-stat{min-width:0;gap:.25rem;padding:1rem 1.05rem;background:var(--bg-card,#fff);border-radius:1rem;box-shadow:0 3px 14px rgba(15,23,42,.035);}
#recurring-view .recurring-stat span{letter-spacing:.025em;line-height:1.3;}
#recurring-view .recurring-stat strong{font-size:clamp(1.05rem,1.5vw,1.3rem);font-weight:750;letter-spacing:-.025em;font-variant-numeric:tabular-nums;}
#recurring-view .recurring-stat small{color:var(--text-secondary,#64748b);font-size:.72rem;line-height:1.35;}
#recurring-view .recurring-table{table-layout:fixed;}
#recurring-view .recurring-table th:nth-child(1){width:32%;}
#recurring-view .recurring-table th:nth-child(2){width:21%;}
#recurring-view .recurring-table th:nth-child(3){width:18%;}
#recurring-view .recurring-table th:nth-child(4){width:29%;}
#recurring-view .recurring-name{min-width:0;gap:.3rem;}
#recurring-view .recurring-name strong{line-height:1.35;text-wrap:pretty;}
#recurring-view .recurring-name small{line-height:1.35;text-wrap:pretty;}
#recurring-view .recurring-next-date,#recurring-view .recurring-next-amount{font-variant-numeric:tabular-nums;}
#recurring-view .recurring-next-date small,#recurring-view .recurring-next-amount small{display:block;margin-top:.18rem;color:var(--text-secondary,#64748b);font-size:.73rem;font-weight:500;}
#recurring-view .recurring-actions{white-space:normal;vertical-align:middle;}
#recurring-view .recurring-main-action,#recurring-view .recurring-more summary{display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:.48rem .72rem;border:1px solid var(--border-color,#dbe2eb);border-radius:.75rem;background:var(--bg-card,#fff);color:var(--text-primary,#334155);font-size:.78rem;font-weight:700;cursor:pointer;transition-property:background-color,border-color,box-shadow,transform;transition-duration:160ms;transition-timing-function:ease-out;}
#recurring-view .recurring-main-action{border-color:color-mix(in srgb,var(--apple-accent,#0f8a70) 24%,var(--border-color,#dbe2eb));color:var(--apple-accent,#0f8a70);}
#recurring-view .recurring-main-action:hover,#recurring-view .recurring-more summary:hover{background:var(--apple-tint,rgba(15,138,112,.06));border-color:var(--apple-accent,#0f8a70);}
#recurring-view .recurring-main-action:active,#recurring-view .recurring-more summary:active{transform:scale(.97);}
#recurring-view .recurring-main-action:focus-visible,#recurring-view .recurring-more summary:focus-visible,#recurring-view .recurring-more-actions button:focus-visible,#recurring-view .recurring-help summary:focus-visible{outline:2px solid var(--apple-accent,#0f8a70);outline-offset:2px;}
#recurring-view .recurring-more{display:inline-block;vertical-align:top;margin-left:.35rem;}
#recurring-view .recurring-more summary{list-style:none;gap:.4rem;}
#recurring-view .recurring-more summary::-webkit-details-marker{display:none;}
#recurring-view .recurring-more summary i{font-size:.62rem;transition:transform 160ms ease-out;}
#recurring-view .recurring-more[open] summary i{transform:rotate(180deg);}
#recurring-view .recurring-more-actions{display:grid;gap:.16rem;min-width:12rem;margin-top:.4rem;padding:.35rem;border:1px solid var(--border-color,#dbe2eb);border-radius:.85rem;background:var(--bg-card,#fff);box-shadow:0 10px 24px rgba(15,23,42,.08);animation:recurringScopeEnter .18s ease-out both;}
#recurring-view .recurring-more-actions button{display:flex;align-items:center;gap:.55rem;width:100%;min-height:40px;padding:.45rem .6rem;border:0;border-radius:.55rem;background:transparent;color:var(--text-primary,#334155);font-size:.78rem;text-align:left;cursor:pointer;}
#recurring-view .recurring-more-actions button:hover{background:var(--apple-tint,rgba(15,138,112,.06));}
#recurring-view .recurring-more-actions button i{width:1rem;color:var(--text-secondary,#64748b);text-align:center;}
#recurring-view .recurring-more-actions .recurring-danger-action{color:#b42318;}
#recurring-view .recurring-more-actions .recurring-danger-action i{color:inherit;}
@media(max-width:900px){#recurring-view .recurring-table th:nth-child(1){width:30%;}#recurring-view .recurring-table th:nth-child(2){width:22%;}#recurring-view .recurring-table th:nth-child(3){width:18%;}#recurring-view .recurring-table th:nth-child(4){width:30%;}}
@media(max-width:768px){
  #recurring-view .recurring-summary{grid-template-columns:repeat(2,minmax(0,1fr));}
  #recurring-view .recurring-stat:first-child{grid-column:1/-1;}
  #recurring-view .recurring-table tbody tr{grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto auto;gap:.45rem .65rem;}
  #recurring-view .recurring-table tbody td:nth-child(1){grid-column:1;grid-row:1;min-width:0;}
  #recurring-view .recurring-table tbody td:nth-child(2){display:flex;flex-direction:column;align-items:flex-start;grid-column:1;grid-row:2;font-size:.76rem;}
  #recurring-view .recurring-table tbody td:nth-child(2)::before{content:'Prochaine échéance';color:var(--text-secondary,#64748b);font-size:.68rem;font-weight:600;}
  #recurring-view .recurring-table tbody td:nth-child(3){display:flex;flex-direction:column;align-items:flex-end;grid-column:2;grid-row:1/3;font-size:.9rem;white-space:nowrap;}
  #recurring-view .recurring-table tbody td:nth-child(4){display:block;grid-column:1/-1;grid-row:3;border-top:1px solid var(--border-color,#e2e8f0);padding-top:.6rem;margin-top:.12rem;font-size:inherit;font-weight:inherit;white-space:normal;}
  #recurring-view .recurring-table tbody td:nth-child(4)::before{content:none;}
  #recurring-view .recurring-more-actions{min-width:min(12rem,70vw);}
}
@media(max-width:410px){#recurring-view .recurring-summary{grid-template-columns:1fr;}#recurring-view .recurring-stat:first-child{grid-column:auto;}}
@media(prefers-reduced-motion:reduce){#recurring-view .recurring-main-action,#recurring-view .recurring-more summary,#recurring-view .recurring-more summary i{transition:none;}#recurring-view .recurring-more-actions{animation:none;}}


/* assets/css/finance-priority2.css */
.fp2-section{margin-bottom:2rem;color:var(--text-primary,#0f172a)}
.fp2-heading{display:flex;justify-content:space-between;margin-bottom:1rem}
.fp2-heading h2{font-size:1.25rem;font-weight:750;margin:.2rem 0;color:inherit}
.fp2-heading p,.fp2-note{font-size:.85rem;color:var(--text-secondary,#64748b);line-height:1.5}
.fp2-eyebrow{color:#059669;font-weight:800;letter-spacing:.11em;font-size:.64rem}
.fp2-metrics{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,190px),1fr));gap:.85rem;margin:1rem 0}
.fp2-metric,.fp2-panel{background:var(--bg-card,#fff);border:1px solid var(--border-color,#e2e8f0);border-radius:1rem;padding:1.2rem;box-shadow:0 6px 22px rgba(15,23,42,.035)}
.fp2-metric{display:flex;flex-direction:column;gap:.35rem;min-width:0}
.fp2-metric-label{font-size:.75rem;color:var(--text-secondary,#64748b);font-weight:600}
.fp2-metric-value{font-size:1.45rem;font-weight:780;overflow-wrap:anywhere;color:inherit}
.fp2-metric-detail{font-size:.72rem;color:var(--text-secondary,#64748b)}
.fp2-panels{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}
.fp2-panel h3{font-size:.94rem;font-weight:750;margin-bottom:1rem;color:inherit}
.fp2-panel h3 i{color:#10b981;margin-right:.4rem}
.fp2-panel-wide{grid-column:1/-1}
.fp2-row{display:flex;gap:.8rem;align-items:center;justify-content:space-between;border-bottom:1px solid var(--border-color,#e2e8f0);padding:.76rem .12rem;flex-wrap:wrap}
.fp2-row:last-child{border-bottom:0}
.fp2-row-body{display:flex;flex-direction:column;gap:.18rem;flex:1;min-width:120px}
.fp2-row-body strong{font-size:.85rem;font-weight:650;color:inherit;overflow-wrap:anywhere}
.fp2-row-body small{font-size:.74rem;color:var(--text-secondary,#64748b)}
.fp2-amount{font-size:.9rem;text-align:right;white-space:normal}
.fp2-danger{color:#dc2626!important}.fp2-warning{color:#b45309!important}
body.dark-mode .fp2-danger{color:#fca5a5!important}
body.dark-mode .fp2-warning{color:#fcd34d!important}
.fp2-alert{padding:.6rem .7rem;border-radius:.5rem;margin:.45rem 0;font-size:.82rem;background:rgba(100,116,139,.08);line-height:1.45}
.fp2-alert.fp2-danger{background:rgba(220,38,38,.08)}.fp2-alert.fp2-warning{background:rgba(217,119,6,.1)}
.fp2-empty{font-size:.82rem;color:var(--text-secondary,#64748b);margin:.5rem 0}
.fp2-progress{height:6px;border-radius:999px;background:rgba(100,116,139,.14);width:100%;overflow:hidden}
.fp2-fill{height:100%;background:#10b981;border-radius:999px}.fp2-fill.fp2-warning{background:#d97706}.fp2-fill.fp2-danger{background:#dc2626}
.fp2-budget-form{display:grid;grid-template-columns:minmax(150px,1fr) minmax(130px,1fr) auto;gap:.8rem;align-items:end;margin-top:1rem}
.fp2-budget-form label{display:flex;flex-direction:column;gap:.4rem;font-size:.78rem;font-weight:600}
.fp2-budget-form small{grid-column:1/-1;font-size:.73rem;color:var(--text-secondary,#64748b)}
#paymentStatusGroup[hidden],#fp2BudgetForm[hidden]{display:none!important}
@media(max-width:1100px){.fp2-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){.fp2-panels,.fp2-metrics{grid-template-columns:1fr}.fp2-budget-form{grid-template-columns:1fr}.fp2-metric-value{font-size:1.3rem}}
@media(prefers-reduced-motion:reduce){.fp2-section *{animation:none!important;transition:none!important}}
/* Explication financière accessible à la demande, sans encombrer la vue principale. */
.fp2-audit { margin-top: 1rem; padding: .75rem .9rem; border: 1px solid var(--border-color,#d9e1e9); border-radius: .8rem; }
.fp2-audit summary { cursor: pointer; font-weight: 650; line-height: 1.4; }
.fp2-audit details { margin: .75rem 0; padding: .6rem .75rem; background: var(--bg-input,#f7f9fb); border-radius: .6rem; }
.fp2-audit ol { margin: .6rem 0; padding-left: 1.4rem; max-height: 15rem; overflow: auto; }
.fp2-audit li { margin: .3rem 0; font-size: .84rem; overflow-wrap: anywhere; }
.fp2-audit :is(summary,button):focus-visible { outline: 3px solid #2563eb; outline-offset: 3px; }


/* assets/css/help.css */
/* Centre d’aide interactif Freev 4.3 / 5.1. */
.freev-help-dialog {
  --text-muted: #596579;
  display: flex;
  width: min(68rem, 100%);
  max-height: min(94vh, 60rem);
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}
body.dark-mode .freev-help-dialog { --text-muted: #b8c4d4; }

.freev-help-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .8rem 1rem;
  padding: 1.25rem 1.5rem 1rem;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
  background: linear-gradient(135deg, rgba(37, 99, 235, .055), rgba(20, 184, 166, .035) 55%, transparent);
}
.freev-help-heading h2 { margin: .2rem 0 .3rem; color: var(--text-primary, #0f172a); font-size: 1.45rem; line-height: 1.2; }
.freev-help-heading p { margin: 0; color: var(--text-muted, #64748b); font-size: .8rem; line-height: 1.5; }
.freev-help-close { flex: 0 0 auto; }

.freev-help-search {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 1.2rem minmax(0, 1fr) auto;
  align-items: center;
  gap: .55rem;
  min-height: 3rem;
  padding: .35rem .55rem .35rem .85rem;
  border: 1px solid var(--border-color, #cbd5e1);
  border-radius: .85rem;
  background: var(--bg-card, #fff);
  box-shadow: 0 6px 18px rgba(15, 23, 42, .05);
  color: #2563eb;
}
.freev-help-search:focus-within { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37, 99, 235, .13); }
.freev-help-search input { min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text-primary, #0f172a); font: 600 .8rem/1.4 Inter, sans-serif; }
.freev-help-search input::-webkit-search-cancel-button { display: none; appearance: none; }
.freev-help-search input::placeholder { color: var(--text-muted, #64748b); font-weight: 500; }
.freev-help-search-clear { display: grid; width: 2rem; height: 2rem; place-items: center; border: 0; border-radius: .55rem; background: var(--bg-input, #f1f5f9); color: var(--text-muted, #64748b); cursor: pointer; }
.freev-help-search-clear[hidden] { display: none; }
.freev-help-search-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.freev-help-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .5rem;
  padding: .7rem 1.5rem;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
  background: var(--bg-input, #f8fafc);
}
.freev-help-tabs[hidden] { display: none; }
.freev-help-page-steps { display: grid; gap: .55rem; margin: 0; padding: 0; list-style: none; counter-reset: help-step; }
.freev-help-page-steps li { display: flex; align-items: flex-start; gap: .7rem; padding: .8rem .9rem; border: 1px solid var(--border-color, #e2e8f0); border-radius: .8rem; background: var(--bg-card, #fff); color: var(--text-secondary, #475569); font-size: .78rem; line-height: 1.5; }
.freev-help-page-steps li::before { counter-increment: help-step; content: counter(help-step); display: grid; flex: 0 0 1.45rem; height: 1.45rem; place-items: center; border-radius: 50%; background: #e8f0ff; color: #205bd8; font-weight: 800; }
.freev-help-page-action { justify-self: start; margin-top: .3rem; }
.freev-help-context { max-width: 54rem; margin: 0 auto; width: 100%; }
body.dark-mode .freev-help-page-steps li { background: var(--bg-input); }
.freev-help-tabs button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  min-height: 2.7rem;
  padding: .55rem .8rem;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: .75rem;
  background: var(--bg-card, #fff);
  color: var(--text-secondary, #475569);
  cursor: pointer;
  font: 750 .78rem/1 Inter, sans-serif;
}
.freev-help-tabs button:not([aria-selected="true"]) { color: #334155; }
.freev-help-tabs button[aria-selected="true"] { border-color: #2563eb; background: #2563eb; color: #fff; box-shadow: 0 8px 20px rgba(37, 99, 235, .2); }
.freev-help-tabs button:focus-visible,
.freev-help-dialog button:focus-visible,
.freev-help-dialog summary:focus-visible,
.freev-help-dialog input:focus-visible { outline: 3px solid rgba(37, 99, 235, .32); outline-offset: 2px; }

.freev-help-content { overflow: auto; overscroll-behavior: contain; }
.freev-help-panel { display: grid; gap: 1rem; padding: 1rem 1.5rem 1.5rem; }
.freev-help-panel[hidden],
.freev-help-panel [hidden] { display: none !important; }

.freev-help-jumps { display: grid; position: sticky; z-index: 3; top: 0; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .4rem; padding: .4rem; border: 1px solid var(--border-color, #e2e8f0); border-radius: .8rem; background: color-mix(in srgb, var(--bg-card, #fff) 92%, transparent); backdrop-filter: blur(10px); }
.freev-help-jumps button { display: flex; align-items: center; justify-content: center; gap: .35rem; min-height: 2.35rem; border: 0; border-radius: .58rem; background: transparent; color: var(--text-secondary, #475569); cursor: pointer; font: 700 .7rem/1 Inter, sans-serif; }
.freev-help-jumps button:hover { background: var(--bg-input, #f1f5f9); color: #2563eb; }

.freev-help-callout { display: flex; align-items: flex-start; gap: .8rem; padding: 1rem; border: 1px solid rgba(37, 99, 235, .2); border-radius: .9rem; background: rgba(37, 99, 235, .07); }
.freev-help-callout > i { margin-top: .12rem; color: #2563eb; font-size: 1.15rem; }
.freev-help-callout > div { display: flex; flex-direction: column; gap: .22rem; }
.freev-help-callout strong { color: var(--text-primary, #0f172a); font-size: .82rem; }
.freev-help-callout span { color: var(--text-secondary, #475569); font-size: .75rem; line-height: 1.55; }
.freev-help-callout-purple { border-color: rgba(124, 58, 237, .22); background: rgba(124, 58, 237, .07); }
.freev-help-callout-purple > i { color: #7c3aed; }

.freev-help-section { display: grid; gap: .75rem; padding-top: .2rem; scroll-margin-top: 3.5rem; }
.freev-help-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.freev-help-section-head h3 { margin: .12rem 0 .18rem; color: var(--text-primary, #0f172a); font-size: 1rem; }
.freev-help-section-head p { margin: 0; color: var(--text-muted, #64748b); font-size: .72rem; line-height: 1.45; }
.freev-help-kicker { color: #2563eb; font-size: .6rem; font-weight: 850; letter-spacing: .09em; }
.freev-help-reset { flex: 0 0 auto; border: 0; background: transparent; color: #2563eb; cursor: pointer; font: 700 .68rem/1 Inter, sans-serif; }

.freev-help-progress-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .75rem; }
.freev-help-progress { height: .48rem; overflow: hidden; border-radius: 99rem; background: var(--border-color, #e2e8f0); }
.freev-help-progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2563eb, #14b8a6); transition: width .25s ease; }
.freev-help-progress-row > strong { min-width: 5.8rem; color: var(--text-secondary, #475569); font-size: .68rem; text-align: right; }

.freev-help-checklist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
.freev-help-checklist label { display: grid; grid-template-columns: 1.1rem 2rem minmax(0, 1fr); align-items: flex-start; gap: .55rem; padding: .8rem; border: 1px solid var(--border-color, #e2e8f0); border-radius: .8rem; background: var(--bg-card, #fff); cursor: pointer; }
.freev-help-checklist label:has(input:checked) { border-color: rgba(16, 185, 129, .4); background: rgba(16, 185, 129, .06); }
.freev-help-checklist input { width: 1rem; height: 1rem; margin-top: .45rem; accent-color: #10b981; }
.freev-help-step-number { display: grid; width: 2rem; height: 2rem; place-items: center; border-radius: .6rem; background: #0f172a; color: #fff; font-size: .72rem; font-weight: 850; }
.freev-help-checklist label:has(input:checked) .freev-help-step-number { background: #059669; }
.freev-help-checklist label > span:last-child { display: flex; min-width: 0; flex-direction: column; gap: .18rem; }
.freev-help-checklist strong { color: var(--text-primary, #0f172a); font-size: .76rem; }
.freev-help-checklist small { color: var(--text-muted, #64748b); font-size: .68rem; line-height: 1.45; }

.freev-help-task-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .65rem; }
.freev-help-task-grid-four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.freev-help-task-grid article { display: grid; grid-template-columns: 2.35rem minmax(0, 1fr); gap: .65rem; padding: .85rem; border: 1px solid var(--border-color, #e2e8f0); border-radius: .85rem; background: var(--bg-card, #fff); }
.freev-help-task-grid article > i { display: grid; width: 2.35rem; height: 2.35rem; place-items: center; border-radius: .7rem; background: rgba(37, 99, 235, .09); color: #2563eb; }
.freev-help-task-grid article > div { display: flex; min-width: 0; flex-direction: column; align-items: flex-start; }
.freev-help-task-grid strong { color: var(--text-primary, #0f172a); font-size: .76rem; }
.freev-help-task-grid p { flex: 1; margin: .25rem 0 .55rem; color: var(--text-muted, #64748b); font-size: .68rem; line-height: 1.45; }
.freev-help-task-grid button { display: inline-flex; align-items: center; gap: .3rem; padding: 0; border: 0; background: transparent; color: #2563eb; cursor: pointer; font: 750 .68rem/1.3 Inter, sans-serif; text-align: left; }

.freev-help-accordions { display: grid; gap: .55rem; }
.freev-help-accordions details { overflow: hidden; border: 1px solid var(--border-color, #e2e8f0); border-radius: .85rem; background: var(--bg-card, #fff); }
.freev-help-accordions summary { display: grid; grid-template-columns: 2.4rem minmax(0, 1fr) auto; align-items: center; gap: .7rem; min-height: 3.8rem; padding: .65rem .8rem; cursor: pointer; list-style: none; }
.freev-help-accordions summary::-webkit-details-marker { display: none; }
.freev-help-summary-icon { display: grid; width: 2.4rem; height: 2.4rem; place-items: center; border-radius: .7rem; background: rgba(16, 185, 129, .1); color: #059669; }
.freev-help-summary-purple { background: rgba(124, 58, 237, .1); color: #7c3aed; }
.freev-help-accordions summary > span:nth-child(2) { display: flex; min-width: 0; flex-direction: column; gap: .15rem; }
.freev-help-accordions summary strong { color: var(--text-primary, #0f172a); font-size: .78rem; }
.freev-help-accordions summary small { color: var(--text-muted, #64748b); font-size: .66rem; }
.freev-help-accordions summary > i { color: var(--text-muted, #64748b); transition: transform .2s ease; }
.freev-help-accordions details[open] summary > i { transform: rotate(180deg); }
.freev-help-details-body { padding: 0 1rem 1rem 3.85rem; color: var(--text-secondary, #475569); font-size: .72rem; line-height: 1.55; }
.freev-help-accordions details[open] .freev-help-details-body { animation: freevHelpMenuReveal .24s cubic-bezier(.22, 1, .36, 1) both; }
.freev-help-details-body ol { display: grid; gap: .3rem; margin: 0 0 .75rem; padding-left: 1.1rem; }
.freev-help-details-body p { margin: 0 0 .75rem; }
.freev-help-details-body pre { margin: 0 0 .75rem; padding: .8rem; overflow: auto; border-radius: .65rem; background: #0f172a; color: #e2e8f0; font: 600 .68rem/1.6 ui-monospace, SFMono-Regular, Consolas, monospace; }

.freev-help-faq-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
.freev-help-faq-grid details { align-self: start; border: 1px solid var(--border-color, #e2e8f0); border-radius: .75rem; background: var(--bg-card, #fff); }
.freev-help-faq-grid summary { display: flex; align-items: center; justify-content: space-between; gap: .7rem; min-height: 3rem; padding: .7rem .8rem; color: var(--text-primary, #0f172a); cursor: pointer; font-size: .73rem; font-weight: 750; list-style: none; }
.freev-help-faq-grid summary::-webkit-details-marker { display: none; }
.freev-help-faq-grid summary i { color: #2563eb; transition: transform .2s ease; }
.freev-help-faq-grid details[open] summary i { transform: rotate(45deg); }
.freev-help-faq-grid p { margin: 0; padding: 0 .8rem .8rem; color: var(--text-muted, #64748b); font-size: .69rem; line-height: 1.55; }
.freev-help-faq-grid details[open] p { animation: freevHelpMenuReveal .2s cubic-bezier(.22, 1, .36, 1) both; }

@keyframes freevHelpMenuReveal {
  from { opacity: 0; transform: translateY(-.35rem); }
  to { opacity: 1; transform: translateY(0); }
}

.freev-help-glossary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; }
.freev-help-glossary span { display: flex; flex-direction: column; gap: .18rem; padding: .7rem; border-left: 3px solid #14b8a6; border-radius: 0 .65rem .65rem 0; background: rgba(20, 184, 166, .06); color: var(--text-muted, #64748b); font-size: .65rem; line-height: 1.4; }
.freev-help-glossary strong { color: var(--text-primary, #0f172a); font-size: .7rem; }

.freev-help-no-results { display: grid; min-height: 18rem; place-items: center; align-content: center; gap: .45rem; margin: 1rem 1.5rem; padding: 2rem; border: 1px dashed var(--border-color, #cbd5e1); border-radius: 1rem; color: var(--text-muted, #64748b); text-align: center; }
.freev-help-no-results[hidden] { display: none; }
.freev-help-no-results > i { color: #2563eb; font-size: 1.7rem; }
.freev-help-no-results strong { color: var(--text-primary, #0f172a); font-size: .9rem; }
.freev-help-no-results span { margin-bottom: .4rem; font-size: .72rem; }

body.dark-mode .freev-help-header,
body.dark-mode .freev-help-tabs,
body.dark-mode .freev-help-jumps,
body.dark-mode .freev-help-checklist label,
body.dark-mode .freev-help-task-grid article,
body.dark-mode .freev-help-accordions details,
body.dark-mode .freev-help-faq-grid details { background-color: var(--bg-input); }
body.dark-mode .freev-help-tabs button,
body.dark-mode .freev-help-search { background: var(--bg-card); }
body.dark-mode .freev-help-tabs button:not([aria-selected="true"]) { color: #e2e8f0; }
body.dark-mode .freev-help-tabs button[aria-selected="true"] { background: #2563eb; }

/* L’onglet actif reste lisible, y compris après le changement dynamique de rubrique. */
.freev-help-tabs button[aria-selected="true"],
.freev-help-tabs button[aria-selected="true"] > span,
.freev-help-tabs button[aria-selected="true"] > i { background: #1d4ed8 !important; color: #fff !important; }

@media (max-width: 900px) {
  .freev-help-task-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .freev-help-glossary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  .freev-help-dialog { max-height: 96dvh; }
  .freev-help-header { gap: .65rem; padding: .9rem 1rem .8rem; }
  .freev-help-heading h2 { font-size: 1.15rem; }
  .freev-help-heading p { font-size: .72rem; }
  .freev-help-search { min-height: 2.75rem; }
  .freev-help-tabs { padding: .6rem 1rem; }
  .freev-help-tabs button { min-height: 2.6rem; padding: .5rem; font-size: .69rem; }
  .freev-help-panel { gap: .85rem; padding: .8rem 1rem 1.2rem; }
  .freev-help-jumps { grid-template-columns: repeat(4, max-content); overflow-x: auto; justify-content: start; }
  .freev-help-jumps button { padding: 0 .65rem; }
  .freev-help-section-head { align-items: flex-start; flex-direction: column; gap: .35rem; }
  .freev-help-checklist,
  .freev-help-task-grid,
  .freev-help-task-grid-four,
  .freev-help-faq-grid { grid-template-columns: 1fr; }
  .freev-help-details-body { padding-left: 1rem; }
  .freev-help-glossary { grid-template-columns: 1fr 1fr; }
  .v4-hero-actions { grid-template-columns: 1fr; }
  .v5-hero-status { align-items: stretch; }
  .v5-hero-status .btn { justify-content: center; }
}

@media (max-width: 430px) {
  .freev-help-header { grid-template-columns: minmax(0, 1fr) 2.25rem; }
  .freev-help-search input { font-size: .73rem; }
  .freev-help-tabs button span { max-width: 8rem; line-height: 1.2; }
  .freev-help-callout { padding: .85rem; }
  .freev-help-checklist label { grid-template-columns: 1rem 1.8rem minmax(0, 1fr); padding: .7rem; }
  .freev-help-step-number { width: 1.8rem; height: 1.8rem; }
  .freev-help-task-grid article { grid-template-columns: 2.1rem minmax(0, 1fr); }
  .freev-help-task-grid article > i { width: 2.1rem; height: 2.1rem; }
  .freev-help-glossary { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .freev-help-dialog,
  .freev-help-progress span,
  .freev-help-accordions summary > i,
  .freev-help-faq-grid summary i,
  .freev-help-accordions details[open] .freev-help-details-body,
  .freev-help-faq-grid details[open] p { animation: none; transition: none; }
  .freev-help-content { scroll-behavior: auto; }
}


/* assets/css/selects.css */
/* Uiverse component adaptation: Switch by m1her (Maher Nas),
   https://uiverse.io/m1her/odd-fireant-56 — MIT License, Copyright 2026 m1her.
   Its clear active state is adapted into Freev's accessible, keyboard-first select component. */
.freev-select-native { display: none !important; }
.freev-select { position: relative; width: 100%; min-width: 0; }
.freev-select-trigger { display: flex; width: 100%; min-height: 2.8rem; align-items: center; justify-content: space-between; gap: .75rem; padding: .65rem .8rem .65rem .9rem; border: 1px solid var(--border-color, #cbd5e1); border-radius: .78rem; background: linear-gradient(135deg, var(--bg-card, #fff), color-mix(in srgb, #2563eb 5%, var(--bg-card, #fff))); color: var(--text-primary, #0f172a); cursor: pointer; font: 650 .78rem/1.25 Inter, sans-serif; text-align: left; transition: border-color .2s ease, box-shadow .2s ease, transform .2s cubic-bezier(.22, 1, .36, 1), background .2s ease; }
.freev-select-trigger > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.freev-select-trigger > i { flex: 0 0 auto; color: #2563eb; font-size: .7rem; transition: transform .22s cubic-bezier(.22, 1, .36, 1); }
.freev-select:not(.is-disabled) .freev-select-trigger:hover { border-color: rgba(37, 99, 235, .55); box-shadow: 0 7px 17px rgba(37, 99, 235, .1); transform: translateY(-1px); }
.freev-select.is-open .freev-select-trigger { border-color: #2563eb; background: linear-gradient(135deg, color-mix(in srgb, #2563eb 9%, var(--bg-card, #fff)), color-mix(in srgb, #14b8a6 8%, var(--bg-card, #fff))); box-shadow: 0 0 0 3px rgba(37, 99, 235, .14), 0 9px 20px rgba(37, 99, 235, .1); }
.freev-select.is-open .freev-select-trigger > i { transform: rotate(180deg); }
.freev-select-trigger:focus-visible,
.freev-select-option:focus-visible { outline: 3px solid rgba(20, 184, 166, .4); outline-offset: 2px; }
.freev-select.is-disabled .freev-select-trigger { cursor: not-allowed; opacity: .55; }
.freev-select-list:popover-open { --freev-select-placement: viewport; display: grid; position: fixed; inset: auto; margin: 0; box-sizing: border-box; gap: .18rem; overflow-y: auto; padding: .35rem; border: 1px solid rgba(37, 99, 235, .2); border-radius: .85rem; background: var(--bg-card, #fff); box-shadow: 0 18px 35px rgba(15, 23, 42, .19); animation: freevSelectReveal .2s cubic-bezier(.22, 1, .36, 1) both; }
.freev-select-list[hidden] { display: none !important; }
.freev-select-option { width: 100%; min-width: 0; min-height: 2.45rem; padding: .55rem .65rem; border: 0; border-radius: .58rem; background: transparent; color: var(--text-secondary, #475569); cursor: pointer; font: 600 .73rem/1.3 Inter, sans-serif; text-align: left; overflow-wrap: anywhere; transition: background .16s ease, color .16s ease, transform .16s ease; }
.freev-select-option:hover,
.freev-select-option:focus-visible { background: rgba(37, 99, 235, .09); color: #1d4ed8; transform: translateX(.16rem); }
.freev-select-option[aria-selected="true"] { background: linear-gradient(90deg, rgba(37, 99, 235, .14), rgba(20, 184, 166, .1)); color: #1d4ed8; font-weight: 800; }
.freev-select-option[aria-selected="true"]::after { content: '✓'; float: right; color: #059669; }
.freev-select-option:disabled { cursor: not-allowed; opacity: .46; }
body.dark-mode .freev-select-trigger,
body.dark-mode .freev-select-list { background-color: var(--bg-input, #0f172a); }
body.dark-mode .freev-select-option { color: var(--text-secondary, #cbd5e1); }
@keyframes freevSelectReveal { from { opacity: 0; transform: translateY(-.35rem) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@media (max-width: 768px) { .freev-select-trigger { min-height: 2.9rem; } }
@media (prefers-reduced-motion: reduce) { .freev-select-trigger, .freev-select-trigger > i, .freev-select-option, .freev-select-list { animation: none; transition: none; transform: none !important; } }


/* assets/css/buttons.css */
/* Uiverse component adaptation: Button by gharsh11032000 (Harsh Gupta),
   https://uiverse.io/gharsh11032000/loud-chicken-53 — MIT License, Copyright 2026 gharsh11032000.
   The hover, active and arrow motion are adapted to Freev's buttons and tabs. */
:root { --freev-button-ease: cubic-bezier(.22, 1, .36, 1); }

.btn,
.btn-icon,
.v4-text-button,
.view-mode-tab,
.v4-horizon button,
.v42-presets button,
[data-dashboard-mode],
[data-dashboard-range],
[data-months],
[data-v5-tab],
.freev-help-tabs button,
.freev-help-jumps button {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  transition: transform .24s var(--freev-button-ease), box-shadow .24s ease, border-color .24s ease, background .3s ease, color .2s ease;
}

.btn {
  min-height: 2.65rem;
  border-radius: .82rem;
  font-weight: 750;
  line-height: 1.15;
  letter-spacing: .005em;
  text-wrap: balance;
}

.btn-primary {
  background: linear-gradient(112deg, #1d4ed8 0%, #2563eb 43%, #14b8a6 100%);
  background-size: 175% 100%;
  box-shadow: 0 9px 20px rgba(37, 99, 235, .24), inset 0 1px 0 rgba(255, 255, 255, .24);
}

.btn-primary:hover {
  background-position: 100% 0;
  transform: translateY(-2px) scale(1.018);
  box-shadow: 0 15px 30px rgba(37, 99, 235, .3), inset 0 1px 0 rgba(255, 255, 255, .28);
}

.btn-primary .fa-arrow-right {
  transition: transform .24s var(--freev-button-ease);
}

.btn-primary:hover .fa-arrow-right {
  transform: translateX(.32rem);
}

.btn-secondary {
  border-color: rgba(100, 116, 139, .18);
  background: linear-gradient(135deg, #64748b, #475569);
  box-shadow: 0 7px 16px rgba(15, 23, 42, .15), inset 0 1px 0 rgba(255, 255, 255, .14);
}

.btn-secondary:hover,
.btn-success:hover,
.btn-danger:hover {
  transform: translateY(-2px);
  filter: saturate(1.08) brightness(1.04);
  box-shadow: 0 12px 23px rgba(15, 23, 42, .2), inset 0 1px 0 rgba(255, 255, 255, .2);
}

.btn-icon {
  display: inline-grid;
  min-width: 2.55rem;
  min-height: 2.55rem;
  place-items: center;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: .78rem;
  background: linear-gradient(135deg, var(--bg-card, #fff), var(--bg-input, #f8fafc));
  box-shadow: 0 4px 11px rgba(15, 23, 42, .07);
}

.btn-icon:hover {
  border-color: rgba(37, 99, 235, .35);
  background: linear-gradient(135deg, rgba(37, 99, 235, .12), rgba(20, 184, 166, .09));
  color: #2563eb;
  transform: translateY(-2px) rotate(-2deg);
  box-shadow: 0 10px 18px rgba(37, 99, 235, .16);
}

.v4-text-button {
  border-radius: .45rem;
  color: #2563eb;
  font-weight: 750;
  text-decoration: none;
}

.v4-text-button::after {
  position: absolute;
  right: .1rem;
  bottom: .12rem;
  left: .1rem;
  height: 1px;
  background: currentColor;
  content: '';
  transform: scaleX(.35);
  transform-origin: left;
  transition: transform .2s var(--freev-button-ease);
}

.v4-text-button:hover { transform: translateX(.18rem); }
.v4-text-button:hover::after { transform: scaleX(1); }

.v4-horizon button,
.v42-presets button,
[data-dashboard-mode],
[data-dashboard-range],
[data-months],
[data-v5-tab] {
  border-radius: .62rem;
}

.v4-horizon button:hover,
.v42-presets button:hover,
[data-dashboard-mode]:hover,
[data-dashboard-range]:hover,
[data-months]:hover,
[data-v5-tab]:hover { transform: translateY(-1px); }

.v4-horizon button.active,
[data-dashboard-mode].active,
[data-dashboard-range].active,
[data-months].active,
[data-v5-tab].active {
  box-shadow: 0 5px 13px rgba(37, 99, 235, .17), inset 0 1px 0 rgba(255, 255, 255, .3);
}

.btn:active,
.btn-icon:active,
.v4-horizon button:active,
.v42-presets button:active,
[data-dashboard-mode]:active,
[data-dashboard-range]:active,
[data-months]:active,
[data-v5-tab]:active,
.freev-help-tabs button:active,
.freev-help-jumps button:active { transform: translateY(1px) scale(.97); }

.btn:focus-visible,
.btn-icon:focus-visible,
.v4-text-button:focus-visible,
.view-mode-tab:focus-visible,
.v4-horizon button:focus-visible,
.v42-presets button:focus-visible,
[data-dashboard-mode]:focus-visible,
[data-dashboard-range]:focus-visible,
[data-months]:focus-visible,
[data-v5-tab]:focus-visible,
.freev-help-tabs button:focus-visible,
.freev-help-jumps button:focus-visible { outline: 3px solid rgba(20, 184, 166, .42); outline-offset: 3px; }

.freev-button-ripple { position: absolute; z-index: 0; width: 1rem; height: 1rem; border-radius: 50%; background: rgba(255, 255, 255, .38); pointer-events: none; transform: translate(-50%, -50%) scale(0); animation: freevButtonRipple .58s ease-out both; }
@keyframes freevButtonRipple { to { opacity: 0; transform: translate(-50%, -50%) scale(22); } }

/* Actions compactes pour les tableaux : même langage visuel, sans surcharge. */
#transactions-view .btn-icon,
#recurring-view .btn-icon { width: 2.48rem; min-width: 2.48rem; min-height: 2.48rem; padding: 0; border-radius: .78rem; box-shadow: 0 3px 10px rgba(15, 23, 42, .07); }
#transactions-view .btn-icon:hover,
#recurring-view .btn-icon:hover { box-shadow: 0 7px 15px rgba(15, 23, 42, .12); transform: translateY(-1px); }
#transactions-view .btn-icon:active,
#recurring-view .btn-icon:active { transform: translateY(0) scale(.96); }

/* Barre latérale : actions structurées comme des contrôles d'application. */
.sidebar-action {
  display: grid;
  min-height: 3.12rem;
  grid-template-columns: 1.15rem minmax(0, 1fr) auto;
  align-items: center;
  gap: .6rem;
  padding: .55rem .78rem;
  border: 1px solid rgba(191, 219, 254, .2);
  border-radius: .9rem;
  color: #f8fafc;
  font-size: .78rem;
  font-weight: 760;
  letter-spacing: .005em;
  text-align: left;
  text-decoration: none;
  text-shadow: 0 1px 1px rgba(15, 23, 42, .16);
  transition: transform .2s var(--freev-button-ease), box-shadow .2s ease, border-color .2s ease, background .25s ease;
}

.sidebar-action i { width: 1.15rem; color: currentColor; font-size: .9rem; text-align: center; }
.sidebar-action-label { min-width: 0; }
.sidebar-action-meta { color: rgba(255, 255, 255, .72); font-size: .61rem; font-weight: 700; letter-spacing: .015em; text-align: right; }

.sidebar-action-primary { border-color: rgba(147, 197, 253, .38); background: linear-gradient(135deg, #2563eb, #1d4ed8); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 6px 14px rgba(30, 64, 175, .22); }
.sidebar-action-secondary { border-color: rgba(203, 213, 225, .2); background: linear-gradient(135deg, #64748b, #475569); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 5px 12px rgba(15, 23, 42, .16); }
.sidebar-action-storage { border-color: rgba(148, 163, 184, .26); background: linear-gradient(135deg, #1e293b, #0f172a); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .09), 0 5px 12px rgba(2, 6, 23, .2); }

.sidebar-action:hover { transform: translateY(-1px); }
.sidebar-action-primary:hover { border-color: rgba(191, 219, 254, .78); background: linear-gradient(135deg, #3b82f6, #1d4ed8); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .26), 0 10px 19px rgba(30, 64, 175, .28); }
.sidebar-action-secondary:hover { border-color: rgba(226, 232, 240, .42); background: linear-gradient(135deg, #718096, #475569); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 9px 17px rgba(15, 23, 42, .22); }
.sidebar-action-storage:hover { border-color: rgba(125, 211, 252, .45); background: linear-gradient(135deg, #24364f, #0f172a); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 9px 17px rgba(2, 6, 23, .28); }
.sidebar-action:active { transform: translateY(0) scale(.985); box-shadow: inset 0 2px 5px rgba(2, 6, 23, .2); }

/* Finition sobre : aplats, bordures fines et profondeur discrète. */
.btn {
  border: 1px solid transparent;
  border-radius: .72rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .08);
  transition: transform .16s ease-out, box-shadow .16s ease-out, border-color .16s ease-out, background-color .16s ease-out, color .16s ease-out;
}

.btn-primary {
  background: #2563eb;
  background-image: none;
  box-shadow: 0 2px 5px rgba(37, 99, 235, .2);
}

.btn-primary:hover {
  background: #1d4ed8;
  background-position: 0 0;
  box-shadow: 0 4px 9px rgba(37, 99, 235, .22);
  transform: translateY(-1px);
}

.btn-secondary {
  border-color: #cbd5e1;
  background: #fff;
  color: #334155;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .06);
}

.btn-secondary:hover {
  border-color: #94a3b8;
  background: #f8fafc;
  color: #0f172a;
  box-shadow: 0 3px 7px rgba(15, 23, 42, .1);
  transform: translateY(-1px);
  filter: none;
}

.btn-success { border-color: #059669; background: #059669; box-shadow: 0 2px 5px rgba(5, 150, 105, .18); }
.btn-success:hover { background: #047857; box-shadow: 0 4px 9px rgba(5, 120, 87, .2); transform: translateY(-1px); filter: none; }
.btn-danger { border-color: #dc2626; background: #dc2626; box-shadow: 0 2px 5px rgba(220, 38, 38, .16); }
.btn-danger:hover { background: #b91c1c; box-shadow: 0 4px 9px rgba(185, 28, 28, .2); transform: translateY(-1px); filter: none; }

.btn-icon {
  border-color: #dbe3ee;
  border-radius: .68rem;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .08);
}

.btn-icon:hover {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
  box-shadow: 0 3px 7px rgba(37, 99, 235, .13);
  transform: translateY(-1px);
}

.btn:active,
.btn-icon:active { transform: translateY(0) scale(.98); box-shadow: 0 1px 2px rgba(15, 23, 42, .08); }

.freev-button-ripple { display: none; animation: none; }

.sidebar-action { border-radius: .78rem; box-shadow: 0 2px 5px rgba(2, 6, 23, .14); text-shadow: none; }
.sidebar-action-primary { border-color: #3b82f6; background: #2563eb; }
.sidebar-action-secondary { border-color: #64748b; background: #475569; }
.sidebar-action-storage { border-color: #334155; background: #1e293b; }
.sidebar-action.sidebar-action-primary,
.sidebar-action.sidebar-action-secondary,
.sidebar-action.sidebar-action-storage { color: #f8fafc; }
.sidebar-action-primary:hover { border-color: #60a5fa; background: #1d4ed8; box-shadow: 0 4px 9px rgba(2, 6, 23, .2); }
.sidebar-action-secondary:hover { border-color: #94a3b8; background: #334155; box-shadow: 0 4px 9px rgba(2, 6, 23, .2); }
.sidebar-action-storage:hover { border-color: #64748b; background: #0f172a; box-shadow: 0 4px 9px rgba(2, 6, 23, .24); }

@media (prefers-reduced-motion: reduce) {
  .btn, .btn-icon, .v4-text-button, .view-mode-tab, .v4-horizon button, .v42-presets button, [data-dashboard-mode], [data-dashboard-range], [data-months], [data-v5-tab], .freev-help-tabs button, .freev-help-jumps button, .btn-primary .fa-arrow-right { transform: none !important; transition: none !important; }
  .freev-button-ripple { display: none; animation: none; }
}


/* assets/css/theme-toggle.css */
/* Uiverse component adaptation: Switch by m1her (Maher Nas),
   https://uiverse.io/m1her/odd-fireant-56 — MIT License, Copyright 2026 m1her.
   The switch motion is adapted to Freev's day/night theme control. */
.dark-mode-toggle { display: flex; width: 100%; min-height: 3.15rem; align-items: center; justify-content: space-between; gap: .75rem; padding: .35rem .42rem .35rem .85rem; border: 1px solid rgba(255, 255, 255, .16); border-radius: 1rem; background: linear-gradient(135deg, rgba(59, 130, 246, .18), rgba(14, 165, 233, .09)); color: #e0f2fe; cursor: pointer; font: 800 .73rem/1 Inter, sans-serif; letter-spacing: .02em; transition: border-color .28s ease, box-shadow .28s ease, background .38s ease, transform .25s cubic-bezier(.22, 1, .36, 1); }
.dark-mode-toggle:hover { border-color: rgba(125, 211, 252, .65); background: linear-gradient(135deg, rgba(59, 130, 246, .29), rgba(45, 212, 191, .16)); box-shadow: 0 10px 22px rgba(2, 6, 23, .24); transform: translateY(-1px); }
.dark-mode-toggle:active { transform: translateY(1px) scale(.985); }
.dark-mode-toggle:focus-visible { outline: 3px solid rgba(45, 212, 191, .55); outline-offset: 3px; }
.theme-toggle-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.theme-toggle-track { display: grid; position: relative; flex: 0 0 3.55rem; width: 3.55rem; height: 1.95rem; align-items: center; grid-template-columns: 1fr 1fr; padding: .17rem; overflow: hidden; border: 1px solid rgba(255, 255, 255, .28); border-radius: 999px; background: linear-gradient(135deg, #38bdf8, #2563eb); box-shadow: inset 0 2px 5px rgba(2, 6, 23, .24), 0 3px 8px rgba(2, 6, 23, .16); transition: background .45s ease; }
.theme-toggle-track > i { z-index: 1; color: rgba(255, 255, 255, .72); font-size: .66rem; text-align: center; transition: opacity .25s ease, transform .35s cubic-bezier(.22, 1, .36, 1); }
.theme-toggle-knob { display: grid; position: absolute; z-index: 2; top: .17rem; left: .17rem; width: 1.55rem; height: 1.55rem; place-items: center; border-radius: 50%; background: radial-gradient(circle at 33% 28%, #fffef1, #fde68a 55%, #f59e0b); box-shadow: 0 3px 8px rgba(2, 6, 23, .35), inset 0 1px 1px rgba(255, 255, 255, .85); color: #b45309; transition: transform .42s cubic-bezier(.34, 1.56, .64, 1), background .38s ease, color .3s ease; }
.theme-toggle-knob i { font-size: .67rem; transition: transform .35s cubic-bezier(.22, 1, .36, 1); }
.dark-mode-toggle[aria-pressed="true"] { background: linear-gradient(135deg, rgba(30, 41, 59, .96), rgba(67, 56, 202, .42)); color: #e0e7ff; }
.dark-mode-toggle[aria-pressed="true"] .theme-toggle-track { background: linear-gradient(135deg, #111827, #4338ca); }
.dark-mode-toggle[aria-pressed="true"] .theme-toggle-knob { color: #c4b5fd; background: radial-gradient(circle at 35% 28%, #f8fafc, #c4b5fd 58%, #6d28d9); transform: translateX(1.6rem) rotate(320deg); }
.dark-mode-toggle[aria-pressed="true"] .theme-toggle-sun { opacity: .36; transform: rotate(-90deg) scale(.72); }
.dark-mode-toggle[aria-pressed="true"] .theme-toggle-moon { opacity: 1; transform: rotate(0) scale(1.08); }
.dark-mode-toggle[aria-pressed="false"] .theme-toggle-moon { opacity: .35; transform: rotate(90deg) scale(.72); }
/* Finition "application" : hiérarchie claire, surfaces plus calmes et mouvement continu. */
.dark-mode-toggle { min-height: 3.65rem; padding: .46rem .5rem .46rem .78rem; border-color: rgba(148, 163, 184, .28); border-radius: 1.05rem; background: linear-gradient(145deg, rgba(30, 41, 59, .96), rgba(15, 23, 42, .98)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .09), 0 8px 18px rgba(2, 6, 23, .18); }
.dark-mode-toggle:hover { border-color: rgba(125, 211, 252, .72); background: linear-gradient(145deg, rgba(40, 55, 79, .98), rgba(15, 23, 42, 1)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 11px 21px rgba(2, 6, 23, .25); transform: translateY(-1px); }
.theme-toggle-copy { display: flex; min-width: 0; flex: 1; flex-direction: column; align-items: flex-start; gap: .14rem; }
.theme-toggle-label { overflow: visible; color: #f8fafc; font-size: .72rem; font-weight: 800; letter-spacing: .035em; }
.theme-toggle-state { color: #94a3b8; font-size: .66rem; font-weight: 700; letter-spacing: .01em; transition: color .3s ease, transform .3s cubic-bezier(.22, 1, .36, 1); }
.theme-toggle-track { flex-basis: 4.1rem; width: 4.1rem; height: 2.25rem; border-color: rgba(191, 219, 254, .75); background: linear-gradient(135deg, #38bdf8 0%, #2563eb 100%); }
.theme-toggle-knob { top: .18rem; left: .18rem; width: 1.8rem; height: 1.8rem; background: linear-gradient(145deg, #fff7c2, #fbbf24); }
.dark-mode-toggle[aria-pressed="true"] { border-color: rgba(167, 139, 250, .42); background: linear-gradient(145deg, rgba(49, 46, 129, .62), rgba(15, 23, 42, 1)); }
.dark-mode-toggle[aria-pressed="true"] .theme-toggle-track { border-color: rgba(196, 181, 253, .62); background: linear-gradient(135deg, #312e81 0%, #111827 100%); }
.dark-mode-toggle[aria-pressed="true"] .theme-toggle-knob { color: #e2e8f0; background: linear-gradient(145deg, #e2e8f0, #94a3b8); box-shadow: 0 3px 8px rgba(2, 6, 23, .48), inset 0 1px 0 rgba(255, 255, 255, .8); transform: translateX(1.72rem) rotate(360deg); }
.dark-mode-toggle[aria-pressed="true"] .theme-toggle-state { color: #ddd6fe; transform: translateX(.06rem); }
@media (prefers-reduced-motion: reduce) { .dark-mode-toggle, .theme-toggle-track, .theme-toggle-track > i, .theme-toggle-knob, .theme-toggle-knob i, .theme-toggle-state { transition: none; transform: none !important; } }


/* assets/css/mobile-nav.css */
/* Uiverse component adaptation: Button by gharsh11032000 (Harsh Gupta),
   https://uiverse.io/gharsh11032000/loud-chicken-53 — MIT License, Copyright 2026 gharsh11032000.
   Its tactile hover and active motion are adapted to Freev's mobile navigation. */
@media (max-width: 767px) {
  .sidebar .nav-item[data-mobile-hidden] { display: none !important; }
  .sidebar { width: min(86vw, 21.5rem); max-width: none; border-right: 1px solid rgba(148, 163, 184, .18); background: linear-gradient(165deg, #0f172a, #172554 52%, #0f172a); }
  .sidebar.open { box-shadow: 16px 0 40px rgba(2, 6, 23, .42); }
  .sidebar-nav { padding: .55rem .7rem 1rem; }
  .sidebar-mobile-sep { margin: .55rem .2rem .42rem; color: rgba(191, 219, 254, .72); font-size: .57rem; font-weight: 850; letter-spacing: .13em; }
  .sidebar-nav > .nav-item:not(.primary-nav) { min-height: 2.9rem; margin: .25rem 0; border: 1px solid transparent; border-radius: .8rem; color: #dbeafe; transition: transform .22s cubic-bezier(.22, 1, .36, 1), background .22s ease, border-color .22s ease; }
  .sidebar-nav > .nav-item:not(.primary-nav):hover,
  .sidebar-nav > .nav-item:not(.primary-nav):active { border-color: rgba(125, 211, 252, .22); background: linear-gradient(90deg, rgba(37, 99, 235, .28), rgba(20, 184, 166, .12)); transform: translateX(.24rem); }
  .sidebar-nav > .nav-item:not(.primary-nav) > i { width: 1.45rem; color: #7dd3fc; text-align: center; }
  .pwa-install-nav { width: 100%; font: inherit; text-align: left; }

  .bottom-nav { height: calc(4.65rem + env(safe-area-inset-bottom)); padding: .35rem .45rem calc(.35rem + env(safe-area-inset-bottom)); border: 0; border-top: 1px solid rgba(148, 163, 184, .18); background: color-mix(in srgb, #0f172a 92%, transparent); box-shadow: 0 -12px 30px rgba(2, 6, 23, .16); backdrop-filter: blur(18px); }
  .bottom-nav-item { min-width: 0; border-radius: .9rem; color: #94a3b8; font-size: .6rem; font-weight: 750; transition: color .22s ease, background .22s ease, transform .22s cubic-bezier(.22, 1, .36, 1); }
  .bottom-nav-item i { display: grid; width: 2.05rem; height: 2.05rem; place-items: center; border-radius: .7rem; font-size: 1rem; transition: transform .25s cubic-bezier(.34, 1.56, .64, 1), background .22s ease; }
  .bottom-nav-item::after { display: none; }
  .bottom-nav-item.active { color: #e0f2fe; background: linear-gradient(135deg, rgba(37, 99, 235, .38), rgba(20, 184, 166, .2)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12); }
  .bottom-nav-item.active i { background: rgba(255, 255, 255, .13); color: #5eead4; transform: translateY(-1px) scale(1.08); }
  .bottom-nav-item:hover { color: #e0f2fe; transform: translateY(-2px); }
  .bottom-nav-item:active { transform: translateY(1px) scale(.94); }
  #bnav-scan i { background: linear-gradient(145deg, #24a784, #14745f); color: white; box-shadow: 0 4px 12px rgba(20,116,95,.26); }
  #bnav-scan:active i { transform: scale(.9); }
  #fabAddBtn { bottom: calc(5.65rem + env(safe-area-inset-bottom)); border: 3px solid rgba(255, 255, 255, .92); box-shadow: 0 13px 28px rgba(37, 99, 235, .38), 0 0 0 5px rgba(37, 99, 235, .12); }
  #fabAddBtn:hover { transform: translateY(-2px) rotate(90deg); }
  @media (prefers-reduced-motion: reduce) {
    .sidebar { animation: none; transition: none; }
    .sidebar-nav > .nav-item:not(.primary-nav), .bottom-nav-item, .bottom-nav-item i, #fabAddBtn { animation: none; transition: none; transform: none !important; }
  }
}


/* assets/css/space-tabs.css */
/* NAV 01 — onglets internes d'un espace. Utilise les jetons de la charte (variables existantes). */
.space-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 16px; padding: 4px; width: fit-content; max-width: 100%; border: 1px solid var(--border-color, #e2e8f0); border-radius: 12px; background: var(--bg-input, #f1f5f9); }
.space-tab { min-height: 44px; padding: 0 16px; border: 0; border-radius: 10px; background: transparent; color: #475569; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
.space-tab:hover { color: var(--text-primary, #1d1d1f); }
.space-tab[aria-selected="true"] { background: var(--bg-card, #fff); color: var(--text-primary, #1d1d1f); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.space-tab:focus-visible { outline: 2px solid #0069d3; outline-offset: 2px; }
body.dark-mode .space-tab:not([aria-selected="true"]) { color: #cbd5e1; }
.settings-anchors { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.settings-anchors a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--border-color, #e2e8f0); border-radius: 10px; color: var(--text-primary, #1d1d1f); font-weight: 600; text-decoration: none; }
.settings-anchors a:focus-visible { outline: 2px solid #0069d3; outline-offset: 2px; }
.settings-data-actions, .settings-security-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.settings-data-actions > .btn, .settings-security-actions > .btn { width: auto; min-height: 44px; margin: 0; }
#settings-view .btn,
.transaction-template-actions .btn { min-width: 0; max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.transaction-template-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; min-width: 0; max-width: 100%; }
.transaction-template-actions > :is(select,.freev-select) { width: min(14rem,100%); min-width: 0; }
#settings-view .premium-v4-preferences { grid-template-columns:minmax(0,1fr); }
#settings-view :is(.theme-toggle-label,.premium-v4-density-label) { white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 767px) {
  .space-tabs, #settingsOpenSmartSecurity { display: none; }
  #settings-view .dark-mode-toggle { flex-wrap: wrap; }
  #settings-view .theme-toggle-copy { flex-basis: 6em; }
}


/* assets/css/spendable.css */
/* QUO 01 — bloc « Ce que je peux encore dépenser ». Espacements 4/8/12/16/24/32, rayons 10/18 px. */
.spendable-block { margin: 0 0 24px; padding: 24px; border-radius: 18px; }
.spendable-head h2 { margin: 0 0 4px; font-size: 20px; font-weight: 700; color: var(--text-primary, #1d1d1f); }
.spendable-scope { margin: 0 0 16px; color: var(--text-muted, #62646b); font-size: 14px; }
.spendable-amount { display: block; font-size: 34px; font-weight: 700; font-variant-numeric: tabular-nums; color: #047857; }
.spendable-main.shortfall .spendable-amount, .spendable-main.none-left .spendable-amount { color: var(--text-primary, #1d1d1f); }
.spendable-sub, .spendable-note { margin: 4px 0 0; color: var(--text-muted, #62646b); font-size: 14px; }
.spendable-alert, .spendable-error { margin: 8px 0 0; color: #b42318; font-size: 15px; font-weight: 600; }
.spendable-alert::before { content: "⚠ "; }
.spendable-formula { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.spendable-formula-part { display: grid; gap: 3px; min-width: 138px; padding: 10px 12px; border: 1px solid var(--border-color, #e2e8f0); border-radius: 12px; background: color-mix(in srgb, var(--surface-color, #fff) 82%, #f3f6f8); }
.spendable-formula-part small { color: var(--text-muted, #62646b); font-size: 12px; }
.spendable-formula-part strong { color: var(--text-primary, #1d1d1f); font-variant-numeric: tabular-nums; }
.spendable-notes { margin: 12px 0 0; padding-left: 20px; color: var(--text-muted, #62646b); font-size: 14px; }
.spendable-details { margin-top: 16px; }
.spendable-details summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 600; }
.spendable-lines { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; margin: 12px 0; font-variant-numeric: tabular-nums; }
.spendable-lines dd { margin: 0; text-align: right; font-weight: 600; }
.spendable-due { margin: 8px 0 0; padding: 0; list-style: none; }
.spendable-due li { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,max-content); gap: 0 16px; padding: 8px 0; border-top: 1px solid var(--border-color, #e2e8f0); overflow-wrap: anywhere; }
.spendable-due small { grid-column: 1; color: var(--text-muted, #62646b); }
.spendable-due strong { grid-row: 1 / span 2; grid-column: 2; align-self: center; text-align: right; font-variant-numeric: tabular-nums; }
.spendable-form { display: grid; gap: 8px; max-width: 420px; margin-top: 16px; }
.spendable-form label { font-size: 14px; font-weight: 600; }
.spendable-form .btn { min-height: 44px; justify-self: start; }
body.dark-mode #settingsAccounts .form-label,
body.dark-mode #spendableDayPreview {color:var(--text-primary,#f1f5f9);}
body.dark-mode #spendableDayError {color:#fca5a5;}
@media (max-width: 767px) { .spendable-block { padding: 16px; } .spendable-amount { font-size: 30px; } .spendable-formula { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); } .spendable-formula-part { min-width: 0; } }
@media (prefers-reduced-motion: no-preference) { .spendable-formula-part { animation: spendableStepIn 320ms cubic-bezier(.2,.75,.25,1) both; } .spendable-formula-part:nth-child(2) { animation-delay: 45ms; } .spendable-formula-part:nth-child(3) { animation-delay: 90ms; } }
@keyframes spendableStepIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }


/* assets/css/premium-priority3.css */
/* FREEV GESTION · PRIORITÉ 3 · Interface premium et responsive.
   Couche de présentation conservant les comportements et les données existants. */
:root {
  --p3-brand: #2563eb;
  --p3-accent: #0d9488;
  --p3-ink: #12253f;
  --p3-radius: 18px;
  --p3-ease: cubic-bezier(.22,1,.36,1);
  --p3-ring: 0 0 0 3px rgba(37,99,235,.32);
  --p3-depth: 0 14px 36px rgba(25,48,85,.065), 0 2px 9px rgba(25,48,85,.035);
}

body.freev-premium-v3 {
  --bg-app: #f4f7fc;
  --bg-main: #f4f7fc;
  --bg-card: #fff;
  --bg-topbar: rgba(255,255,255,.96);
  --border-color: #e4eaf3;
  --text-primary: #14243b;
  --text-secondary: #50617b;
  --text-muted: #687890;
  background: var(--bg-app);
}
body.freev-premium-v3.dark-mode {
  --bg-app: #0b1424;
  --bg-main: #0b1424;
  --bg-card: #142238;
  --bg-topbar: #121f32;
  --bg-input: #101c2e;
  --border-color: #2b3d57;
  --text-primary: #f0f5ff;
  --text-secondary: #c3d1e2;
  --text-muted: #a5b5c9;
  --p3-ink: #eff6ff;
  --p3-depth: 0 12px 32px rgba(0,0,0,.19);
}

/* Clavier, lecteur d'écran et états natifs. */
.freev-skip-link {position:fixed;left:1rem;top:-6rem;z-index:100000;background:#fff;color:#123b74;padding:.75rem 1rem;border:2px solid #2563eb;border-radius:.7rem;font-weight:750}
.freev-skip-link:focus {top:1rem}
.freev-premium-v3 :is(button,input,select,textarea,a,[tabindex]):focus-visible {outline:3px solid #3b82f6;outline-offset:3px;box-shadow:var(--p3-ring)}
.freev-premium-v3 .sidebar-nav .nav-item {width:calc(100% - 1.5rem);margin:.16rem .75rem;border:1px solid transparent;border-radius:12px;text-align:left;background:transparent;font:600 .875rem/1.35 Inter,system-ui,sans-serif;min-height:44px;position:relative}
.freev-premium-v3 .sidebar-nav .nav-item:hover {background:rgba(180,206,249,.09);border-color:rgba(160,191,244,.12);color:#fff}
.freev-premium-v3 .sidebar-nav .nav-item.active,
.freev-premium-v3 .sidebar-nav .nav-item[aria-current="page"] {background:linear-gradient(108deg,rgba(69,124,235,.24),rgba(21,189,174,.09));border-color:rgba(138,182,250,.23);color:#fff;box-shadow:inset 3px 0 0 #60a5fa}
.freev-premium-v3 .sidebar-nav .nav-item i {width:22px;flex-shrink:0;color:#b3c7e4;transition:transform .22s var(--p3-ease),color .2s}
.freev-premium-v3 .sidebar-nav .nav-item:hover i {transform:scale(1.08);color:#93f5e5}
.freev-premium-v3 .sidebar-nav .nav-item[aria-current="page"] i {color:#93f5e5}
.freev-premium-v3 .sidebar-mobile-sep {padding:.55rem 1.5rem .35rem;color:#a4bbd6;font-size:.65rem;letter-spacing:.14em;font-weight:800}

/* Sidebar premium, identité et profondeur. */
.freev-premium-v3 .sidebar {background:linear-gradient(177deg,#101f39 0%,#0e1930 52%,#121d32 100%);box-shadow:9px 0 26px rgba(6,17,35,.075)}
.freev-premium-v3 .sidebar-header {background:linear-gradient(140deg,rgba(29,65,116,.92),rgba(20,42,72,.96));padding:1.65rem 1.3rem 1.25rem;border-bottom:1px solid rgba(216,234,255,.12)}
.premium-brand {display:flex;align-items:center;gap:.85rem;min-width:0}
.premium-brand-mark {display:grid;place-items:center;width:46px;height:46px;flex-shrink:0;border-radius:14px;background:linear-gradient(135deg,#60a5fa,#2dd4bf);color:#062139;font-size:1.2rem;box-shadow:0 10px 24px rgba(21,197,192,.22),inset 0 1px rgba(255,255,255,.4)}
.premium-brand-copy {min-width:0;display:flex;flex-direction:column;gap:.15rem}
.premium-brand-copy strong {color:#fff;font-size:1.5rem;letter-spacing:.08em;line-height:1.1;font-weight:850}
.premium-brand-copy small {font-size:.57rem;letter-spacing:.11em;color:#b9d5f2;font-weight:750;white-space:nowrap}
.premium-brand-tagline {margin:1rem 0 0;color:#b6cfe8;font-size:.77rem}
.freev-premium-v3 .sidebar-nav {padding-top:1rem;scrollbar-color:#465c79 transparent;scrollbar-width:thin}

/* Espaces clairs, barre d'outils compactée. */
.freev-premium-v3 .main-content {background:var(--bg-main);min-width:0}
.freev-premium-v3 .top-bar {position:relative;z-index:10;padding:1rem 1.4rem;background:var(--bg-topbar);border-color:var(--border-color);box-shadow:0 3px 19px rgba(38,56,93,.045);gap:.65rem;flex-wrap:wrap}
.freev-premium-v3 .top-bar > div {min-width:0;flex-wrap:wrap}
.freev-premium-v3 .content-area {padding:1.4rem 1.8rem 2rem;scrollbar-color:#c0cee2 transparent}
.freev-premium-v3 .month-picker {border-radius:13px;box-shadow:0 1px 5px rgba(31,65,103,.04)}
.freev-premium-v3 .month-nav-btn {border-radius:10px;min-width:34px;min-height:34px}
.freev-premium-v3 .month-nav-btn:hover {background:rgba(37,99,235,.08);color:#2563eb}

/* Bandeau dynamique : accessible, sans chiffres fictifs. */
.premium-workspace-head {position:relative;isolation:isolate;display:flex;align-items:center;justify-content:space-between;gap:1.5rem;min-height:180px;overflow:hidden;padding:1.8rem 2rem;margin-bottom:1.4rem;border-radius:24px;border:1px solid rgba(255,255,255,.14);background:linear-gradient(112deg,#142a4b 0%,#1c4676 54%,#0e6872 100%);box-shadow:0 20px 50px rgba(21,52,99,.15)}
.premium-workspace-head::before {content:"";position:absolute;z-index:-1;top:-130px;right:-90px;width:420px;height:360px;border:1px solid rgba(255,255,255,.09);border-radius:50%;box-shadow:0 0 0 50px rgba(255,255,255,.024),0 0 0 100px rgba(255,255,255,.018)}
.premium-workspace-intro {min-width:0;max-width:680px}
.premium-workspace-kicker {display:inline-flex;align-items:center;gap:.48rem;color:#b4f2e7;font-size:.68rem;letter-spacing:.13em;font-weight:850}
.premium-live-dot {display:inline-block;background:#5eead4;width:7px;height:7px;border-radius:50%;box-shadow:0 0 0 4px rgba(94,234,212,.15)}
.premium-workspace-head h1 {font-size:clamp(1.5rem,2.4vw,2.35rem);font-weight:825;letter-spacing:-.045em;color:#fff;line-height:1.18;margin:.65rem 0 .5rem;text-wrap:balance}
.premium-workspace-head p {color:#d8eaf9;font-size:.84rem;line-height:1.65;max-width:55ch}
.premium-workspace-actions {display:flex;align-items:center;justify-content:flex-end;gap:.6rem;flex-wrap:wrap;flex-shrink:0}
.premium-workspace-add-wrap {position:relative;display:inline-flex;flex:0 0 auto}
.premium-workspace-head.workspace-add-open {overflow:visible!important;z-index:130}
.premium-workspace-head.workspace-add-open::before {display:none!important}
.premium-workspace-add-chevron {font-size:.65rem;opacity:.72;margin-left:.08rem}
.premium-workspace-add-panel {position:absolute;z-index:120;top:calc(100% + .5rem);right:0;display:grid;gap:.2rem;width:min(19rem,calc(100vw - 2rem));max-height:min(70vh,28rem);overflow:auto;padding:.4rem;border:1px solid var(--border-color,#cbd5e1);border-radius:13px;background:var(--bg-card,#fff);color:var(--text-primary,#0f172a);box-shadow:0 16px 38px rgba(15,23,42,.2)}
.premium-workspace-add-panel[hidden] {display:none!important}
.premium-workspace-add-item {display:flex;align-items:center;gap:.7rem;width:100%;min-height:44px;padding:.62rem .72rem;border:0;border-radius:9px;background:transparent;color:inherit;font:inherit;font-size:.82rem;font-weight:650;text-align:left;cursor:pointer}
.premium-workspace-add-item[hidden] {display:none!important}
.premium-workspace-add-item > i {width:1.15rem;color:var(--v4-accent,#2563eb);text-align:center}
.premium-workspace-add-item:hover,.premium-workspace-add-item:focus-visible {background:var(--apple-hover,#eff6ff)}
.premium-workspace-add-item:focus-visible,#workspaceAddTrigger:focus-visible {outline:3px solid var(--v4-accent,#2563eb);outline-offset:2px}
.premium-workspace-add-wrap > #workspaceAddTrigger {width:100%}
.premium-workspace-action {display:inline-flex;align-items:center;justify-content:center;gap:.6rem;min-height:45px;padding:.7rem .9rem;border:1px solid rgba(240,249,255,.29);border-radius:12px;color:#fff;font-size:.8rem;font-weight:750;cursor:pointer;white-space:nowrap;transition:transform .24s var(--p3-ease),box-shadow .24s,background .24s}
.premium-workspace-action-secondary {background:rgba(255,255,255,.1);backdrop-filter:blur(8px)}
.premium-workspace-action-primary {background:#e9fbff;color:#13506b;border-color:#e9fbff;box-shadow:0 10px 22px rgba(0,0,0,.1)}
.premium-workspace-action:hover {transform:translateY(-2px);box-shadow:0 12px 20px rgba(6,19,38,.14)}
.premium-workspace-action:active {transform:translateY(0) scale(.98)}

/* Cartes, finance et tableaux. Cohérence jour/nuit. */
.freev-premium-v3 .card,
.freev-premium-v3 .stat-card,
.freev-premium-v3 .fp2-metric,
.freev-premium-v3 .fp2-panel {border:1px solid var(--border-color);background:var(--bg-card);box-shadow:var(--p3-depth);border-radius:var(--p3-radius)}
.freev-premium-v3 .card:hover,
.freev-premium-v3 .stat-card:hover,
.freev-premium-v3 .fp2-panel:hover {box-shadow:0 18px 36px rgba(33,60,101,.11)}
.freev-premium-v3 .stat-card {min-width:0;padding:1.25rem;gap:1.05rem;transition:box-shadow .24s,transform .24s;align-items:center}
.freev-premium-v3 .stat-card .text-2xl {font-size:clamp(1.23rem,1.75vw,1.8rem);letter-spacing:-.035em;overflow-wrap:anywhere;line-height:1.22;color:var(--text-primary)}
.freev-premium-v3 .stat-card .stat-icon {width:54px;height:54px;flex-shrink:0;border-radius:16px;font-size:1.3rem}
.freev-premium-v3 .stat-card .flex-1 {min-width:0}
.freev-premium-v3 .fp2-heading h2 {font-size:1.36rem;letter-spacing:-.025em}
.freev-premium-v3 .fp2-metric,.freev-premium-v3 .fp2-panel {padding:1.3rem}
.freev-premium-v3 .fp2-metric-value {font-size:clamp(1.22rem,1.8vw,1.72rem);letter-spacing:-.03em}
.freev-premium-v3 .fp2-alert {border:1px solid var(--border-color);border-radius:12px;padding:.75rem .85rem}
.freev-premium-v3 .fp2-progress {height:9px}
.freev-premium-v3 .progress-bar {border-radius:999px;overflow:hidden}
.freev-premium-v3 .table-container {border-radius:14px}
.freev-premium-v3 .table tbody tr {transition:background .16s ease}
.freev-premium-v3 .form-input,.freev-premium-v3 .form-select,.freev-premium-v3 .form-textarea {border-radius:11px}
.freev-premium-v3 .btn {justify-content:center}
.freev-premium-v3 .bottom-nav-item {transition:transform .2s var(--p3-ease),color .2s,background .2s}
.freev-premium-v3 .bottom-nav-item[aria-current="page"] {color:#2563eb}

/* Moins de mouvement, plus de contrôle : les actions restent visibles au clavier. */
@media (hover:none) { .freev-premium-v3 .card:hover,.freev-premium-v3 .stat-card:hover,.freev-premium-v3 .fp2-panel:hover {transform:none;box-shadow:var(--p3-depth)} }
@media (min-width:1300px) {
  .freev-premium-v3 .premium-stat-grid {grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:1rem!important}
  .freev-premium-v3 .stat-card {flex-direction:column;align-items:flex-start;gap:.8rem}
}
@media (max-width:1250px) {
  .premium-workspace-head {padding:1.55rem 1.6rem}
  .premium-workspace-actions {max-width:230px}
  .premium-workspace-action {width:100%}
  .freev-premium-v3 .top-bar {padding:.9rem 1.2rem}
}
@media (max-width:900px) {
  .premium-workspace-head {align-items:flex-start;flex-direction:column;gap:1rem}
  .premium-workspace-actions {max-width:none;width:100%;justify-content:flex-start}
  .premium-workspace-action {width:auto}
  .freev-premium-v3 .content-area {padding:1.1rem 1.2rem 1.5rem}
}
@media (max-width:768px) {
  .freev-premium-v3 .sidebar {width:min(86vw,21.5rem)}
  .freev-premium-v3 .sidebar-nav .nav-item {width:calc(100% - 1.35rem);margin:.13rem .675rem;min-height:48px;padding:.7rem .88rem}
  .freev-premium-v3 .sidebar-header {padding:1.2rem 1.05rem}
  .freev-premium-v3 .top-bar {position:relative;padding:.55rem .85rem;min-height:57px;gap:.5rem;flex-wrap:nowrap}
  .freev-premium-v3 .top-bar > div:first-child {min-width:0;flex-wrap:nowrap;gap:.4rem}
  .freev-premium-v3 .top-bar > div:last-child {display:none}
  .freev-premium-v3 .content-area {padding:.85rem .8rem calc(6rem + env(safe-area-inset-bottom))}
  .premium-workspace-head {min-height:unset;margin-bottom:1rem;border-radius:18px;padding:1.2rem 1.1rem;gap:.85rem;box-shadow:0 13px 26px rgba(16,42,83,.14)}
  .premium-workspace-head h1 {font-size:1.55rem;margin:.52rem 0 .3rem}
  .premium-workspace-head p {font-size:.77rem}
  .premium-workspace-kicker {font-size:.58rem}
  .premium-workspace-actions {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;gap:.55rem}
  .premium-workspace-action {width:100%;min-height:43px;padding:.58rem .42rem;font-size:.72rem;white-space:normal}
  .freev-premium-v3 #dashboard-view > .premium-stat-grid {grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:.65rem!important}
  .freev-premium-v3 .stat-card {padding:.8rem;min-width:0;align-items:flex-start;gap:.35rem}
  .freev-premium-v3 .stat-card .stat-icon {width:37px;height:37px;font-size:1rem;border-radius:11px}
  .freev-premium-v3 .stat-card .text-2xl {font-size:clamp(1.03rem,4vw,1.32rem)}
  .freev-premium-v3 .fp2-panel,.freev-premium-v3 .fp2-metric {padding:1rem}
  .freev-premium-v3 .fp2-panel h3 {line-height:1.45}
  .freev-premium-v3 .bottom-nav-item {min-width:0}
}
@media (max-width:375px) {
  .freev-premium-v3 .stat-card .text-2xl {font-size:1rem}
  .freev-premium-v3 .month-picker input[type="month"] {width:112px;font-size:.75rem}
  .freev-premium-v3 .month-nav-btn {min-width:29px;min-height:29px;width:29px;height:29px}
  .premium-workspace-action {font-size:.68rem}
}
@media (max-width:760px) {
  .premium-workspace-add-wrap {width:100%}
  .premium-workspace-add-panel {left:0;right:auto}
}
@media (prefers-reduced-motion:reduce) {
  .freev-premium-v3 *, .freev-premium-v3 *::before, .freev-premium-v3 *::after {animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}
  .freev-premium-v3 .stat-card:hover,.freev-premium-v3 .premium-workspace-action:hover {transform:none!important}
}


/* assets/css/premium-v4.css */
/* FREEV GESTION · Premium V4 | Direction artistique & ergonomie.
   Couche de présentation additive : aucun calcul, aucune donnée financière modifiés. */
body.freev-premium-v4 {
  --v4-accent:#2563eb; --v4-accent-dark:#1e40af; --v4-teal:#0d9488;
  --v4-surface:#fff; --v4-soft:#f0f5fc; --v4-subtle:#e8eef8;
  --v4-line:#dbe4f0; --v4-shadow:0 5px 18px rgba(23,48,83,.055),0 16px 44px rgba(23,48,83,.04);
  --bg-app:#f3f6fb; --bg-main:#f3f6fb; --bg-card:#fff;
  --border-color:#dfe7f2; --text-primary:#172b47; --text-secondary:#52657e;
  font-feature-settings:"tnum" 1;
  -webkit-font-smoothing:antialiased;
}
body.freev-premium-v4.dark-mode {
  --v4-accent:#75a7ff; --v4-accent-dark:#aacaff; --v4-teal:#5eead4;
  --v4-surface:#17263c; --v4-soft:#1d314b; --v4-subtle:#293f58;
  --v4-line:#31465e; --v4-shadow:0 6px 24px rgba(0,0,0,.17);
  --bg-app:#0b1525; --bg-main:#0b1525; --bg-card:#16263c;
  --border-color:#2b415b; --text-primary:#eaf2ff; --text-secondary:#bfd0e4;
}
/* Identité, menu, hiérarchie et actions isolées visuellement. */
.freev-premium-v4 .sidebar {width:280px; background:linear-gradient(172deg,#09172d,#0f2742 62%,#092536); border-right:1px solid rgba(199,224,255,.1)}
.freev-premium-v4 .sidebar-header {background:linear-gradient(128deg,#132d50,#0b3a4c);padding:1.35rem 1.25rem 1.1rem}
.freev-premium-v4 .premium-brand-mark {background:linear-gradient(142deg,#daf6ff,#80d5e2);box-shadow:0 0 0 5px rgba(148,225,239,.08),0 6px 19px rgba(0,0,0,.2);color:#12354d;border-radius:16px;width:49px;height:49px}
.freev-premium-v4 .premium-brand-copy strong {font-size:1.45rem;letter-spacing:-.015em}
.freev-premium-v4 .premium-brand-copy small {font-size:.61rem;letter-spacing:.095em}
.freev-premium-v4 .premium-brand-tagline {font-size:.77rem;color:#c1dbed;margin:.85rem 0 0}
.freev-premium-v4 .sidebar-nav {padding:.85rem .5rem 1rem;scrollbar-width:thin}
.freev-premium-v4 .sidebar-nav .nav-item {position:relative;display:flex;width:calc(100% - .45rem);padding:.73rem .88rem;margin:.14rem .2rem;min-height:46px;border:1px solid transparent;border-radius:12px;font-weight:650;font-size:.83rem;letter-spacing:-.01em;gap:.7rem;min-width:0}
.freev-premium-v4 .sidebar-nav .nav-item>span:not(.v4-new-badge):not(.v5-new-badge) {min-width:0;overflow-wrap:anywhere;line-height:1.35}
.freev-premium-v4 .sidebar-nav .nav-item:hover {background:rgba(255,255,255,.07);border-color:rgba(155,222,240,.12)}
.freev-premium-v4 .sidebar-nav .nav-item[aria-current="page"],.freev-premium-v4 .sidebar-nav .nav-item.active {background:linear-gradient(98deg,rgba(96,165,250,.2),rgba(45,212,191,.09));border-color:rgba(147,197,253,.22);box-shadow:inset 3px 0 #70d8ec;color:#fff}
.freev-premium-v4 .sidebar-nav .nav-item[aria-current="page"] i {color:#8ce9e6}
.freev-premium-v4 .sidebar-mobile-sep {padding:.9rem 1.1rem .35rem;letter-spacing:.14em;color:#8aa8c3;font-size:.63rem}
.freev-premium-v4 .accounts-sidebar-section {border-bottom:1px solid rgba(215,231,255,.1)}
.freev-premium-v4 .premium-v4-sidebar-tools {padding:1.05rem .95rem 1.15rem;border-top:1px solid rgba(215,231,255,.12);background:rgba(1,17,31,.13)}
.freev-premium-v4 .premium-v4-tools-label {font-size:.65rem;text-transform:uppercase;letter-spacing:.1em;color:#bfd6e7;font-weight:800;margin-bottom:.75rem;display:flex;align-items:center;gap:.5rem}
.freev-premium-v4 .premium-v4-sidebar-tools .sidebar-action {min-height:40px;margin-bottom:.4rem!important;border-radius:10px;font-size:.75rem;white-space:normal;padding:.55rem .65rem}
.freev-premium-v4 .premium-v4-sidebar-tools .sidebar-action .sidebar-action-meta {margin-left:auto}
.freev-premium-v4 .premium-v4-preferences {border-top:1px solid rgba(222,239,255,.12);margin-top:.65rem;padding-top:.65rem;display:grid;gap:.45rem}
.freev-premium-v4 .premium-v4-density-toggle {display:flex;align-items:center;gap:.7rem;background:rgba(255,255,255,.055);border:1px solid rgba(215,235,255,.14);border-radius:12px;color:#e0edf7;width:100%;min-height:48px;padding:.55rem .75rem;text-align:left;cursor:pointer;font:inherit;transition:background .2s,border-color .2s}
.freev-premium-v4 .premium-v4-density-toggle:hover {background:rgba(255,255,255,.105);border-color:rgba(215,235,255,.3)}
.premium-v4-density-icon {color:#81dceb;width:22px;text-align:center}
.premium-v4-density-label {display:flex;flex-direction:column;gap:.15rem;flex:1;font-size:.77rem;font-weight:700}
.premium-v4-density-label small {font-size:.65rem;font-weight:500;color:#abc6da}
.premium-v4-density-state {font-size:1.3rem;color:#78dcca}
/* Espace de travail, barre supérieure et bandeau de la vue courante. */
.freev-premium-v4 .main-content {background:var(--bg-main)}
.freev-premium-v4 .top-bar {padding:.9rem 1.45rem;min-height:76px;border-bottom:1px solid var(--border-color);box-shadow:none;background:var(--bg-topbar)}
.freev-premium-v4 .top-bar>.flex {min-width:0;gap:.65rem}
.freev-premium-v4 .top-bar .btn {min-height:40px;border-radius:11px;white-space:normal}
.freev-premium-v4 .top-bar .btn-primary {box-shadow:0 6px 15px rgba(37,99,235,.14)}
.freev-premium-v4 .month-picker {background:var(--bg-card);border:1px solid var(--v4-line);border-radius:13px;padding:.18rem}
.freev-premium-v4 .month-nav-btn {height:35px;width:35px;border-radius:9px;flex:0 0 auto}
.freev-premium-v4 .view-mode-tabs {background:var(--v4-soft);border-radius:12px;padding:3px}
.freev-premium-v4 .view-mode-tab {border-radius:9px;min-height:33px;font-size:.74rem}
.freev-premium-v4 .view-mode-tab.active-mode {box-shadow:0 1px 6px rgba(13,42,73,.1)}
.freev-premium-v4 .content-area {padding:1.5rem clamp(.9rem,2.3vw,2.4rem) 2.2rem}
.freev-premium-v4 .premium-workspace-head {min-height:183px;background:linear-gradient(118deg,#132a4c 0%,#214b70 58%,#116a75 100%);border-radius:22px;box-shadow:0 14px 42px rgba(20,61,100,.13);padding:1.65rem 2rem;gap:1.5rem;margin-bottom:1.3rem}
.freev-premium-v4 .premium-workspace-head::before {width:320px;height:320px;top:-122px;right:-95px;box-shadow:0 0 0 46px rgba(255,255,255,.035),0 0 0 95px rgba(255,255,255,.018)}
.freev-premium-v4 .premium-workspace-head::after {content:"";position:absolute;left:0;bottom:0;width:100%;height:3px;background:linear-gradient(90deg,rgba(94,234,212,.84),rgba(147,197,253,.34),transparent);pointer-events:none}
.freev-premium-v4 .premium-workspace-kicker {color:#b8f6eb;letter-spacing:.13em}
.freev-premium-v4 .premium-workspace-head h1 {font-size:clamp(1.5rem,2.4vw,2.35rem);font-weight:790;letter-spacing:-.045em;margin:.45rem 0 .4rem}
.freev-premium-v4 .premium-workspace-head p {color:#dceefa;font-size:.83rem;line-height:1.6}
.freev-premium-v4 .premium-v4-context {display:inline-flex;align-items:center;gap:.5rem;background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.17);border-radius:999px;color:#e0eefb;margin-top:.9rem;padding:.35rem .76rem;font-size:.7rem}
.freev-premium-v4 .premium-v4-context strong {font-weight:800;color:#fff;text-transform:capitalize}
.freev-premium-v4 .premium-workspace-action {min-height:44px;border-radius:12px;transition:background .18s,box-shadow .18s,transform .18s}
.freev-premium-v4 .premium-workspace-action-primary {background:#dffaff;color:#16445f;border-color:#dffaff}
.freev-premium-v4 .premium-workspace-action-primary:hover {background:#fff}
/* Indicateurs : chiffres dominants, teinte liée au sens des données, pas de chiffres artificiels. */
.freev-premium-v4 .premium-stat-grid {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.9rem;margin-bottom:1.4rem}
.freev-premium-v4 .premium-v4-stat {display:flex;flex-direction:column;align-items:flex-start;justify-content:space-between;min-height:155px;gap:.8rem;position:relative;isolation:isolate;overflow:hidden;border:1px solid var(--border-color);border-radius:17px;box-shadow:var(--v4-shadow);padding:1.2rem 1.3rem;background:var(--bg-card);transition:box-shadow .2s,border-color .2s,transform .2s}
.freev-premium-v4 .premium-v4-stat::before {content:"";position:absolute;inset:0 auto auto 0;width:100%;height:3px;background:var(--v4-stat-accent)}
.freev-premium-v4 .premium-v4-stat:hover {transform:translateY(-2px);border-color:var(--v4-subtle);box-shadow:0 15px 35px rgba(20,50,78,.11)}
.freev-premium-v4 .premium-v4-stat-balance {--v4-stat-accent:#2e7adf}
.freev-premium-v4 .premium-v4-stat-income {--v4-stat-accent:#139b81}
.freev-premium-v4 .premium-v4-stat-expense {--v4-stat-accent:#e17b64}
.freev-premium-v4 .premium-v4-stat-savings {--v4-stat-accent:#9d7bdb}
.freev-premium-v4 .premium-v4-stat .stat-icon {width:41px;height:41px;border-radius:12px;font-size:1.05rem;flex-shrink:0}
.freev-premium-v4 .premium-v4-stat .text-2xl {font-size:clamp(1.3rem,1.7vw,1.92rem);line-height:1.23;letter-spacing:-.036em;overflow-wrap:anywhere}
.freev-premium-v4 .premium-v4-stat .text-sm {font-size:.76rem;font-weight:650}
.freev-premium-v4 .premium-v4-stat .flex-1 {flex:none;min-width:0;width:100%}
/* Cartes et rapports : cohérence, zones de clic et tableaux consultables. */
.freev-premium-v4 .card,.freev-premium-v4 .fp2-metric,.freev-premium-v4 .fp2-panel {border:1px solid var(--border-color);border-radius:17px;background:var(--bg-card);box-shadow:var(--v4-shadow)}
.freev-premium-v4 .card {padding:clamp(1rem,1.45vw,1.45rem)}
.freev-premium-v4 .card:hover,.freev-premium-v4 .fp2-panel:hover {box-shadow:var(--v4-shadow)}
.freev-premium-v4 .premium-v4-chart-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;margin-bottom:1.5rem}
.freev-premium-v4 .fp2-heading {margin-top:.5rem;margin-bottom:1rem}
.freev-premium-v4 .fp2-heading h2 {font-size:1.22rem;font-weight:800;letter-spacing:-.025em}
.freev-premium-v4 .fp2-metrics {gap:.75rem;margin:.8rem 0 1rem}
.freev-premium-v4 .fp2-panels {gap:1rem}
.freev-premium-v4 .fp2-metric,.freev-premium-v4 .fp2-panel {padding:1.1rem}
.freev-premium-v4 .fp2-metric {background:linear-gradient(170deg,var(--bg-card),var(--v4-soft));min-width:0}
.freev-premium-v4 .fp2-metric-value {font-size:1.38rem;line-height:1.3;overflow-wrap:anywhere}
.freev-premium-v4 .fp2-panel h3 {font-size:.88rem;font-weight:800;line-height:1.45;letter-spacing:-.012em}
.freev-premium-v4 .fp2-row {padding:.85rem .15rem;gap:.6rem}
.freev-premium-v4 .fp2-progress {height:8px}
.freev-premium-v4 .progress-bar {height:11px;border-radius:999px;background:var(--v4-soft)}
.freev-premium-v4 .progress-fill {border-radius:999px}
.freev-premium-v4 .premium-v4-filter-bar {display:flex;flex-wrap:wrap;align-items:end;gap:.65rem;background:var(--v4-soft);padding:.85rem;border:1px solid var(--v4-line);border-radius:14px;margin-bottom:1rem}
.freev-premium-v4 .premium-v4-filter-bar .form-input,.freev-premium-v4 .premium-v4-filter-bar .form-select {min-width:0;max-width:100%;min-height:41px}
.freev-premium-v4 .premium-v4-filter-bar #txSearch {flex:1 1 210px;max-width:none!important}
.freev-premium-v4 .premium-v4-filter-bar button {min-height:41px}
.freev-premium-v4 .table-container {border:1px solid var(--border-color);border-radius:14px;max-width:100%;overflow-x:auto}
.freev-premium-v4 .table {background:var(--bg-card);border-collapse:separate;border-spacing:0}
.freev-premium-v4 .table thead {background:var(--v4-soft)}
.freev-premium-v4 .table th {background:var(--v4-soft);color:var(--text-secondary);font-size:.72rem;font-weight:750;letter-spacing:.045em;border-bottom:1px solid var(--border-color);padding:.85rem .88rem}
.freev-premium-v4 .table td {color:var(--text-primary);padding:.86rem .88rem;border-bottom:1px solid var(--border-color)}
.freev-premium-v4 .table td.text-emerald-600,
body.freev-apple .mobile-recent-amount.is-income {color:#087a5c}
.freev-premium-v4 .table td.text-rose-600,
body.freev-apple .mobile-recent-amount.is-expense {color:#b4233b}
.freev-premium-v4 .table td.text-brand-600,
body.freev-apple .mobile-recent-amount.is-transfer {color:var(--apple-accent,#215de1)}
.freev-premium-v4.dark-mode .table td.text-emerald-600,
body.freev-apple.dark-mode .mobile-recent-amount.is-income {color:#6ee7b7}
.freev-premium-v4.dark-mode .table td.text-rose-600,
body.freev-apple.dark-mode .mobile-recent-amount.is-expense {color:#fda4af}
.freev-premium-v4 .table tbody tr:last-child td {border-bottom:0}
.freev-premium-v4 .table tbody tr:hover {background:var(--v4-soft)}
.freev-premium-v4 .btn {border-radius:11px;min-height:38px;gap:.45rem;font-weight:700;line-height:1.35;transition:background .2s,box-shadow .2s,transform .2s}
.freev-premium-v4 .btn:hover {transform:translateY(-1px)}
.freev-premium-v4 .btn:active {transform:none}
.freev-premium-v4 .btn-primary {background:linear-gradient(135deg,#1f61db,#3179eb);color:#fff}
.freev-premium-v4 .btn-primary:hover {background:linear-gradient(135deg,#194ebd,#246ad5)}
.freev-premium-v4 .form-input,.freev-premium-v4 .form-select,.freev-premium-v4 .form-textarea {min-height:40px;border:1px solid var(--v4-line);border-radius:10px;background:var(--bg-input,var(--bg-card));color:var(--text-primary);max-width:100%}
.freev-premium-v4 .form-input:hover,.freev-premium-v4 .form-select:hover {border-color:var(--v4-accent)}
.freev-premium-v4 .modal-content,.freev-premium-v4 .accounts-modal-content {border:1px solid var(--border-color);border-radius:19px;background:var(--bg-card);box-shadow:0 25px 90px rgba(3,15,35,.29);max-width:calc(100vw - 2rem)}
.freev-premium-v4 .modal-header {border-bottom:1px solid var(--border-color);padding:1.2rem 1.4rem}
.freev-premium-v4 .modal-footer {border-top:1px solid var(--border-color);padding:1.05rem 1.4rem;flex-wrap:wrap}
.freev-premium-v4 .recurring-header {gap:1rem;align-items:center}
.freev-premium-v4 .rec-calendar-wrap {min-width:0;max-width:100%}
/* Densité de lecture : modifie uniquement les espacements, jamais le contenu. */
.freev-premium-v4.freev-v4-compact .content-area {padding-top:.8rem}
.freev-premium-v4.freev-v4-compact .premium-workspace-head {min-height:122px;padding:1.1rem 1.5rem;margin-bottom:.85rem}
.freev-premium-v4.freev-v4-compact .premium-workspace-head h1 {font-size:1.4rem;margin:.22rem 0}
.freev-premium-v4.freev-v4-compact .premium-v4-context {margin-top:.4rem}
.freev-premium-v4.freev-v4-compact .premium-stat-grid {gap:.65rem;margin-bottom:.85rem}
.freev-premium-v4.freev-v4-compact .premium-v4-stat {min-height:115px;padding:.85rem 1rem;gap:.45rem}
.freev-premium-v4.freev-v4-compact .premium-v4-stat .stat-icon {width:32px;height:32px;font-size:.85rem}
.freev-premium-v4.freev-v4-compact .card {padding:.9rem}
.freev-premium-v4.freev-v4-compact .fp2-panel,.freev-premium-v4.freev-v4-compact .fp2-metric {padding:.9rem}
.freev-premium-v4.freev-v4-compact .table td {padding:.55rem .7rem}
.freev-premium-v4.freev-v4-compact .table th {padding:.6rem .7rem}
.freev-premium-v4.freev-v4-compact .fp2-row {padding:.55rem .1rem}
/* Accessibilité sans animation inutile. */
.freev-premium-v4 :is(button,a,input,select,textarea,[tabindex]):focus-visible {outline:3px solid #4da9e5!important;outline-offset:3px;box-shadow:0 0 0 5px rgba(77,169,229,.17)}
.freev-premium-v4 :is(.premium-v4-stat,.card,.fp2-panel) {scroll-margin-top:1.5rem}
@media(min-width:1500px){.freev-premium-v4 .premium-stat-grid{gap:1.15rem}.freev-premium-v4 .content-area{padding-left:2.2rem;padding-right:2.2rem}}
@media(max-width:1350px){.freev-premium-v4 .premium-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.freev-premium-v4 .premium-v4-stat{min-height:130px}.freev-premium-v4 .top-bar>.flex:last-child{gap:.45rem}.freev-premium-v4 .top-bar>.flex:last-child .btn{padding:.55rem .7rem;font-size:.73rem}}
@media(max-width:1050px){.freev-premium-v4 .premium-v4-chart-grid,.freev-premium-v4 .fp2-panels{grid-template-columns:minmax(0,1fr)}.freev-premium-v4 .premium-workspace-head{align-items:flex-start;flex-direction:column;gap:.8rem}.freev-premium-v4 .premium-workspace-actions{width:100%;max-width:none;justify-content:flex-start}.freev-premium-v4 .premium-workspace-action{width:auto}.freev-premium-v4 .top-bar{gap:.5rem;flex-wrap:wrap}.freev-premium-v4 .top-bar>.flex:last-child{flex-wrap:wrap}}
@media(max-width:768px){
  .freev-premium-v4 .sidebar{width:min(88vw,22rem)}
  .freev-premium-v4 .sidebar-header{padding:1rem .95rem}
  .freev-premium-v4 .sidebar-nav .nav-item{width:calc(100% - .25rem);margin:.12rem;min-height:46px}
  .freev-premium-v4 .premium-v4-sidebar-tools{padding:.9rem .8rem}
  .freev-premium-v4 .top-bar{min-height:60px;display:flex;align-items:center;padding:.6rem .8rem;flex-wrap:nowrap}
  .freev-premium-v4 .top-bar>.flex:first-child{gap:.4rem;flex-wrap:nowrap;min-width:0;max-width:100%}
  .freev-premium-v4 .top-bar>.flex:last-child{display:none}
  .freev-premium-v4 .content-area{padding:.85rem .8rem calc(6.3rem + env(safe-area-inset-bottom))}
  .freev-premium-v4 .premium-workspace-head{min-height:0;padding:1.12rem 1.14rem;border-radius:17px;gap:.9rem}
  .freev-premium-v4 .premium-workspace-head h1{font-size:1.5rem}
  .freev-premium-v4 .premium-workspace-head p{font-size:.79rem}
  .freev-premium-v4 .premium-workspace-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.5rem}
  .freev-premium-v4 .premium-workspace-action{min-width:0;width:100%;font-size:.72rem;min-height:45px;white-space:normal;padding:.6rem .5rem}
  .freev-premium-v4 .premium-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:.65rem;margin-bottom:1rem}
  .freev-premium-v4 .premium-v4-stat{min-height:130px;padding:.9rem;border-radius:14px;gap:.45rem}
  .freev-premium-v4 .premium-v4-stat .text-2xl{font-size:clamp(1rem,4vw,1.28rem)}
  .freev-premium-v4 .premium-v4-stat .stat-icon{width:36px;height:36px}
  .freev-premium-v4 .premium-v4-chart-grid{grid-template-columns:minmax(0,1fr);gap:.8rem}
  .freev-premium-v4 .card{padding:1rem;border-radius:14px}
  .freev-premium-v4 .fp2-metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:.6rem}
  .freev-premium-v4 .fp2-panels{grid-template-columns:minmax(0,1fr);gap:.8rem}
  .freev-premium-v4 .premium-v4-filter-bar{padding:.7rem;gap:.6rem}
  .freev-premium-v4 .premium-v4-filter-bar>.form-input,.freev-premium-v4 .premium-v4-filter-bar>.form-select{max-width:100%!important;flex:1 1 145px}
  .freev-premium-v4 .premium-v4-filter-bar>div:has(input[type="date"]){flex:1 1 145px;min-width:0}
  .freev-premium-v4 .premium-v4-filter-bar input[type="date"]{width:100%;max-width:100%!important}
  .freev-premium-v4 .modal-content,.freev-premium-v4 .accounts-modal-content{max-width:calc(100vw - 1rem);border-radius:15px}
  .freev-premium-v4 .bottom-nav-item{min-height:46px}
}
@media(max-width:430px){
  .freev-premium-v4 .premium-stat-grid,.freev-premium-v4 .fp2-metrics{grid-template-columns:minmax(0,1fr)}
  .freev-premium-v4 .premium-v4-stat{flex-direction:row;min-height:100px;align-items:center;justify-content:flex-start;gap:.8rem}
  .freev-premium-v4 .premium-v4-stat .flex-1{flex:1;width:auto}
  .freev-premium-v4 .premium-v4-stat .text-2xl{font-size:1.28rem}
  .freev-premium-v4 .premium-workspace-head h1{font-size:1.35rem}
  .freev-premium-v4 .premium-v4-context{margin-top:.65rem}
  .freev-premium-v4 .premium-workspace-actions{grid-template-columns:1fr}
  .freev-premium-v4 .premium-workspace-action{min-height:42px}
  .freev-premium-v4 .month-picker input[type="month"]{min-width:0;width:114px}
  .freev-premium-v4 .month-nav-btn{width:30px;height:30px;min-width:30px;min-height:30px}
  .freev-premium-v4 .premium-v4-filter-bar>.form-input,.freev-premium-v4 .premium-v4-filter-bar>.form-select{flex-basis:100%}
  .freev-premium-v4 .premium-v4-filter-bar>div:has(input[type="date"]){flex-basis:100%}
}
@media(prefers-reduced-motion:reduce){.freev-premium-v4 *,.freev-premium-v4 *::before,.freev-premium-v4 *::after{scroll-behavior:auto!important;animation:none!important;transition-duration:.01ms!important}.freev-premium-v4 .premium-v4-stat:hover,.freev-premium-v4 .btn:hover{transform:none!important}}
/* Priorité sur les grilles historiques déclarées en !important par le thème V3. */
@media(min-width:769px) and (max-width:1350px){
  body.freev-premium-v3.freev-premium-v4 #dashboard-view>.premium-stat-grid {grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:430px){
  body.freev-premium-v3.freev-premium-v4 #dashboard-view>.premium-stat-grid {grid-template-columns:minmax(0,1fr)!important}
}
@media(max-width:768px){
  body.freev-premium-v3.freev-premium-v4 .sidebar {overflow-y:auto;overscroll-behavior:contain}
  body.freev-premium-v3.freev-premium-v4 .sidebar-nav {flex:none;overflow:visible}
}
/* Récurrences : différence claire entre historique protégé et périodes à venir. */
.freev-premium-v4 .rec-calendar-wrap {border:1px solid var(--border-color);border-radius:17px;background:var(--bg-card);box-shadow:var(--v4-shadow)}
.freev-premium-v4 .rec-calendar-head h3 {color:var(--text-primary);font-size:1.2rem;letter-spacing:-.025em}
.freev-premium-v4 .rec-year-controls {padding:.15rem .25rem;border:1px solid var(--v4-line);border-radius:11px;background:var(--v4-soft)}
.freev-premium-v4 .rec-month-grid {gap:.7rem}
.freev-premium-v4 .rec-month {position:relative;min-width:0;background:var(--bg-card);border:1px solid var(--v4-line);border-radius:13px;padding:.85rem;min-height:105px;box-shadow:0 2px 7px rgba(17,49,83,.025)}
.freev-premium-v4 .rec-month:hover {border-color:var(--v4-accent);box-shadow:0 6px 18px rgba(17,49,83,.09)}
.freev-premium-v4 .rec-month.is-selected {outline:2px solid var(--v4-accent);outline-offset:1px;background:var(--v4-soft)}
.freev-premium-v4 .rec-month.is-past {opacity:1;background:var(--v4-soft);border-style:dashed}
.freev-premium-v4 .rec-month.is-past .rec-month-name {color:var(--text-secondary)}
.freev-premium-v4 .rec-month strong {font-size:clamp(.92rem,1.3vw,1.1rem);overflow-wrap:anywhere}
.freev-premium-v4 .rec-month small {line-height:1.35;color:var(--text-secondary);opacity:1}
.freev-premium-v4 .rec-detail-card,.freev-premium-v4 .rec-history-card {border:1px solid var(--v4-line);border-radius:13px;background:var(--bg-card)}
.freev-premium-v4 .rec-impact-preview {border-color:var(--v4-line);background:var(--v4-soft);border-left:3px solid var(--v4-teal)}
@media(max-width:580px){.freev-premium-v4 .rec-month-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:.55rem}.freev-premium-v4 .rec-month{min-height:102px;padding:.65rem}}


/* assets/css/apple-premium.css */
/* FREEV Gestion · Edition Signature · design inspiré des principes d'interface Apple.
   Couche de présentation seule : aucun montant, événement ou état financier modifié.
   Ne requiert aucune police externe ni bibliothèque d'animation. */
body.freev-apple {
  --apple-accent:#0069d3;
  --apple-accent-hover:#005bb5;
  --apple-ink:#1d1d1f;
  --apple-muted:#6e6e73;
  --apple-surface:#ffffff;
  --apple-canvas:#f5f5f7;
  --apple-sidebar:#fafafcf2;
  --apple-outline:#e6e6eb;
  --apple-tint:#f2f6ff;
  --apple-hover:#f2f2f5;
  --apple-shadow:0 2px 8px rgba(0,0,0,.025),0 14px 35px rgba(26,33,58,.035);
  --apple-ease:cubic-bezier(.2,.7,.2,1);
  --bg-app:var(--apple-canvas);
  --bg-main:var(--apple-canvas);
  --bg-card:var(--apple-surface);
  --bg-topbar:rgba(250,250,252,.88);
  --bg-input:#fff;
  --border-color:var(--apple-outline);
  --text-primary:var(--apple-ink);
  --text-secondary:var(--apple-muted);
  --text-muted:#86868b;
  --v4-accent:var(--apple-accent);
  --v4-accent-dark:#0062c3;
  --v4-surface:var(--apple-surface);
  --v4-soft:var(--apple-tint);
  --v4-subtle:#ecf1fa;
  --v4-line:var(--apple-outline);
  --v4-shadow:var(--apple-shadow);
  font-family:-apple-system,BlinkMacSystemFont,"SF Pro Display","SF Pro Text",Inter,"Segoe UI",sans-serif;
  font-kerning:normal;
  font-feature-settings:"tnum" 1;
  letter-spacing:-.01em;
  color-scheme:light;
}
body.freev-apple.dark-mode {
  --apple-accent:#69acff;
  --apple-accent-hover:#87bdff;
  --apple-ink:#f5f5f7;
  --apple-muted:#a1a1aa;
  --apple-surface:#202126;
  --apple-canvas:#101114;
  --apple-sidebar:#1a1b20f2;
  --apple-outline:#383940;
  --apple-tint:#1b2e4a;
  --apple-hover:#2b2d34;
  --apple-shadow:0 4px 20px rgba(0,0,0,.15);
  --bg-app:var(--apple-canvas);
  --bg-main:var(--apple-canvas);
  --bg-card:var(--apple-surface);
  --bg-topbar:rgba(27,28,32,.88);
  --bg-input:#292b32;
  --border-color:var(--apple-outline);
  --text-primary:var(--apple-ink);
  --text-secondary:#b2b2bb;
  --text-muted:#9d9da8;
  --v4-accent:var(--apple-accent);
  --v4-accent-dark:var(--apple-accent);
  --v4-surface:var(--apple-surface);
  --v4-soft:var(--apple-tint);
  --v4-line:var(--apple-outline);
  --v4-shadow:var(--apple-shadow);
  color-scheme:dark;
}
body.freev-apple :is(button,input,select,textarea) {font-family:inherit}
body.freev-apple :is(button,a,input,select,textarea,[tabindex]):focus-visible {
  outline:3px solid var(--apple-accent)!important;
  outline-offset:3px;
  box-shadow:0 0 0 5px rgba(0,113,227,.12);
}
body.freev-apple :is(button,summary,a){-webkit-tap-highlight-color:transparent}
body.freev-apple .sidebar {
  width:268px;
  color:var(--apple-ink);
  background:var(--apple-sidebar);
  border-right:1px solid var(--apple-outline);
  box-shadow:none;
  -webkit-backdrop-filter:blur(20px) saturate(155%);
  backdrop-filter:blur(20px) saturate(155%);
}
body.freev-apple .sidebar-header {
  padding:1.45rem 1.25rem 1rem;
  border-bottom:0;
  background:transparent;
}
body.freev-apple .premium-brand-mark {
  background:linear-gradient(155deg,#298cff,#0064cd);
  color:#fff;
  border-radius:14px;
  box-shadow:0 5px 12px rgba(0,113,227,.16),inset 0 1px 0 rgba(255,255,255,.3);
  width:43px;height:43px;font-size:1rem;
}
body.freev-apple .premium-brand-copy strong {
  font-size:1.24rem;font-weight:760;color:var(--apple-ink);
  letter-spacing:-.055em;
}
body.freev-apple .premium-brand-copy small {
  color:var(--apple-muted);font-size:.6rem;letter-spacing:.065em;font-weight:600;
}
body.freev-apple .premium-brand-tagline {color:var(--apple-muted);font-size:.76rem;margin:.8rem 0 0}
body.freev-apple .accounts-sidebar-section {
  background:transparent;padding:.85rem .95rem .9rem;
  border-bottom:1px solid var(--apple-outline);
}
body.freev-apple .accounts-sidebar-label,
body.freev-apple .sidebar-mobile-sep,
body.freev-apple .premium-v4-tools-label {
  color:var(--apple-muted);
  font-size:.65rem;font-weight:730;letter-spacing:.06em;
}
body.freev-apple .accounts-sidebar-btn {
  border:1px solid var(--apple-outline);
  border-radius:8px;background:var(--apple-surface);
  color:var(--apple-muted);min-height:30px;padding:.3rem .55rem;
}
body.freev-apple .accounts-sidebar-btn:hover {background:var(--apple-hover);color:var(--apple-ink)}
body.freev-apple .account-sidebar-item {border-radius:10px;min-height:39px}
body.freev-apple .account-sidebar-name {color:var(--apple-ink);font-weight:550}
body.freev-apple .account-sidebar-item:hover {background:var(--apple-hover);border-color:transparent}
body.freev-apple .account-sidebar-item.active,
body.freev-apple .account-sidebar-item.group-selected {background:var(--apple-tint);border-color:rgba(0,113,227,.12)}
body.freev-apple .account-sidebar-item.active .account-sidebar-name {color:var(--apple-accent)}
body.freev-apple .sidebar-nav {padding:.75rem .65rem 1rem;scrollbar-color:#d7d7df transparent}
body.freev-apple .sidebar-nav .nav-item {
  width:calc(100% - .35rem);margin:.12rem .175rem;
  min-height:43px;padding:.63rem .85rem;gap:.82rem;
  border:0;border-radius:11px;
  box-shadow:none;background:transparent;color:var(--apple-muted);
  font:600 .81rem/1.35 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  letter-spacing:-.015em;
  transition:background-color .18s var(--apple-ease),color .18s var(--apple-ease);
}
body.freev-apple .sidebar-nav .nav-item i {width:20px;color:#91919b;font-size:.97rem;transform:none}
body.freev-apple .sidebar-nav .nav-item:hover {background:var(--apple-hover);color:var(--apple-ink);border-color:transparent}
body.freev-apple .sidebar-nav .nav-item:hover i {color:var(--apple-accent);transform:none}
body.freev-apple .sidebar-nav .nav-item.active,
body.freev-apple .sidebar-nav .nav-item[aria-current="page"] {
  background:var(--apple-tint);box-shadow:none;border-color:transparent;
  color:var(--apple-accent);font-weight:720;
}
body.freev-apple .sidebar-nav .nav-item.active i,
body.freev-apple .sidebar-nav .nav-item[aria-current="page"] i {color:var(--apple-accent)}
body.freev-apple .sidebar-nav .v4-new-badge,
body.freev-apple .sidebar-nav .v5-new-badge {box-shadow:none}
body.freev-apple .premium-v4-sidebar-tools {
  background:transparent;border-top:1px solid var(--apple-outline);
  padding:.95rem;
}
body.freev-apple .premium-v4-sidebar-tools .sidebar-action {
  min-height:41px;border-radius:10px;font-weight:630;font-size:.73rem;
  box-shadow:none;
}
body.freev-apple .premium-v4-sidebar-tools .sidebar-action-primary {
  background:var(--apple-tint);border:1px solid transparent;color:var(--apple-accent);
}
body.freev-apple .premium-v4-sidebar-tools .sidebar-action-secondary,
body.freev-apple .premium-v4-sidebar-tools .sidebar-action-storage {
  background:var(--apple-surface);border:1px solid var(--apple-outline);color:var(--apple-ink);
}
body.freev-apple .premium-v4-sidebar-tools .sidebar-action:hover {background:var(--apple-hover);color:var(--apple-ink)}
body.freev-apple .premium-v4-sidebar-tools .sidebar-action-meta {opacity:.7}
body.freev-apple .premium-v4-preferences {border-color:var(--apple-outline)}
body.freev-apple :is(.premium-v4-density-toggle,.dark-mode-toggle) {
  min-height:47px;border:1px solid var(--apple-outline);border-radius:11px;
  background:var(--apple-surface);box-shadow:none;color:var(--apple-ink);
  font-weight:600;transition:background-color .18s,border-color .18s;
}
body.freev-apple :is(.premium-v4-density-toggle,.dark-mode-toggle):hover {
  background:var(--apple-hover);border-color:var(--apple-outline);box-shadow:none;transform:none;
}
body.freev-apple .premium-v4-density-icon,
body.freev-apple .premium-v4-density-state {color:var(--apple-accent)}
body.freev-apple .premium-v4-density-label small,
body.freev-apple .theme-toggle-state {color:var(--apple-muted)}
body.freev-apple .sidebar-user-info {color:var(--apple-ink);background:var(--apple-hover);border:1px solid var(--apple-outline)}
body.freev-apple .sidebar-user-email {color:var(--apple-muted)}
/* Workspace : une seule lecture visuelle, sans bandeau décoratif agressif. */
body.freev-apple .main-content {background:var(--apple-canvas)}
body.freev-apple .top-bar {
  min-height:73px;padding:.8rem clamp(1rem,2.2vw,2.4rem);
  background:var(--bg-topbar);border-bottom:1px solid var(--apple-outline);
  box-shadow:none;z-index:12;
  -webkit-backdrop-filter:blur(18px) saturate(150%);
  backdrop-filter:blur(18px) saturate(150%);
}
body.freev-apple .content-area {padding:1.8rem clamp(1rem,2.4vw,2.7rem) 2.8rem}
body.freev-apple .top-bar .btn {min-height:38px;border-radius:11px}
body.freev-apple .month-picker {
  border:1px solid var(--apple-outline);border-radius:11px;
  background:var(--apple-surface);box-shadow:0 1px 3px rgba(0,0,0,.025);
}
body.freev-apple .month-nav-btn {border-radius:8px;color:var(--apple-muted)}
body.freev-apple .month-nav-btn:hover {background:var(--apple-hover);color:var(--apple-accent)}
body.freev-apple .view-mode-tabs {background:var(--apple-hover);border-radius:11px;gap:1px}
body.freev-apple .view-mode-tab {border-radius:8px;color:var(--apple-muted);font-weight:630}
body.freev-apple .view-mode-tab.active-mode {background:var(--apple-surface);color:var(--apple-ink);box-shadow:0 1px 4px rgba(0,0,0,.08)}
body.freev-apple .premium-workspace-head {
  min-height:0;padding:2.25rem clamp(1.3rem,2.7vw,2.75rem);margin-bottom:1.5rem;
  border:1px solid var(--apple-outline);border-radius:24px;
  background:radial-gradient(circle at 95% 10%,rgba(0,113,227,.085),transparent 43%),var(--apple-surface);
  box-shadow:var(--apple-shadow);gap:1.5rem;
}
body.freev-apple .premium-workspace-head::before,
body.freev-apple .premium-workspace-head::after {content:none}
body.freev-apple .premium-workspace-kicker {color:var(--apple-accent);letter-spacing:.09em;font-size:.62rem;font-weight:740}
body.freev-apple .premium-live-dot {background:#30b566;box-shadow:0 0 0 4px rgba(48,181,102,.11)}
body.freev-apple .premium-workspace-head h1 {
  color:var(--apple-ink);font-size:clamp(2rem,3vw,3.05rem);
  font-weight:760;line-height:1.08;letter-spacing:-.055em;
  margin:.65rem 0 .75rem;
}
body.freev-apple .premium-workspace-head p {
  color:var(--apple-muted);font-size:clamp(.83rem,1.1vw,.91rem);
  max-width:60ch;line-height:1.6;
}
body.freev-apple .premium-v4-context {
  border:1px solid var(--apple-outline);background:var(--apple-hover);
  color:var(--apple-muted);padding:.43rem .75rem;margin-top:1.05rem;
  border-radius:999px;font-size:.72rem;
}
body.freev-apple .premium-v4-context strong {color:var(--apple-ink);font-weight:700}
body.freev-apple .premium-workspace-action {min-height:43px;border-radius:11px;box-shadow:none;font-weight:670;transition:background-color .16s,transform .16s}
body.freev-apple .premium-workspace-action-primary {background:var(--apple-accent);border-color:var(--apple-accent);color:#fff}
body.freev-apple .premium-workspace-action-primary:hover {background:var(--apple-accent-hover);border-color:var(--apple-accent-hover);color:#fff}
body.freev-apple .premium-workspace-action-secondary {background:var(--apple-hover);color:var(--apple-ink);border-color:var(--apple-outline);backdrop-filter:none}
body.freev-apple .premium-workspace-action-secondary:hover {background:var(--apple-tint)}
body.freev-apple .premium-workspace-action:hover {transform:translateY(-1px);box-shadow:none}
/* KPI : chiffres en vedette, iconographie minimale, nuances différenciées. */
body.freev-apple .premium-stat-grid {gap:1rem;margin-bottom:1.55rem}
body.freev-apple .premium-v4-stat {
  border:1px solid var(--apple-outline);border-radius:20px;
  box-shadow:var(--apple-shadow);background:var(--apple-surface);
  min-height:162px;padding:1.35rem 1.4rem;gap:1.05rem;
  transition:box-shadow .2s var(--apple-ease),transform .2s var(--apple-ease);
}
body.freev-apple .premium-v4-stat::before {display:none}
body.freev-apple .premium-v4-stat:hover {border-color:var(--apple-outline);transform:translateY(-2px);box-shadow:0 10px 26px rgba(0,0,0,.06)}
body.freev-apple .premium-v4-stat .stat-icon {
  width:39px;height:39px;border-radius:12px;
  background:var(--apple-hover);color:var(--apple-accent);box-shadow:none;font-size:1rem;
}
body.freev-apple .premium-v4-stat .stat-icon i {color:inherit!important}
body.freev-apple .premium-v4-stat-income .stat-icon {background:rgba(48,181,102,.10);color:#238a4d}
body.freev-apple .premium-v4-stat-expense .stat-icon {background:rgba(255,69,58,.09);color:#d43c35}
body.freev-apple .premium-v4-stat-savings .stat-icon {background:rgba(175,82,222,.11);color:#9846ce}
body.freev-apple .premium-v4-stat .text-sm {color:var(--apple-muted);font-size:.77rem;font-weight:580}
body.freev-apple .premium-v4-stat .text-2xl {
  font-size:clamp(1.4rem,1.9vw,2.15rem);font-weight:760;letter-spacing:-.06em;
  line-height:1.15;color:var(--apple-ink);
}
body.freev-apple .premium-v4-stat-income #totalIncome {color:#248c52}
body.freev-apple .premium-v4-stat-expense #totalExpenses {color:#d63f3a}
body.freev-apple .premium-v4-stat-savings #totalSavings {color:var(--apple-ink)}
body.freev-apple .premium-v4-stat #balanceChange {color:var(--apple-muted)}
body.freev-apple :is(.card,.fp2-panel,.fp2-metric,.rec-calendar-wrap,.rec-detail-card,.rec-history-card) {
  background:var(--apple-surface);border:1px solid var(--apple-outline);
  border-radius:20px;box-shadow:var(--apple-shadow);
}
body.freev-apple .card {padding:clamp(1rem,1.7vw,1.6rem)}
body.freev-apple :is(.card,.fp2-panel):hover {box-shadow:var(--apple-shadow)}
body.freev-apple :is(.fp2-heading h2,.dashboard-chart-head h3,.card h3,.rec-calendar-head h3) {
  color:var(--apple-ink);letter-spacing:-.035em;font-weight:700;
}
body.freev-apple .fp2-heading h2 {font-size:clamp(1.35rem,1.8vw,1.8rem)}
body.freev-apple :is(.fp2-heading p,.fp2-note,.fp2-eyebrow) {color:var(--apple-muted)}
body.freev-apple .fp2-eyebrow {font-size:.62rem;letter-spacing:.08em}
body.freev-apple .fp2-metric-value {letter-spacing:-.055em}
body.freev-apple .progress-bar {height:9px;background:var(--apple-hover);border-radius:999px}
body.freev-apple .progress-fill {border-radius:999px}
/* Tableaux et formulaires : contrôle, contraste, et densité mesurée. */
body.freev-apple .table-container {
  border-radius:14px;max-width:100%;overflow-x:auto;
  border:1px solid var(--apple-outline);background:var(--apple-surface);
}
body.freev-apple .table {border-collapse:separate;border-spacing:0;width:100%}
body.freev-apple .table thead {background:var(--apple-hover)}
body.freev-apple .table th {
  color:var(--apple-muted);font-size:.68rem;text-transform:uppercase;
  letter-spacing:.045em;font-weight:690;border-color:var(--apple-outline);
  padding:.8rem .9rem;white-space:nowrap;
}
body.freev-apple .table td {padding:.88rem .9rem;border-color:var(--apple-outline);font-size:.81rem}
body.freev-apple .table tbody tr:hover {background:var(--apple-hover)}
body.freev-apple :is(.btn,.premium-workspace-action,.btn-icon) {font-weight:660}
body.freev-apple .btn {border-radius:11px;min-height:39px;box-shadow:none;transition:background-color .16s var(--apple-ease),color .16s,border-color .16s,transform .16s}
body.freev-apple .btn-primary {background:var(--apple-accent);border-color:var(--apple-accent);color:#fff;box-shadow:none}
body.freev-apple .btn-primary:hover {background:var(--apple-accent-hover);border-color:var(--apple-accent-hover);color:#fff}
body.freev-apple :is(.btn-secondary,.btn-icon) {background:var(--apple-surface);color:var(--apple-ink);border:1px solid var(--apple-outline)}
body.freev-apple :is(.btn-secondary,.btn-icon):hover {background:var(--apple-hover)}
body.freev-apple .btn:hover {transform:translateY(-1px)}
body.freev-apple .btn:active {transform:scale(.99)}
body.freev-apple :is(.form-input,.form-select,.form-textarea,input[type="month"]) {
  border-radius:11px;border-color:var(--apple-outline);
  background:var(--bg-input);color:var(--apple-ink);
  font-size:max(.84rem,14px);
}
body.freev-apple :is(.form-input,.form-select,.form-textarea):focus {
  border-color:var(--apple-accent);box-shadow:0 0 0 3px rgba(0,113,227,.13);
}
body.freev-apple .premium-v4-filter-bar {border:1px solid var(--apple-outline);border-radius:17px;background:var(--apple-surface);box-shadow:var(--apple-shadow)}
body.freev-apple :is(.modal-content,.accounts-modal-content,.v4-dialog) {
  background:var(--apple-surface);border:1px solid var(--apple-outline);
  border-radius:23px;box-shadow:0 26px 70px rgba(0,0,0,.20);
}
body.freev-apple :is(.modal-header,.modal-footer) {border-color:var(--apple-outline)}
body.freev-apple .modal-header h2 {letter-spacing:-.04em}
body.freev-apple .rec-month {
  background:var(--apple-surface);border-color:var(--apple-outline);
  border-radius:14px;box-shadow:none;
  transition:background .16s,border-color .16s;
}
body.freev-apple .rec-month:hover {background:var(--apple-hover);border-color:var(--apple-accent);box-shadow:none}
body.freev-apple .rec-month.is-selected {background:var(--apple-tint);outline:2px solid var(--apple-accent)}
body.freev-apple .rec-month.is-past {background:var(--apple-hover);border-style:dashed}
body.freev-apple .rec-impact-preview {background:var(--apple-tint);border-left:3px solid var(--apple-accent)}
body.freev-apple .bottom-nav {background:var(--bg-topbar);border-top:1px solid var(--apple-outline);backdrop-filter:blur(18px) saturate(140%)}
body.freev-apple .bottom-nav-item {color:var(--apple-muted)}
body.freev-apple .bottom-nav-item.active,
body.freev-apple .bottom-nav-item[aria-current="page"] {color:var(--apple-accent)}
body.freev-apple .bottom-nav-item.active::after {background:var(--apple-accent)}
body.freev-apple #fabAddBtn {background:var(--apple-accent);border-color:var(--apple-surface);box-shadow:0 8px 25px rgba(0,113,227,.23)}
body.freev-apple.dark-mode .premium-v4-stat-income #totalIncome {color:#5bc987}
body.freev-apple.dark-mode .premium-v4-stat-expense #totalExpenses {color:#ff857e}
body.freev-apple.dark-mode .premium-v4-stat-income .stat-icon {color:#5bc987}
body.freev-apple.dark-mode .premium-v4-stat-expense .stat-icon {color:#ff857e}
body.freev-apple.dark-mode .premium-v4-stat-savings .stat-icon {color:#d0a0fb}
body.freev-apple.dark-mode .table thead {background:var(--apple-hover)}
body.freev-apple.dark-mode .table tbody tr:hover {background:var(--apple-hover)}
/* La densité compacte reste un choix explicite, sans masquer les données. */
body.freev-apple.freev-v4-compact .premium-workspace-head {padding:1.2rem 1.5rem}
body.freev-apple.freev-v4-compact .premium-v4-stat {min-height:116px;padding:.9rem 1rem}
@media (min-width:1500px) {
  body.freev-apple .content-area {max-width:1920px;width:100%;margin:0 auto}
}
@media (max-width:1350px) {
  body.freev-apple .premium-stat-grid {grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:1050px) {
  body.freev-apple .premium-workspace-head {align-items:flex-start;flex-direction:column}
  body.freev-apple .premium-workspace-actions {justify-content:flex-start;width:100%;max-width:none}
  body.freev-apple .premium-workspace-action {width:auto}
}
@media (max-width:768px) {
  body.freev-apple .sidebar {width:min(86vw,340px)}
  body.freev-apple .sidebar-header {padding:1.2rem 1rem 1rem}
  body.freev-apple .sidebar-close-btn {color:var(--apple-ink);background:var(--apple-hover);border-color:var(--apple-outline)}
  body.freev-apple .sidebar-nav .nav-item {width:calc(100% - .3rem);min-height:46px}
  body.freev-apple .top-bar {min-height:61px;padding:.65rem .85rem;flex-wrap:nowrap}
  body.freev-apple .content-area {padding:1rem .85rem calc(6.3rem + env(safe-area-inset-bottom))}
  body.freev-apple .premium-workspace-head {border-radius:20px;padding:1.4rem 1.25rem;margin-bottom:1.1rem}
  body.freev-apple .premium-workspace-head h1 {font-size:clamp(1.6rem,6vw,2.15rem)}
  body.freev-apple .premium-workspace-actions {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.5rem}
  body.freev-apple .premium-workspace-action {width:100%;min-height:44px;font-size:.73rem}
  body.freev-apple .premium-stat-grid {grid-template-columns:repeat(2,minmax(0,1fr));gap:.7rem}
  body.freev-apple .premium-v4-stat {min-height:132px;padding:.95rem;gap:.5rem;border-radius:16px}
  body.freev-apple .premium-v4-stat .text-2xl {font-size:clamp(1.1rem,3.8vw,1.45rem)}
  body.freev-apple :is(.card,.fp2-panel,.fp2-metric,.rec-calendar-wrap) {border-radius:16px}
  body.freev-apple .premium-v4-chart-grid {grid-template-columns:1fr}
  body.freev-apple .premium-v4-filter-bar :is(input,select) {max-width:100%}
  body.freev-apple .modal-content {max-width:calc(100vw - 1rem)}
}
@media (max-width:430px) {
  body.freev-apple .premium-stat-grid {grid-template-columns:1fr}
  body.freev-apple .premium-v4-stat {flex-direction:row;align-items:center;min-height:100px;gap:.85rem}
  body.freev-apple .premium-v4-stat .flex-1 {width:auto;flex:1}
  body.freev-apple .premium-v4-stat .text-2xl {font-size:1.45rem}
  body.freev-apple .premium-workspace-actions {grid-template-columns:1fr}
  body.freev-apple .month-picker input[type="month"] {width:112px;min-width:0}
  body.freev-apple .month-nav-btn {width:30px;height:30px}
}
@media (prefers-reduced-transparency:reduce) {
  body.freev-apple .sidebar,body.freev-apple .top-bar,body.freev-apple .bottom-nav {
    backdrop-filter:none;-webkit-backdrop-filter:none;background:var(--apple-surface)
  }
}
@media (prefers-reduced-motion:reduce) {
  body.freev-apple *,body.freev-apple *::before,body.freev-apple *::after {
    animation-duration:.01ms!important;animation-iteration-count:1!important;
    transition-duration:.01ms!important;scroll-behavior:auto!important;
  }
  body.freev-apple .btn:hover,body.freev-apple .premium-v4-stat:hover,body.freev-apple .premium-workspace-action:hover {transform:none!important}
}
/* Parcours de connexion et préférences dans la même grammaire visuelle. */
body.freev-apple .auth-overlay {background:rgba(17,19,27,.58);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px)}
body.freev-apple .auth-card {
  border-radius:25px;border:1px solid var(--apple-outline);
  background:var(--apple-surface);color:var(--apple-ink);
  box-shadow:0 28px 80px rgba(0,0,0,.2);
}
body.freev-apple .auth-logo {color:var(--apple-ink);letter-spacing:-.05em}
body.freev-apple .auth-logo i {color:var(--apple-accent)}
body.freev-apple .auth-tabs {background:var(--apple-hover);border-radius:12px}
body.freev-apple .auth-tab {border-radius:9px}
body.freev-apple .auth-tab.active {background:var(--apple-surface);color:var(--apple-accent);box-shadow:0 1px 5px rgba(0,0,0,.07)}
body.freev-apple :is(.rec-year-controls,.fp2-alert,.account-card-modal) {border-color:var(--apple-outline);border-radius:13px}
body.freev-apple .rec-year-controls {background:var(--apple-hover)}
body.freev-apple .dark-mode-toggle[aria-pressed="true"] {
  background:var(--apple-surface);border-color:var(--apple-outline);color:var(--apple-ink)
}
body.freev-apple .dark-mode-toggle[aria-pressed="true"] .theme-toggle-state {color:var(--apple-muted)}
body.freev-apple :is(.dark-mode-toggle,.premium-v4-density-toggle):active {transform:scale(.995)}
@media (max-width:430px) {
  body.freev-apple :is(.form-input,.form-select,.form-textarea) {font-size:16px}
  body.freev-apple .sidebar-nav .nav-item {min-height:44px}
}

/* Contraste AA des boutons en mode sombre (texte foncé sur bleu clair). */
body.freev-apple.dark-mode :is(.btn-primary,.premium-workspace-action-primary) {color:#101a2b}
body.freev-apple.dark-mode :is(.btn-primary,.premium-workspace-action-primary):hover {color:#101a2b}


/* assets/css/signature2.css */
/* FREEV Gestion · Signature 2.0 · presentation only.
   Motion: opacity/transform only; no remote fonts, no financial-data mutations. */
body.freev-apple {
  --signature-blue:#0069d3;
  --signature-ring:rgba(0,105,211,.14);
  --signature-raise:0 12px 28px rgba(35,45,75,.075);
  --signature-chart-grid:rgba(112,117,127,.11);
  --signature-green:#21864d;
  --signature-red:#d63f3a;
}
body.freev-apple.dark-mode {
  --signature-blue:#69acff;
  --signature-ring:rgba(105,172,255,.22);
  --signature-raise:0 12px 36px rgba(0,0,0,.24);
  --signature-chart-grid:rgba(195,199,216,.11);
  --signature-green:#5bc987;
  --signature-red:#ff857e;
}
/* Cohesive shell: calm layering, readable navigational hierarchy. */
body.freev-apple .main-content {min-width:0}
body.freev-apple .content-area {min-width:0}
body.freev-apple .premium-workspace-head {
  position:relative;
  background:var(--apple-surface);
  border:1px solid var(--apple-outline);
  box-shadow:var(--apple-shadow);
  overflow:hidden;
}
body.freev-apple .premium-workspace-head::before {
  content:"";position:absolute;inset:0 0 auto;height:3px;
  background:linear-gradient(90deg,var(--signature-blue),transparent 74%);
  opacity:.65;pointer-events:none;
}
body.freev-apple .premium-workspace-head h1 {line-height:1.13;letter-spacing:-.055em}
body.freev-apple .premium-v4-stat,
body.freev-apple .dashboard-chart-card,
body.freev-apple .fp2-panel,
body.freev-apple .fp2-metric {isolation:isolate}
body.freev-apple .premium-v4-stat .text-2xl {font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
/* Financial charts: focus on the data instead of heavy decorations. */
body.freev-apple .premium-v4-chart-grid {gap:clamp(.8rem,1.6vw,1.4rem)}
body.freev-apple .dashboard-chart-card {min-width:0;padding:clamp(1.1rem,1.7vw,1.65rem);border-radius:23px}
body.freev-apple .dashboard-chart-head {align-items:flex-start;gap:.75rem}
body.freev-apple .dashboard-chart-head h3 {font-size:clamp(1rem,1.45vw,1.25rem);font-weight:750;letter-spacing:-.035em}
body.freev-apple .dashboard-chart-head p {color:var(--apple-muted);line-height:1.5}
body.freev-apple .dashboard-chart-toolbar {column-gap:.9rem;row-gap:.65rem;flex-wrap:wrap}
body.freev-apple .dashboard-chart-segment {
  border:1px solid var(--apple-outline);border-radius:12px;
  padding:3px;background:var(--apple-hover);
}
body.freev-apple .dashboard-chart-segment button {border-radius:9px;min-height:34px;transition:color .16s,background-color .16s,box-shadow .16s}
body.freev-apple .dashboard-chart-segment button.active,
body.freev-apple .dashboard-chart-segment button[aria-pressed="true"] {
  background:var(--apple-surface);color:var(--apple-ink);
  box-shadow:0 1px 4px rgba(0,0,0,.075);
}
body.freev-apple .dashboard-chart-toggle {
  gap:.5rem;color:var(--apple-muted);font-size:.75rem;line-height:1.35;white-space:nowrap;
}
body.freev-apple .dashboard-chart-toggle input {
  width:1.125rem;height:1.125rem;flex:0 0 1.125rem;
}
body.freev-apple .dashboard-chart-card .chart-container {width:100%;min-width:0;overflow:hidden;border-radius:14px}
body.freev-apple .dashboard-chart-summary {
  color:var(--apple-muted);font-size:.78rem;line-height:1.6;
  border-top:1px solid var(--apple-outline);padding-top:.75rem;
}
body.freev-apple .dashboard-chart-empty {color:var(--apple-muted)}
/* Subtle and efficient hover/press feedback, only for real pointer devices. */
@media (hover:hover) and (pointer:fine) {
  body.freev-apple .premium-v4-stat:hover {box-shadow:var(--signature-raise);transform:translate3d(0,-2px,0)}
  body.freev-apple .dashboard-chart-card:hover {box-shadow:var(--signature-raise)}
  body.freev-apple .sidebar-nav .nav-item:hover {transform:translateX(2px)}
  body.freev-apple .btn-primary:hover,
  body.freev-apple .premium-workspace-action-primary:hover {filter:brightness(1.05)}
}
body.freev-apple .sidebar-nav .nav-item {transition:background-color .17s,color .17s,transform .17s}
body.freev-apple :is(.btn,.premium-workspace-action,.bottom-nav-item,.nav-item):active {transform:scale(.985)}
body.freev-apple .bottom-nav-item[aria-current="page"] i {color:var(--signature-blue)}
body.freev-apple .bottom-nav-item:focus-visible {outline-offset:-3px}
body.freev-apple .btn-primary:focus-visible {box-shadow:0 0 0 5px var(--signature-ring)}
body.freev-apple .rec-month.is-past {opacity:.9}
body.freev-apple .rec-month.is-past:is(:hover,:focus-visible) {opacity:1}
/* Tables can scroll without expanding the app beyond the viewport. */
body.freev-apple .table-container {overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}
body.freev-apple .table-container .table {min-width:max-content}
/* Dialogs should remain usable with very short viewports / mobile keyboards. */
body.freev-apple :is(.modal-content,.accounts-modal-content,.v4-dialog) {max-height:min(92dvh,920px);overflow-y:auto;overscroll-behavior:contain}
body.freev-apple .modal-content:focus-visible {outline-offset:-3px}
@media (max-width:768px) {
  body.freev-apple.freev-mobile-nav-open {overflow:hidden;touch-action:none}
  body.freev-apple .content-area {padding-bottom:calc(7.75rem + env(safe-area-inset-bottom))}
  body.freev-apple .premium-workspace-head {padding:1.15rem;gap:.9rem}
  body.freev-apple .premium-v4-chart-grid {gap:.8rem}
  body.freev-apple .dashboard-chart-card {padding:1rem;border-radius:18px}
  body.freev-apple .dashboard-chart-toolbar {align-items:flex-start}
  body.freev-apple .dashboard-chart-segment button {min-height:42px;min-width:45px}
  body.freev-apple .bottom-nav {
    padding-bottom:calc(.4rem + env(safe-area-inset-bottom));
    padding-left:max(.4rem,env(safe-area-inset-left));
    padding-right:max(.4rem,env(safe-area-inset-right));
  }
  body.freev-apple .bottom-nav-item {min-height:43px;min-width:0;gap:1px}
  body.freev-apple .bottom-nav-item i {transition:color .18s,background-color .18s,transform .18s}
  body.freev-apple .bottom-nav-item[aria-current="page"] {
    background:var(--apple-tint);color:var(--signature-blue);
  }
  body.freev-apple .bottom-nav-item[aria-current="page"] i {transform:translateY(-1px);background:transparent}
  body.freev-apple .bottom-nav-item::after {display:none}
  body.freev-apple #fabAddBtn {z-index:11}
}
@media (max-width:390px) {
  body.freev-apple .dashboard-chart-head {flex-wrap:wrap}
  body.freev-apple .dashboard-chart-toolbar {gap:.45rem}
  body.freev-apple .dashboard-chart-toggle {width:100%}
  body.freev-apple .premium-workspace-actions {display:grid;grid-template-columns:1fr;min-width:0}
  body.freev-apple .bottom-nav-item {font-size:.58rem}
  body.freev-apple .bottom-nav-item i {font-size:.95rem}
}
@media (prefers-contrast:more) {
  body.freev-apple .dashboard-chart-card,
  body.freev-apple .premium-v4-stat,
  body.freev-apple .bottom-nav {border-color:var(--apple-muted)}
}
@media (prefers-reduced-transparency:reduce) {
  body.freev-apple .bottom-nav,
  body.freev-apple .top-bar,
  body.freev-apple .sidebar {backdrop-filter:none;-webkit-backdrop-filter:none;background:var(--apple-surface)}
}
@media (prefers-reduced-motion:reduce) {
  body.freev-apple .dashboard-chart-card,
  body.freev-apple .premium-v4-stat,
  body.freev-apple .nav-item,
  body.freev-apple .bottom-nav-item,
  body.freev-apple .bottom-nav-item i {animation:none!important;transition:none!important;transform:none!important}
}

/* Signature 2.1 · composition inspirée du tableau de bord de référence,
   avec la palette FREEV bleu cobalt / turquoise et les commandes existantes. */
body.freev-apple {
  --signature-blue:#1f61db;
  --signature-teal:#139b81;
  --signature-green:#187b68;
  --signature-ring:rgba(31,97,219,.16);
  --apple-accent:var(--signature-blue);
  --apple-accent-hover:#194ebd;
  --apple-canvas:#f5f5f7;
  --apple-sidebar:rgba(250,252,255,.94);
  --apple-outline:#e2e8f0;
  --apple-tint:#edf4ff;
  --apple-hover:#f1f4f8;
  --apple-shadow:0 1px 2px rgba(18,39,69,.035),0 13px 34px rgba(18,39,69,.045);
  --v4-accent:var(--signature-blue);
  --v4-accent-dark:#194ebd;
  --v4-teal:var(--signature-teal);
  --v4-line:var(--apple-outline);
  --v4-soft:var(--apple-tint);
  --v4-shadow:var(--apple-shadow);
  --bg-app:var(--apple-canvas);
  --bg-main:var(--apple-canvas);
}
body.freev-apple.dark-mode {
  --signature-blue:#83b5ff;
  --signature-teal:#54d2b2;
  --signature-green:#54d2b2;
  --signature-ring:rgba(131,181,255,.22);
  --apple-accent:var(--signature-blue);
  --apple-accent-hover:#a3c9ff;
  --v4-accent:var(--signature-blue);
  --v4-accent-dark:var(--signature-blue);
  --v4-teal:var(--signature-teal);
}

/* Rail latéral compact : les noms restent présents pour les lecteurs d’écran
   et disponibles au survol des icônes. Le tiroir mobile conserve ses libellés. */
@media (min-width:768px) {
  body.freev-apple .sidebar {
    width:86px;flex:0 0 86px;align-items:center;
    border-right:1px solid var(--apple-outline);box-shadow:none;
  }
  body.freev-apple .sidebar-header {
    width:100%;padding:.95rem .45rem .85rem;border-bottom:1px solid var(--apple-outline);
  }
  body.freev-apple .premium-brand {flex-direction:column;align-items:center;gap:.35rem}
  body.freev-apple .premium-brand-mark {
    width:43px;height:43px;border-radius:15px;
    background:linear-gradient(145deg,#2582ee,#1f61db 62%,#139b81);
    box-shadow:0 7px 18px rgba(31,97,219,.2);color:#fff;
  }
  body.freev-apple .premium-brand-copy {display:flex;align-items:center}
  body.freev-apple .premium-brand-copy strong {font-size:.72rem;letter-spacing:.08em}
  body.freev-apple .premium-brand-copy small,
  body.freev-apple .premium-brand-tagline {display:none}
  body.freev-apple .accounts-sidebar-section {
    width:100%;padding:.65rem .2rem .55rem;border-bottom:1px solid var(--apple-outline);
  }
  body.freev-apple .accounts-sidebar-header {position:relative;justify-content:center;margin:0 0 .45rem}
  body.freev-apple .accounts-sidebar-label {
    position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;
    clip:rect(0,0,0,0);white-space:nowrap;border:0;
  }
  body.freev-apple .accounts-sidebar-actions {justify-content:center;gap:.3rem}
  body.freev-apple .accounts-sidebar-btn {
    width:30px;height:30px;min-height:30px;padding:0;justify-content:center;
    border-radius:10px;font-size:0;
  }
  body.freev-apple .accounts-sidebar-btn i {font-size:.7rem}
  body.freev-apple #accountsSidebarList {max-height:23vh;overflow:auto;scrollbar-width:none}
  body.freev-apple #accountsSidebarList::-webkit-scrollbar {display:none}
  body.freev-apple .account-sidebar-item {
    position:relative;width:48px;min-height:46px;margin:.18rem auto;padding:.25rem;
    justify-content:center;border-color:transparent;border-radius:14px;
  }
  body.freev-apple .account-sidebar-name {
    position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;
    clip:rect(0,0,0,0);white-space:nowrap;border:0;
  }
  body.freev-apple .account-avatar {width:32px;height:32px;font-size:.68rem!important}
  body.freev-apple .account-sidebar-check {
    position:absolute;right:1px;top:0;width:15px;height:15px;display:grid;place-items:center;
    border:2px solid var(--apple-sidebar);border-radius:50%;background:var(--apple-surface);
    font-size:.48rem;
  }
  body.freev-apple .sidebar-nav {
    width:100%;min-height:0;flex:1 1 auto;padding:.65rem .35rem 1rem;overflow-x:hidden;overflow-y:auto;
  }
  body.freev-apple .sidebar-nav .nav-item {
    position:relative;width:50px;min-height:49px;margin:.19rem auto;padding:0;
    justify-content:center;gap:0;border:1px solid transparent;border-radius:15px;
  }
  body.freev-apple .sidebar-nav .nav-item > span:not(.v4-new-badge):not(.v5-new-badge) {
    position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;
    clip:rect(0,0,0,0);white-space:nowrap;border:0;
  }
  body.freev-apple .sidebar-nav .nav-item i {width:auto;font-size:1.05rem}
  body.freev-apple .sidebar-nav .nav-item.active,
  body.freev-apple .sidebar-nav .nav-item[aria-current="page"] {
    background:var(--apple-tint);color:var(--signature-blue);box-shadow:none;
  }
  body.freev-apple .sidebar-nav .nav-item.active i,
  body.freev-apple .sidebar-nav .nav-item[aria-current="page"] i {color:var(--signature-blue)}
  body.freev-apple .premium-v4-sidebar-tools {
    display:flex;flex:0 0 auto;flex-direction:column;align-items:center;gap:.22rem;
    width:100%;padding:.6rem .3rem calc(.65rem + env(safe-area-inset-bottom));border-top:1px solid var(--apple-outline);
  }
  body.freev-apple .premium-v4-sidebar-tools .sidebar-user-info {
    display:flex;flex:0 0 48px;align-items:center;justify-content:center;
    width:48px;height:48px;min-height:48px;margin:0 0 .12rem;padding:0;
    overflow:hidden;border:1px solid var(--apple-outline);border-radius:16px;
    background:var(--apple-hover);cursor:default;
  }
  body.freev-apple .premium-v4-sidebar-tools .sidebar-user-avatar {
    display:grid;place-items:center;width:35px;height:35px;flex:0 0 35px;
    border:2px solid var(--apple-surface);border-radius:50%;
    background:linear-gradient(145deg,#638cff,var(--signature-blue));
    color:#fff;font-size:.78rem;font-weight:750;box-shadow:0 3px 8px rgba(31,97,219,.16);
  }
  body.freev-apple .premium-v4-sidebar-tools .sidebar-user-email {
    position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;
    clip:rect(0,0,0,0);white-space:nowrap;border:0;
  }
  body.freev-apple .premium-v4-sidebar-tools .cloud-sync-badge {
    display:inline-flex;align-items:center;justify-content:center;flex:0 0 36px;
    width:36px;height:36px;min-height:36px;margin:0 auto;padding:0;gap:0;
    overflow:hidden;border:1px solid transparent;border-radius:13px;
    font-size:0;line-height:1;transition:background-color .18s,color .18s,border-color .18s,transform .18s;
  }
  body.freev-apple .premium-v4-sidebar-tools .cloud-sync-badge.synced {
    background:rgba(19,155,129,.12);border-color:rgba(19,155,129,.14);color:#13866f;
  }
  body.freev-apple .premium-v4-sidebar-tools .cloud-sync-badge.syncing {
    background:var(--apple-tint);border-color:var(--apple-outline);color:var(--signature-blue);
  }
  body.freev-apple .premium-v4-sidebar-tools .cloud-sync-badge.offline {
    background:var(--apple-hover);border-color:var(--apple-outline);color:var(--apple-muted);
  }
  body.freev-apple .premium-v4-sidebar-tools .cloud-sync-badge i {font-size:.9rem}
  body.freev-apple .premium-v4-sidebar-tools .cloud-sync-badge .auth-spinner {margin:0}
  body.freev-apple .premium-v4-sidebar-tools > .sidebar-auth-action {
    width:42px;min-width:42px;min-height:42px;height:42px;margin:.05rem auto 0!important;padding:0;
    display:flex;align-items:center;justify-content:center;gap:0;border-radius:14px;font-size:0;
    transition:background-color .18s,color .18s,border-color .18s,box-shadow .18s,transform .18s;
  }
  body.freev-apple .premium-v4-sidebar-tools > #sidebarLogoutBtn {
    background:rgba(214,63,58,.09);color:var(--signature-red);border:1px solid rgba(214,63,58,.2);
  }
  body.freev-apple .premium-v4-sidebar-tools > #sidebarLoginBtn {
    background:var(--signature-blue);color:#fff;border:1px solid transparent;
  }
  body.freev-apple .premium-v4-sidebar-tools > .sidebar-auth-action i {font-size:.95rem}
  body.freev-apple .premium-v4-sidebar-tools :is(.sidebar-auth-action,.cloud-sync-badge):focus-visible {
    outline:0;box-shadow:0 0 0 4px var(--signature-ring);
  }
  @keyframes sidebarToolEnter {
    from {opacity:0;transform:translateY(5px) scale(.96)}
    to {opacity:1;transform:translateY(0) scale(1)}
  }
  body.freev-apple .premium-v4-sidebar-tools :is(.sidebar-user-info,.cloud-sync-badge,.sidebar-auth-action) {
    animation:sidebarToolEnter .22s var(--apple-ease) both;
  }
  body.freev-apple .premium-v4-sidebar-tools > .btn {
    width:42px;min-width:42px;min-height:42px;height:42px;margin:.05rem auto 0!important;padding:0;
    justify-content:center;font-size:0;border-radius:14px;
  }
  body.freev-apple .premium-v4-sidebar-tools > .btn i {font-size:.95rem}

  /* La barre de commande reprend la forme capsule de la référence. */
  body.freev-apple .top-bar {
    min-height:68px;margin:.75rem .9rem 0;padding:.55rem .7rem;
    gap:.55rem;border:1px solid var(--apple-outline);border-radius:20px;
    background:var(--bg-topbar);box-shadow:0 5px 18px rgba(21,39,66,.045);
  }
  body.freev-apple .top-bar > .flex:first-child {flex:0 0 auto;gap:.55rem;min-width:0}
  body.freev-apple .top-bar > .flex:last-child {
    flex:1 1 auto;justify-content:flex-end;gap:.38rem;flex-wrap:nowrap;min-width:0;
  }
  body.freev-apple .top-bar .btn {min-height:39px;border-radius:13px;white-space:nowrap}
  body.freev-apple .top-bar .btn-secondary {background:transparent;border-color:transparent}
  body.freev-apple .top-bar .btn-secondary:hover {background:var(--apple-hover);border-color:var(--apple-outline)}
  body.freev-apple .month-picker {min-height:42px;border-radius:999px;padding:.15rem .35rem}
  body.freev-apple .view-mode-tabs {padding:.2rem;border-radius:999px;gap:.12rem}
  body.freev-apple .view-mode-tab {min-height:34px;padding:.45rem .72rem;border-radius:999px}
  body.freev-apple .view-mode-tab.active-mode {
    background:var(--signature-blue);color:#fff;box-shadow:0 3px 9px rgba(31,97,219,.2);
  }
  body.freev-apple .view-mode-tab.active-mode i {color:inherit}

  /* En-tête discret pour laisser place aux chiffres et aux graphiques. */
  body.freev-apple .content-area {padding:.4rem clamp(1rem,2.1vw,2rem) 2.5rem}
  body.freev-apple .premium-workspace-head {
    display:flex;flex-direction:row;align-items:center;justify-content:space-between;
    min-height:0;margin:.25rem 0 .65rem;padding:.75rem .2rem;
    border:0;border-radius:0;background:transparent;box-shadow:none;overflow:visible;
  }
  body.freev-apple .premium-workspace-head::before,
  body.freev-apple .premium-workspace-head::after {content:none}
  body.freev-apple .premium-workspace-intro {min-width:0}
  body.freev-apple .premium-workspace-head h1 {
    margin:.28rem 0 .3rem;font-size:clamp(1.65rem,2.2vw,2.25rem);line-height:1.12;
  }
  body.freev-apple .premium-workspace-head p {font-size:.84rem;line-height:1.45}
  body.freev-apple .premium-v4-context {margin-top:.6rem;padding:.36rem .68rem}
  body.freev-apple .premium-workspace-head .premium-v4-context {display:none}
  body.freev-apple .premium-workspace-actions {flex:0 0 auto;gap:.5rem}
  body.freev-apple .premium-workspace-action {min-height:41px;border-radius:13px}
  body.freev-apple .premium-workspace-action-primary {box-shadow:0 5px 13px rgba(31,97,219,.16)}
}

/* Résumé puis grand graphique, comme la hiérarchie de la photo. */
body.freev-apple .premium-workspace-head .premium-v4-context {display:none}
body.freev-apple .premium-stat-grid {gap:.78rem;margin-bottom:1rem}
body.freev-apple .premium-v4-stat {
  min-height:132px;padding:1rem 1.1rem;gap:.7rem;border-radius:18px;
  box-shadow:0 1px 2px rgba(18,39,69,.025),0 8px 22px rgba(18,39,69,.035);
}
body.freev-apple .premium-v4-stat .stat-icon {width:35px;height:35px;border-radius:11px}
body.freev-apple .premium-v4-stat-balance .stat-icon {background:rgba(31,97,219,.1);color:var(--signature-blue)}
body.freev-apple .premium-v4-stat-savings .stat-icon {background:rgba(19,155,129,.11);color:var(--signature-teal)}
body.freev-apple .premium-v4-stat-income .stat-icon {background:rgba(19,155,129,.1);color:var(--signature-teal)}
body.freev-apple .premium-v4-stat-income #totalIncome {color:#187b68}
body.freev-apple .premium-v4-stat .text-2xl {font-size:clamp(1.3rem,1.7vw,1.75rem)}
body.freev-apple .premium-v4-chart-grid {grid-template-columns:minmax(0,1fr);gap:.8rem;margin-bottom:1.15rem}
body.freev-apple .dashboard-chart-card {
  padding:clamp(1rem,1.5vw,1.45rem);border-radius:21px;
  box-shadow:0 1px 2px rgba(18,39,69,.025),0 9px 25px rgba(18,39,69,.04);
}
body.freev-apple .dashboard-chart-card .chart-container {height:clamp(260px,34vw,360px);padding:.6rem .15rem}
body.freev-apple .dashboard-chart-toolbar {align-items:center;margin:.55rem 0 .25rem}
body.freev-apple .dashboard-chart-segment {border-radius:999px;padding:3px}
body.freev-apple .dashboard-chart-segment button {border-radius:999px}
body.freev-apple .dashboard-chart-segment button.active,
body.freev-apple .dashboard-chart-segment button[aria-pressed="true"] {
  background:var(--signature-blue);color:#fff;box-shadow:0 2px 7px rgba(31,97,219,.18);
}
body.freev-apple .dashboard-chart-card .btn-icon {border-radius:12px}
@media (min-width:1000px) {
  body.freev-apple .premium-stat-grid,
  body.freev-apple.freev-premium-v3.freev-premium-v4 #dashboard-view > .premium-stat-grid {
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
  }
  body.freev-apple .premium-v4-stat {min-height:112px}
  body.freev-apple .dashboard-chart-card {position:relative}
  body.freev-apple .dashboard-chart-head > div {max-width:clamp(16rem,38vw,28rem)}
  body.freev-apple .dashboard-chart-toolbar {
    position:absolute;top:1.08rem;right:5rem;max-width:calc(100% - 30rem);
    justify-content:flex-end;flex-wrap:nowrap;margin:0;
  }
  body.freev-apple .dashboard-chart-toggle {white-space:nowrap}
  body.freev-apple .dashboard-chart-card .chart-container {margin-top:.35rem}
}
@media (min-width:1000px) and (max-width:1250px) {
  body.freev-apple .premium-workspace-actions {width:auto;max-width:none;display:flex}
  body.freev-apple .premium-workspace-action {width:auto;white-space:nowrap}
  body.freev-apple .premium-workspace-add-wrap {width:auto}
}

/* Les vues et indicateurs utilisent les transitions déjà optimisées de FREEV. */
body.freev-apple :is(.sidebar-nav .nav-item,.premium-v4-stat,.dashboard-chart-card,.btn,.premium-workspace-action) {
  transition-timing-function:var(--apple-ease);
}
@media (hover:hover) and (pointer:fine) {
  body.freev-apple .sidebar-nav .nav-item:hover {transform:translateY(-1px)}
  body.freev-apple .premium-v4-stat:hover {transform:translateY(-2px);box-shadow:var(--signature-raise)}
}
@media (min-width:768px) and (max-width:1050px) {
  body.freev-apple .top-bar {flex-wrap:wrap}
  body.freev-apple .top-bar > .flex:last-child {flex:1 1 100%;justify-content:flex-end}
  body.freev-apple .premium-workspace-head {align-items:flex-start;flex-direction:column}
  body.freev-apple .premium-workspace-actions {width:auto;max-width:100%;flex-wrap:wrap}
}
@media (min-width:768px) and (max-width:1220px) {
  body.freev-apple .top-bar .v4-search-trigger > span,
  body.freev-apple .top-bar .v4-search-trigger > kbd {display:none}
  body.freev-apple .top-bar > .flex:last-child > .btn-secondary {
    width:41px;min-width:41px;padding:.4rem;font-size:0;justify-content:center;
  }
  body.freev-apple .top-bar > .flex:last-child > .btn-secondary i {font-size:.9rem}
  body.freev-apple .top-bar > .flex:last-child > .btn-primary {font-size:0;gap:0}
  body.freev-apple .top-bar > .flex:last-child > .btn-primary i {font-size:.9rem}
  body.freev-apple .top-bar > .flex:last-child > .btn-primary::after {
    content:"Ajouter";font-size:.78rem;font-weight:680;
  }
}
@media (max-width:767px) {
  body.freev-apple .top-bar {
    min-height:0;margin:.45rem .5rem 0;padding:.4rem .5rem;border:1px solid var(--apple-outline);
    border-radius:17px;background:var(--bg-topbar);box-shadow:0 4px 14px rgba(21,39,66,.04);
    flex-wrap:wrap;justify-content:center;gap:.3rem;
  }
  body.freev-apple .top-bar > .flex:first-child {
    flex:1 1 100%;width:100%;max-width:none;justify-content:center;flex-wrap:wrap;gap:.3rem;
  }
  body.freev-apple .top-bar #viewModeTabs {
    display:flex!important;flex:0 1 auto;max-width:100%;overflow-x:auto;
  }
  body.freev-apple .top-bar .month-picker {flex:0 1 232px;justify-content:space-between;max-width:100%}
  body.freev-apple .top-bar .view-mode-tab {min-height:34px;padding:.35rem .55rem;font-size:.68rem}
  body.freev-apple .content-area {padding-top:.45rem}
  body.freev-apple .premium-workspace-head {
    align-items:stretch;flex-direction:column;gap:.4rem;margin:.12rem 0 .5rem;padding:.3rem .05rem;
    min-height:0;border:0;border-radius:0;background:transparent;box-shadow:none;overflow:visible;
  }
  body.freev-apple .premium-workspace-head::before,
  body.freev-apple .premium-workspace-head::after {content:none}
  body.freev-apple .premium-workspace-head h1 {font-size:clamp(1.55rem,6vw,2rem)}
  body.freev-apple .premium-workspace-head p {font-size:.8rem}
  body.freev-apple .premium-workspace-head .premium-v4-context {display:none}
  body.freev-apple .premium-workspace-actions {
    display:grid;width:100%;max-width:none;grid-template-columns:repeat(2,minmax(0,1fr));
    justify-content:stretch;gap:.45rem;
  }
  body.freev-apple .premium-workspace-action {width:100%;min-width:0;min-height:43px;padding:.5rem .45rem}
  body.freev-apple .premium-workspace-add-wrap {width:100%;min-width:0}
  body.freev-apple .premium-stat-grid {gap:.65rem;margin-bottom:.8rem}
  body.freev-apple .premium-v4-stat {min-height:116px;padding:.85rem;border-radius:16px}
  body.freev-apple .dashboard-chart-card .chart-container {height:275px;padding:.35rem 0}
  body.freev-apple #fabAddBtn {display:none!important}
}
@media (min-width:768px) and (max-width:999px) {
  body.freev-apple .dashboard-chart-toolbar {position:static;max-width:none;justify-content:flex-start;margin:.55rem 0 .25rem;flex-wrap:wrap}
}
@media (max-width:430px) {
  body.freev-apple .premium-workspace-actions {display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
  body.freev-apple .premium-workspace-action {width:100%;font-size:.72rem}
  body.freev-apple .premium-v4-stat {min-height:98px}
  body.freev-apple .dashboard-chart-card .chart-container {height:245px}
}
@media (max-width:360px) {
  body.freev-apple .premium-workspace-actions {grid-template-columns:1fr}
}
@media (prefers-reduced-transparency:reduce) {
  body.freev-apple .top-bar,body.freev-apple .sidebar {backdrop-filter:none;-webkit-backdrop-filter:none;background:var(--apple-surface)}
}
@media (prefers-reduced-motion:reduce) {
  body.freev-apple :is(.sidebar-nav .nav-item,.premium-v4-stat,.dashboard-chart-card,.btn,.premium-workspace-action) {
    transition-duration:.01ms!important;transform:none!important;
  }
  body.freev-apple .premium-v4-sidebar-tools :is(.sidebar-user-info,.cloud-sync-badge,.sidebar-auth-action) {
    animation:none!important;transition:none!important;transform:none!important;
  }
}

/* Signature 2.2 · transitions cohérentes et entrées plus soignées. */
body.freev-apple {
  --signature-motion-ease:cubic-bezier(.2,.7,.2,1);
  --signature-motion-fast:160ms;
  --signature-motion-surface:240ms;
}
body.freev-apple :is(.card,.fp2-panel,.fp2-metric,.premium-v4-stat,.dashboard-chart-card,.rec-calendar-wrap,.rec-detail-card,.rec-history-card) {
  transition:transform var(--signature-motion-surface) var(--signature-motion-ease),
    box-shadow var(--signature-motion-surface) var(--signature-motion-ease),
    border-color var(--signature-motion-fast) ease,
    background-color var(--signature-motion-fast) ease;
}
body.freev-apple :is(.btn,.btn-icon,.premium-workspace-action,.dashboard-chart-segment button,.view-mode-tab,.v4-horizon button,.v42-presets button) {
  transition:transform var(--signature-motion-fast) var(--signature-motion-ease),
    box-shadow var(--signature-motion-fast) var(--signature-motion-ease),
    color var(--signature-motion-fast) ease,
    background-color var(--signature-motion-fast) ease,
    border-color var(--signature-motion-fast) ease;
}
body.freev-apple .btn > .fa-arrow-right,
body.freev-apple .btn > .fa-chevron-right {transition:transform var(--signature-motion-fast) var(--signature-motion-ease)}
body.freev-apple .freev-button-ripple {background:color-mix(in srgb,var(--signature-teal) 20%,transparent)}
body.freev-apple :is(.btn-primary,.premium-workspace-action-primary) .freev-button-ripple {background:rgba(255,255,255,.34)}

@keyframes freevSurfaceEnter {
  from {opacity:0;transform:translate3d(0,9px,0) scale(.992)}
  to {opacity:1;transform:translate3d(0,0,0) scale(1)}
}
body.freev-apple .view-enter :is(.premium-stat-grid,.premium-v4-chart-grid,.fp2-metrics,.fp2-panels,.v4-layout) > * {
  animation:freevSurfaceEnter .29s var(--signature-motion-ease) both;
}
body.freev-apple .view-enter :is(.premium-stat-grid,.premium-v4-chart-grid,.fp2-metrics,.fp2-panels,.v4-layout) > :nth-child(2) {animation-delay:28ms}
body.freev-apple .view-enter :is(.premium-stat-grid,.premium-v4-chart-grid,.fp2-metrics,.fp2-panels,.v4-layout) > :nth-child(3) {animation-delay:56ms}
body.freev-apple .view-enter :is(.premium-stat-grid,.premium-v4-chart-grid,.fp2-metrics,.fp2-panels,.v4-layout) > :nth-child(4) {animation-delay:84ms}

@keyframes freevBackdropIn {from {opacity:0} to {opacity:1}}
@keyframes freevDialogIn {
  from {opacity:0;transform:translate3d(0,12px,0) scale(.985)}
  to {opacity:1;transform:translate3d(0,0,0) scale(1)}
}
body.freev-apple .modal-overlay:not(.hidden) {animation:freevBackdropIn .2s ease-out both}
body.freev-apple .modal-overlay:not(.hidden) > :is(.modal-content,.accounts-modal-content) {
  animation:freevDialogIn .3s var(--signature-motion-ease) both;
}

@keyframes freevPopoverIn {
  from {opacity:0;transform:translate3d(0,-5px,0) scale(.985)}
  to {opacity:1;transform:translate3d(0,0,0) scale(1)}
}
@keyframes freevMenuItemIn {from {opacity:0;transform:translate3d(0,4px,0)} to {opacity:1;transform:translate3d(0,0,0)}}
body.freev-apple .premium-workspace-add-panel:not([hidden]) {
  transform-origin:top right;
  animation:freevPopoverIn .2s var(--signature-motion-ease) both;
}
body.freev-apple .premium-workspace-add-panel:not([hidden]) .premium-workspace-add-item:not([hidden]) {
  animation:freevMenuItemIn .19s var(--signature-motion-ease) both;
}
body.freev-apple .premium-workspace-add-panel:not([hidden]) .premium-workspace-add-item:nth-child(2) {animation-delay:24ms}
body.freev-apple .premium-workspace-add-panel:not([hidden]) .premium-workspace-add-item:nth-child(3) {animation-delay:48ms}
body.freev-apple .premium-workspace-add-panel:not([hidden]) .premium-workspace-add-item:nth-child(4) {animation-delay:72ms}

@media (hover:hover) and (pointer:fine) {
  body.freev-apple :is(.card,.fp2-panel,.fp2-metric,.dashboard-chart-card,.rec-calendar-wrap,.rec-detail-card,.rec-history-card):hover {
    transform:translate3d(0,-1px,0);
    border-color:color-mix(in srgb,var(--signature-teal) 18%,var(--apple-outline));
    box-shadow:var(--signature-raise);
  }
  body.freev-apple .premium-v4-stat:hover {transform:translate3d(0,-2px,0)}
  body.freev-apple :is(.btn,.btn-icon,.premium-workspace-action):hover > .fa-arrow-right,
  body.freev-apple :is(.btn,.btn-icon,.premium-workspace-action):hover > .fa-chevron-right {transform:translateX(2px)}
}
@media (prefers-reduced-motion:reduce) {
  body.freev-apple :is(.card,.fp2-panel,.fp2-metric,.premium-v4-stat,.dashboard-chart-card,.rec-calendar-wrap,.rec-detail-card,.rec-history-card,.btn,.btn-icon,.premium-workspace-action,.dashboard-chart-segment button,.view-mode-tab,.v4-horizon button,.v42-presets button),
  body.freev-apple :is(.btn,.btn-icon,.premium-workspace-action) > :is(.fa-arrow-right,.fa-chevron-right) {
    transition:none!important;transform:none!important;
  }
  body.freev-apple :is(.modal-overlay,.modal-content,.accounts-modal-content,.premium-workspace-add-panel,.premium-workspace-add-item),
  body.freev-apple .view-enter :is(.premium-stat-grid,.premium-v4-chart-grid,.fp2-metrics,.fp2-panels,.v4-layout) > * {
    animation:none!important;
  }
}


/* assets/css/color-controls.css */
body.freev-apple .freev-color-choice {
  position:relative;display:inline-flex;align-items:center;min-height:40px;min-width:0;
  border-radius:13px;cursor:pointer;vertical-align:middle;
}
.freev-color-settings-row{display:flex;align-items:center;flex-wrap:wrap;gap:.5rem 1rem;margin-bottom:.5rem}
.freev-color-settings-row .form-label{margin:0}
body.freev-apple .freev-color-settings-row .freev-color-choice-ui{max-width:100%;white-space:normal;overflow-wrap:anywhere}
body.freev-apple .freev-color-choice input[type="color"] {
  position:absolute;inset:0;z-index:2;width:100%;height:100%;margin:0;padding:0;
  border:0;opacity:0;cursor:pointer;appearance:none;-webkit-appearance:none;
}
body.freev-apple .freev-color-choice-ui {
  display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:40px;padding:7px 11px;
  border:1px solid var(--apple-outline);border-radius:13px;color:var(--apple-ink);background:var(--apple-surface);
  font-size:.76rem;font-weight:650;line-height:1.2;white-space:nowrap;
  transition:background-color .16s,border-color .16s,box-shadow .16s,transform .16s;
}
body.freev-apple .freev-color-choice-ui > i:first-child {
  display:grid;place-items:center;width:25px;height:25px;border-radius:9px;color:var(--signature-blue);background:var(--apple-tint);font-size:.78rem;
}
body.freev-apple .freev-color-choice:hover .freev-color-choice-ui {background:var(--apple-hover);border-color:color-mix(in srgb,var(--signature-blue) 28%,var(--apple-outline))}
body.freev-apple .freev-color-choice:active .freev-color-choice-ui {transform:scale(.985)}
body.freev-apple .freev-color-choice:focus-within .freev-color-choice-ui {outline:3px solid var(--apple-accent);outline-offset:3px;box-shadow:0 0 0 5px var(--signature-ring)}
body.freev-apple .freev-color-choice-dot {
  display:inline-block;flex:0 0 13px;width:13px;height:13px;border:2px solid var(--apple-surface);border-radius:50%;
  background:var(--apple-accent);box-shadow:0 0 0 1px var(--apple-outline),0 1px 3px rgba(0,0,0,.13);
}
body.freev-apple .freev-color-choice-compact,
body.freev-apple .freev-color-choice-compact .freev-color-choice-ui {min-height:36px}
body.freev-apple .freev-color-choice-compact .freev-color-choice-ui {gap:7px;padding:5px 8px;font-size:.7rem}
body.freev-apple .freev-color-choice-icon-only .freev-color-choice-ui {gap:6px;padding:5px 7px}
body.freev-apple .freev-color-choice-icon-only .freev-color-choice-ui > i:first-child {width:23px;height:23px}

body.freev-apple .freev-color-preset-list {display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin:4px 0 18px}
body.freev-apple .freev-color-preset {
  display:grid;place-items:center;flex:0 0 32px;width:32px;height:32px;padding:0;border:2px solid var(--apple-surface);border-radius:50%;
  color:#fff;background:var(--freev-color-choice);box-shadow:0 0 0 1px var(--apple-outline);cursor:pointer;
  transition:transform .16s,box-shadow .16s;
}
body.freev-apple .freev-color-preset:hover {transform:scale(1.08);box-shadow:0 0 0 2px var(--freev-color-choice)}
body.freev-apple .freev-color-preset.is-selected {box-shadow:0 0 0 2px var(--freev-color-choice),0 0 0 5px var(--signature-ring)}
body.freev-apple .freev-color-preset:focus-visible,
body.freev-apple .freev-color-preset-default:focus-visible,
body.freev-apple .freev-account-color-preset:focus-visible {outline:3px solid var(--apple-accent);outline-offset:3px}
body.freev-apple .freev-color-preset-list-compact {gap:6px;margin:0}
body.freev-apple .freev-color-preset-list-compact .freev-color-preset {flex-basis:27px;width:27px;height:27px}
body.freev-apple .freev-account-color-setting[hidden] {display:none!important}

body.freev-apple .freev-color-settings-heading {display:flex;align-items:center;gap:13px;margin-bottom:18px}
body.freev-apple .freev-color-settings-heading h2 {margin-bottom:3px}
body.freev-apple .freev-color-settings-heading p {margin:0}
body.freev-apple .freev-color-settings-icon {
  display:grid;place-items:center;flex:0 0 43px;width:43px;height:43px;border:1px solid var(--apple-outline);
  border-radius:15px;color:var(--signature-blue);background:var(--apple-tint);font-size:1rem;
}
body.freev-apple .freev-account-color-setting {
  display:flex;align-items:center;justify-content:space-between;gap:18px;padding:15px;
  border:1px solid var(--apple-outline);border-radius:18px;background:color-mix(in srgb,var(--apple-surface) 78%,var(--apple-canvas));
}
body.freev-apple .freev-account-color-current {display:flex;align-items:center;gap:11px;min-width:0}
body.freev-apple .freev-account-color-preview {
  display:grid;place-items:center;flex:0 0 43px;width:43px;height:43px;border:2px solid var(--apple-surface);
  border-radius:50%;color:white;box-shadow:0 0 0 1px var(--apple-outline),0 4px 12px rgba(0,0,0,.12);font-size:.9rem;
}
body.freev-apple .freev-account-color-current-copy {display:grid;gap:3px;min-width:0}
body.freev-apple .freev-account-color-current-copy small {color:var(--apple-muted);font-size:.67rem;font-weight:600}
body.freev-apple .freev-account-color-current-copy strong {overflow:hidden;color:var(--apple-ink);font-size:.84rem;font-weight:720;text-overflow:ellipsis;white-space:nowrap}
body.freev-apple .freev-account-color-controls {display:flex;align-items:center;justify-content:flex-end;gap:11px;flex-wrap:wrap}
body.freev-apple .freev-account-color-presets {display:flex;align-items:center;gap:7px;flex-wrap:wrap}
body.freev-apple .freev-account-color-preset {
  display:grid;place-items:center;width:30px;height:30px;padding:0;border:2px solid var(--apple-surface);border-radius:50%;
  color:white;background:var(--account-color-choice);box-shadow:0 0 0 1px var(--apple-outline);cursor:pointer;
  transition:transform .16s,box-shadow .16s;
}
body.freev-apple .freev-account-color-preset:hover {transform:scale(1.1);box-shadow:0 0 0 2px var(--account-color-choice)}
body.freev-apple .freev-account-color-preset[aria-pressed="true"] {box-shadow:0 0 0 2px var(--account-color-choice)}
body.freev-apple .freev-account-color-preset i {font-size:.65rem;filter:drop-shadow(0 1px 2px rgba(0,0,0,.5))}
body.freev-apple .freev-color-reset {
  display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:40px;padding:7px 10px;
  border:1px solid var(--apple-outline);border-radius:12px;color:var(--apple-muted);background:var(--apple-surface);
  font-size:.72rem;font-weight:630;cursor:pointer;transition:background-color .16s,color .16s;
}
body.freev-apple .freev-color-reset:hover:not(:disabled) {color:var(--apple-ink);background:var(--apple-hover)}
body.freev-apple .freev-color-reset:disabled {opacity:.48;cursor:not-allowed}
body.freev-apple .freev-color-preset-default {
  display:grid;place-items:center;width:29px;height:29px;padding:0;border:1px solid var(--apple-outline);border-radius:50%;
  color:var(--apple-muted);background:var(--apple-hover);cursor:pointer;transition:color .16s,border-color .16s,box-shadow .16s;
}
body.freev-apple .freev-color-preset-default:hover,
body.freev-apple .freev-color-preset-default.is-selected {color:var(--signature-blue);border-color:var(--signature-blue);box-shadow:0 0 0 3px var(--signature-ring)}
body.freev-apple .freev-color-preset-default i {font-size:.7rem}

@media (max-width:700px) {
  body.freev-apple .freev-account-color-setting {align-items:flex-start;flex-direction:column;gap:14px}
  body.freev-apple .freev-account-color-controls {justify-content:flex-start;gap:9px}
  body.freev-apple .freev-account-color-presets {width:100%}
}
@media (prefers-reduced-motion:reduce) {
  body.freev-apple .freev-color-choice-ui,
  body.freev-apple .freev-account-color-preset,
  body.freev-apple .freev-color-reset,
  body.freev-apple .freev-color-preset,
  body.freev-apple .freev-color-preset-default {transition:none!important}
}


/* assets/css/clarity.css */
/* FREEV · repères de première visite et prise en main */
body.freev-apple .dashboard-welcome-guide {
  position:relative;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:15px;
  margin:0 0 18px;padding:18px 54px 18px 18px;border:1px solid color-mix(in srgb,var(--signature-blue) 18%,var(--apple-outline));
  border-radius:20px;background:linear-gradient(115deg,color-mix(in srgb,var(--signature-blue) 7%,var(--apple-surface)),var(--apple-surface) 68%);
  box-shadow:var(--apple-shadow);animation:freev-guide-enter .32s cubic-bezier(.2,.75,.25,1) both;
}
body.freev-apple .dashboard-welcome-guide[hidden] {display:none!important}
body.freev-apple .dashboard-welcome-icon {
  display:grid;place-items:center;width:44px;height:44px;border:1px solid color-mix(in srgb,var(--signature-blue) 16%,var(--apple-outline));
  border-radius:15px;color:var(--signature-blue);background:var(--apple-surface);font-size:1.05rem;
}
body.freev-apple .dashboard-welcome-copy {min-width:0}
body.freev-apple .dashboard-welcome-kicker {color:var(--signature-blue);font-size:.61rem;font-weight:800;letter-spacing:.1em}
body.freev-apple .dashboard-welcome-copy h2 {margin:3px 0 4px;color:var(--apple-ink);font-size:1rem;line-height:1.25;letter-spacing:-.03em;text-wrap:balance}
body.freev-apple .dashboard-welcome-copy p {margin:0;color:var(--apple-muted);font-size:.76rem;line-height:1.5;text-wrap:pretty}
body.freev-apple .dashboard-welcome-actions {display:flex;align-items:center;gap:8px;flex-wrap:wrap}
body.freev-apple .dashboard-welcome-actions button {display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:42px;padding:8px 12px;border:1px solid var(--apple-outline);border-radius:12px;background:var(--apple-surface);color:var(--apple-ink);font:inherit;font-size:.73rem;font-weight:650;line-height:1.3;cursor:pointer;transition:background-color .16s,border-color .16s,box-shadow .16s,transform .16s}
body.freev-apple .dashboard-welcome-actions .dashboard-welcome-primary {border-color:var(--signature-blue);background:var(--signature-blue);color:#fff;box-shadow:0 4px 12px var(--signature-ring)}
body.freev-apple .dashboard-welcome-actions button:hover {border-color:var(--signature-blue);box-shadow:0 0 0 3px var(--signature-ring)}
body.freev-apple .dashboard-welcome-actions button:active {transform:scale(.98)}
body.freev-apple .dashboard-welcome-actions button:focus-visible,
body.freev-apple .dashboard-welcome-close:focus-visible {outline:3px solid var(--apple-accent);outline-offset:3px}
body.freev-apple .dashboard-welcome-close {position:absolute;top:9px;right:9px;display:grid;place-items:center;width:34px;height:34px;border:0;border-radius:10px;background:transparent;color:var(--apple-muted);cursor:pointer;transition:color .16s,background-color .16s}
body.freev-apple .dashboard-welcome-close:hover {background:var(--apple-hover);color:var(--apple-ink)}

body.freev-apple .freev-help-start-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
body.freev-apple .freev-help-start-card {display:grid;grid-template-columns:30px minmax(0,1fr);align-items:start;gap:11px;padding:14px;border:1px solid var(--apple-outline);border-radius:16px;background:var(--apple-surface);box-shadow:0 2px 8px rgba(18,39,69,.025)}
body.freev-apple .freev-help-start-number {display:grid;place-items:center;width:29px;height:29px;border-radius:10px;color:var(--signature-blue);background:var(--apple-tint);font-size:.73rem;font-weight:800}
body.freev-apple .freev-help-start-card strong {display:block;color:var(--apple-ink);font-size:.8rem;line-height:1.4}
body.freev-apple .freev-help-start-card p {min-height:2.3em;margin:4px 0 8px;color:var(--apple-muted);font-size:.75rem;line-height:1.5;text-wrap:pretty}
body.freev-apple .freev-help-start-card button {display:inline-flex;align-items:center;gap:6px;min-height:40px;padding:5px 0;border:0;background:transparent;color:var(--signature-blue);font:inherit;font-size:.75rem;font-weight:700;line-height:1.35;text-align:left;cursor:pointer}
body.freev-apple .freev-help-start-card button:hover {color:var(--apple-accent-hover)}
body.freev-apple .freev-help-start-card button:focus-visible {outline:3px solid var(--signature-ring);outline-offset:3px;border-radius:5px}
body.freev-apple .freev-help-space-grid {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
body.freev-apple .freev-help-space-grid article {display:grid;align-content:start;gap:4px;padding:11px 12px;border:1px solid var(--apple-outline);border-radius:13px;background:color-mix(in srgb,var(--apple-surface) 82%,var(--apple-canvas))}
body.freev-apple .freev-help-space-grid strong {color:var(--apple-ink);font-size:.78rem;font-weight:700}
body.freev-apple .freev-help-space-grid span {color:var(--apple-muted);font-size:.75rem;line-height:1.45;text-wrap:pretty}
body.freev-apple #freevHelpPanelStart .freev-help-glossary {margin-top:0}
body.freev-apple #freevHelpPanelStart .freev-help-glossary span {line-height:1.45}
body.freev-apple .freev-help-tabs {grid-template-columns:repeat(3,minmax(0,1fr))}
body.freev-apple .freev-help-tabs button {min-height:42px}

@keyframes freev-guide-enter {from {opacity:0;transform:translateY(5px)}to {opacity:1;transform:translateY(0)}}

@media (max-width:760px) {
  body.freev-apple .dashboard-welcome-guide {grid-template-columns:auto minmax(0,1fr);align-items:start;padding:15px 48px 15px 15px}
  body.freev-apple .dashboard-welcome-actions {grid-column:2;justify-content:flex-start}
  body.freev-apple .freev-help-space-grid {grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:560px) {
  body.freev-apple .dashboard-welcome-guide {gap:10px}
  body.freev-apple .dashboard-welcome-icon {width:38px;height:38px;border-radius:13px;font-size:.9rem}
  body.freev-apple .dashboard-welcome-copy h2 {font-size:.92rem}
  body.freev-apple .dashboard-welcome-copy p {font-size:.75rem}
  body.freev-apple .dashboard-welcome-actions {grid-column:1/-1}
  body.freev-apple .dashboard-welcome-actions button {flex:1;min-width:0}
  body.freev-apple .freev-help-start-grid,
  body.freev-apple .freev-help-space-grid {grid-template-columns:1fr}
  body.freev-apple .freev-help-tabs {gap:5px;padding:8px}
  body.freev-apple .freev-help-tabs button {gap:5px;min-height:42px;padding:6px 5px;font-size:.75rem}
  body.freev-apple .freev-help-start-card p {min-height:0}
}
@media (prefers-reduced-motion:reduce) {
  body.freev-apple .dashboard-welcome-guide,
  body.freev-apple .dashboard-welcome-actions button,
  body.freev-apple .dashboard-welcome-close {animation:none!important;transition:none!important}
}


/* assets/css/account-profile.css */
body.freev-apple #accountProfileLayer[hidden],
body.freev-apple .account-profile-view[hidden],
body.freev-apple .account-profile-field[hidden],
body.freev-apple .account-profile-google-confirm[hidden],
body.freev-apple .account-profile-message[hidden] {display:none!important}

body.freev-apple.account-profile-open {overflow:hidden}
body.freev-apple .premium-v4-sidebar-tools .sidebar-user-info {
  appearance:none;-webkit-appearance:none;position:relative;cursor:pointer;
  font:inherit;text-align:left;transition:background-color .18s,border-color .18s,transform .18s,box-shadow .18s;
}
body.freev-apple .premium-v4-sidebar-tools .sidebar-user-info:hover,
body.freev-apple .premium-v4-sidebar-tools .sidebar-user-info[aria-expanded="true"] {
  background:var(--apple-tint);border-color:color-mix(in srgb,var(--apple-accent) 28%,var(--apple-outline));
}
body.freev-apple .premium-v4-sidebar-tools .sidebar-user-info:active {transform:scale(.97)}
body.freev-apple .account-profile-layer {
  position:fixed;inset:0;z-index:960;pointer-events:none;opacity:0;
  transition:opacity .18s ease;
}
body.freev-apple .account-profile-layer.is-open {opacity:1;pointer-events:auto}
body.freev-apple .account-profile-scrim {
  position:absolute;inset:0;width:100%;height:100%;padding:0;border:0;border-radius:0;
  background:rgba(20,27,42,.17);backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px);
  opacity:0;transition:opacity .2s ease;cursor:default;
}
body.freev-apple .account-profile-layer.is-open .account-profile-scrim {opacity:1}
body.freev-apple .account-profile-popover {
  position:fixed;left:101px;bottom:22px;display:flex;flex-direction:column;
  width:min(398px,calc(100vw - 122px));max-height:calc(100dvh - 44px);padding:0;
  overflow:hidden;color:var(--apple-ink);background:var(--apple-surface);
  border:1px solid var(--apple-outline);border-radius:24px;box-shadow:0 24px 75px rgba(17,26,48,.22),0 5px 18px rgba(17,26,48,.08);
  transform:translateY(11px) scale(.985);transform-origin:bottom left;opacity:0;
  transition:transform .24s var(--apple-ease),opacity .2s ease;
}
body.freev-apple .account-profile-layer.is-open .account-profile-popover {transform:translateY(0) scale(1);opacity:1}
body.freev-apple .account-profile-popover:focus {outline:none}
body.freev-apple .account-profile-header {
  display:flex;align-items:center;gap:12px;padding:19px 20px 17px;
  border-bottom:1px solid var(--apple-outline);background:linear-gradient(145deg,var(--apple-surface),var(--apple-tint));
}
body.freev-apple .account-profile-mark {
  display:grid;place-items:center;flex:0 0 43px;width:43px;height:43px;border-radius:15px;
  color:#fff;background:linear-gradient(145deg,#2d8cf0,var(--signature-blue) 68%,#178f79);
  box-shadow:0 6px 16px rgba(31,97,219,.19);font-size:16px;
}
body.freev-apple .account-profile-heading {min-width:0;flex:1}
body.freev-apple .account-profile-heading h2 {margin:0;color:var(--apple-ink);font-size:1.05rem;line-height:1.25;letter-spacing:-.035em;font-weight:730}
body.freev-apple .account-profile-heading p {margin:3px 0 0;color:var(--apple-muted);font-size:.77rem;line-height:1.35}
body.freev-apple .account-profile-close {
  display:grid;place-items:center;flex:0 0 34px;width:34px;height:34px;padding:0;border:1px solid var(--apple-outline);
  border-radius:11px;color:var(--apple-muted);background:var(--apple-surface);cursor:pointer;
  transition:background-color .16s,color .16s,transform .16s;
}
body.freev-apple .account-profile-close:hover {color:var(--apple-ink);background:var(--apple-hover)}
body.freev-apple .account-profile-close:active {transform:scale(.94)}
body.freev-apple .account-profile-view {padding:18px 20px 20px;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}
body.freev-apple .account-profile-label {display:block;color:var(--apple-muted);font-size:.69rem;font-weight:650;letter-spacing:.035em}
body.freev-apple .account-profile-email {margin:5px 0 0;color:var(--apple-ink);font-size:.92rem;font-weight:650;overflow-wrap:anywhere}
body.freev-apple .account-profile-section {margin-top:19px}
body.freev-apple .account-profile-section-heading {display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px}
body.freev-apple .account-profile-section-heading h3,
body.freev-apple .account-profile-danger h3 {margin:0;color:var(--apple-ink);font-size:.8rem;font-weight:700;letter-spacing:-.01em}
body.freev-apple .account-profile-count {
  display:grid;place-items:center;min-width:22px;height:22px;padding:0 6px;border-radius:8px;
  color:var(--signature-blue);background:var(--apple-tint);font-size:.68rem;font-weight:700;
}
body.freev-apple .account-profile-account-list {display:grid;gap:6px;margin:0;padding:0;list-style:none}
body.freev-apple .account-profile-account {
  display:flex;align-items:center;gap:10px;min-width:0;min-height:43px;padding:6px 9px;
  border:1px solid var(--apple-outline);border-radius:13px;background:color-mix(in srgb,var(--apple-surface) 78%,var(--apple-canvas));
}
body.freev-apple .account-profile-account-mark {
  display:grid;place-items:center;flex:0 0 28px;width:28px;height:28px;border-radius:9px;
  color:var(--signature-blue);background:var(--apple-tint);font-size:.72rem;font-weight:750;
}
body.freev-apple .account-profile-account-name {flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--apple-ink);font-size:.77rem;font-weight:620}
body.freev-apple .account-profile-current {padding:4px 7px;border-radius:8px;color:var(--signature-green);background:color-mix(in srgb,var(--signature-green) 10%,transparent);font-size:.64rem;font-weight:700}
body.freev-apple .account-profile-empty {padding:12px;border:1px dashed var(--apple-outline);border-radius:12px;color:var(--apple-muted);font-size:.75rem;text-align:center}
body.freev-apple .account-profile-membership {
  display:flex;align-items:center;gap:11px;margin-top:15px;padding:12px;
  border:1px solid var(--apple-outline);border-radius:14px;background:var(--apple-tint);
}
body.freev-apple .account-profile-membership-icon {display:grid;place-items:center;flex:0 0 33px;width:33px;height:33px;border-radius:11px;color:var(--signature-blue);background:var(--apple-surface)}
body.freev-apple .account-profile-membership strong {display:block;margin-top:3px;color:var(--apple-ink);font-size:.79rem;font-weight:700}
body.freev-apple .account-profile-membership small {display:block;margin-top:2px;color:var(--apple-muted);font-size:.69rem}
body.freev-apple .account-profile-danger {
  display:flex;flex-direction:column;gap:12px;margin-top:17px;padding-top:15px;border-top:1px solid var(--apple-outline);
}
body.freev-apple .account-profile-danger p {margin:4px 0 0;color:var(--apple-muted);font-size:.72rem;line-height:1.45}
body.freev-apple .account-profile-danger-button {
  display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:42px;padding:9px 13px;
  border:1px solid color-mix(in srgb,var(--signature-red) 24%,var(--apple-outline));border-radius:12px;
  color:var(--signature-red);background:color-mix(in srgb,var(--signature-red) 7%,var(--apple-surface));
  font-size:.76rem;font-weight:680;cursor:pointer;transition:background-color .16s,border-color .16s,transform .16s,box-shadow .16s;
}
body.freev-apple .account-profile-danger-button:hover {border-color:color-mix(in srgb,var(--signature-red) 42%,var(--apple-outline));background:color-mix(in srgb,var(--signature-red) 11%,var(--apple-surface))}
body.freev-apple .account-profile-danger-button:active {transform:scale(.985)}
body.freev-apple .account-profile-danger-button:disabled {opacity:.55;cursor:not-allowed}
body.freev-apple .account-profile-back {
  display:inline-flex;align-items:center;gap:8px;align-self:flex-start;margin:-2px 0 15px;padding:5px 0;
  border:0;color:var(--signature-blue);background:transparent;font-size:.76rem;font-weight:650;cursor:pointer;
}
body.freev-apple .account-profile-delete-intro {display:flex;align-items:flex-start;gap:12px;margin-bottom:18px;padding:13px;border:1px solid color-mix(in srgb,var(--signature-red) 18%,var(--apple-outline));border-radius:15px;background:color-mix(in srgb,var(--signature-red) 5%,var(--apple-surface))}
body.freev-apple .account-profile-delete-icon {display:grid;place-items:center;flex:0 0 35px;width:35px;height:35px;border-radius:11px;color:var(--signature-red);background:color-mix(in srgb,var(--signature-red) 11%,var(--apple-surface))}
body.freev-apple .account-profile-delete-intro h3 {margin:1px 0 4px;color:var(--apple-ink);font-size:.86rem;font-weight:730}
body.freev-apple .account-profile-delete-intro p {margin:0;color:var(--apple-muted);font-size:.72rem;line-height:1.5}
.account-profile-google-confirm {padding:12px 14px;border:1px solid #cbdcf4;border-radius:14px;background:#f5f9ff}
.account-profile-google-confirm p {margin:0 0 10px;color:#334155;font-size:.84rem;line-height:1.5}
.account-profile-google-confirm p:last-child {margin:10px 0 0}
body.freev-apple .account-profile-field {display:grid;gap:6px;margin-top:13px;color:var(--apple-muted);font-size:.72rem;font-weight:600}
body.freev-apple .account-profile-field strong {color:var(--signature-red);letter-spacing:.04em}
body.freev-apple .account-profile-field input {
  width:100%;min-height:43px;padding:10px 12px;border:1px solid var(--apple-outline);border-radius:12px;
  color:var(--apple-ink);background:var(--bg-input);font:inherit;font-size:.82rem;transition:border-color .16s,box-shadow .16s;
}
body.freev-apple .account-profile-field input:focus {outline:0;border-color:var(--signature-blue);box-shadow:0 0 0 4px var(--signature-ring)}
body.freev-apple .account-profile-field input:disabled {opacity:.65}
body.freev-apple .account-profile-message {margin:12px 0 0;padding:10px 11px;border:1px solid color-mix(in srgb,var(--signature-red) 22%,var(--apple-outline));border-radius:11px;color:var(--signature-red);background:color-mix(in srgb,var(--signature-red) 7%,var(--apple-surface));font-size:.72rem;line-height:1.45}
body.freev-apple .account-profile-message.is-success {border-color:color-mix(in srgb,var(--signature-green) 25%,var(--apple-outline));color:var(--signature-green);background:color-mix(in srgb,var(--signature-green) 8%,var(--apple-surface))}
body.freev-apple .account-profile-delete-actions {display:flex;gap:9px;margin-top:16px}
body.freev-apple .account-profile-secondary-button {
  min-height:42px;padding:9px 14px;border:1px solid var(--apple-outline);border-radius:12px;color:var(--apple-ink);background:var(--apple-surface);
  font-size:.75rem;font-weight:650;cursor:pointer;transition:background-color .16s;
}
body.freev-apple .account-profile-secondary-button:hover {background:var(--apple-hover)}
body.freev-apple .account-profile-delete-actions .account-profile-danger-button {flex:1}

@media (max-width:768px) {
  body.freev-apple .account-profile-popover {
    left:0;right:0;bottom:0;width:100%;max-width:none;max-height:min(88dvh,760px);
    padding-bottom:env(safe-area-inset-bottom);border-right:0;border-bottom:0;border-left:0;border-radius:25px 25px 0 0;
    transform:translateY(25px);
  }
  body.freev-apple .account-profile-layer.is-open .account-profile-popover {transform:translateY(0)}
  body.freev-apple .account-profile-header {padding:17px 18px 15px}
  body.freev-apple .account-profile-view {padding:16px 18px calc(20px + env(safe-area-inset-bottom));max-height:calc(88dvh - 78px)}
}

@media (prefers-reduced-motion:reduce) {
  body.freev-apple .account-profile-layer,
  body.freev-apple .account-profile-scrim,
  body.freev-apple .account-profile-popover,
  body.freev-apple .premium-v4-sidebar-tools .sidebar-user-info,
  body.freev-apple .account-profile-close,
  body.freev-apple .account-profile-danger-button,
  body.freev-apple .account-profile-secondary-button {transition:none!important}
}
.freev-mfa-settings{margin-top:1.25rem;padding:1.25rem;border:1px solid #c9d9ee;border-radius:18px;background:linear-gradient(135deg,#f6fbff,#eff7f8)}
.freev-mfa-settings p{margin:.45rem 0 1rem;color:#526178;line-height:1.5}
.freev-mfa-settings #settingsMfaSetup{margin-top:1rem;padding:1rem;border-radius:14px;background:#fff;border:1px solid #dce7f3}
.freev-mfa-settings #settingsMfaQr{display:block;max-width:100%;margin:.7rem 0;border:10px solid #fff;box-shadow:0 0 0 1px #dce7f3;border-radius:12px}
.freev-mfa-settings code{overflow-wrap:anywhere}
.freev-mfa-settings label{display:block;margin:.7rem 0 .35rem;font-weight:650}
.freev-mfa-settings #settingsMfaCode{max-width:180px;margin-right:.5rem}
.auth-card.mfa-challenge .auth-tabs,.auth-card.mfa-challenge .form-group,.auth-card.mfa-challenge .auth-legal-agreement,.auth-card.mfa-challenge #authSubmitBtn,.auth-card.mfa-challenge #authForgotBtn,.auth-card.mfa-challenge #authLegacyResetBtn{display:none!important}
.freev-mfa-challenge{padding:1rem;border:1px solid #c9d9ee;border-radius:16px;background:#f6fbff}
.freev-mfa-challenge p{color:#526178;line-height:1.5}
.freev-mfa-challenge .form-input{max-width:220px;letter-spacing:.28em;font-size:1.3rem;text-align:center}
.freev-mfa-challenge .auth-btn{margin-top:1rem}
.freev-mfa-challenge .btn{width:100%;margin-top:.65rem}
.freev-google-terms{width:min(440px,calc(100vw - 32px));max-height:min(90vh,700px);padding:28px;border:1px solid #d7e3f3;border-radius:22px;background:#fff;color:#17233a;box-shadow:0 25px 80px #102b5160}
.freev-google-terms::backdrop{background:#081b39aa;backdrop-filter:blur(5px)}
.freev-google-terms-kicker{font-size:.73rem;font-weight:800;letter-spacing:.12em;text-transform:uppercase;color:#087c86}
.freev-google-terms h2{margin:10px 0;font-size:1.7rem;line-height:1.15}
.freev-google-terms p{color:#465a75;line-height:1.5}
.freev-google-terms a{color:#155dc2;font-weight:700;text-decoration:underline}
.freev-google-terms label{display:flex;align-items:flex-start;gap:10px;margin:18px 0;padding:14px;border:1px solid #dbe5f1;border-radius:13px;line-height:1.5}
.freev-google-terms label input{flex:none;width:18px;height:18px;margin-top:2px}
.freev-google-terms-actions{display:flex;gap:10px;justify-content:flex-end;margin-top:18px}
.freev-google-terms-actions button{padding:11px 15px;border:1px solid #ccd9ea;border-radius:11px;background:#fff;color:#17304f;font-weight:700;cursor:pointer}
.freev-google-terms-actions #freevGoogleTermsAccept{background:#1764dc;border-color:#1764dc;color:#fff}
.freev-google-terms-actions button:disabled{opacity:.55;cursor:not-allowed}
.freev-google-terms-error{color:#a21730!important}
@media(max-width:480px){.freev-google-terms{padding:20px}.freev-google-terms-actions{flex-direction:column-reverse}.freev-google-terms-actions button{width:100%}}


/* assets/css/account-sharing.css */
.share-settings { overflow: hidden; }
.account-profile-sharing { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: .7rem; margin-top: .65rem; padding: .8rem .9rem; border: 1px solid #dce5f1; border-radius: .75rem; background: #f6f9fe; color: #1757ad; font-size: .82rem; font-weight: 730; cursor: pointer; }
.account-profile-sharing:hover { background: #edf5ff; }
.share-heading { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 1.4rem; }
.share-heading-icon { width: 3rem; height: 3rem; flex: none; display: grid; place-items: center; border-radius: 1rem; color: #1766db; background: linear-gradient(145deg, #eef5ff, #dceaff); box-shadow: inset 0 1px 0 #fff; }
.share-eyebrow { color: #1766db; font-size: .68rem; font-weight: 800; letter-spacing: .12em; }
.share-heading h2 { margin: .15rem 0 .3rem; font-size: clamp(1.35rem, 2.5vw, 1.8rem); font-weight: 780; color: var(--text-primary, #172034); }
.share-heading p { max-width: 60ch; margin: 0; color: var(--text-secondary, #64748b); line-height: 1.55; }
.share-verification { padding: 1rem 1.1rem; border: 1px solid #f5d49b; border-radius: 1rem; background: #fff9ee; margin-bottom: 1rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.share-verification[hidden] { display: none; }
.share-verification strong { color: #8b4d08; }
.share-verification p { margin: .2rem 0 0; color: #8b5d25; font-size: .85rem; }
.share-verify-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.share-form { display: grid; grid-template-columns: minmax(160px, 1fr) minmax(220px, 1.6fr) auto; align-items: end; gap: .8rem; }
.share-form label { display: grid; gap: .4rem; min-width: 0; color: var(--text-primary, #334155); font-size: .82rem; font-weight: 700; }
.share-form input, .share-form select { width: 100%; min-width: 0; min-height: 44px; }
.share-form button { min-height: 44px; white-space: nowrap; }
.share-permissions { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; margin: 0; padding: 0; border: 0; }
.share-permissions legend { margin-bottom: .45rem; color: var(--text-primary, #334155); font-size: .82rem; font-weight: 700; }
.share-permission-choice { display: flex !important; flex-direction: row; align-items: flex-start; gap: .65rem !important; padding: .8rem; border: 1px solid #dce5f1; border-radius: .85rem; background: var(--surface, #fff); cursor: pointer; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.share-permission-choice:has(input:checked) { border-color: #3675e6; box-shadow: 0 0 0 3px rgba(54,117,230,.1); }
.share-permission-choice:hover { transform: translateY(-2px); }
.share-permission-choice input { width: 17px; min-height: 17px; margin: .15rem 0 0; accent-color: #2563eb; }
.share-permission-choice span { display: grid; gap: .2rem; }
.share-permission-choice strong { font-size: .83rem; }
.share-permission-choice small, .share-permission-help { color: var(--text-secondary, #64748b); font-size: .75rem; line-height: 1.4; }
.share-permission-help { grid-column: 1 / -1; margin: 0; }
.share-permission-choice.is-unavailable { opacity: .55; cursor: not-allowed; }
.share-access-actions { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; justify-content: flex-end; }
.share-access-level { min-height: 36px; padding: .35rem .55rem; border: 1px solid #dce5f1; border-radius: .65rem; background: var(--surface, #fff); color: var(--text-primary, #172034); font-size: .76rem; }
.share-permission-badge { display: inline-flex; width: fit-content; align-items: center; gap: .3rem; padding: .2rem .5rem; border-radius: 999px; color: #0b6d59; background: #e7f6f1; font-size: .72rem; font-weight: 750; }
.share-permission-badge.is-view { color: #3e5b7a; background: #edf3fa; }
.share-edit-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .65rem; }
.share-edit-button.is-primary { background:#1769d4; color:#fff; border-color:#1769d4; }
.freev-shared-workspace { padding-top:calc(3.4rem + env(safe-area-inset-top)); }
.freev-shared-workspace-banner { position:fixed; top:0; left:0; right:0; z-index:10000; min-height:calc(3.4rem + env(safe-area-inset-top)); display:flex; justify-content:space-between; align-items:center; gap:1rem; padding:calc(.55rem + env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) .55rem max(1rem, env(safe-area-inset-left)); background:#112c49; color:#fff; box-shadow:0 6px 24px #122c4930; font-size:.86rem; font-weight:700; }
.freev-shared-workspace-banner button { border:1px solid #ffffff7a; border-radius:999px; background:#fff; color:#112c49; padding:.45rem .8rem; font:inherit; cursor:pointer; }
@media (max-width:650px) { .freev-shared-workspace-banner { font-size:.75rem; } .freev-shared-workspace-banner button { flex:0 0 auto; font-size:.72rem; } }
.share-edit-button { padding: .4rem .65rem; border: 1px solid #dce5f1; border-radius: .6rem; background: var(--surface, #fff); color: #1757ad; font-size: .75rem; font-weight: 700; cursor: pointer; }
.share-edit-button:hover { border-color: #8eb5f3; background: #f5f9ff; }
.share-edit-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; margin-top: .7rem; padding: .8rem; border: 1px solid #dce5f1; border-radius: .8rem; background: #f8fbff; }
.share-edit-form label { display: grid; gap: .25rem; min-width: 0; color: #334155; font-size: .75rem; font-weight: 700; }
.share-edit-form input, .share-edit-form select { width: 100%; min-width: 0; min-height: 40px; padding: .4rem .55rem; border: 1px solid #cbd8e9; border-radius: .6rem; background: #fff; color: #172034; }
.share-edit-form .share-edit-wide { grid-column: 1 / -1; }
.share-edit-form .share-edit-actions { grid-column: 1 / -1; margin-top: 0; }
.share-status { min-height: 1.4rem; margin: .65rem 0 1.1rem; color: #087a5c; font-size: .84rem; }
.share-status.is-error { color: #b42318; }
.share-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.share-columns > div { min-width: 0; }
.share-columns h3 { font-size: .95rem; font-weight: 760; margin: 0 0 .6rem; color: var(--text-primary, #172034); }
.share-list { display: grid; align-content: start; gap: .65rem; }
.share-empty { color: var(--text-secondary, #64748b); font-size: .86rem; margin: 0; padding: .85rem 1rem; border: 1px dashed #d6e1ef; border-radius: .8rem; }
.share-access-card, .share-received-card { min-width: 0; border: 1px solid #dce5f1; border-radius: .95rem; background: var(--surface, #fff); box-shadow: 0 6px 22px rgba(22, 44, 78, .045); }
.share-access-card { display: flex; justify-content: space-between; align-items: center; gap: .8rem; padding: .8rem .9rem; }
.share-access-copy { display: grid; gap: .16rem; min-width: 0; }
.share-access-copy strong { color: var(--text-primary, #172034); font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-access-copy span { color: var(--text-secondary, #64748b); font-size: .76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-revoke { flex: none; min-height: 36px; padding: .35rem .7rem; border: 1px solid #dce5f1; border-radius: .65rem; background: var(--surface, #fff); color: #9c3434; font-size: .76rem; font-weight: 730; cursor: pointer; transition: background .18s ease, transform .18s ease, border-color .18s ease; }
.share-revoke:hover { background: #fff3f1; border-color: #f3bcb7; transform: translateY(-1px); }
.share-revoke:focus-visible { outline: 3px solid #80b4ff; outline-offset: 2px; }
.share-received-card { padding: .9rem; }
.share-received-top { display: flex; justify-content: space-between; align-items: flex-start; gap: .8rem; }
.share-balance { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; margin: .9rem 0 .45rem; padding: .8rem .9rem; border-radius: .75rem; background: linear-gradient(120deg, #eff6ff, #f3faf7); }
.share-balance span { color: #4f6480; font-size: .77rem; }
.share-balance strong { color: #123b62; font-size: 1.15rem; white-space: nowrap; }
.share-operations summary { color: #1766db; font-size: .78rem; font-weight: 700; cursor: pointer; }
.share-operations ul { list-style: none; margin: .55rem 0 0; padding: 0; }
.share-operations li { display: flex; justify-content: space-between; gap: .7rem; padding: .48rem 0; border-top: 1px solid #e8edf4; font-size: .75rem; }
.share-operations li span { min-width: 0; color: var(--text-secondary, #64748b); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-operations li strong { flex: none; color: var(--text-primary, #172034); white-space: nowrap; }
.share-operations li strong.is-income { color: #087a5c; }
.share-operations li strong.is-expense { color: #bc4343; }
@media (max-width: 900px) { .share-form { grid-template-columns: repeat(2, minmax(0, 1fr)); } .share-form button { grid-column: 1 / -1; } }
@media (max-width: 650px) { .share-heading { gap: .7rem; } .share-heading-icon { width: 2.5rem; height: 2.5rem; } .share-verification { align-items: stretch; flex-direction: column; } .share-form, .share-columns, .share-permissions { grid-template-columns: minmax(0, 1fr); } .share-form button { grid-column: auto; } .share-access-card { align-items: flex-start; flex-direction: column; } .share-access-actions { justify-content: flex-start; } }
@media (prefers-reduced-motion: reduce) { .share-revoke, .share-permission-choice { transition: none; } .share-revoke:hover, .share-permission-choice:hover { transform: none; } }


/* assets/css/focus-polish.css */
/* Repères de focus cohérents : un seul contour visible, dans la palette FREEV. */
body.freev-apple :is(button,a,input,select,textarea,[tabindex]):focus-visible {
  outline:2px solid var(--signature-teal,#139b81)!important;
  outline-offset:2px!important;
  box-shadow:none!important;
}

/* Les champs utilisent leur bordure comme repère de focus. */
body.freev-apple :is(.form-input,.form-select,.form-textarea,input[type="month"],.account-profile-field input):focus {
  outline:0!important;
  border-color:var(--signature-teal,#139b81)!important;
  box-shadow:none!important;
}

/* La bordure du conteneur porte le focus des recherches : pas de second cadre interne. */
body.freev-apple .v4-search-box {
  border-color:var(--apple-outline);
  color:var(--apple-muted);
  transition:border-color .16s var(--apple-ease),background-color .16s var(--apple-ease);
}
body.freev-apple .v4-search-box:focus-within {
  border-color:var(--signature-teal,#139b81);
  color:var(--signature-teal,#139b81);
}
body.freev-apple .v4-search-box input:focus-visible {
  outline:0!important;
  outline-offset:0!important;
  box-shadow:none!important;
}

body.freev-apple .freev-help-search {
  color:var(--apple-muted);
  transition:border-color .16s var(--apple-ease),box-shadow .16s var(--apple-ease);
}
body.freev-apple .freev-help-search:focus-within {
  border-color:var(--signature-teal,#139b81);
  color:var(--signature-teal,#139b81);
}
body.freev-apple .freev-help-search:has(.freev-help-search-clear:focus-visible) {
  border-color:var(--apple-outline);
  color:var(--apple-muted);
}
body.freev-apple .freev-help-search input:focus-visible {
  outline:0!important;
  outline-offset:0!important;
  box-shadow:none!important;
}

/* Les contrôles dont le parent signale déjà le focus gardent un seul indicateur. */
body.freev-apple .freev-color-choice input:focus-visible,
body.freev-apple .v5-switch input:focus-visible {
  outline:0!important;
  outline-offset:0!important;
  box-shadow:none!important;
}
body.freev-apple .freev-color-choice:focus-within .freev-color-choice-ui {
  outline:2px solid var(--signature-teal,#139b81)!important;
  outline-offset:2px!important;
  box-shadow:none!important;
}
body.freev-apple .v5-switch input:focus-visible + span {
  outline:2px solid var(--signature-teal,#139b81)!important;
  outline-offset:2px!important;
}
/* Harmonise les états de focus qui ajoutaient encore un accent bleu intérieur. */
body.freev-apple .v42-presets button:focus-visible {
  outline:0!important;
  outline-offset:0!important;
  border-color:var(--signature-teal,#139b81)!important;
  color:var(--signature-green,#187b68)!important;
}
body.freev-apple .freev-select-trigger:focus-visible {
  border-color:var(--signature-teal,#139b81);
}
body.freev-apple .freev-select.is-open .freev-select-trigger:focus-visible {
  outline:0!important;
  outline-offset:0!important;
  border-color:var(--signature-teal,#139b81)!important;
  box-shadow:none!important;
}
body.freev-apple .freev-select-option:focus-visible {
  outline:0!important;
  outline-offset:0!important;
  background:color-mix(in srgb,var(--signature-teal,#139b81) 10%,var(--apple-surface))!important;
  color:var(--signature-green,#187b68)!important;
  transform:none;
}
body.freev-apple .v4-search-chip-remove:focus-visible {background:transparent}

@media (prefers-reduced-motion:reduce) {
  body.freev-apple .v4-search-box,
  body.freev-apple .freev-help-search {transition:none}
}


/* assets/css/chart-motion.css */
/* Shared chart entrances and the hand-drawn planner forecast. */
@keyframes freevChartReveal {
  from { opacity: 0; transform: translateY(7px) scale(.995); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.chart-container.chart-reveal {
  animation: freevChartReveal .58s cubic-bezier(.2,.72,.25,1) both;
  transform-origin: center top;
}

.v42-forecast-chart svg.is-animating .v42-forecast-line {
  stroke-dasharray: var(--forecast-line-length, 1);
  stroke-dashoffset: var(--forecast-line-length, 1);
  transition: stroke-dashoffset 1.05s cubic-bezier(.2,.72,.25,1);
}

.v42-forecast-chart svg.is-animating .v42-forecast-line.is-drawn {
  stroke-dashoffset: 0;
}

.v42-forecast-chart .v42-forecast-area {
  opacity: 1;
}

.v42-forecast-chart svg.is-animating .v42-forecast-area {
  opacity: 0;
  transform: translateY(5px);
  transform-box: fill-box;
  transform-origin: center;
  transition: opacity .7s ease-out, transform .7s ease-out;
}

.v42-forecast-chart svg.is-animating .v42-forecast-area.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.v42-forecast-chart .v42-forecast-point {
  opacity: 1;
}

.v42-forecast-chart svg.is-animating .v42-forecast-point {
  opacity: 0;
  transform: scale(.72);
  transform-box: fill-box;
  transform-origin: center;
  animation: freevForecastPoint .34s cubic-bezier(.2,.72,.25,1) both;
  animation-delay: calc(.28s + var(--forecast-point-delay, 0ms));
}

@keyframes freevForecastPoint {
  to { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .chart-container.chart-reveal { animation: none; }
  .v42-forecast-chart svg.is-animating * { animation: none !important; transition: none !important; }
}


/* assets/css/receipt-scanner.css */
/* AJ mobile — scan de ticket, confirmation explicite et OCR local. */
.receipt-scan-entry { display: none; }
.receipt-scanner-dialog {
  --receipt-green: var(--brand-primary, #16836b);
  width: min(560px, calc(100vw - 2rem));
  max-width: none;
  max-height: min(92vh, 900px);
  max-height: min(92dvh, 900px);
  padding: 0;
  overflow: auto;
  color: var(--text-primary, #15211d);
  border: 1px solid rgba(255,255,255,.78);
  border-radius: 1.55rem;
  background: var(--bg-card, #fff);
  box-shadow: 0 30px 100px rgba(14, 30, 25, .28), 0 5px 20px rgba(14, 30, 25, .1);
  overscroll-behavior: contain;
}
.receipt-scanner-dialog::backdrop { background: rgba(18, 28, 27, .44); backdrop-filter: blur(11px) saturate(.82); animation: receipt-backdrop-in .22s ease-out both; }
.receipt-scanner-dialog[open] { animation: receipt-dialog-in .28s cubic-bezier(.2,.75,.25,1) both; }
.receipt-scanner-shell { padding: 1.25rem; }
.receipt-scanner-header { display: flex; align-items: center; gap: .8rem; }
.receipt-scanner-title-mark { display: grid; width: 2.9rem; height: 2.9rem; flex: 0 0 auto; place-items: center; border-radius: 1rem; background: linear-gradient(145deg, #e1f5eb, #c9ecdc); color: var(--receipt-green); font-size: 1.2rem; box-shadow: inset 0 1px 0 rgba(255,255,255,.9); }
.receipt-scanner-title-copy { min-width: 0; flex: 1; }
.receipt-scanner-title-copy > span, .receipt-review-heading > div > span { color: var(--receipt-green); font-size: .62rem; font-weight: 800; letter-spacing: .12em; }
.receipt-scanner-title-copy h2 { margin: .08rem 0 0; font-size: 1.2rem; letter-spacing: -.035em; }
.receipt-scanner-close { display: grid; width: 2.65rem; height: 2.65rem; flex: 0 0 auto; place-items: center; border: 1px solid var(--border-color, #e5e9e7); border-radius: 50%; background: var(--bg-card, #fff); color: var(--text-primary, #15211d); font-size: 1.05rem; cursor: pointer; transition: transform .18s ease, background .18s ease; }
.receipt-scanner-close:hover { transform: rotate(5deg); background: var(--bg-secondary, #f5f8f6); }
.receipt-scanner-intro { margin: .75rem 0 1rem; color: var(--text-muted, #68766f); font-size: .84rem; line-height: 1.5; }
.receipt-scanner-account { display: flex; align-items: center; gap: .55rem; min-height: 2.6rem; padding: .45rem .7rem; border: 1px solid rgba(22,131,107,.12); border-radius: .85rem; background: rgba(22,131,107,.055); color: var(--text-muted, #68766f); font-size: .73rem; }
.receipt-scanner-account > i { color: var(--receipt-green); }
.receipt-scanner-account strong { margin-left: auto; overflow: hidden; color: var(--text-primary, #15211d); font-size: .76rem; text-overflow: ellipsis; white-space: nowrap; }
.receipt-scanner-alert { margin-top: .8rem; padding: .7rem .8rem; border: 1px solid rgba(190,90,48,.18); border-radius: .8rem; background: rgba(253,237,224,.72); color: #82472b; font-size: .76rem; line-height: 1.45; }
.receipt-scanner-screen { animation: receipt-screen-in .24s ease-out both; }
.receipt-scanner-screen[hidden] { display: none !important; }
.receipt-scanner-dialog [hidden] { display: none !important; }
.receipt-scanner-start-art { position: relative; display: grid; width: 8rem; height: 8rem; margin: 1.25rem auto 1rem; place-items: center; border: 1px solid rgba(22,131,107,.12); border-radius: 2.5rem; background: radial-gradient(circle at 50% 42%, #fff 0 25%, #f0f8f3 72%); color: var(--receipt-green); font-size: 2.35rem; box-shadow: 0 13px 36px rgba(22,131,107,.1); }
.receipt-scan-orbit { position: absolute; inset: .6rem; border: 1px solid rgba(22,131,107,.15); border-radius: 2rem; transform: rotate(-12deg); }
.receipt-scan-spark { position: absolute; width: .42rem; height: .42rem; border-radius: 50%; background: #8cc8a8; box-shadow: 0 0 0 .3rem rgba(140,200,168,.13); }
.receipt-scan-spark-one { top: 1.6rem; right: 1.35rem; }
.receipt-scan-spark-two { bottom: 1.45rem; left: 1.45rem; width: .32rem; height: .32rem; }
.receipt-scanner-screen > h3, .receipt-processing-screen > h3 { margin: .65rem 0 .3rem; text-align: center; font-size: 1.12rem; letter-spacing: -.025em; }
.receipt-scanner-screen > p { color: var(--text-muted, #68766f); font-size: .8rem; line-height: 1.5; text-align: center; }
.receipt-scanner-start-art + h3 + p { max-width: 25rem; margin: 0 auto; }
.receipt-scanner-actions { display: grid; gap: .6rem; margin: 1.1rem 0 .2rem; }
.receipt-action-primary, .receipt-action-secondary { display: inline-flex; min-height: 3rem; align-items: center; justify-content: center; gap: .55rem; padding: .7rem 1rem; border: 1px solid transparent; border-radius: .9rem; font: inherit; font-size: .86rem; font-weight: 700; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease; touch-action: manipulation; }
.receipt-action-primary { background: var(--receipt-green); color: #fff; box-shadow: 0 7px 18px rgba(22,131,107,.2); }
.receipt-action-primary:hover:not(:disabled) { transform: translateY(-1px); background: color-mix(in srgb, var(--receipt-green), #0a3427 12%); box-shadow: 0 10px 23px rgba(22,131,107,.24); }
.receipt-action-secondary { border-color: var(--border-color, #e4e9e6); background: var(--bg-card, #fff); color: var(--text-primary, #15211d); }
.receipt-action-secondary:hover:not(:disabled) { background: var(--bg-secondary, #f5f8f6); }
.receipt-action-primary:active:not(:disabled), .receipt-action-secondary:active:not(:disabled) { transform: scale(.985); }
.receipt-action-primary:focus-visible, .receipt-action-secondary:focus-visible, .receipt-scanner-close:focus-visible, .receipt-review-reshoot:focus-visible { outline: 3px solid rgba(22,131,107,.34); outline-offset: 2px; }
.receipt-action-primary:disabled, .receipt-action-secondary:disabled { opacity: .55; cursor: wait; }
.receipt-file-input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.receipt-scanner-privacy { display: flex; align-items: flex-start; justify-content: center; gap: .45rem; margin: .9rem 0 .1rem; color: var(--text-muted, #68766f); font-size: .66rem !important; }
.receipt-scanner-privacy i { margin-top: .1rem; color: var(--receipt-green); }
.receipt-camera-screen { padding-top: .8rem; }
.receipt-camera-frame { position: relative; width: 100%; aspect-ratio: 4 / 5; max-height: min(52dvh, 440px); overflow: hidden; border-radius: 1.15rem; background: #101816; box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); }
.receipt-camera-frame video { width: 100%; height: 100%; object-fit: cover; }
.receipt-camera-guide { position: absolute; inset: 11% 16%; display: grid; place-items: center; border: 1px solid rgba(245,255,249,.78); border-radius: .85rem; box-shadow: 0 0 0 100vmax rgba(0,0,0,.16); }
.receipt-camera-guide::before, .receipt-camera-guide::after { position: absolute; width: 1.2rem; height: 1.2rem; border-color: #a5e0bf; border-style: solid; content: ''; }
.receipt-camera-guide::before { top: -.08rem; left: -.08rem; border-width: 2px 0 0 2px; border-radius: .35rem 0 0; }
.receipt-camera-guide::after { right: -.08rem; bottom: -.08rem; border-width: 0 2px 2px 0; border-radius: 0 0 .35rem; }
.receipt-camera-guide span { width: 82%; border-top: 1px solid rgba(210,255,228,.72); animation: receipt-camera-line 2.6s ease-in-out infinite alternate; }
.receipt-camera-guide { animation: receipt-guide-breathe 2.8s ease-in-out infinite; }
.receipt-camera-guide span { box-shadow: 0 0 16px 3px rgba(139,234,187,.45); }
.receipt-camera-actions { grid-template-columns: 1fr auto; }
.receipt-review-screen { padding-top: .75rem; }
.receipt-review-photo-wrap { position: relative; display: grid; height: 7rem; overflow: hidden; place-items: center; border: 1px solid var(--border-color, #e4e9e6); border-radius: 1rem; background: linear-gradient(135deg, #f3f7f4, #edf2ef); }
.receipt-review-photo-wrap img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
.receipt-review-photo-badge { position: absolute; right: .5rem; bottom: .5rem; display: inline-flex; align-items: center; gap: .28rem; padding: .3rem .5rem; border: 1px solid rgba(255,255,255,.8); border-radius: 999px; background: rgba(255,255,255,.9); color: #187352; font-size: .61rem; font-weight: 700; box-shadow: 0 3px 10px rgba(0,0,0,.08); }
.receipt-review-photo-badge:not(:disabled) { cursor:pointer; min-height:2.75rem; padding-inline:.75rem; font-size:.75rem; color:#116c55; }
.receipt-review-photo-badge:disabled { visibility:hidden; }
.receipt-photo-dialog { position:fixed; inset:0; width:min(720px,calc(100vw - 1rem)); height:fit-content; max-width:none; max-height:94dvh; margin:auto; padding:0; border:1px solid var(--border-color,#dce7e2); border-radius:1rem; background:var(--bg-card,#fff); color:var(--text-primary,#17231e); }
.receipt-photo-dialog[open] { display:flex; flex-direction:column; }
.receipt-photo-dialog::backdrop { background:rgba(18,28,27,.70); }
.receipt-photo-header { display:flex; flex-wrap:wrap; align-items:center; gap:.45rem; padding:.65rem; border-bottom:1px solid var(--border-color,#dce7e2); }
.receipt-photo-header h3 { flex:1 0 7rem; margin:0; font-size:.9rem; }
.receipt-photo-header button { min-height:2.75rem; }
.receipt-photo-header button[aria-pressed="true"] { background:#116c55; color:white; }
.receipt-photo-help { margin:0; padding:.35rem .65rem; color:var(--text-secondary,#3c5147); font-size:.75rem; }
.receipt-photo-scroll { min-height:0; overflow:auto; overscroll-behavior:contain; background:var(--bg-secondary,#edf2ef); }
.receipt-photo-scroll img { display:block; width:100%; max-height:min(70dvh,850px); object-fit:contain; margin:0 auto; }
.receipt-photo-image { position:relative; width:100%; }
.receipt-photo-scroll[data-zoomed="true"] .receipt-photo-image { width:200%; }
.receipt-photo-scroll[data-zoomed="true"] img { max-width:none; max-height:none; }
#receiptPhotoHighlight { position:absolute; border:2px solid #16836b; outline:2px solid white; background:#27bf7b30; pointer-events:none; border-radius:3px; }
#receiptExtraPhotos { margin:.45rem 0; }
.receipt-article-reread { display:grid; gap:.55rem; margin:.6rem 0; }
.receipt-article-reread h3 { margin:0; font-size:1rem; }
.receipt-article-reread button { justify-self:start; min-height:2.75rem; white-space:normal; }
.receipt-article-reread p,.receipt-article-balance { margin:0; color:var(--text-secondary,#41536d); overflow-wrap:anywhere; }
.receipt-article-proposal { margin:.5rem 0; padding:0; list-style:none; max-height:16rem; overflow:auto; overscroll-behavior:contain; }
.receipt-article-proposal li { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:.5rem; padding:.45rem 0; border-bottom:1px solid var(--border-color,#d8e2ef); overflow-wrap:anywhere; }
.receipt-article-proposal li span:last-child { white-space:nowrap; font-variant-numeric:tabular-nums; }
.receipt-article-prices { display:grid; gap:.55rem; margin:.55rem 0 0; padding:0; list-style:none; }
.receipt-article-prices li { padding:.55rem 0; border-top:1px solid var(--border-color,#d8e2ef); overflow-wrap:anywhere; }
.receipt-article-price-actions { display:flex; flex-wrap:wrap; gap:.35rem; margin-top:.4rem; }
.receipt-article-source { grid-column:1/-1; display:flex; flex-wrap:wrap; gap:.3rem; }
.receipt-article-source button { min-height:2.75rem; }
#receiptArticleRows { display:grid; gap:.65rem; margin-top:.6rem; }
.receipt-article-row { display:grid; grid-template-columns:1fr 1fr; gap:.35rem .55rem; align-items:end; }
.receipt-article-row-header { display:flex; grid-column:1/-1; gap:.4rem; align-items:end; }
.receipt-article-row-header label { flex:1; }
.receipt-article-row-header button,.receipt-add-article { min-height:2.75rem; white-space:normal; }
.receipt-add-article { margin:.65rem 0 0; }
.receipt-article-row label { display:grid; gap:.2rem; min-width:0; }
.receipt-article-row :is(input,select) { width:100%; min-width:0; min-height:2.75rem; padding:.45rem .55rem; border:1px solid var(--border-color,#d8e2ef); border-radius:.65rem; background:var(--bg-card,#fff); color:var(--text-primary,#172135); font:inherit; font-size:1rem; }

.financial-follow-up { position:fixed; inset:0; margin:auto; width:min(920px,calc(100vw - 1rem)); height:fit-content; max-height:92dvh; max-width:none; border:1px solid var(--border-color,#d8e2ef); border-radius:22px; padding:0; color:var(--text-primary,#172135); background:var(--bg-card,#fff); box-shadow:0 24px 70px #06142e55; }
.financial-follow-up[open] { display:flex; flex-direction:column; }
.financial-follow-up::backdrop { background:#0b192d8a; }
.follow-header { display:flex; justify-content:space-between; align-items:center; gap:.6rem; padding:1rem 1.25rem .65rem; }
.follow-header h2 { margin:0; font-size:1.4rem; font-weight:750; }
.follow-header p,.follow-content p { margin:.25rem 0; }
.follow-tabs { display:flex; flex-wrap:wrap; gap:.4rem; padding:.5rem 1.25rem; border-bottom:1px solid var(--border-color,#d8e2ef); }
.follow-tabs button { flex:0 0 auto; min-height:2.5rem; padding:.4rem .7rem; border-radius:.65rem; border:1px solid var(--border-color,#d8e2ef); background:var(--bg-card,#fff); color:var(--text-primary,#172135); font:inherit; font-size:.82rem; font-weight:650; }
.follow-tabs button[aria-pressed="true"] { background:#164fb8; color:white; border-color:#164fb8; }
.follow-more-tabs { display:none; }
@media(max-width:540px){
  .follow-tabs .follow-secondary-tab { display:none; }
  .follow-more-tabs:not([hidden]) { display:block; min-width:0; grid-column:span 2; }
  .follow-more-tabs select { width:100%; min-height:2.5rem; border:1px solid var(--border-color,#d8e2ef); border-radius:.65rem; background:var(--bg-card,#fff); color:var(--text-primary,#172135); font:inherit; font-size:.82rem; padding:.35rem; }
}
.financial-follow-up :is(button,input,select,textarea,summary):focus-visible { outline:2px solid #4f86ef; outline-offset:2px; }
.follow-content { min-height:0; overflow:auto; overscroll-behavior:contain; padding:.7rem 1.25rem 1.25rem; }
.follow-content :is(h3,h4) { margin:.35rem 0; font-weight:750; }
.follow-content h3 { font-size:1.2rem; }
.follow-status:empty { display:none; }
.follow-status[data-error="true"] { color:#b42318; }
body.dark-mode .follow-status[data-error="true"] { color:#ffac9e; }
.follow-content .follow-empty { padding:.8rem 0; }
.follow-control { display:grid; gap:.3rem; width:min(100%,16rem); margin:.5rem 0; }
.follow-actions { display:flex; flex-wrap:wrap; gap:.4rem; }
.follow-row { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:.35rem .8rem; padding:.65rem 0; border-bottom:1px solid var(--border-color,#d8e2ef); overflow-wrap:anywhere; }
.follow-row :is(strong,time,small) { display:block; }
.follow-row .follow-actions { grid-column:1/-1; }
.follow-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,12rem),1fr)); gap:.6rem; align-items:end; }
.follow-grid label { display:grid; gap:.25rem; min-width:0; }
.follow-grid .form-input { width:100%; min-width:0; font-size:1rem; }
.follow-form-card,.follow-result { margin:.65rem 0; padding:.75rem; border:1px solid var(--border-color,#d8e2ef); border-radius:.85rem; }
.follow-form-card summary { cursor:pointer; font-weight:700; }
.follow-form-card form { margin:.6rem 0 0; }
.follow-comparison { display:grid; grid-template-columns:auto repeat(2,minmax(0,1fr)); gap:.45rem; padding:.35rem 0; border-bottom:1px solid var(--border-color,#d8e2ef); overflow-wrap:anywhere; }
.follow-comparison b { display:block; }
.follow-month-totals { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:.5rem; margin:.7rem 0; }
.follow-month-totals div { display:grid; gap:.2rem; min-width:0; padding:.65rem; border:1px solid var(--border-color,#d8e2ef); border-radius:.65rem; overflow-wrap:anywhere; }
.follow-month-totals dd { margin:0; font-weight:750; }
.follow-aging-totals{grid-template-columns:repeat(4,minmax(0,1fr))}
.follow-aging-totals div:nth-child(n+3){border-inline-start:3px solid #be7126}
.follow-aging-warning{padding:.65rem .8rem;border:1px solid var(--border-color,#d8e2ef);border-radius:.65rem}
.follow-aging-buckets{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:.55rem;margin:.6rem 0 .9rem}
.follow-aging-buckets article{min-width:0;display:flex;flex-direction:column;gap:.15rem;padding:.7rem;
  border:1px solid var(--border-color,#d8e2ef);border-radius:.7rem;overflow-wrap:anywhere}
.follow-aging-buckets span,.follow-aging-buckets dt{color:var(--text-secondary,#455a70);font-size:.77rem}
.follow-aging-buckets dl{margin:.35rem 0 .25rem}
.follow-aging-buckets dl>div{display:flex;flex-wrap:wrap;justify-content:space-between;gap:.1rem .35rem}
.follow-aging-buckets dd,.follow-aging-totals dd{margin:0;font-weight:750;font-variant-numeric:tabular-nums}
.follow-aging-buckets button{margin-top:auto;align-self:start;min-height:34px;text-align:start}
#followAgingRows:focus-visible{outline:2px solid #3376dd;outline-offset:3px}
@media(max-width:780px){.follow-aging-buckets{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:540px){
  .follow-aging-buckets,.follow-aging-totals{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:540px){ .follow-month-totals{grid-template-columns:1fr;gap:.25rem} .follow-month-totals div{grid-template-columns:minmax(0,1fr) auto;align-items:center;padding:.45rem .5rem} }
@media(max-width:540px){ .follow-header,.follow-tabs,.follow-content{padding-inline:.75rem} .follow-row{grid-template-columns:minmax(0,1fr)} }
@media(max-width:430px){
  .follow-tabs { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); }
  .follow-tabs button { min-width:0; padding:.35rem .22rem; line-height:1.2; overflow-wrap:anywhere; }
}
.receipt-review-heading { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin: .85rem 0 .2rem; }
.receipt-review-heading h3 { margin: .08rem 0 0; font-size: 1rem; letter-spacing: -.02em; }
.receipt-review-reshoot { display: inline-flex; align-items: center; gap: .35rem; padding: .45rem .6rem; border: 1px solid var(--border-color, #e4e9e6); border-radius: .7rem; background: var(--bg-card, #fff); color: var(--text-primary, #15211d); font: inherit; font-size: .68rem; font-weight: 650; cursor: pointer; }
.receipt-review-note { margin: .3rem 0 .65rem; text-align: left !important; font-size: .69rem !important; }
.receipt-review-priority { margin:.2rem 0 .75rem; padding:.6rem .75rem; border:1px solid color-mix(in srgb,var(--receipt-green,#16836b) 20%,transparent); border-radius:.8rem; background:color-mix(in srgb,var(--receipt-green,#16836b) 7%,var(--bg-card,#fff)); color:var(--text-primary,#27342f); font-size:.73rem; font-weight:700; line-height:1.4; }
.receipt-review-fields { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem .65rem; }
.receipt-review-fields label { display: grid; min-width: 0; grid-template-columns: max-content 1fr; align-items: baseline; gap: .3rem .35rem; color: var(--text-primary, #27342f); font-size: .69rem; font-weight: 650; }
.transaction-time { display: block; margin-top: .2rem; color: var(--text-muted, #718096); font-size: .7rem; font-weight: 500; }
.receipt-review-fields label > span { margin-left: .25rem; color: var(--text-muted, #748179); font-size: .59rem; font-weight: 450; }
.receipt-review-fields label > span[data-confidence="high"] { color: #116c55; font-weight: 750; }
.receipt-review-fields label > span:is([data-confidence="review"],[data-confidence="missing"],[data-confidence="conflict"]) { color: #944129; font-weight: 750; }
body.dark-mode .receipt-review-fields label > span[data-confidence="high"] { color: #86d9bd; }
body.dark-mode .receipt-review-fields label > span:is([data-confidence="review"],[data-confidence="missing"],[data-confidence="conflict"]) { color: #ffab93; }
.receipt-review-fields select[data-freev-native-select] { appearance: auto; }
.receipt-review-fields input, .receipt-review-fields select { width: 100%; min-width: 0; min-height: 2.7rem; padding: .55rem .65rem; border: 1px solid var(--border-color, #e1e8e4); border-radius: .72rem; outline: 0; background: var(--bg-card, #fff); color: var(--text-primary, #15211d); font: inherit; font-size: .78rem; transition: border-color .16s ease, box-shadow .16s ease; }
.receipt-review-fields input, .receipt-review-fields select { grid-column: 1 / -1; }
.receipt-review-fields input:focus, .receipt-review-fields select:focus { border-color: var(--receipt-green); box-shadow: 0 0 0 3px rgba(22,131,107,.12); }
.receipt-review-fields input[aria-invalid="true"] { border-color: #bd5550; box-shadow: 0 0 0 3px rgba(189,85,80,.1); }
.receipt-description-field { grid-column: 1 / -1; }
.receipt-currency-note { min-height: .8rem; margin: .5rem 0 0 !important; color: var(--text-muted, #68766f); font-size: .66rem !important; text-align: left !important; }
.receipt-prefill-photo { margin: -.3rem 0 1rem; border: 1px solid var(--border-color, #e4e9e6); border-radius: .85rem; background: var(--bg-card, #fff); overflow: hidden; }
.receipt-prefill-photo.hidden { display: none; }
.receipt-prefill-photo summary { padding: .75rem .9rem; color: var(--text-primary, #15211d); font-size: .8rem; font-weight: 700; cursor: pointer; }
.receipt-prefill-photo img { display: block; max-width: 100%; max-height: 18rem; margin: 0 auto .75rem; object-fit: contain; }
.receipt-analyze-button { width: 100%; margin-top: .6rem; }
.receipt-processing-screen { display: flex; min-height: 22rem; flex-direction: column; align-items: center; justify-content: center; padding: 1rem .25rem .5rem; text-align: center; }
.receipt-processing-art { position: relative; display: grid; width: 6.3rem; height: 6.3rem; overflow: hidden; place-items: center; border-radius: 1.9rem; background: linear-gradient(145deg, #f2faf5, #dcefe4); color: var(--receipt-green); font-size: 1.8rem; }
.receipt-processing-ring { position: absolute; inset: .35rem; border: 1px solid rgba(22,131,107,.2); border-radius: 1.65rem; animation: receipt-ring 1.9s ease-in-out infinite; }
.receipt-processing-scanline { position: absolute; right: .55rem; left: .55rem; top: 18%; height: 2px; background: #78c49c; box-shadow: 0 0 12px 2px rgba(120,196,156,.36); animation: receipt-scanline 1.8s ease-in-out infinite alternate; }
.receipt-processing-kicker { margin: 1rem 0 0 !important; color: var(--receipt-green) !important; font-size: .6rem !important; font-weight: 800; letter-spacing: .14em; }
.receipt-processing-screen > h3 { margin: .38rem 0 .2rem; }
.receipt-processing-screen > p:not(.receipt-processing-kicker) { max-width: 23rem; margin: .15rem 0 .95rem; }
.receipt-progress-track { position: relative; width: min(100%, 22rem); height: .42rem; overflow: hidden; border-radius: 999px; background: var(--bg-secondary, #e9efeb); }
.receipt-progress-track > span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #1f8065, #71bf96); transition: width .24s ease; }
.receipt-progress-track.is-indeterminate > span { width: 36%; animation: receipt-progress-indeterminate 1.25s ease-in-out infinite; }
.receipt-processing-footer { display: flex; width: min(100%, 22rem); justify-content: space-between; gap: .5rem; margin: .45rem 0 1rem; color: var(--text-muted, #68766f); font-size: .63rem; }
.receipt-processing-footer span:last-child { color: var(--text-primary, #27342f); font-variant-numeric: tabular-nums; }
.receipt-scanner-footer { display: flex; justify-content: center; margin-top: 1rem; padding-top: .8rem; border-top: 1px solid var(--border-color, #e8edea); color: var(--text-muted, #68766f); font-size: .65rem; }
.receipt-scanner-footer i { margin-right: .3rem; color: var(--receipt-green); }
.receipt-scanner-dialog button:focus-visible, .receipt-scanner-dialog input:focus-visible, .receipt-scanner-dialog select:focus-visible { outline: 3px solid rgba(22,131,107,.28); outline-offset: 2px; }

body.dark-mode .receipt-scanner-dialog { --text-primary: #e7f0eb; --text-muted: #a7b5ad; --bg-card: #18231f; --bg-secondary: #202e28; --border-color: #33443b; border-color: #33443b; }
body.dark-mode .receipt-scanner-dialog .receipt-review-photo-wrap { background: #202e28; }
body.dark-mode .receipt-scanner-dialog .receipt-review-photo-badge { background: rgba(24,35,31,.9); border-color: #33443b; }
body.dark-mode .receipt-scanner-dialog .receipt-review-photo-badge:not(:disabled) { color:#a0ead0; }

@media (max-width: 768px) {
  .receipt-scan-entry { position: relative; display: grid; grid-template-columns: 2.6rem minmax(0, 1fr); align-items: center; gap: .7rem; margin: .25rem 0 1rem; padding: .85rem; border: 1px solid rgba(22,131,107,.16); border-radius: 1.15rem; background: radial-gradient(ellipse at 0 0, rgba(183,230,202,.34), transparent 56%), var(--bg-card, #fff); box-shadow: 0 7px 23px rgba(20,54,39,.055); }
  .receipt-scan-entry-mark { display: grid; width: 2.55rem; height: 2.55rem; grid-row: span 2; place-items: center; border-radius: .85rem; background: #e3f4e9; color: #18785d; font-size: 1rem; }
  .receipt-scan-entry-copy { min-width: 0; }
  .receipt-scan-entry-copy > span { color: #278064; font-size: .55rem; font-weight: 800; letter-spacing: .11em; }
  .receipt-scan-entry-copy h2 { margin: .13rem 0 .12rem; font-size: .9rem; line-height: 1.2; letter-spacing: -.025em; }
  .receipt-scan-entry-copy p { margin: 0; color: var(--text-muted, #68766f); font-size: .67rem; line-height: 1.35; }
  .receipt-scan-entry-button { display: inline-flex; min-height: 2.55rem; grid-column: 2; align-items: center; justify-content: center; gap: .5rem; margin-top: .15rem; padding: .5rem .7rem; border: 0; border-radius: .76rem; background: #1b7e63; color: white; font: inherit; font-size: .72rem; font-weight: 700; box-shadow: 0 5px 13px rgba(27,126,99,.18); cursor: pointer; transition: transform .16s ease, box-shadow .16s ease; }
  .receipt-scan-entry-button:active { transform: scale(.98); }
  .receipt-scan-entry-arrow { margin-left: auto; font-size: .65rem; opacity: .72; }
  .receipt-scanner-dialog { position: fixed; inset: auto 0 0; width: 100%; max-width: none; max-height: min(94dvh, 960px); margin: 0; border: 1px solid rgba(255,255,255,.8); border-bottom: 0; border-radius: 1.55rem 1.55rem 0 0; padding-bottom: env(safe-area-inset-bottom); }
  .receipt-scanner-shell { padding: 1.05rem max(1rem, env(safe-area-inset-right)) 1rem max(1rem, env(safe-area-inset-left)); }
  .receipt-scanner-dialog::backdrop { background: rgba(18,28,27,.5); }
  .receipt-scanner-dialog[open] { animation-name: receipt-sheet-in; }
  .receipt-scanner-start-art { margin-top: .9rem; }
  .receipt-scanner-screen > h3 { font-size: 1.04rem; }
  .receipt-scanner-screen > p { font-size: .75rem; }
  .receipt-camera-frame { max-height: min(46dvh, 430px); }
  .receipt-processing-screen { min-height: 19rem; }
}

@media (max-width: 390px) {
  .receipt-scan-entry { padding: .7rem; gap: .55rem; }
  .receipt-scan-entry-copy h2 { font-size: .82rem; }
  .receipt-scan-entry-copy p { font-size: .62rem; }
  .receipt-scan-entry-button { font-size: .68rem; }
  .receipt-review-fields { gap: .5rem; }
  .receipt-review-fields label { font-size: .65rem; }
  .receipt-review-fields input, .receipt-review-fields select { padding-inline: .5rem; font-size: .74rem; }
}

@media (prefers-reduced-motion: reduce) {
  .receipt-scanner-dialog, .receipt-scanner-dialog *, .receipt-scanner-dialog::backdrop, .receipt-scan-entry-button { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@keyframes receipt-dialog-in { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes receipt-sheet-in { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: translateY(0); } }
@keyframes receipt-backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes receipt-screen-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@keyframes receipt-ring { 50% { transform: scale(.93) rotate(-4deg); opacity: .58; } }
@keyframes receipt-scanline { to { top: 81%; } }
@keyframes receipt-camera-line { to { transform: translateY(5.5rem); opacity: .35; } }
@keyframes receipt-guide-breathe { 50% { border-color: rgba(188,255,216,.95); box-shadow: 0 0 0 100vmax rgba(0,0,0,.16), inset 0 0 24px rgba(126,221,173,.14); } }
@keyframes receipt-progress-indeterminate { from { transform: translateX(-120%); } to { transform: translateX(320%); } }

@media (max-width: 768px) {
  .receipt-prefill-notice { display: flex; gap: .65rem; margin-bottom: 1rem; padding: .85rem; border-radius: .85rem; background: #e8f6ef; color: #17634d; font-size: .82rem; line-height: 1.45; }
  .receipt-prefill-notice.hidden { display: none; }
  .receipt-prefill-notice.is-duplicate { background: #fff4e5; color: #8b4b16; }
}

/* Caméra : repères nets, mouvement discret et retour immédiat à la capture. */
.receipt-camera-frame { isolation: isolate; background: #0a1715; }
.receipt-camera-frame video { display: block; }
.receipt-camera-vignette { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(4,16,14,.24), transparent 24% 72%, rgba(4,16,14,.34)); }
.receipt-camera-guide { inset: 10% 13%; border: 1px solid rgba(218,255,231,.42); border-radius: 1rem; animation: receipt-frame-breathe 3.6s ease-in-out infinite; }
.receipt-camera-guide::before, .receipt-camera-guide::after { content: none; }
.receipt-corner { position: absolute; width: 1.7rem; height: 1.7rem; border: 3px solid #8de8bb; filter: drop-shadow(0 0 7px rgba(104,235,167,.6)); }
.receipt-corner-tl { top: -.13rem; left: -.13rem; border-width: 3px 0 0 3px; border-radius: .7rem 0 0; }
.receipt-corner-tr { top: -.13rem; right: -.13rem; border-width: 3px 3px 0 0; border-radius: 0 .7rem 0 0; }
.receipt-corner-bl { bottom: -.13rem; left: -.13rem; border-width: 0 0 3px 3px; border-radius: 0 0 0 .7rem; }
.receipt-corner-br { bottom: -.13rem; right: -.13rem; border-width: 0 3px 3px 0; border-radius: 0 0 .7rem; }
.receipt-camera-guide > span { position: absolute; top: 10%; left: 8%; width: 84%; height: 2px; border: 0; background: linear-gradient(90deg, transparent, #a7ffcd 22% 78%, transparent); box-shadow: 0 0 15px 4px rgba(125,250,178,.42); animation: receipt-camera-sweep 3.4s cubic-bezier(.42,0,.58,1) infinite alternate; }
.receipt-camera-hud { position: absolute; top: .8rem; left: 50%; display: inline-flex; align-items: center; gap: .45rem; padding: .43rem .68rem; transform: translateX(-50%); border: 1px solid rgba(255,255,255,.24); border-radius: 999px; background: rgba(4,27,22,.68); color: #effff5; font-size: .68rem; font-weight: 700; white-space: nowrap; backdrop-filter: blur(8px); }
.receipt-camera-hud { max-width: calc(100% - 1rem); white-space: normal; text-align: center; }
.receipt-camera-hint { min-height: 2.8em; margin: .7rem 0 0; color: #456157; font-size: .86rem; line-height: 1.4; text-align: center; }
.receipt-camera-frame[data-quality="ready"] .receipt-camera-guide { border-color: rgba(133,245,172,.88); }
.receipt-camera-frame[data-quality="adjust"] .receipt-camera-guide { border-color: rgba(255,216,142,.75); }
.receipt-camera-frame[data-quality="adjust"] .receipt-corner { border-color: #ffd88e; filter: drop-shadow(0 0 6px rgba(255,195,100,.35)); }
.receipt-camera-frame[data-quality="adjust"] .receipt-camera-live-dot { background: #ffd88e; box-shadow: 0 0 0 .25rem rgba(255,216,142,.14); }
.receipt-camera-live-dot { width: .42rem; height: .42rem; border-radius: 50%; background: #84f5ae; box-shadow: 0 0 0 .25rem rgba(132,245,174,.16); animation: receipt-live-pulse 2s ease-in-out infinite; }
.receipt-camera-flash { position: absolute; inset: 0; z-index: 4; background: white; opacity: 0; pointer-events: none; }
.receipt-camera-frame.is-capturing .receipt-camera-flash { animation: receipt-capture-flash .36s ease-out both; }

/* Lecture : une feuille abstraite balayée, avec étapes liées au vrai moteur OCR. */
.receipt-processing-screen { min-height: 27rem; }
.receipt-processing-art { isolation: isolate; width: 12rem; height: 12.4rem; overflow: visible; margin: .2rem auto .45rem; border: 0; border-radius: 2.3rem; background: radial-gradient(circle at 50% 45%, #eafaf0 0, #e8f4ee 54%, transparent 73%); box-shadow: none; }
.receipt-processing-halo { position: absolute; inset: .25rem; border: 1px solid rgba(29,149,107,.2); border-radius: 2.1rem; box-shadow: 0 0 0 1rem rgba(41,170,119,.045), 0 0 0 2rem rgba(41,170,119,.026); animation: receipt-halo-breathe 3.2s ease-in-out infinite; }
.receipt-processing-paper { position: absolute; top: 1.05rem; left: 2.35rem; width: 7.3rem; height: 9.6rem; padding: 1.05rem .8rem; border: 1px solid rgba(53,115,89,.13); border-radius: .42rem .42rem .65rem .65rem; background: linear-gradient(155deg, #fff 0%, #fcfffd 58%, #effaf3 100%); box-shadow: 0 1rem 2.2rem rgba(27,81,57,.16), inset 0 1px 0 #fff; transform: rotate(-4deg); animation: receipt-paper-float 3.3s ease-in-out infinite; }
.receipt-processing-paper::after { position: absolute; right: .45rem; bottom: .4rem; left: .45rem; height: 1px; background: repeating-linear-gradient(90deg, #c5dccc 0 4px, transparent 4px 8px); content: ''; }
.receipt-processing-paper > span { display: block; height: .34rem; margin-bottom: .65rem; border-radius: 999px; background: #dce9df; }
.receipt-processing-paper .receipt-paper-heading { width: 55%; height: .48rem; margin: 0 auto 1.2rem; background: #88c6a1; }
.receipt-processing-paper .receipt-paper-row-one { width: 83%; }
.receipt-processing-paper .receipt-paper-row-two { width: 65%; }
.receipt-processing-paper .receipt-paper-row-three { width: 75%; }
.receipt-processing-paper .receipt-paper-total { width: 58%; height: .52rem; margin: 1.05rem 0 0 auto; background: #72bc91; }
.receipt-processing-beam { position: absolute; z-index: 2; top: 17%; left: 1.55rem; width: 8.9rem; height: .24rem; border-radius: 999px; background: linear-gradient(90deg, transparent, #52d897 18% 82%, transparent); box-shadow: 0 0 .8rem .22rem rgba(68,223,139,.42), 0 .6rem 1.7rem rgba(68,223,139,.17); animation: receipt-paper-scan 2.5s cubic-bezier(.46,.02,.54,.98) infinite alternate; }
.receipt-processing-spark { position: absolute; z-index: 3; width: .42rem; height: .42rem; border-radius: 50%; background: #54d78f; box-shadow: 0 0 .65rem .2rem rgba(84,215,143,.3); animation: receipt-spark 2.4s ease-in-out infinite; }
.receipt-processing-spark-one { top: 2.2rem; right: 1rem; }
.receipt-processing-spark-two { bottom: 2.4rem; left: .8rem; animation-delay: 1.1s; }
.receipt-processing-steps { display: grid; width: min(100%,22rem); grid-template-columns: repeat(3,1fr); gap: .35rem; margin: .7rem auto 1rem; }
.receipt-processing-steps span { position: relative; padding-top: .62rem; color: var(--text-muted,#68766f); font-size: .66rem; font-weight: 700; text-align: center; transition: color .25s ease; }
.receipt-processing-steps span::before { position: absolute; top: 0; right: .12rem; left: .12rem; height: .2rem; border-radius: 999px; background: var(--bg-secondary,#e5ebe7); content: ''; transition: background .3s ease, box-shadow .3s ease; }
.receipt-processing-screen[data-stage="prepare"] [data-receipt-step="prepare"],
.receipt-processing-screen[data-stage="read"] [data-receipt-step="read"],
.receipt-processing-screen[data-stage="verify"] [data-receipt-step="verify"] { color: var(--receipt-green); }
.receipt-processing-screen[data-stage="prepare"] [data-receipt-step="prepare"]::before,
.receipt-processing-screen[data-stage="read"] [data-receipt-step="read"]::before,
.receipt-processing-screen[data-stage="verify"] [data-receipt-step="verify"]::before { background: #35b987; box-shadow: 0 0 0 .15rem rgba(53,185,135,.13); }
.receipt-processing-screen[data-stage="read"] [data-receipt-step="prepare"]::before,
.receipt-processing-screen[data-stage="verify"] [data-receipt-step="prepare"]::before,
.receipt-processing-screen[data-stage="verify"] [data-receipt-step="read"]::before { background: #a0d7b7; }
.receipt-progress-track { height: .48rem; }
.receipt-progress-track > span { background: linear-gradient(90deg,#1d8b6a,#4bd894 70%,#a7f2c4); }
body.dark-mode .receipt-processing-art { background: radial-gradient(circle at 50% 45%, #214535, #1e332b 55%, transparent 73%); }
body.dark-mode .receipt-processing-paper { background: linear-gradient(155deg,#ecf9f0,#d9eee0); }

@keyframes receipt-frame-breathe { 50% { border-color: rgba(217,255,231,.78); } }
@keyframes receipt-camera-sweep { to { top: 88%; opacity: .48; } }
@keyframes receipt-live-pulse { 50% { box-shadow: 0 0 0 .38rem rgba(132,245,174,.08); opacity: .7; } }
@keyframes receipt-capture-flash { 0%,100% { opacity: 0; } 32% { opacity: .7; } }
@keyframes receipt-halo-breathe { 50% { transform: scale(.95); opacity: .62; } }
@keyframes receipt-paper-float { 50% { transform: translateY(-.34rem) rotate(-2deg); } }
@keyframes receipt-paper-scan { to { top: 79%; opacity: .65; } }
@keyframes receipt-spark { 50% { transform: translateY(-.45rem) scale(.65); opacity: .4; } }

@media (prefers-reduced-motion: reduce) {
  .receipt-camera-guide, .receipt-camera-guide > span, .receipt-camera-live-dot, .receipt-camera-frame.is-capturing .receipt-camera-flash,
  .receipt-processing-halo, .receipt-processing-paper, .receipt-processing-beam, .receipt-processing-spark { animation: none !important; transition: none !important; }
  .receipt-camera-frame.is-capturing .receipt-camera-flash { opacity: 0; }
}

/* Icône d'accueil : un mouvement continu léger, limité à quelques petits calques. */
.receipt-scanner-start-art { isolation: isolate; overflow: hidden; animation: receipt-start-float 4.2s ease-in-out infinite; }
.receipt-scanner-start-art::before { position: absolute; inset: .5rem; z-index: -1; border-radius: 2.15rem; background: radial-gradient(circle at 50% 55%, rgba(77,186,129,.13), transparent 68%); content: ''; }
.receipt-scanner-start-art > .fa-receipt { z-index: 2; transform-origin: center; animation: receipt-icon-breathe 3.1s ease-in-out infinite; }
.receipt-scan-orbit { transform: rotate(-12deg); animation: receipt-orbit-turn 16s linear infinite; }
.receipt-scan-orbit-inner { inset: 1.08rem; border-style: dashed; border-color: rgba(27,143,101,.23); border-radius: 1.5rem; animation-duration: 22s; animation-direction: reverse; }
.receipt-start-scanline { position: absolute; z-index: 3; top: 21%; left: 24%; width: 52%; height: 2px; border-radius: 999px; background: linear-gradient(90deg,transparent,#37bc80 18% 82%,transparent); box-shadow: 0 0 .65rem .18rem rgba(55,188,128,.28); animation: receipt-start-scan 3.25s ease-in-out infinite alternate; }
.receipt-scan-spark { animation: receipt-start-spark 3s ease-in-out infinite; }
.receipt-scan-spark-two { animation-delay: 1.15s; }
@keyframes receipt-start-float { 50% { transform: translateY(-.3rem); } }
@keyframes receipt-icon-breathe { 50% { transform: scale(1.08) rotate(-3deg); } }
@keyframes receipt-orbit-turn { to { transform: rotate(348deg); } }
@keyframes receipt-start-scan { to { top: 76%; opacity: .54; } }
@keyframes receipt-start-spark { 50% { transform: scale(.7); opacity: .5; } }

@media (max-width: 768px) {
  .receipt-scanner-dialog { max-height: calc(100vh - env(safe-area-inset-top) - .35rem); max-height: calc(100dvh - env(safe-area-inset-top) - .35rem); padding-bottom: 0; -webkit-overflow-scrolling: touch; }
  .receipt-scanner-shell { padding: 1rem max(.9rem,env(safe-area-inset-right)) calc(.9rem + env(safe-area-inset-bottom)) max(.9rem,env(safe-area-inset-left)); }
  .receipt-scanner-account { min-width: 0; }
  .receipt-scanner-account strong { max-width: 55%; }
  .receipt-review-fields input, .receipt-review-fields select { font-size: 16px; }
  .receipt-scanner-screen > p { line-height: 1.45; }
}

@media (max-width: 390px) {
  .receipt-review-fields { grid-template-columns: minmax(0,1fr); }
  .receipt-review-fields label { grid-column: 1; }
  .receipt-scanner-title-copy h2 { font-size: 1.08rem; }
  .receipt-scanner-title-copy > span { font-size: .56rem; }
  .receipt-scanner-intro { font-size: .76rem; }
  .receipt-scanner-actions { gap: .5rem; }
  .receipt-action-primary, .receipt-action-secondary { min-height: 2.85rem; padding-inline: .7rem; }
}

@media (max-width: 768px) and (max-height: 670px) {
  .receipt-scanner-start-art { width: 6.2rem; height: 6.2rem; margin: .65rem auto .5rem; border-radius: 1.9rem; font-size: 1.9rem; }
  .receipt-scan-orbit { inset: .45rem; border-radius: 1.5rem; }
  .receipt-scan-orbit-inner { inset: .9rem; border-radius: 1.1rem; }
  .receipt-scanner-start-art + h3 { margin-top: .3rem; }
  .receipt-camera-frame { max-height: 38dvh; }
  .receipt-processing-screen { min-height: 20rem; }
  .receipt-processing-art { width: 9rem; height: 9rem; transform: scale(.78); margin: -.6rem auto -.3rem; }
}

@media (pointer: coarse) and (orientation: landscape) and (max-height: 600px) {
  .receipt-scan-entry { display: grid; grid-template-columns: 2.6rem minmax(0,1fr); align-items: center; gap: .65rem; padding: .75rem; border: 1px solid rgba(22,131,107,.16); border-radius: 1rem; background: var(--bg-card,#fff); }
  .receipt-scan-entry-mark { display: grid; grid-row: span 2; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: .8rem; background: #e3f4e9; color: #18785d; }
  .receipt-scan-entry-button { grid-column: 2; min-height: 2.5rem; border: 0; border-radius: .7rem; background: #1b7e63; color: white; font: inherit; font-weight: 700; }
  .receipt-scanner-dialog { max-height: calc(100vh - .5rem); max-height: calc(100dvh - .5rem); -webkit-overflow-scrolling: touch; }
  .receipt-scanner-shell { padding: .75rem max(.9rem,env(safe-area-inset-right)) calc(.75rem + env(safe-area-inset-bottom)) max(.9rem,env(safe-area-inset-left)); }
  .receipt-scanner-intro { margin: .4rem 0 .55rem; }
  .receipt-scanner-start-art { width: 5.25rem; height: 5.25rem; margin: .45rem auto; font-size: 1.6rem; border-radius: 1.55rem; }
  .receipt-scan-orbit { inset: .4rem; border-radius: 1.2rem; }
  .receipt-scan-orbit-inner { inset: .78rem; border-radius: .9rem; }
  .receipt-scanner-actions { margin-top: .55rem; }
  .receipt-camera-frame { max-height: 37dvh; aspect-ratio: 5 / 3; }
  .receipt-processing-screen { min-height: 15rem; }
}

/* Quand le navigateur expose les segments, le dialogue reste dans un seul volet. */
@media (horizontal-viewport-segments: 2) {
  .receipt-scan-entry { display: grid; grid-template-columns: 2.6rem minmax(0,1fr); align-items: center; gap: .65rem; padding: .8rem; border: 1px solid rgba(22,131,107,.16); border-radius: 1rem; background: var(--bg-card,#fff); }
  .receipt-scan-entry-mark { display: grid; grid-row: span 2; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: .8rem; background: #e3f4e9; color: #18785d; }
  .receipt-scan-entry-button { grid-column: 2; min-height: 2.5rem; border: 0; border-radius: .7rem; background: #1b7e63; color: white; font: inherit; font-weight: 700; }
  .receipt-scanner-dialog { position: fixed; inset: env(viewport-segment-top 0 0,0px) auto auto env(viewport-segment-left 0 0,0px); width: env(viewport-segment-width 0 0,50vw); max-width: none; max-height: env(viewport-segment-height 0 0,100dvh); margin: 0; border-radius: 0 1.35rem 1.35rem 0; }
  .receipt-review-fields input, .receipt-review-fields select { font-size: 16px; }
}
@media (vertical-viewport-segments: 2) {
  .receipt-scan-entry { display: grid; grid-template-columns: 2.6rem minmax(0,1fr); gap: .65rem; padding: .8rem; border: 1px solid rgba(22,131,107,.16); border-radius: 1rem; background: var(--bg-card,#fff); }
  .receipt-scan-entry-mark { display: grid; grid-row: span 2; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: .8rem; background: #e3f4e9; color: #18785d; }
  .receipt-scan-entry-button { grid-column: 2; min-height: 2.5rem; border: 0; border-radius: .7rem; background: #1b7e63; color: white; font: inherit; font-weight: 700; }
  .receipt-scanner-dialog { position: fixed; inset: env(viewport-segment-top 0 1,50vh) 0 auto 0; width: 100%; max-width: none; max-height: env(viewport-segment-height 0 1,50vh); margin: 0; border-radius: 1.35rem 1.35rem 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  .receipt-scanner-start-art, .receipt-scanner-start-art > .fa-receipt, .receipt-scan-orbit,
  .receipt-start-scanline, .receipt-scan-spark { animation: none !important; transform: none !important; }
}
.receipt-review-warnings{display:grid;gap:.55rem;margin:.9rem 0;padding:.85rem;border:1px solid #f5d79b;border-radius:16px;background:#fffaf0;color:#57411b}
.receipt-review-warnings[hidden]{display:none}
.receipt-scan-precision {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  width: min(100%, 24rem);
  min-height: 44px;
  margin: .2rem auto .85rem;
  padding: .68rem .8rem;
  border: 1px solid var(--border-color);
  border-radius: .75rem;
  background: var(--bg-card);
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
}
.receipt-scan-precision input { margin-top: .22rem; accent-color: var(--apple-accent, #2563eb); }
.receipt-scan-precision strong, .receipt-scan-precision small { display: block; }
.receipt-scan-precision small { color: var(--text-secondary); font-size: .75rem; }
.receipt-scan-precision:focus-within { outline: 2px solid var(--apple-accent, #2563eb); outline-offset: 3px; }
.receipt-review-choices { display:grid; gap:.5rem; margin:.65rem 0; }
.receipt-review-choices > div { display:flex; flex-wrap:wrap; align-items:center; gap:.4rem; font-size:.75rem; }
.receipt-review-choices strong { flex:1 0 100%; }
.receipt-review-choices button { min-height:2.5rem; overflow-wrap:anywhere; text-align:left; }
.receipt-amount-choice { flex:1 0 100%; display:flex; flex-wrap:wrap; gap:.4rem; align-items:center; }
.receipt-amount-choice > button:first-child { min-width:3.75rem; justify-content:center; font-variant-numeric:tabular-nums; }
.receipt-review-warning{display:flex;align-items:flex-start;gap:.65rem;font-size:.85rem;line-height:1.4;cursor:pointer}
.receipt-review-warning input{flex:none;width:1.05rem;height:1.05rem;margin:.1rem 0 0;accent-color:#2463df}


/* assets/css/merchant-logos.css */
.merchant-mark{display:inline-grid;place-items:center;width:38px;height:38px;min-width:38px;border:1px solid var(--border-color,#e3e9ef);border-radius:12px;background:var(--bg-card,#fff);vertical-align:middle;overflow:hidden;box-shadow:0 3px 9px rgba(20,38,57,.055)}
.merchant-mark img{display:block;width:30px;height:30px;object-fit:contain}
.merchant-mark.is-neutral{color:#74869a;background:var(--bg-secondary,#f3f7fa)}
.merchant-mark.is-fallback{font-size:.7rem;font-weight:800;letter-spacing:.035em;color:#164b66;background:linear-gradient(145deg,#e9f8ff,#d6f2eb);border-color:#b9dfe3;box-shadow:inset 0 1px rgba(255,255,255,.85),0 3px 9px rgba(20,38,57,.055)}
.merchant-mark.is-fallback.is-named{color:#244f86;background:linear-gradient(145deg,#ecf3ff,#e3eafc);border-color:#ccd9ef}
.merchant-mark.is-suggested{border-style:dashed;border-color:#89b5d5}
.merchant-transaction-name{display:inline-flex;align-items:center;gap:.62rem;min-width:0}
.merchant-transaction-name>span:last-child{min-width:0;overflow-wrap:anywhere}
.merchant-logo-panel{display:flex;align-items:center;gap:.75rem;margin:.65rem 0 1rem;padding:.65rem .75rem;border:1px solid var(--border-color,#e3e9ef);border-radius:14px;background:var(--bg-secondary,#f7f9fb)}
.merchant-logo-panel-copy{display:grid;gap:.1rem;min-width:0;flex:1}
.merchant-logo-panel-copy strong{font-size:.78rem;color:var(--text-primary,#193047)}
.merchant-logo-panel-copy small{font-size:.7rem;color:var(--text-secondary,#475569);line-height:1.3}
.merchant-logo-panel button{border:1px solid var(--border-color,#d5e0e8);border-radius:10px;background:var(--bg-card,#fff);padding:.48rem .65rem;font-size:.72rem;font-weight:700;color:var(--text-primary,#193047);cursor:pointer}
.merchant-logo-dialog{width:min(540px,calc(100vw - 24px));max-height:min(82vh,700px);padding:0;border:1px solid var(--border-color,#dbe4ea);border-radius:20px;background:var(--bg-card,#fff);color:var(--text-primary,#193047);box-shadow:0 24px 80px rgba(8,26,46,.24)}
.merchant-logo-dialog::backdrop{background:rgba(11,25,42,.52);backdrop-filter:blur(6px)}
.merchant-logo-dialog header{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1.1rem 1.2rem .75rem}
.merchant-logo-dialog h2{margin:0;font-size:1.18rem}
.merchant-logo-dialog header button{border:0;background:transparent;font-size:1.4rem;cursor:pointer;color:inherit}
.merchant-logo-dialog p{margin:0;padding:0 1.2rem .75rem;font-size:.78rem;color:var(--text-muted,#687989)}
.merchant-logo-dialog input{display:block;width:calc(100% - 2.4rem);margin:0 1.2rem .8rem;padding:.7rem;border:1px solid var(--border-color,#dbe4ea);border-radius:12px;background:var(--bg-card,#fff);color:inherit}
.merchant-logo-results{display:grid;gap:.25rem;max-height:45vh;overflow:auto;padding:0 1.2rem .8rem}
.merchant-logo-result{display:flex;align-items:center;gap:.7rem;width:100%;padding:.5rem .65rem;border:1px solid transparent;border-radius:12px;background:transparent;color:inherit;text-align:left;cursor:pointer}
.merchant-logo-result:hover,.merchant-logo-result:focus-visible{border-color:#91bdd2;background:rgba(75,153,190,.09)}
.merchant-logo-result img{width:34px;height:34px;object-fit:contain;flex:none}
.merchant-logo-result span{display:grid;gap:.05rem;min-width:0}
.merchant-logo-result strong{font-size:.8rem}.merchant-logo-result small{font-size:.67rem;color:var(--text-muted,#687989)}
.merchant-logo-dialog footer{display:flex;gap:.5rem;justify-content:flex-end;flex-wrap:wrap;padding:.8rem 1.2rem 1.1rem;border-top:1px solid var(--border-color,#dbe4ea)}
.merchant-logo-dialog footer button{border:1px solid var(--border-color,#dbe4ea);border-radius:10px;background:var(--bg-secondary,#f5f8fa);padding:.55rem .7rem;color:inherit;cursor:pointer;font-size:.75rem}
.merchant-logo-dialog :focus-visible,.merchant-logo-panel button:focus-visible{outline:3px solid #56a4cc;outline-offset:2px}
.merchant-logo-empty{padding:.8rem!important}
.merchant-logo-dialog[open]{position:fixed;inset:0;margin:auto;height:max-content;display:flex;flex-direction:column;max-height:min(82dvh,700px);overflow:hidden}
.merchant-logo-dialog[open]>:not(.merchant-logo-results){flex:none}
.merchant-logo-dialog p a{color:inherit;text-decoration:underline;white-space:nowrap}
.merchant-logo-dialog header button{width:44px;height:44px;flex:none}
.merchant-logo-dialog input{box-sizing:border-box;min-height:44px}
.merchant-logo-results{flex:0 1 auto;min-height:0;align-content:start;overscroll-behavior:contain}
.merchant-logo-dialog footer button{min-height:44px}
.merchant-mark img[src^="/assets/brand/fr-202611/"],.merchant-logo-result img[src^="/assets/brand/fr-202611/"]{background:#fff;border-radius:4px}
@media(max-width:650px){.merchant-logo-panel{flex-wrap:wrap}.merchant-logo-panel button{margin-left:auto}.merchant-mark{width:34px;height:34px;min-width:34px}.merchant-mark img{width:27px;height:27px}}
@media(max-width:400px),(max-height:500px){
 .merchant-logo-dialog header,.merchant-logo-dialog footer{padding:.4rem .75rem}
 .merchant-logo-dialog p,.merchant-logo-results{padding-left:.75rem;padding-right:.75rem}
 .merchant-logo-dialog input{width:calc(100% - 1.5rem);margin:0 .75rem .4rem}
 .merchant-logo-dialog footer{justify-content:space-between}
}


/* assets/css/menu-system.css */
/* Shared menu surfaces. Native selects remain the form source of truth. */
.freev-select-trigger {min-height:46px;padding:.7rem .85rem .7rem 1rem;border-radius:13px;background:var(--bg-card,#fff);box-shadow:0 1px 2px rgba(17,31,52,.03);font-size:.84rem;font-weight:650;}
.freev-select-trigger>i {color:var(--text-secondary,#64748b);}
.freev-select:not(.is-disabled) .freev-select-trigger:hover {border-color:color-mix(in srgb,var(--apple-accent,#2563eb) 45%,var(--border-color,#cbd5e1));box-shadow:0 8px 20px rgba(17,31,52,.07);}
.freev-select.is-open .freev-select-trigger {background:var(--bg-card,#fff);border-color:var(--apple-accent,#2563eb);box-shadow:0 0 0 3px color-mix(in srgb,var(--apple-accent,#2563eb) 12%,transparent),0 8px 24px rgba(17,31,52,.08);}
.freev-select-list:popover-open {gap:.18rem;padding:.45rem;border:1px solid var(--border-color,#dce5ef);border-radius:15px;background:var(--bg-card,#fff);box-shadow:0 12px 22px rgba(12,24,44,.09),0 28px 58px rgba(12,24,44,.11);overscroll-behavior:contain;scrollbar-width:thin;}
.freev-select.opens-up .freev-select-list {transform-origin:bottom center;}
.freev-select-option {display:flex;align-items:center;justify-content:space-between;gap:.75rem;min-height:44px;padding:.65rem .8rem;border-radius:10px;color:var(--text-primary,#26354c);font-size:.8rem;font-weight:600;line-height:1.35;white-space:normal;}
.freev-select-option:hover,.freev-select-option:focus-visible {background:color-mix(in srgb,var(--apple-accent,#2563eb) 8%,var(--bg-card,#fff));color:var(--text-primary,#17243a);transform:none;}
.freev-select-option[aria-selected="true"] {background:color-mix(in srgb,var(--apple-accent,#2563eb) 10%,var(--bg-card,#fff));color:var(--apple-accent,#2563eb);}
.freev-select-option[aria-selected="true"]::after {float:none;color:var(--apple-accent,#2563eb);font-size:.9rem;}
.premium-workspace-add-panel {width:min(20rem,calc(100vw - 1.5rem));max-height:min(32rem,70dvh);padding:.5rem;border:1px solid var(--border-color,#dce5ef);border-radius:17px;background:var(--bg-card,#fff);box-shadow:0 14px 28px rgba(12,24,44,.1),0 30px 68px rgba(12,24,44,.13);scrollbar-width:thin;overscroll-behavior:contain;}
.premium-workspace-add-item {min-height:48px;padding:.7rem .8rem;border-radius:11px;font-size:.83rem;line-height:1.3;transition:background .16s ease,transform .16s ease;}
.premium-workspace-add-item>i {display:grid;flex:0 0 1.65rem;width:1.65rem;height:1.65rem;place-items:center;border-radius:.48rem;background:color-mix(in srgb,var(--apple-accent,#2563eb) 10%,var(--bg-card,#fff));color:var(--apple-accent,#2563eb);}
.premium-workspace-add-item:hover,.premium-workspace-add-item:focus-visible {background:color-mix(in srgb,var(--apple-accent,#2563eb) 7%,var(--bg-card,#fff));transform:translateX(2px);}
#recurring-view .recurring-more-actions {min-width:14rem;padding:.45rem;border-radius:15px;box-shadow:0 12px 24px rgba(12,24,44,.1),0 28px 58px rgba(12,24,44,.1);}
#recurring-view .recurring-more-actions button {min-height:44px;padding:.65rem .75rem;border-radius:10px;font-size:.8rem;}
:is(.freev-select-trigger,.premium-workspace-add-item,#recurring-view .recurring-more summary):focus-visible {outline:2px solid var(--apple-accent,#2563eb);outline-offset:2px;}
@media(max-width:600px){.premium-workspace-add-panel{max-height:min(24rem,57dvh)}}
@media(prefers-reduced-motion:reduce){.freev-select-list,.premium-workspace-add-panel,.premium-workspace-add-item{animation:none;transition:none;transform:none!important}}

/* Use the installed FREEV app mark in the sidebar, not a chart glyph. */
.sidebar .premium-brand-mark {overflow:hidden;padding:0;background:transparent!important;box-shadow:0 7px 18px rgba(31,97,219,.17)!important;}
.sidebar .premium-brand-mark img {display:block;width:100%;height:100%;object-fit:cover;border-radius:inherit;}


/* assets/css/site-motion.css */
/* One quiet motion language for the whole workspace. Keep financial values still. */
body.freev-apple {
  --freev-motion-quick: 150ms;
  --freev-motion-standard: 240ms;
  --freev-motion-ease: cubic-bezier(.22,.68,0,1);
  --freev-motion-shadow: 0 12px 30px rgba(25,40,68,.075);
  --signature-motion-ease: var(--freev-motion-ease);
  --signature-motion-fast: var(--freev-motion-quick);
  --signature-motion-surface: var(--freev-motion-standard);
}

/* Clearer hierarchy without adding decoration or delaying the data. */
body.freev-apple :is(.v4-section-head,.v5-section-head,.fp2-section-head) h2,
body.freev-apple :is(.v4-section-head,.v5-section-head,.fp2-section-head) h3 {
  letter-spacing: -.025em;
  line-height: 1.2;
  text-wrap: balance;
}
body.freev-apple :is(.v4-section-head,.v5-section-head,.fp2-section-head) p {
  max-width: 70ch;
  line-height: 1.55;
}
body.freev-apple :is(.premium-v4-stat,.fp2-metric,.v5-stat) strong,
body.freev-apple :is(#cardBalance,#cardIncome,#cardExpenses,#cardSavings) {
  font-variant-numeric: tabular-nums;
  letter-spacing: -.025em;
}
body.freev-apple :is(.premium-workspace-head,.v4-hero,.v5-hero) {
  transition: border-color var(--freev-motion-standard) ease,
    box-shadow var(--freev-motion-standard) var(--freev-motion-ease);
}
body.freev-apple :is(.v4-story-heading,.v5-story-heading) {
  margin-block: clamp(1.2rem,2vw,1.8rem) .85rem;
}
body.freev-apple :is(.v4-story-heading,.v5-story-heading) h3 {
  letter-spacing: -.035em;
  text-wrap: balance;
}
body.freev-apple .premium-workspace-head {
  border-radius: 26px;
  background:
    radial-gradient(circle at 92% 12%,color-mix(in srgb,var(--apple-accent,#2563eb) 10%,transparent),transparent 34%),
    radial-gradient(circle at 3% 98%,color-mix(in srgb,var(--signature-teal,#139b81) 6%,transparent),transparent 40%),
    var(--apple-surface,#fff);
  box-shadow: 0 1px 2px rgba(24,39,68,.035),0 18px 45px rgba(24,39,68,.075);
}
body.freev-apple .premium-workspace-kicker {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  max-width: 100%;
  padding: .43rem .68rem;
  border: 1px solid color-mix(in srgb,var(--apple-accent,#2563eb) 14%,transparent);
  border-radius: 999px;
  background: color-mix(in srgb,var(--apple-accent,#2563eb) 5%,var(--apple-surface,#fff));
}
body.freev-apple :is(.premium-workspace-head,.v4-hero,.v5-hero) h1,
body.freev-apple :is(.v4-hero,.v5-hero) h2 { text-wrap: balance; }
body.freev-apple :is(.premium-workspace-head,.v4-hero,.v5-hero) p { text-wrap: pretty; }
body.freev-apple .premium-v4-stat {
  background: linear-gradient(150deg,
    color-mix(in srgb,var(--v4-stat-accent,var(--apple-accent,#2563eb)) 5%,var(--apple-surface,#fff)),
    var(--apple-surface,#fff) 65%);
  box-shadow: 0 1px 2px rgba(24,39,68,.035),0 10px 28px rgba(24,39,68,.055);
}
/* The first page explains why it is useful before showing the numbers. */
body.freev-apple .freev-dashboard-only {display:none}
body.freev-apple[data-freev-view="dashboard"] .premium-workspace-head {
  min-height:clamp(12.5rem,17vw,14.5rem);
  padding:clamp(1.15rem,2.3vw,2rem);
  gap:clamp(1rem,2vw,2rem);
  overflow:hidden;
}
body.freev-apple[data-freev-view="dashboard"] .premium-workspace-intro {position:relative;z-index:2;max-width:46rem}
body.freev-apple[data-freev-view="dashboard"] .premium-workspace-head h1 {
  margin:.45rem 0 .42rem;
  font-size:clamp(2rem,3vw,3.15rem);
  letter-spacing:-.055em;
}
body.freev-apple[data-freev-view="dashboard"] .premium-workspace-head #premiumWorkspaceDesc {
  max-width:58ch;
  font-size:clamp(.84rem,1vw,.96rem);
  line-height:1.5;
}
body.freev-apple[data-freev-view="dashboard"] .premium-workspace-actions {position:relative;z-index:3}
body.freev-apple[data-freev-view="dashboard"] .freev-dashboard-benefits {
  display:flex;flex-wrap:wrap;gap:.45rem;margin-top:1rem;
}
body.freev-apple .freev-dashboard-benefits span {
  display:inline-flex;align-items:center;gap:.42rem;
  min-height:2rem;padding:.38rem .68rem;
  border:1px solid var(--apple-outline,#dce5ef);border-radius:999px;
  background:color-mix(in srgb,var(--apple-surface,#fff) 85%,transparent);
  color:var(--apple-muted,#64748b);font-size:.72rem;font-weight:650;line-height:1.2;
}
body.freev-apple .freev-dashboard-benefits i {color:var(--signature-teal,#139b81);font-size:.67rem}
body.freev-apple[data-freev-view="dashboard"] .freev-dashboard-benefits span {animation:freevFeatureStepIn 360ms var(--freev-motion-ease) both}
body.freev-apple[data-freev-view="dashboard"] .freev-dashboard-benefits span:nth-child(2) {animation-delay:80ms}
body.freev-apple[data-freev-view="dashboard"] .freev-dashboard-benefits span:nth-child(3) {animation-delay:160ms}
body.freev-apple[data-freev-view="dashboard"] .freev-dashboard-explore {
  display:inline-flex;align-items:center;gap:.5rem;margin-top:.85rem;padding:.24rem 0;
  border:0;background:transparent;color:var(--apple-accent,#2563eb);
  font-size:.8rem;font-weight:730;cursor:pointer;text-align:left;
}
body.freev-apple .freev-dashboard-explore i {transition:transform var(--freev-motion-standard) var(--freev-motion-ease)}
body.freev-apple .freev-dashboard-explore:focus-visible {outline:2px solid var(--apple-accent,#2563eb);outline-offset:4px;border-radius:3px}
body.freev-apple #dashboardFlowChart {scroll-margin-top:clamp(5rem,9vh,7rem)}
/* Each workspace has its own illustrative motion instead of a repeated badge. */
body.freev-apple .freev-workspace-illustration {display:none}
@media (min-width:1251px) {
  body.freev-apple[data-freev-view="dashboard"] .freev-workspace-illustration,
  body.freev-apple[data-freev-view="transactions"] .freev-workspace-illustration,
  body.freev-apple[data-freev-view="recurring"] .freev-workspace-illustration,
  body.freev-apple[data-freev-view="analytics"] .freev-workspace-illustration,
  body.freev-apple[data-freev-view="savings"] .freev-workspace-illustration,
  body.freev-apple[data-freev-view="debts"] .freev-workspace-illustration,
  body.freev-apple[data-freev-view="history"] .freev-workspace-illustration,
  body.freev-apple[data-freev-view="settings"] .freev-workspace-illustration {
    display:block;position:absolute;z-index:1;right:clamp(12.5rem,16vw,17rem);top:50%;
    width:11.5rem;transform:translateY(-50%);pointer-events:none;
  }
  body.freev-apple[data-freev-view="dashboard"] .freev-workspace-illustration {width:13rem}
  body.freev-apple[data-freev-view]:not([data-freev-view="dashboard"]):not([data-freev-view="planner"]):not([data-freev-view="smart"]) .premium-workspace-head {
    min-height:8.15rem;padding:1.1rem 1.45rem;overflow:hidden;
  }
  body.freev-apple[data-freev-view]:not([data-freev-view="dashboard"]) .premium-workspace-intro {
    position:relative;z-index:2;max-width:min(62%,42rem);
  }
  body.freev-apple[data-freev-view] .premium-workspace-actions {position:relative;z-index:3}
}
body.freev-apple .freev-workspace-illustration svg {
  display:block;width:100%;height:auto;overflow:visible;
  animation:freevArtReveal 440ms var(--freev-motion-ease) both;
}
body.freev-apple .freev-workspace-illustration :is(.art-surface,.art-debt-step) {
  fill:color-mix(in srgb,var(--apple-accent,#2563eb) 6%,var(--apple-surface,#fff));
  stroke:color-mix(in srgb,var(--apple-accent,#2563eb) 25%,transparent);stroke-width:1.5;
}
body.freev-apple .freev-workspace-illustration .art-guide {
  fill:none;stroke:color-mix(in srgb,var(--apple-accent,#2563eb) 21%,transparent);
  stroke-width:1.5;stroke-linecap:round;stroke-dasharray:3 6;
}
body.freev-apple .freev-workspace-illustration .art-line {
  fill:none;stroke:var(--signature-teal,#139b81);stroke-width:3;
  stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:100;stroke-dashoffset:100;
  animation:freevArtDraw 1s var(--freev-motion-ease) 120ms forwards;
}
body.freev-apple .freev-workspace-illustration .art-dot {
  fill:var(--apple-surface,#fff);stroke:var(--signature-teal,#139b81);stroke-width:3;
  transform-box:fill-box;transform-origin:center;opacity:0;
  animation:freevFeatureAppear 300ms var(--freev-motion-ease) 850ms forwards,
    freevArtPulse 3.4s ease-in-out 1.2s infinite;
}
body.freev-apple .freev-workspace-illustration .art-bar {
  fill:color-mix(in srgb,var(--signature-teal,#139b81) 28%,var(--apple-surface,#fff));
  transform-box:fill-box;transform-origin:center bottom;
  animation:freevArtBar 3.6s ease-in-out infinite;
}
body.freev-apple .freev-workspace-illustration .art-bar-two {animation-delay:400ms}
body.freev-apple .freev-workspace-illustration .art-bar-three {animation-delay:800ms}
body.freev-apple .freev-workspace-illustration .art-bar-four {animation-delay:1.2s}
body.freev-apple .freev-workspace-illustration .art-receipt {animation:freevArtFloat 4.8s ease-in-out infinite}
body.freev-apple .freev-workspace-illustration .art-row {
  fill:none;stroke:var(--apple-muted,#64748b);stroke-width:3;stroke-linecap:round;
  animation:freevArtRow 3.8s ease-in-out infinite;
}
body.freev-apple .freev-workspace-illustration .art-row-two {animation-delay:450ms}
body.freev-apple .freev-workspace-illustration .art-row-three {animation-delay:900ms}
body.freev-apple .freev-workspace-illustration .art-row-four {animation-delay:1.35s}
body.freev-apple .freev-workspace-illustration .art-status {fill:var(--signature-teal,#139b81)}
body.freev-apple .freev-workspace-illustration .art-check {
  fill:none;stroke:var(--apple-surface,#fff);stroke-width:3;stroke-linecap:round;stroke-linejoin:round;
  stroke-dasharray:100;stroke-dashoffset:100;
  animation:freevArtDraw 550ms var(--freev-motion-ease) 500ms forwards;
}
body.freev-apple .freev-workspace-illustration .art-calendar-date {
  fill:var(--apple-surface,#fff);stroke:color-mix(in srgb,var(--apple-accent,#2563eb) 32%,transparent);stroke-width:2;
}
body.freev-apple .freev-workspace-illustration .art-calendar-focus {
  fill:var(--signature-teal,#139b81);stroke:var(--signature-teal,#139b81);
  transform-box:fill-box;transform-origin:center;animation:freevArtPulse 3.2s ease-in-out infinite;
}
body.freev-apple .freev-workspace-illustration .art-line-tip {fill:none;stroke:var(--signature-teal,#139b81);stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
body.freev-apple .freev-workspace-illustration .art-coin {
  fill:color-mix(in srgb,var(--signature-teal,#139b81) 15%,var(--apple-surface,#fff));
  stroke:var(--signature-teal,#139b81);stroke-width:2;
}
body.freev-apple .freev-workspace-illustration :is(.art-coin-one,.art-coin-two,.art-coin-three) {
  transform-box:fill-box;transform-origin:center;
  animation:freevSavingsCoin 5.2s cubic-bezier(.2,.7,.2,1) infinite;
}
body.freev-apple .freev-workspace-illustration .art-coin-two {animation-delay:-1.7s}
body.freev-apple .freev-workspace-illustration .art-coin-three {animation-delay:-3.4s}
body.freev-apple .freev-workspace-illustration .art-savings-basket {
  transform-box:fill-box;transform-origin:center bottom;
  animation:freevSavingsBasket 5.2s ease-in-out infinite;
}
body.freev-apple .freev-workspace-illustration .art-savings-glint {
  fill:none;stroke:var(--signature-teal,#139b81);stroke-width:2;stroke-linecap:round;
  transform-box:fill-box;transform-origin:center;
  animation:freevSavingsGlint 5.2s ease-in-out infinite;
}
body.freev-apple .freev-workspace-illustration .art-coin-mark {fill:none;stroke:var(--signature-teal,#139b81);stroke-width:2;stroke-linecap:round}
body.freev-apple .freev-workspace-illustration .art-debt-step {
  transform-box:fill-box;transform-origin:center bottom;animation:freevArtBar 4.2s ease-in-out infinite;
}
body.freev-apple .freev-workspace-illustration .art-debt-two {animation-delay:400ms}
body.freev-apple .freev-workspace-illustration .art-debt-three {animation-delay:800ms}
body.freev-apple .freev-workspace-illustration .art-debt-four {animation-delay:1.2s}
body.freev-apple .freev-workspace-illustration .art-history-node {
  fill:var(--apple-surface,#fff);stroke:var(--signature-teal,#139b81);stroke-width:3;
  transform-box:fill-box;transform-origin:center;animation:freevArtPulse 3.8s ease-in-out infinite;
}
body.freev-apple .freev-workspace-illustration .art-history-two {animation-delay:500ms}
body.freev-apple .freev-workspace-illustration .art-history-three {animation-delay:1s}
body.freev-apple .freev-workspace-illustration .art-history-four {animation-delay:1.5s}
body.freev-apple .freev-workspace-illustration .art-slider-handle {
  fill:var(--apple-surface,#fff);stroke:var(--apple-accent,#2563eb);stroke-width:3;
  transform-box:fill-box;transform-origin:center;
  animation:freevSettingsSlider 4.8s cubic-bezier(.45,0,.25,1) infinite;
}
body.freev-apple .freev-workspace-illustration .art-slider-two {animation-delay:-1.6s}
body.freev-apple .freev-workspace-illustration .art-slider-three {animation-delay:-3.2s}
body.freev-apple .freev-workspace-illustration .art-slider-progress {
  fill:none;stroke:var(--apple-accent,#2563eb);stroke-width:2.5;stroke-linecap:round;
  stroke-dasharray:30 160;opacity:.52;
  animation:freevSettingsTrack 4.8s linear infinite;
}
body.freev-apple .freev-workspace-illustration .art-slider-progress-two {animation-delay:-1.6s}
body.freev-apple .freev-workspace-illustration .art-slider-progress-three {animation-delay:-3.2s}
@keyframes freevArtReveal {from{opacity:0;transform:translate3d(0,7px,0)}to{opacity:1;transform:translate3d(0,0,0)}}
@keyframes freevArtDraw {to{stroke-dashoffset:0}}
@keyframes freevArtPulse {50%{transform:scale(1.18);opacity:.72}}
@keyframes freevArtBar {50%{transform:scaleY(.78)}}
@keyframes freevArtFloat {50%{transform:translate3d(0,-5px,0)}}
@keyframes freevArtRow {50%{opacity:.45}}
@keyframes freevArtSlide {50%{transform:translate3d(6px,0,0)}}
@keyframes freevSavingsCoin {
  0%,100% {transform:translate3d(0,0,0) scale(1)}
  20% {transform:translate3d(0,-13px,0) scale(1.04)}
  35% {transform:translate3d(0,2px,0) scale(.96)}
  45% {transform:translate3d(0,-3px,0) scale(1.01)}
  55%,85% {transform:translate3d(0,0,0) scale(1)}
}
@keyframes freevSavingsBasket {25%,45%{transform:scale(1.025)}65%{transform:scale(1)}}
@keyframes freevSavingsGlint {0%,18%,60%,100%{opacity:.2;transform:scale(.75)}32%,40%{opacity:1;transform:scale(1.16)}}
@keyframes freevSettingsSlider {
  0%,100% {transform:translate3d(0,0,0) scale(1)}
  25% {transform:translate3d(16px,0,0) scale(1.08)}
  50% {transform:translate3d(-10px,0,0) scale(1)}
  75% {transform:translate3d(8px,0,0) scale(1.04)}
}
@keyframes freevSettingsTrack {to{stroke-dashoffset:-190}}
@media (hover:hover) and (pointer:fine) {
  body.freev-apple .freev-dashboard-explore:hover i {transform:translateX(3px)}
  body.freev-apple .freev-dashboard-explore:hover {color:var(--apple-accent-hover,var(--apple-accent,#2563eb))}
}
@media (max-width:768px) {
  body.freev-apple[data-freev-view="dashboard"] .premium-workspace-head {min-height:0;padding:1.25rem;gap:1rem}
  body.freev-apple[data-freev-view="dashboard"] .premium-workspace-head h1 {font-size:clamp(1.9rem,7vw,2.5rem)}
  body.freev-apple[data-freev-view="dashboard"] .premium-workspace-actions {max-width:none}
}
@media (max-width:430px) {
  body.freev-apple[data-freev-view="dashboard"] .premium-workspace-head {padding:1.05rem}
  body.freev-apple .freev-dashboard-benefits span {font-size:.68rem}
}
body.freev-apple #dashboardAlerts:not(:empty) {
  display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,18rem),1fr));
  gap:.7rem;margin:1rem 0 1.3rem;
}
body.freev-apple #dashboardAlerts:empty {display:none}
body.freev-apple #dashboardAlerts > div {
  min-width:0;min-height:5.25rem;margin:0!important;padding:.9rem 1rem;
  border:1px solid var(--apple-outline,#dce5ef);border-radius:17px;
  background:var(--apple-surface,#fff);color:var(--apple-ink,#17243a);
  box-shadow:0 4px 18px rgba(24,39,68,.04);
}
body.freev-apple #dashboardAlerts > div > i {
  display:grid;place-items:center;flex:0 0 2rem;width:2rem;height:2rem;
  margin:0;border-radius:10px;background:color-mix(in srgb,currentColor 9%,var(--apple-surface,#fff));
}
body.freev-apple #dashboardAlerts > div > div {color:var(--apple-muted,#64748b);line-height:1.45}
body.freev-apple #dashboardAlerts > div > div strong:first-child {color:var(--apple-ink,#17243a)}
body.freev-apple #dashboardAlerts > .bg-blue-50 {border-left:3px solid var(--apple-accent,#2563eb)}
body.freev-apple #dashboardAlerts > .bg-yellow-50 {border-left:3px solid #d8971d}
body.freev-apple #dashboardAlerts > .bg-rose-50 {border-left:3px solid #d45662}
/* Planner and smart tools use the same calm presentation as the dashboard. */
body.freev-apple #planner-view .v4-hero,
body.freev-apple #smart-view .v5-hero {
  min-height: 13.5rem;
  border-color: var(--apple-outline,#dce5ef);
  background:
    radial-gradient(circle at 91% 13%,color-mix(in srgb,var(--apple-accent,#2563eb) 10%,transparent),transparent 34%),
    radial-gradient(circle at 5% 95%,color-mix(in srgb,var(--signature-teal,#139b81) 8%,transparent),transparent 42%),
    var(--apple-surface,#fff);
  box-shadow: 0 1px 2px rgba(24,39,68,.035),0 18px 42px rgba(24,39,68,.075);
}
body.freev-apple #planner-view .v4-hero::after,
body.freev-apple #smart-view .v5-hero::after {
  border-color: color-mix(in srgb,var(--apple-accent,#2563eb) 13%,transparent);
  box-shadow: 0 0 0 4rem color-mix(in srgb,var(--apple-accent,#2563eb) 2%,transparent),
    0 0 0 8rem color-mix(in srgb,var(--signature-teal,#139b81) 2%,transparent);
}
body.freev-apple #planner-view .v4-hero h2,
body.freev-apple #smart-view .v5-hero h2 {
  max-width: 21ch;
  color: var(--apple-ink,#17243a);
  text-transform: none;
}
body.freev-apple #planner-view .v4-hero p,
body.freev-apple #smart-view .v5-hero p { color: var(--apple-muted,#64748b); }
body.freev-apple #planner-view .v4-hero .v4-eyebrow,
body.freev-apple #smart-view .v5-hero .v5-eyebrow { color: var(--signature-teal,#139b81); }
body.freev-apple #planner-view .v4-hero-actions .btn,
body.freev-apple #smart-view .v5-hero-status .btn {
  border-color: var(--apple-outline,#dce5ef);
  color: var(--apple-ink,#17243a);
  background: var(--apple-surface,#fff);
}
body.freev-apple #planner-view .v4-summary-card:first-child,
body.freev-apple #smart-view .v5-summary article:first-child {
  border-color: color-mix(in srgb,var(--apple-accent,#2563eb) 22%,var(--apple-outline,#dce5ef));
  background: linear-gradient(145deg,
    color-mix(in srgb,var(--apple-accent,#2563eb) 8%,var(--apple-surface,#fff)),
    var(--apple-surface,#fff) 70%);
  box-shadow: 0 1px 2px rgba(24,39,68,.035),0 12px 28px rgba(24,39,68,.07);
  color: var(--apple-ink,#17243a);
}
body.freev-apple #planner-view .v4-summary-card:first-child :is(span,strong,small),
body.freev-apple #smart-view .v5-summary article:first-child :is(span,strong,small) {
  color: var(--apple-ink,#17243a);
}
body.freev-apple #planner-view .v4-summary-card:first-child .v4-summary-icon,
body.freev-apple #smart-view .v5-summary article:first-child > i {
  color: var(--apple-accent,#2563eb);
  background: color-mix(in srgb,var(--apple-accent,#2563eb) 10%,var(--apple-surface,#fff));
}
body.freev-apple #smart-view .v5-tabs button.active {
  color: var(--apple-surface,#fff);
  background: var(--apple-ink,#17243a);
  box-shadow: 0 5px 14px rgba(22,35,57,.16);
}
@media (max-width:800px) {
  body.freev-apple #planner-view .v4-hero,
  body.freev-apple #smart-view .v5-hero { min-height:0; }
  body.freev-apple #planner-view .v4-hero-actions,
  body.freev-apple #smart-view .v5-hero-status { align-self:stretch; }
}

/* Feature artwork adds continuous, decorative motion without implying forecast data. */
body.freev-apple .freev-feature-hero { isolation:isolate; }
body.freev-apple .freev-feature-intro { position:relative;z-index:1;max-width:min(56%,42rem); }
body.freev-apple .freev-feature-steps {display:flex;flex-wrap:wrap;gap:.45rem;margin-top:1.15rem}
body.freev-apple .freev-feature-steps span {
  display:inline-flex;align-items:center;gap:.42rem;min-height:2rem;
  padding:.38rem .68rem;border:1px solid var(--apple-outline,#dce5ef);
  border-radius:999px;background:color-mix(in srgb,var(--apple-surface,#fff) 85%,transparent);
  color:var(--apple-muted,#64748b);font-size:.72rem;font-weight:650;line-height:1.2;
}
body.freev-apple .freev-feature-steps i {color:var(--signature-teal,#139b81);font-size:.67rem}
body.freev-apple :is(#planner-view,#smart-view):not(.hidden) .freev-feature-steps span {animation:freevFeatureStepIn 360ms var(--freev-motion-ease) both}
body.freev-apple :is(#planner-view,#smart-view):not(.hidden) .freev-feature-steps span:nth-child(2) {animation-delay:80ms}
body.freev-apple :is(#planner-view,#smart-view):not(.hidden) .freev-feature-steps span:nth-child(3) {animation-delay:160ms}
@keyframes freevFeatureStepIn {from{opacity:0;transform:translate3d(0,7px,0)}to{opacity:1;transform:translate3d(0,0,0)}}
body.freev-apple .freev-feature-art {
  position:absolute;z-index:0;top:1.1rem;right:clamp(1rem,6vw,6rem);
  width:clamp(11rem,20vw,16rem);height:auto;
  opacity:.86;pointer-events:none;
}
body.freev-apple .freev-feature-art svg {display:block;width:100%;height:auto;overflow:visible}
body.freev-apple :is(#planner-view,#smart-view):not(.hidden) .freev-feature-art {
  animation:freevFeatureFloat 5.6s ease-in-out 1s infinite;
}
@keyframes freevFeatureFloat {50%{transform:translate3d(0,-4px,0)}}
body.freev-apple .freev-feature-guide {fill:none;stroke:color-mix(in srgb,var(--apple-accent,#2563eb) 13%,transparent);stroke-width:1.2;stroke-dasharray:3 6}
body.freev-apple .freev-feature-area {fill:color-mix(in srgb,var(--signature-teal,#139b81) 9%,transparent)}
body.freev-apple .freev-feature-stroke {fill:none;stroke:var(--signature-teal,#139b81);stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:400;stroke-dashoffset:400}
body.freev-apple .freev-feature-trace {
  fill:none;stroke:var(--apple-accent,#2563eb);stroke-width:3.5;stroke-linecap:round;
  stroke-dasharray:9 91;stroke-dashoffset:100;opacity:0;
}
body.freev-apple .freev-feature-point {fill:var(--apple-surface,#fff);stroke:var(--signature-teal,#139b81);stroke-width:3;opacity:0}
body.freev-apple .freev-feature-orbit {fill:none;stroke:color-mix(in srgb,var(--apple-accent,#2563eb) 30%,transparent);stroke-width:2;stroke-dasharray:300;stroke-dashoffset:300}
body.freev-apple .freev-feature-node {fill:var(--apple-surface,#fff);stroke:var(--apple-accent,#2563eb);stroke-width:2.5;opacity:0;transform-box:fill-box;transform-origin:center;transform:scale(.65)}
body.freev-apple .freev-feature-node:nth-of-type(2) {fill:color-mix(in srgb,var(--apple-accent,#2563eb) 12%,var(--apple-surface,#fff))}
body.freev-apple .freev-feature-check {fill:none;stroke:var(--signature-teal,#139b81);stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:40;stroke-dashoffset:40}
body.freev-apple #planner-view:not(.hidden) .freev-feature-stroke {animation:freevFeatureDraw 850ms var(--freev-motion-ease) 100ms forwards}
body.freev-apple #planner-view:not(.hidden) .freev-feature-trace {animation:freevPlannerTrace 5s linear 1s infinite}
body.freev-apple #planner-view:not(.hidden) .freev-feature-area {animation:freevPlannerArea 5s ease-in-out 1s infinite}
body.freev-apple #planner-view:not(.hidden) .freev-feature-point {
  transform-box:fill-box;transform-origin:center;
  animation:freevFeatureAppear 320ms var(--freev-motion-ease) 760ms forwards,
    freevArtPulse 3.6s ease-in-out 1.3s infinite;
}
body.freev-apple #smart-view:not(.hidden) .freev-feature-orbit {animation:freevFeatureDraw 700ms var(--freev-motion-ease) 90ms forwards}
body.freev-apple #smart-view:not(.hidden) .freev-feature-node {animation:freevFeatureAppear 360ms var(--freev-motion-ease) 280ms forwards}
body.freev-apple #smart-view:not(.hidden) .freev-feature-node:nth-of-type(3) {animation-delay:360ms}
body.freev-apple #smart-view:not(.hidden) .freev-feature-node:nth-of-type(4) {animation-delay:430ms}
body.freev-apple #smart-view:not(.hidden) .freev-feature-node:nth-of-type(5) {animation-delay:500ms}
body.freev-apple #smart-view:not(.hidden) .freev-feature-node:nth-of-type(6) {animation-delay:570ms}
body.freev-apple #smart-view:not(.hidden) .freev-feature-check {animation:freevFeatureDraw 390ms var(--freev-motion-ease) 620ms forwards}
body.freev-apple .freev-smart-signal {
  fill:var(--signature-teal,#139b81);transform-box:view-box;transform-origin:120px 70px;
}
body.freev-apple #smart-view:not(.hidden) .freev-smart-signal {animation:freevSmartSignal 8s linear 1s infinite}
@keyframes freevFeatureDraw {to {stroke-dashoffset:0}}
@keyframes freevFeatureAppear {to {opacity:1;transform:scale(1)}}
@keyframes freevPlannerTrace {
  0%{stroke-dashoffset:100;opacity:0}
  12%,82%{opacity:.8}
  100%{stroke-dashoffset:0;opacity:0}
}
@keyframes freevPlannerArea {50%{opacity:.55}}
@keyframes freevSmartSignal {to{transform:rotate(1turn)}}

body.freev-apple #planner-view .v4-hero-actions,
body.freev-apple #smart-view .v5-hero-status {position:relative;z-index:2;gap:.55rem;max-width:28rem}
body.freev-apple #planner-view .v4-hero-actions #v4HelpButton,
body.freev-apple #planner-view .v4-hero-actions .freev-feature-cta,
body.freev-apple #smart-view .v5-hero-status #v5HelpButton {display:inline-flex}
body.freev-apple :is(#planner-view .v4-hero-actions,#smart-view .v5-hero-status) .freev-feature-cta {
  color:var(--apple-surface,#fff);background:var(--apple-ink,#17243a);
  border-color:var(--apple-ink,#17243a);box-shadow:0 9px 22px rgba(22,35,57,.16);
  white-space:normal;text-align:center;
}
body.freev-apple .freev-feature-cta .fa-arrow-right {transition:transform var(--freev-motion-standard) var(--freev-motion-ease)}
body.freev-apple :is(#v42ForecastChart,#v5Overview) {scroll-margin-top:clamp(5rem,9vh,7rem)}
body.freev-apple :is(#planner-view .v4-summary-icon,#smart-view .v5-summary article > i,#smart-view .v5-insights article > i) {
  transition:transform 280ms var(--freev-motion-ease),background-color var(--freev-motion-standard) ease;
}
@media (hover:hover) and (pointer:fine) {
  body.freev-apple .freev-feature-cta:hover .fa-arrow-right {transform:translateX(3px)}
  body.freev-apple :is(#planner-view .v4-hero-actions,#smart-view .v5-hero-status) .freev-feature-cta:hover {box-shadow:0 13px 26px rgba(22,35,57,.2)}
  body.freev-apple :is(#planner-view .v4-summary-card,#smart-view .v5-summary article,#smart-view .v5-insights article):hover > :is(.v4-summary-icon,i) {transform:translate3d(0,-2px,0) scale(1.06)}
}
@media (max-width:1050px) {
  body.freev-apple .freev-feature-intro {max-width:100%}
  body.freev-apple .freev-feature-art {display:none}
}
@media (max-width:600px) {
  body.freev-apple #planner-view .v4-hero-actions,
  body.freev-apple #smart-view .v5-hero-status {max-width:none}
  body.freev-apple :is(#planner-view .v4-hero-actions,#smart-view .v5-hero-status) .freev-feature-cta {width:100%;justify-content:center;min-height:46px}
}
body.freev-apple :is(.card,.v5-card) > :is(.v4-section-head,.v5-section-head) {
  gap: .75rem;
  padding-bottom: .85rem;
  margin-bottom: .85rem;
  border-bottom: 1px solid color-mix(in srgb,var(--apple-outline,#dce5ef) 80%,transparent);
}
body.freev-apple :is(.v4-section-head,.v5-section-head,.v4-story-heading,.v5-story-heading) p {
  text-wrap: pretty;
}

body.freev-apple :is(.card,.v5-card,.fp2-panel,.fp2-metric,.premium-v4-stat,.dashboard-chart-card,.rec-detail-card,.rec-history-card) {
  transition: transform var(--freev-motion-standard) var(--freev-motion-ease),
    box-shadow var(--freev-motion-standard) var(--freev-motion-ease),
    border-color var(--freev-motion-quick) ease,
    background-color var(--freev-motion-quick) ease;
}
@media (hover:hover) and (pointer:fine) {
  body.freev-apple :is(.card,.v5-card,.fp2-panel,.fp2-metric,.premium-v4-stat,.dashboard-chart-card,.rec-detail-card,.rec-history-card):hover {
    box-shadow: var(--freev-motion-shadow);
  }
  body.freev-apple :is(.btn,.btn-icon,.premium-workspace-action,.freev-select-trigger,.premium-workspace-add-item):not(:disabled):active {
    transform: scale(.975);
    transition-duration: 90ms;
  }
}

body.freev-apple :is(.sidebar-nav .nav-item,.bottom-nav-item,.view-mode-tab,[data-v5-tab],.v4-horizon button,.premium-workspace-action) {
  transition: color var(--freev-motion-quick) ease,
    background-color var(--freev-motion-quick) ease,
    border-color var(--freev-motion-quick) ease,
    box-shadow var(--freev-motion-standard) var(--freev-motion-ease),
    transform var(--freev-motion-standard) var(--freev-motion-ease);
}
body.freev-apple :is(.sidebar-nav .nav-item,.bottom-nav-item)[aria-current="page"] {
  box-shadow: inset 0 0 0 1px color-mix(in srgb,var(--apple-accent,#2563eb) 12%,transparent);
}
body.freev-apple :is(.btn-primary,.premium-workspace-action-primary) {
  box-shadow: 0 5px 13px color-mix(in srgb,var(--apple-accent,#2563eb) 17%,transparent);
}
@media (hover:hover) and (pointer:fine) {
  body.freev-apple :is(.btn-primary,.premium-workspace-action-primary):not(:disabled):hover {
    box-shadow: 0 9px 20px color-mix(in srgb,var(--apple-accent,#2563eb) 23%,transparent);
  }
}

body.freev-apple :is(.freev-select-list,#recurring-view .recurring-more-actions) {
  transform-origin: top center;
  animation: freevMenuArrive 210ms var(--freev-motion-ease) both;
}
body.freev-apple .freev-select.opens-up .freev-select-list { transform-origin: bottom center; }
body.freev-apple .premium-workspace-add-panel:not([hidden]) {
  animation-duration: 220ms;
  animation-timing-function: var(--freev-motion-ease);
}
body.freev-apple .premium-workspace-add-chevron {
  transition: transform var(--freev-motion-standard) var(--freev-motion-ease);
}
body.freev-apple #workspaceAddTrigger[aria-expanded="true"] .premium-workspace-add-chevron {
  transform: rotate(180deg);
}
@keyframes freevMenuArrive {
  from { opacity:0; transform:translate3d(0,-5px,0) scale(.985); }
  to { opacity:1; transform:translate3d(0,0,0) scale(1); }
}

body.freev-apple :is(details > summary,.freev-select-trigger,.form-input,.form-select) {
  transition: background-color var(--freev-motion-quick) ease,
    border-color var(--freev-motion-quick) ease,
    box-shadow var(--freev-motion-standard) var(--freev-motion-ease);
}
body.freev-apple details[open] > :not(summary) {
  animation: freevDetailArrive 220ms var(--freev-motion-ease) both;
}
body.freev-apple :is(.v4-detail-disclosure,.v4-simulator-disclosure) > summary > .fa-chevron-down {
  transition: transform var(--freev-motion-standard) var(--freev-motion-ease);
}
body.freev-apple :is(.v4-detail-disclosure,.v4-simulator-disclosure)[open] > summary > .fa-chevron-down {
  transform: rotate(180deg);
}
@keyframes freevDetailArrive {
  from { opacity:0; transform:translate3d(0,-5px,0); }
  to { opacity:1; transform:translate3d(0,0,0); }
}

/* Chart animation is a single entrance; interaction and values remain immediate. */
body.freev-apple .chart-container.chart-reveal {
  animation-duration: 440ms;
  animation-timing-function: var(--freev-motion-ease);
}
body.freev-apple :is(.v42-forecast-chart,.dashboard-chart-card) :is(svg,canvas) {
  transform-origin: center center;
}
body.freev-apple .modal-overlay:not(.hidden) > :is(.modal-content,.accounts-modal-content) {
  animation-duration: 260ms;
  animation-timing-function: var(--freev-motion-ease);
}
body.freev-apple .toast.show {
  animation-duration: 280ms;
  animation-timing-function: var(--freev-motion-ease);
}
body.freev-apple [data-v5-tab] > i {
  transition: transform var(--freev-motion-standard) var(--freev-motion-ease),
    color var(--freev-motion-quick) ease;
}
body.freev-apple [data-v5-tab].active > i { transform: scale(1.08); }
body.freev-apple .v5-panel:not([hidden]) {
  animation: freevDetailArrive 240ms var(--freev-motion-ease) both;
}
@media (max-width:768px) {
  body.freev-apple .modal-overlay:not(.hidden) > :is(.modal-content,.accounts-modal-content) {
    animation-name: freevSheetArrive;
    animation-duration: 280ms;
  }
  @keyframes freevSheetArrive {
    from { opacity:0; transform:translate3d(0,22px,0) scale(.99); }
    to { opacity:1; transform:translate3d(0,0,0) scale(1); }
  }
}

@media (prefers-reduced-motion:reduce) {
  body.freev-apple :is(.card,.v5-card,.fp2-panel,.fp2-metric,.premium-v4-stat,.dashboard-chart-card,.rec-detail-card,.rec-history-card,.premium-workspace-head,.v4-hero,.v5-hero,.sidebar-nav .nav-item,.bottom-nav-item,.view-mode-tab,[data-v5-tab],[data-v5-tab] > i,.v4-horizon button,.premium-workspace-action,.premium-workspace-add-chevron,.freev-select-list,.premium-workspace-add-panel,.recurring-more-actions,details > summary,details[open] > :not(summary),.v4-detail-disclosure > summary > .fa-chevron-down,.v4-simulator-disclosure > summary > .fa-chevron-down,.freev-select-trigger,.form-input,.form-select,.chart-container.chart-reveal,.v5-panel:not([hidden]),.toast.show,.modal-overlay:not(.hidden) > .modal-content,.modal-overlay:not(.hidden) > .accounts-modal-content) {
    animation:none!important;
    transition:none!important;
  }
  body.freev-apple :is(#workspaceAddTrigger[aria-expanded="true"] .premium-workspace-add-chevron,[data-v5-tab].active > i,.v4-detail-disclosure[open] > summary > .fa-chevron-down,.v4-simulator-disclosure[open] > summary > .fa-chevron-down) { transform:none!important; }
  body.freev-apple :is(.freev-feature-stroke,.freev-feature-point,.freev-feature-orbit,.freev-feature-node,.freev-feature-check,.freev-feature-cta .fa-arrow-right) {animation:none!important;transition:none!important}
  body.freev-apple .freev-feature-steps span {animation:none!important}
  body.freev-apple .freev-dashboard-benefits span {animation:none!important;transform:none!important;opacity:1}
  body.freev-apple .freev-workspace-illustration svg,
  body.freev-apple .freev-workspace-illustration svg * {animation:none!important;transition:none!important;transform:none!important;opacity:1!important}
  body.freev-apple .freev-workspace-illustration :is(.art-line,.art-check) {stroke-dashoffset:0}
  body.freev-apple .freev-feature-art {animation:none!important;transform:none!important}
  body.freev-apple .freev-feature-trace {display:none}
  body.freev-apple .freev-smart-signal,
  body.freev-apple .freev-feature-area {animation:none!important;transform:none!important}
  body.freev-apple .freev-dashboard-explore i {transition:none!important;transform:none!important}
  body.freev-apple :is(#planner-view .v4-summary-icon,#smart-view .v5-summary article > i,#smart-view .v5-insights article > i) {transition:none!important;transform:none!important}
  body.freev-apple :is(.freev-feature-stroke,.freev-feature-orbit,.freev-feature-check) {stroke-dashoffset:0}
  body.freev-apple :is(.freev-feature-point,.freev-feature-node) {opacity:1;transform:none}
}


/* assets/css/auth-buddy.css */
.auth-overlay, body.freev-apple .auth-overlay { overflow:auto; background:radial-gradient(circle at 26% 31%,#315da988 0%,#101d39c9 45%,#0b1424e8 100%); backdrop-filter:blur(18px) saturate(1.18); -webkit-backdrop-filter:blur(18px) saturate(1.18) }
.auth-stage { width:min(100%,760px); display:grid; grid-template-columns:minmax(215px,280px) minmax(0,400px); align-items:center; gap:28px; margin:auto; animation:authStageArrive .6s cubic-bezier(.2,.8,.2,1) both }
.auth-buddy-scene { position:relative; min-height:390px; display:flex; flex-direction:column; align-items:center; justify-content:center; isolation:isolate; color:#e9f6ff; text-align:center }
.auth-buddy-aura { position:absolute; width:260px; height:260px; top:19px; border-radius:50%; background:radial-gradient(circle,#71e1e883 0%,#5187ec42 37%,transparent 72%); filter:blur(17px); z-index:-1; animation:authAura 5s ease-in-out infinite }
.auth-buddy-ring { position:absolute; width:234px; height:234px; top:29px; border:1px solid #addef35c; border-radius:50%; box-shadow:inset 0 0 22px #7dc9f016,0 0 32px #64c9e31e; pointer-events:none; animation:authOrbit 14s linear infinite }
.auth-buddy-ring::before,.auth-buddy-ring::after { content:''; position:absolute; width:7px; height:7px; border-radius:50%; background:#79ecd2; box-shadow:0 0 14px #7efbe2; left:50%; top:-4px }
.auth-buddy-ring::after { background:#a5ccff; box-shadow:0 0 14px #9fc8ff; top:auto; bottom:-4px }
.auth-buddy-scene morph-bot { width:210px; height:210px; display:block; filter:drop-shadow(0 22px 28px #071b5366); animation:authBuddyFloat 4.2s ease-in-out infinite; transition:filter .35s ease }
.auth-buddy-scene.buddy-loading morph-bot { opacity:0 }
.auth-buddy-scene.buddy-loading::before { content:''; position:absolute; top:44px; width:178px; height:178px; border-radius:46%; background:linear-gradient(125deg,#315cf5,#42b3e9 55%,#34d399); box-shadow:0 20px 36px #0b398559,inset 0 2px 12px #ffffff6b; animation:authLoadingBreath 2.1s ease-in-out infinite }
.auth-buddy-scene.buddy-loading::after { content:'••'; position:absolute; top:86px; color:#fff; font-size:4rem; letter-spacing:.2em; line-height:1; animation:authLoadingEyes 1.3s ease-in-out infinite }
.auth-buddy-scene morph-bot:hover { filter:drop-shadow(0 25px 32px #19bda581) }
.auth-buddy-scene.buddy-unavailable morph-bot { display:none }
.auth-buddy-scene.buddy-unavailable::before { content:''; display:block; flex:none; width:160px; height:160px; border-radius:46%; background:radial-gradient(ellipse 9px 17px at 38% 42%,#fff 96%,transparent 100%),radial-gradient(ellipse 9px 17px at 62% 42%,#fff 96%,transparent 100%),linear-gradient(135deg,#315cf5,#34d399); box-shadow:0 20px 40px #06255377; animation:authBuddyFloat 4.2s ease-in-out infinite }
.auth-buddy-copy { display:grid; gap:7px; max-width:240px; margin-top:6px; text-wrap:balance }
.auth-buddy-copy strong { font-size:1.3rem; line-height:1.16; letter-spacing:-.025em }
.auth-buddy-copy span:last-child { color:#c9d9ec; font-size:.82rem; line-height:1.4 }
.auth-buddy-eyebrow { color:#6de4cb; font-size:.67rem; font-weight:800; letter-spacing:.15em }
.auth-stage .auth-card,body.freev-apple .auth-stage .auth-card { position:relative; overflow:hidden; max-width:none; padding:2rem; border:1px solid #ffffffbd; border-radius:28px; background:linear-gradient(150deg,#f7fbff 0%,#fff 23%,#fff 78%,#f7fafc 100%); box-shadow:0 32px 90px #0611288c,0 2px 14px #b4d0ef33; animation:authCardArrive .55s .08s cubic-bezier(.2,.8,.2,1) both }
.auth-stage .auth-card::before { content:''; position:absolute; top:0; left:13%; width:74%; height:3px; border-radius:0 0 8px 8px; background:linear-gradient(90deg,transparent,#3472f1,#31c6ad,transparent); box-shadow:0 1px 20px #2d98e592 }
.auth-stage .auth-logo,body.freev-apple .auth-stage .auth-logo { display:flex; align-items:center; gap:11px; margin:0 0 21px; text-align:left; letter-spacing:normal }
.auth-logo-mark { display:grid; place-items:center; width:46px; height:46px; border-radius:14px; background:#edf5ff; box-shadow:inset 0 0 0 1px #dfeaf8,0 7px 18px #1f65c915; flex:none }
.auth-logo-mark img { display:block; width:36px; height:36px; border-radius:9px }
.auth-logo-text { display:grid; gap:2px }
.auth-logo-text strong { font-size:1.09rem; font-weight:780; color:#172336; letter-spacing:-.035em }
.auth-logo-text small { font-size:.73rem; font-weight:550; color:#708096; letter-spacing:0 }
.auth-intro { margin:0 0 24px; text-align:left }
.auth-intro-kicker { display:block; margin-bottom:8px; color:#138b7b; font-size:.65rem; font-weight:850; letter-spacing:.14em }
.auth-intro h2 { margin:0 0 5px; color:#182237; font-size:1.6rem; line-height:1.14; letter-spacing:-.05em; font-weight:780 }
.auth-intro p { margin:0; color:#68798e; font-size:.82rem; line-height:1.45 }
.auth-stage .auth-tabs,body.freev-apple .auth-stage .auth-tabs { margin-bottom:22px; padding:4px; border:1px solid #e1e9f4; border-radius:14px; background:#eff3f9 }
.auth-stage .auth-tab { min-height:43px; border-radius:10px; color:#52637a }
.auth-stage .auth-tab.active,body.freev-apple .auth-stage .auth-tab.active { color:#1554c7; background:#fff; box-shadow:0 2px 9px #203d6a17,0 1px 2px #203d6a0d }
.auth-account-type { min-width:0; margin:0 0 18px; padding:0; border:0; text-align:left }
.auth-account-type[hidden] { display:none!important }
.auth-account-type legend { padding:0; color:#1c304e; font-size:.83rem; font-weight:780 }
.auth-account-type > p { margin:5px 0 12px; color:#69798f; font-size:.72rem; line-height:1.4 }
.auth-account-type-options { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px }
.auth-account-type-options label { position:relative; cursor:pointer }
.auth-account-type-options input { position:absolute; width:1px; height:1px; opacity:0 }
.auth-account-type-options label > span { display:grid; gap:5px; min-height:104px; padding:12px; border:1px solid #dae5f1; border-radius:14px; background:#f8fbff; box-shadow:0 3px 9px #173b6b08; transition:border-color .2s ease,box-shadow .2s ease,transform .2s ease,background .2s ease }
.auth-account-type-options svg { display:block; width:27px; height:27px; padding:6px; border-radius:8px; background:#e6efff; color:#2860cb; box-sizing:border-box }
.auth-account-type-options strong { color:#1c304e; font-size:.79rem; line-height:1.15 }
.auth-account-type-options small { color:#718096; font-size:.66rem; line-height:1.3 }
.auth-account-type-options label:hover > span { transform:translateY(-2px); border-color:#92b5ec; box-shadow:0 8px 20px #164c9e19 }
.auth-account-type-options input:checked + span { border-color:#3477ed; background:linear-gradient(150deg,#f4f8ff,#f5fffd); box-shadow:0 0 0 3px #3477ed1e,0 8px 22px #164c9e17 }
.auth-account-type-options input:focus-visible + span { outline:3px solid #2772eb; outline-offset:2px }
.auth-stage .form-label { display:block; margin-bottom:7px; font-size:.77rem; font-weight:670 }
.auth-stage .form-input { min-height:49px; border-radius:12px; border-color:#dce5f0; background:#fff; font-size:.88rem }
.auth-stage .form-input::placeholder { color:#98a5b5 }
.auth-password-field { position:relative }
.auth-password-field .form-input { width:100%; padding-right:52px }
.auth-password-toggle { position:absolute; right:6px; top:50%; transform:translateY(-50%); display:grid; place-items:center; width:38px; height:38px; border:0; border-radius:10px; background:transparent; color:#687c95; cursor:pointer; transition:background .2s ease,color .2s ease }
.auth-password-toggle:hover,.auth-password-toggle[aria-pressed="true"] { background:#edf4fc; color:#2363d7 }
.auth-password-toggle:focus-visible { outline:2px solid #3472f1; outline-offset:1px }
.auth-caps-hint:not([hidden]) { display:block; margin-top:6px; color:#9a580c; font-size:.7rem; font-weight:650 }
.auth-stage .auth-btn { min-height:50px; position:relative; overflow:hidden; border-radius:12px; letter-spacing:-.01em }
.auth-stage .auth-btn:not(:disabled)::after { content:'→'; display:inline-block; margin-left:10px; font-size:1.1rem; transition:transform .2s ease }
.auth-stage .auth-btn:hover:not(:disabled)::after { transform:translateX(4px) }
.auth-trust { display:flex; align-items:center; gap:10px; margin-top:19px; padding:12px; border:1px solid #dceee9; border-radius:13px; background:#f5faf8; text-align:left }
.auth-trust-icon { display:grid; place-items:center; width:32px; height:32px; flex:none; border-radius:10px; background:#e0f4ed; color:#139879; font-size:.88rem }
.auth-trust > span:last-child { display:grid; gap:2px }
.auth-trust strong { color:#263c46; font-size:.73rem; font-weight:750 }
.auth-trust small { color:#6a7f89; font-size:.68rem; line-height:1.35 }
.auth-stage #authForgotBtn { margin-top:7px !important; color:#2462cc !important; font-weight:620 }
.auth-stage #authForgotBtn:hover { text-decoration:underline }
.auth-stage .auth-btn { background:linear-gradient(110deg,#2663eb,#315be5 65%,#168d8b); box-shadow:0 9px 24px #2761e638; transition:transform .2s ease,box-shadow .2s ease,filter .2s ease }
.auth-stage .auth-btn:hover:not(:disabled) { transform:translateY(-2px); box-shadow:0 13px 28px #2761e650; filter:brightness(1.05) }
.auth-stage .auth-tab { transition:background .24s ease,color .24s ease,box-shadow .24s ease,transform .24s ease }
.auth-stage .auth-tab:hover { transform:translateY(-1px) }
.auth-stage .form-input:focus { border-color:#4b86f2; box-shadow:0 0 0 4px #3d84ef1c,0 8px 22px #145dc30d; transition:border-color .2s ease,box-shadow .2s ease }
.auth-stage .auth-error,.auth-stage .auth-success { animation:authNotice .28s cubic-bezier(.2,.8,.2,1) both }
@keyframes authStageArrive { from { opacity:0; transform:translateY(16px) scale(.985) } to { opacity:1; transform:none } }
@keyframes authCardArrive { from { opacity:0; transform:translateX(18px) } to { opacity:1; transform:none } }
@keyframes authNotice { from { opacity:0; transform:translateY(-5px) } to { opacity:1; transform:none } }
@keyframes authBuddyFloat { 0%,100% { transform:translateY(0) } 50% { transform:translateY(-9px) } }
@keyframes authAura { 0%,100% { opacity:.6; transform:scale(.95) } 50% { opacity:1; transform:scale(1.08) } }
@keyframes authOrbit { to { transform:rotate(360deg) } }
@keyframes authLoadingBreath { 50% { transform:scale(.95); filter:brightness(1.08) } }
@keyframes authLoadingEyes { 50% { opacity:.48; transform:translateY(3px) } }
@media(max-width:650px) { .auth-stage { width:min(100%,400px); grid-template-columns:1fr; gap:8px; padding:12px 0 } .auth-buddy-scene { min-height:128px; flex-direction:row; text-align:left; gap:8px; justify-content:center } .auth-buddy-scene morph-bot { width:104px; height:104px; flex:none } .auth-buddy-aura { width:140px; height:140px; top:-10px; left:5% } .auth-buddy-copy { margin:0; max-width:190px } .auth-buddy-copy strong { font-size:1rem } .auth-buddy-copy span:last-child { font-size:.7rem } .auth-stage .auth-card { padding:1.5rem } }
@media(max-width:360px) { .auth-buddy-copy span:last-child { display:none } .auth-buddy-scene { min-height:98px } .auth-buddy-scene morph-bot { width:88px; height:88px } .auth-stage .auth-card { padding:1.2rem } }
@media(max-width:650px) { .auth-buddy-ring { width:116px; height:116px; top:5px; left:calc(5% + 12px) } }
@media(max-width:360px) { .auth-buddy-ring { width:100px; height:100px; top:0 } }
@media(max-width:650px) { .auth-buddy-scene.buddy-loading::before { width:94px; height:94px; top:17px; left:13px } .auth-buddy-scene.buddy-loading::after { top:36px; left:34px; font-size:2.2rem } }
@media(max-width:650px) { .auth-buddy-scene.buddy-unavailable::before { width:94px; height:94px } }
@media(max-width:360px) { .auth-buddy-scene.buddy-loading::before { width:82px; height:82px; top:8px; left:16px } .auth-buddy-scene.buddy-loading::after { top:24px; left:34px; font-size:2rem } }
@media(max-width:360px) { .auth-buddy-scene.buddy-unavailable::before { width:82px; height:82px } }
@media(max-width:650px) and (max-height:680px) { .auth-stage { padding:6px 0; gap:3px } .auth-buddy-scene { min-height:86px } .auth-buddy-scene morph-bot { width:78px; height:78px } .auth-buddy-copy span:last-child { display:none } .auth-buddy-ring { width:92px; height:92px; top:-3px } .auth-buddy-scene.buddy-loading::before { width:74px; height:74px; top:6px } .auth-buddy-scene.buddy-loading::after { top:20px; font-size:1.8rem } .auth-stage .auth-card { padding:1.15rem } .auth-stage .auth-logo { margin-bottom:.8rem } .auth-stage .auth-tabs { margin-bottom:.8rem } }
@media(max-width:650px) { .auth-stage .auth-card,body.freev-apple .auth-stage .auth-card { padding:1.5rem } .auth-intro { margin-bottom:17px } .auth-stage .auth-tabs,body.freev-apple .auth-stage .auth-tabs { margin-bottom:17px } }
@media(max-width:650px) and (max-height:680px) { .auth-stage .auth-card,body.freev-apple .auth-stage .auth-card { padding:1.15rem } .auth-stage .auth-logo { margin-bottom:12px } .auth-intro { margin-bottom:13px } .auth-intro h2 { font-size:1.32rem } .auth-stage .auth-tabs,body.freev-apple .auth-stage .auth-tabs { margin-bottom:12px } .auth-trust { margin-top:11px } }
body.dark-mode .auth-stage .auth-card,body.freev-apple.dark-mode .auth-stage .auth-card { background:linear-gradient(145deg,#222c3c,#1d2532 65%,#202e38); border-color:#45536a }
body.dark-mode .auth-logo-mark { background:#283a51; box-shadow:inset 0 0 0 1px #465b74 }
body.dark-mode .auth-logo-text strong,body.dark-mode .auth-intro h2 { color:#f4f8ff }
body.dark-mode .auth-logo-text small,body.dark-mode .auth-intro p { color:#bac9d9 }
body.dark-mode .auth-stage .form-label { color:#e0e9f4 !important }
body.dark-mode .auth-stage .auth-tabs { background:#253347; border-color:#3c506b }
body.dark-mode .auth-stage .auth-tab:not(.active) { color:#c3d1e4 }
body.dark-mode .auth-account-type legend,body.dark-mode .auth-account-type-options strong { color:#f0f6ff }
body.dark-mode .auth-account-type > p,body.dark-mode .auth-account-type-options small { color:#bdc9d9 }
body.dark-mode .auth-account-type-options label > span { background:#263449; border-color:#425675 }
body.dark-mode .auth-account-type-options input:checked + span { background:#213d59; border-color:#5ea3ff }
body.dark-mode .auth-stage .auth-tab.active { background:#344966; color:#e9f3ff }
body.dark-mode .auth-stage .form-input { background:#223044; border-color:#43546b; color:#f5f8ff }
body.dark-mode .auth-password-toggle { color:#b5c8e1 }
body.dark-mode .auth-password-toggle:hover,body.dark-mode .auth-password-toggle[aria-pressed="true"] { background:#334a66; color:#e8f3ff }
body.dark-mode .auth-caps-hint { color:#ffd18b }
body.dark-mode .auth-trust { background:#1e3c3d; border-color:#32615d }
body.dark-mode .auth-trust strong { color:#dcf9f0 }
body.dark-mode .auth-trust small { color:#add2cb }
@media(prefers-reduced-motion:reduce) { .auth-stage,.auth-stage .auth-card,.auth-buddy-aura,.auth-buddy-ring,.auth-buddy-scene morph-bot,.auth-buddy-scene.buddy-unavailable::before,.auth-buddy-scene.buddy-loading::before,.auth-buddy-scene.buddy-loading::after,.auth-stage .auth-error,.auth-stage .auth-success { animation:none !important } .auth-stage .auth-btn,.auth-stage .auth-tab,.auth-stage .form-input { transition:none !important } }
.auth-google-divider { display:flex; align-items:center; gap:.8rem; margin:.85rem 0 .7rem; color:#94a3b8; font-size:.72rem; font-weight:700; }
.auth-google-divider::before,.auth-google-divider::after { content:""; height:1px; flex:1; background:#e2e8f0; }
.auth-google-button { display:flex; width:100%; min-height:2.9rem; align-items:center; justify-content:center; gap:.7rem; border:1px solid #d5dfe9; border-radius:.85rem; background:linear-gradient(180deg,#fff,#f8fafc); color:#334155; font:inherit; font-weight:750; box-shadow:0 4px 12px rgba(15,23,42,.04); }
.auth-google-button:not(:disabled) { cursor:pointer; transition:border-color .2s, box-shadow .2s, transform .2s; }
.auth-google-button:not(:disabled):hover { border-color:#9ab5dc; box-shadow:0 7px 18px rgba(37,99,235,.12); transform:translateY(-1px); }
.auth-google-button:focus-visible { outline:3px solid #2563eb; outline-offset:3px; }
.auth-google-button svg { flex:none; }
.auth-google-button small { padding:.2rem .45rem; border-radius:999px; background:#edf4ff; color:#4e6485; font-size:.62rem; }
.auth-google-button:disabled { cursor:not-allowed; opacity:.77; }
.auth-google-hint { margin:.42rem 0 .2rem; color:#64748b; font-size:.7rem; line-height:1.35; text-align:center; }
.auth-discover-link { display:flex; align-items:center; gap:11px; min-height:64px; margin:-9px 0 17px; padding:10px 12px; border:1px solid #c9ddf8; border-radius:14px; background:linear-gradient(115deg,#f0f7ff,#f1fbfa); color:#173959; text-align:left; text-decoration:none; box-shadow:0 5px 16px #184b9010; transition:transform .2s ease,border-color .2s ease,box-shadow .2s ease; }
.auth-discover-link:hover { transform:translateY(-2px); border-color:#76abea; box-shadow:0 9px 22px #184b9020; }
.auth-discover-link:focus-visible { outline:3px solid #3472f1; outline-offset:2px; }
.auth-discover-icon { display:grid; place-items:center; flex:none; width:36px; height:36px; border-radius:11px; background:#dcecff; color:#155fc4; }
.auth-discover-copy { display:grid; gap:2px; min-width:0; flex:1; }
.auth-discover-copy strong { font-size:.78rem; line-height:1.3; }
.auth-discover-copy small { color:#536e85; font-size:.68rem; line-height:1.3; }
.auth-discover-arrow { color:#1766ce; font-size:1.18rem; font-weight:800; }
body.dark-mode .auth-discover-link { color:#ecf5ff; border-color:#476b93; background:linear-gradient(115deg,#253e59,#20484b); }
body.dark-mode .auth-discover-copy small { color:#c2d3e3; }
body.dark-mode .auth-discover-icon { color:#b7d7ff; background:#315577; }
@media(max-width:650px) { .auth-discover-link { margin:-5px 0 13px; min-height:58px; } }
@media(prefers-reduced-motion:reduce) { .auth-discover-link { transition:none; } }
body.dark-mode .auth-google-button { background:#253347; border-color:#43546b; color:#e8f3ff; }
body.dark-mode .auth-google-hint { color:#b4c5d8; }


/* assets/css/legacy-transfer.css */
.freev-legacy-transfer-offer {
  position: fixed;
  z-index: 2100;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  width: min(640px, calc(100vw - 36px));
  padding: 16px 40px 16px 16px;
  border: 1px solid #cfe6e3;
  border-radius: 22px;
  background: linear-gradient(130deg, #f2fbf8, #fff 48%, #f3f7ff);
  box-shadow: 0 18px 55px #102b402e, 0 2px 8px #2b847014;
  color: #19353e;
  animation: freevLegacyOfferIn .35s cubic-bezier(.2,.8,.2,1) both;
}
.freev-legacy-transfer-offer[hidden] { display:none!important; }
.freev-onboarding-recover[hidden],#accountProfileRecover[hidden] { display:none!important; }
.freev-onboarding-recover {
  display:flex;align-items:center;gap:12px;width:100%;min-height:64px;margin:12px 0 0;padding:12px 15px;
  border:1px solid #bdded9;border-radius:15px;background:linear-gradient(120deg,#effaf6,#f5f9ff);
  color:#174b50;font:inherit;text-align:left;cursor:pointer;
  transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease;
}
.freev-onboarding-recover:hover { transform:translateY(-2px);border-color:#64b8a9;box-shadow:0 10px 26px #168a701c; }
.freev-onboarding-recover:disabled { opacity:.55;cursor:wait;transform:none;box-shadow:none; }
.freev-onboarding-recover:focus-visible { outline:3px solid #227ae0;outline-offset:2px; }
.freev-onboarding-recover>span { display:grid;gap:3px;flex:1; }
.freev-onboarding-recover strong { font-size:.87rem; }
.freev-onboarding-recover small { font-size:.72rem;color:#54727a;line-height:1.35; }
#accountProfileRecover { margin-top:8px; }
.freev-legacy-transfer-icon,.freev-legacy-transfer-mark {
  display: grid;
  place-items: center;
  color: #087f6d;
  background: #ddf5ec;
  border-radius: 14px;
}
.freev-legacy-transfer-icon { width: 42px; height: 42px; }
.freev-legacy-transfer-offer strong { display:block; font-size:.92rem; line-height:1.25; }
.freev-legacy-transfer-offer p { margin:4px 0 0; color:#587178; font-size:.78rem; line-height:1.4; }
.freev-legacy-transfer-offer .btn { white-space:nowrap; }
.freev-legacy-transfer-close {
  position:absolute; right:10px; top:8px; border:0; background:transparent;
  color:#587178; font-size:1.3rem; cursor:pointer;
}
.freev-legacy-transfer-dialog {
  width:min(480px, calc(100vw - 28px)); max-height:calc(100dvh - 28px);
  border:1px solid #dbe8e7; border-radius:24px; padding:0;
  background:#fff; color:#18313a; box-shadow:0 35px 100px #0a253d59;
}
.freev-legacy-transfer-dialog::backdrop { background:#09182b9c; backdrop-filter:blur(7px); }
.freev-legacy-transfer-dialog form { padding:28px; display:grid; gap:14px; }
.freev-legacy-transfer-mark { width:48px; height:48px; font-size:1.15rem; }
.freev-legacy-transfer-dialog h2 { margin:0; font-size:1.38rem; letter-spacing:-.025em; }
.freev-legacy-transfer-dialog p { margin:0; color:#536d79; font-size:.89rem; line-height:1.55; }
.freev-legacy-transfer-dialog label { font-size:.84rem; font-weight:700; }
.freev-legacy-transfer-dialog input {
  width:100%; min-height:46px; border:1px solid #cad9e4; border-radius:12px;
  padding:0 13px; font:inherit; color:#18313a; background:#fff;
}
.freev-legacy-transfer-dialog input:focus-visible { outline:2px solid #2563eb; outline-offset:2px; }
.freev-legacy-transfer-dialog .freev-legacy-transfer-error {
  padding:10px 12px; border-radius:10px; background:#fff2f0; color:#a33528;
}
.freev-legacy-transfer-dialog .freev-legacy-transfer-success { background:#e8f7ef; color:#126a4f; }
.freev-legacy-transfer-actions { display:flex; justify-content:flex-end; gap:10px; flex-wrap:wrap; margin-top:4px; }
@keyframes freevLegacyOfferIn { from { opacity:0; transform:translateY(15px) scale(.98); } to { opacity:1; transform:none; } }
@media (max-width:600px) {
  .freev-legacy-transfer-offer { grid-template-columns:40px 1fr; width:calc(100vw - 24px); right:12px; bottom:max(12px,env(safe-area-inset-bottom)); padding:14px 34px 14px 14px; }
  .freev-legacy-transfer-offer .btn { grid-column:1 / -1; width:100%; }
  .freev-legacy-transfer-dialog form { padding:22px; }
}
@media (prefers-reduced-motion:reduce) { .freev-legacy-transfer-offer { animation:none; }.freev-onboarding-recover { transition:none; } }


/* assets/css/workspace-buddy.css */
/* Un seul compagnon léger pour toutes les vues, au-dessus du contenu et sous les dialogues. */
.workspace-buddy[hidden], .workspace-buddy-card[hidden] { display:none !important; }
.workspace-buddy { position:fixed; right:20px; bottom:20px; z-index:80; display:grid; justify-items:end; gap:10px; pointer-events:none; color:var(--apple-ink,#1d1d1f); }
.workspace-buddy > * { pointer-events:auto; }
.workspace-buddy-invite { position:absolute; right:78px; bottom:15px; width:max-content; max-width:calc(100vw - 110px); padding:9px 12px; border:1px solid var(--apple-outline,#e3eaf2); border-radius:12px; background:var(--apple-surface,#fff); box-shadow:0 8px 24px #15264120; color:var(--apple-ink,#1d1d1f); font-size:11px; font-weight:720; opacity:0; transform:translateX(6px); pointer-events:none; transition:opacity .3s ease,transform .3s ease; }
.workspace-buddy.is-inviting .workspace-buddy-invite { opacity:1; transform:translateX(0); }
.workspace-buddy-toggle { position:relative; display:grid; place-items:center; width:68px; height:68px; padding:0; overflow:hidden; border:1px solid #bbd7eb; border-radius:22px; background:linear-gradient(145deg,#f7fcff,#e8f6f5); box-shadow:0 10px 26px #2346742b,inset 0 1px #fff; cursor:pointer; transition:transform .3s cubic-bezier(.2,.8,.2,1),box-shadow .3s ease; -webkit-tap-highlight-color:transparent; }
.workspace-buddy-toggle:hover { transform:translateY(-3px) scale(1.04); box-shadow:0 16px 32px #23467435,inset 0 1px #fff; }
.workspace-buddy-toggle:active { transform:scale(.96); }
.workspace-buddy-toggle:focus-visible, .workspace-buddy-card button:focus-visible { outline:3px solid #2764e7; outline-offset:3px; }
.workspace-buddy-glow { position:absolute; inset:5px; border-radius:18px; background:radial-gradient(circle at 25% 15%,#b3e9ff94,transparent 55%),radial-gradient(circle at 85% 90%,#9ff2c990,transparent 53%); animation:workspaceBuddyBreathe 5s ease-in-out infinite; }
.workspace-buddy-toggle morph-bot { position:relative; display:block; width:58px; height:58px; filter:drop-shadow(0 4px 5px #1d55a83a); }
.workspace-buddy-fallback { display:none; position:relative; width:50px; height:50px; align-items:center; justify-content:center; border-radius:16px; color:#fff; font-size:11px; font-weight:800; letter-spacing:4px; background:linear-gradient(145deg,#315cf5,#24b69b); }
.workspace-buddy.is-unavailable morph-bot { display:none; }
.workspace-buddy.is-unavailable .workspace-buddy-fallback { display:flex; }
.workspace-buddy-card { position:relative; width:min(332px,calc(100vw - 40px)); max-height:calc(100dvh - 200px); overflow-x:hidden; overflow-y:auto; padding:19px 18px 17px; border:1px solid var(--apple-outline,#e3eaf2); border-radius:21px; background:var(--apple-surface,#fff); box-shadow:0 16px 44px #15264129,0 2px 8px #1526410d; animation:workspaceBuddyAppear .28s cubic-bezier(.2,.8,.2,1) both; }
.workspace-buddy-card::before { content:''; position:absolute; top:0; left:20px; right:20px; height:2px; border-radius:0 0 5px 5px; background:linear-gradient(90deg,#3069ed,#31c9ad); }
.workspace-buddy-kicker { display:block; margin-bottom:7px; color:#148b7b; font-size:10px; font-weight:800; letter-spacing:.12em; }
.workspace-buddy-card strong { display:block; padding-right:24px; font-size:15px; line-height:1.25; letter-spacing:-.025em; }
.workspace-buddy-card p { margin:6px 0 0; color:var(--apple-muted,#68758a); font-size:12px; line-height:1.45; }
.workspace-buddy-actions { display:grid; grid-template-columns:minmax(0,1fr); gap:8px; min-width:0; margin-top:15px; }
.workspace-buddy-card .workspace-buddy-action { position:static; display:block; width:100%; min-height:39px; padding:8px 13px; border:1px solid transparent; border-radius:11px; font:inherit; font-size:12px; font-weight:750; text-align:center; white-space:normal; overflow-wrap:anywhere; cursor:pointer; transition:transform .2s ease,background .2s ease,box-shadow .2s ease; }
.workspace-buddy-action:hover { transform:translateY(-1px); }
.workspace-buddy-action:active { transform:scale(.98); }
.workspace-buddy-action-primary { color:#fff; background:linear-gradient(105deg,#245fe4,#147ec0); box-shadow:0 6px 13px #1d5ed029; }
.workspace-buddy-action-primary:hover { box-shadow:0 9px 18px #1d5ed03b; }
.workspace-buddy-action-secondary { color:var(--apple-ink,#1d1d1f); background:var(--apple-hover,#f1f4f9); border-color:var(--apple-outline,#dfe6ee); }
.workspace-buddy-card .workspace-buddy-future { display:flex; align-items:center; justify-content:center; gap:6px; width:100%; margin-top:12px; padding:6px 4px; border:0; border-radius:8px; color:#167d70; background:transparent; font:inherit; font-size:11px; font-weight:750; cursor:pointer; }
.workspace-buddy-card .workspace-buddy-future:hover { background:var(--apple-hover,#f0f4fa); }
.workspace-buddy-card #workspaceBuddyClose { position:absolute; top:10px; right:10px; display:grid; place-items:center; width:28px; height:28px; padding:0; border:0; border-radius:9px; color:var(--apple-muted,#68758a); background:transparent; cursor:pointer; }
.workspace-buddy-card #workspaceBuddyClose:hover { background:var(--apple-hover,#f0f4fa); }
body.dark-mode .workspace-buddy-toggle { border-color:#466778; background:linear-gradient(145deg,#28394d,#1b3539); box-shadow:0 10px 28px #0005,inset 0 1px #ffffff20; }
@keyframes workspaceBuddyAppear { from { opacity:0; transform:translateY(8px) scale(.96); } to { opacity:1; transform:translateY(0) scale(1); } }
@keyframes workspaceBuddyBreathe { 50% { opacity:.55; transform:scale(1.1); } }
@media (max-width:768px), (pointer:coarse) and (max-width:1024px) { .workspace-buddy { right:calc(1.25rem + env(safe-area-inset-right)); bottom:calc(8.9rem + env(safe-area-inset-bottom)); } .workspace-buddy-toggle { width:54px; height:54px; border-radius:18px; } .workspace-buddy-toggle morph-bot { width:48px; height:48px; } .workspace-buddy-invite { right:64px; bottom:10px; } .workspace-buddy-card { width:min(332px,calc(100vw - 2.5rem - env(safe-area-inset-right))); } }
@media (max-height:560px) and (max-width:768px) { .workspace-buddy { bottom:calc(5.2rem + env(safe-area-inset-bottom)); right:calc(5.1rem + env(safe-area-inset-right)); } }
@media (prefers-reduced-motion:reduce) { .workspace-buddy *, .workspace-buddy *::before, .workspace-buddy *::after { animation:none !important; transition:none !important; } }


/* assets/css/adaptive-devices.css */
/* Une même interface de consultation pour téléphones étroits, grands téléphones
   tactiles et appareils dont le navigateur expose deux segments d'écran. */
@media (max-width: 767px), (horizontal-viewport-segments: 2), (vertical-viewport-segments: 2) {
  html, body, .main-content, .content-area { min-width: 0; max-width: 100%; }
  .main-content { width: 100%; }
  body.freev-apple .sidebar { width: min(86vw, 21.5rem); max-width: none; }
  .content-area { min-height: 0; padding-inline: max(.75rem, env(safe-area-inset-left)) max(.75rem, env(safe-area-inset-right)); padding-bottom: calc(6.1rem + env(safe-area-inset-bottom)); overflow-x: hidden; }
  .content-area > *, #dashboard-view, #transactions-view, #settings-view { min-width: 0; max-width: 100%; }
  .content-area :is(img, svg, canvas) { max-width: 100%; }
  .top-bar { min-width: 0; padding-inline: max(.75rem, env(safe-area-inset-left)) max(.75rem, env(safe-area-inset-right)); }
  .top-bar > *, .top-bar > .flex { min-width: 0; }
  body.freev-apple .top-bar #viewModeTabs { display: none !important; }
  .month-picker { min-width: 0; max-width: 100%; gap: .25rem; }
  body.freev-apple .top-bar #globalMonthPicker {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    max-width: none;
    padding-inline: .25rem;
  }

  /* La navigation reste accessible au pouce et ne dépend pas du rendu desktop. */
  .bottom-nav { display: flex !important; width: 100%; height: calc(4.7rem + env(safe-area-inset-bottom)); padding: .35rem max(.3rem, env(safe-area-inset-right)) calc(.35rem + env(safe-area-inset-bottom)) max(.3rem, env(safe-area-inset-left)); border-top: 1px solid rgba(154,218,190,.15); background: color-mix(in srgb, #10231f 94%, transparent); box-shadow: 0 -12px 30px rgba(2,25,20,.16); backdrop-filter: blur(18px); }
  .bottom-nav-item { min-width: 0; min-height: 3.2rem; flex: 1 1 0; border-radius: .9rem; color: #a7c4b9; font-size: .61rem; }
  .bottom-nav-item i { display: grid; width: 2.05rem; height: 2.05rem; flex: 0 0 auto; place-items: center; border-radius: .7rem; }
  .bottom-nav-item.active { color: #e9fff2; background: rgba(43,152,113,.23); }
  .bottom-nav-item.active i { color: #93e6b2; background: rgba(255,255,255,.1); }
  .bottom-nav-item::after { display: none; }
  #bnav-scan i { background: linear-gradient(145deg,#26a783,#14745f); color: #fff; }
  #fabAddBtn { display: none !important; }

  /* Sur mobile, le tableau de bord sert à consulter le solde et les mouvements. */
  body[data-freev-view="dashboard"] :is(#premiumWorkspaceDesc, .freev-dashboard-benefits, .freev-dashboard-explore, #premiumWorkspaceIllustration, .premium-v4-context, .premium-workspace-actions, #dashboardAlerts, .premium-v4-chart-grid, #budgetCard, #spendableBlock, #financePriority2) { display: none !important; }
  body[data-freev-view="dashboard"] .premium-stat-grid > :not(.premium-v4-stat-balance) { display: none !important; }
  body[data-freev-view="dashboard"] .premium-stat-grid { display: block !important; margin-bottom: 1rem !important; }
  body[data-freev-view="dashboard"] .premium-v4-stat-balance { display: flex; min-height: 9rem; min-width: 0; align-items: center; gap: 1rem; padding: clamp(1rem, 3vw, 1.4rem); border-radius: 1.3rem; background: linear-gradient(140deg, #172b35, #164d55 66%, #187666); color: #fff; }
  body[data-freev-view="dashboard"] .premium-v4-stat-balance :is(#balanceLabel, #balanceChange) { color: rgba(255,255,255,.78) !important; }
  body[data-freev-view="dashboard"] .premium-v4-stat-balance #cardBalance { color: #fff !important; font-size: clamp(1.7rem, 6vw, 2.45rem); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
  body[data-freev-view="dashboard"] #dashboardRecentTransactionsBlock { min-width: 0; border-radius: 1.25rem; }
  .mobile-recent-list { display: grid; gap: .1rem; padding: 0; margin: 0; list-style: none; }
  .mobile-recent-list li { display: flex; min-width: 0; align-items: center; gap: .65rem; padding: .78rem 0; border-bottom: 1px solid var(--border-color, #e8ecea); }
  .mobile-recent-list li:last-child { border-bottom: 0; }
  .mobile-recent-info { display: grid; min-width: 0; flex: 1; gap: .12rem; }
  .mobile-recent-info strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-recent-amount { flex: 0 0 auto; font-variant-numeric: tabular-nums; }

  .receipt-scan-entry { display: grid; grid-template-columns: 2.6rem minmax(0,1fr); align-items: center; gap: .65rem; margin: .25rem 0 1rem; padding: .85rem; border: 1px solid rgba(22,131,107,.16); border-radius: 1.15rem; background: var(--bg-card,#fff); }
  .receipt-scan-entry-mark { display: grid; width: 2.55rem; height: 2.55rem; grid-row: span 2; place-items: center; border-radius: .85rem; background: #e3f4e9; color: #18785d; }
  .receipt-scan-entry-copy { min-width: 0; }
  .receipt-scan-entry-copy h2 { margin: .15rem 0; font-size: clamp(.84rem, 2vw, 1rem); line-height: 1.25; }
  .receipt-scan-entry-copy p { margin: 0; color: var(--text-muted,#68766f); font-size: .72rem; line-height: 1.4; }
  .receipt-scan-entry-button { display: inline-flex; min-height: 2.8rem; grid-column: 2; align-items: center; justify-content: center; gap: .5rem; padding: .55rem .8rem; border: 0; border-radius: .8rem; background: #1b7e63; color: #fff; font: inherit; font-size: .78rem; font-weight: 750; }
  .receipt-scan-entry-arrow { margin-left: auto; }
}

/* Une tablette tactile garde les pages et outils de bureau, avec le scan en plus. */
@media (min-width: 768px) and (max-width: 1366px) and (pointer: coarse) {
  .receipt-scan-entry { display:grid; grid-template-columns:2.6rem minmax(0,1fr); gap:.8rem; max-width:34rem; padding:1rem; margin:.5rem 0 1rem; border:1px solid rgba(22,131,107,.18); border-radius:1.1rem; background:var(--bg-card,#fff); }
  .receipt-scan-entry-mark { grid-row:span 2; display:grid; place-items:center; width:2.6rem; height:2.6rem; border-radius:.85rem; background:#e3f4e9; color:#18785d; }
  .receipt-scan-entry-button { grid-column:2; min-height:2.75rem; border:0; border-radius:.8rem; background:#1b7e63; color:#fff; font:inherit; font-weight:750; }
  .receipt-scanner-dialog { max-width:min(44rem,92vw); }
}

@media (max-width: 767px) {
  .sidebar .nav-item.primary-nav:not([data-space="dashboard"]):not([data-space="operations"]):not([data-space="settings"]) { display:none !important; }
  .sidebar :is(.sidebar-future-action,.premium-v4-sidebar-future) { display:none !important; }
  #v4WhatsNew,#v5WhatsNew { display:none !important; }
}

@media (max-width: 360px) {
  .top-bar { gap: .25rem; }
  .month-picker { gap: .12rem; }
  .month-picker input[type="month"] { font-size: .75rem; }
  .bottom-nav-item { padding-inline: .12rem; font-size: .56rem; }
  .bottom-nav-item i { width: 1.9rem; height: 1.9rem; }
  #dashboardRecentTransactionsBlock { padding: .85rem; }
  .mobile-recent-list li { gap: .4rem; }
  .mobile-recent-amount { font-size: .76rem; }
  .receipt-scan-entry { padding: .7rem; }
  .receipt-scan-entry-copy p { font-size: .65rem; }
}

/* Deux volets côte à côte : solde et scan sur le premier, mouvements sur le
   second. Aucun bouton ni montant important ne traverse la charnière. */
@media (horizontal-viewport-segments: 2) {
  .bottom-nav { left: env(viewport-segment-left 0 0, 0px); right: auto; width: env(viewport-segment-width 0 0, 50vw); }
  .top-bar > :is(.flex, div) { max-width: calc(env(viewport-segment-width 0 0, 50vw) - 1.5rem); }
  body[data-freev-view="dashboard"] .premium-workspace-head { max-width: calc(env(viewport-segment-width 0 0, 50vw) - 1.5rem); }
  body[data-freev-view="dashboard"] #dashboard-view { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); column-gap: max(1rem, calc(env(viewport-segment-left 1 0, 50vw) - env(viewport-segment-right 0 0, 50vw) + 1rem)); align-content: start; }
  body[data-freev-view="dashboard"] #dashboardWelcomeGuide,
  body[data-freev-view="dashboard"] .receipt-scan-entry,
  body[data-freev-view="dashboard"] .premium-stat-grid { grid-column: 1; }
  body[data-freev-view="dashboard"] #dashboardRecentTransactionsBlock { grid-column: 2; grid-row: 1 / span 3; align-self: start; }
  .content-area { padding-bottom: calc(6rem + env(safe-area-inset-bottom)); }
}

/* Charnière horizontale : les contrôles de navigation restent dans le volet bas. */
@media (vertical-viewport-segments: 2) {
  .main-content { height: env(viewport-segment-height 0 0, 50vh); max-height: env(viewport-segment-height 0 0, 50vh); }
  .content-area { padding-bottom: 1rem; }
  .bottom-nav { top: env(viewport-segment-top 0 1, 50vh); bottom: auto; min-height: 4.7rem; padding-top: .45rem; }
  .sidebar { height: env(viewport-segment-height 0 0, 50vh); }
}

@media (prefers-reduced-motion: reduce) {
  .bottom-nav-item, .receipt-scan-entry-button { transition: none !important; }
}


/* assets/css/future-features.css */
/* Aperçus des fonctionnalités futures : présence visible, aucune capacité simulée. */
.sidebar-future-actions { flex:none; padding:0 .65rem .55rem; }
.sidebar-future-divider { display:block; height:1px; margin:.55rem .35rem; background:var(--apple-outline,#e2e7ef); }
body.freev-apple .sidebar-future-action { display:flex; align-items:center; width:calc(100% - .35rem); min-height:43px; margin:.12rem .175rem; padding:.63rem .85rem; gap:.82rem; border:0; border-radius:11px; color:var(--apple-muted,#6e6e73); background:transparent; font:600 .81rem/1.35 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; text-align:left; cursor:pointer; transition:background-color .18s ease,color .18s ease,transform .18s ease; }
body.freev-apple .sidebar-future-action:hover { background:var(--apple-hover,#f2f4f8); color:var(--apple-ink,#1d1d1f); }
.sidebar-future-action:focus-visible { outline:3px solid var(--apple-accent,#2764e7); outline-offset:2px; }
.sidebar-future-tooltip {position:fixed;z-index:32000;max-width:calc(100vw - 24px);padding:9px 13px;border:1px solid var(--apple-outline,#dce5ef);border-radius:10px;background:var(--apple-surface,#fff);color:var(--apple-ink,#172033);box-shadow:0 7px 24px #17203325;font:600 13px/1.4 system-ui,sans-serif;pointer-events:none}
.sidebar-future-tooltip[hidden] {display:none!important}
.sidebar-future-action small { display:block; margin-top:2px; color:var(--apple-muted,#7a8798); font-size:.66rem; font-weight:600; }
body.freev-apple .sidebar-future-action i { display:grid; place-items:center; flex:none; width:29px; height:29px; color:#8b96a7; font-size:1rem; text-align:center; }
body.freev-apple .sidebar-future-action i.buddy-sidebar-face { position:relative; display:block; width:29px; height:29px; border-radius:10px; background:linear-gradient(145deg,#315cf5,#24b69b); box-shadow:0 4px 10px #2469c635,inset 0 1px #ffffff80; transform:none; }
.buddy-sidebar-face::before,.buddy-sidebar-face::after { content:''; position:absolute; top:9px; width:4px; height:8px; border-radius:50%; background:#fff; transform:rotate(-17deg); }
.buddy-sidebar-face::before { left:9px; }.buddy-sidebar-face::after { right:9px; }
body.freev-apple .sidebar-future-action:hover i.buddy-sidebar-face { box-shadow:0 7px 15px #2469c650,inset 0 1px #ffffff80; transform:translateY(-1px); }
@media (min-width:768px) { .sidebar-future-actions { padding:0 .35rem .5rem; } .sidebar-future-divider { margin:.65rem auto; width:36px; } body.freev-apple .sidebar-future-action { width:50px; min-height:49px; margin:.19rem auto; padding:0; justify-content:center; border:1px solid transparent; border-radius:15px; } body.freev-apple .sidebar-future-action > span { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; } }
@media (max-width:767px) { .sidebar-future-divider { margin:.6rem .8rem; } body.freev-apple .sidebar-future-action { display:flex; width:calc(100% - .3rem); min-height:49px; margin:.15rem; padding:.65rem .85rem; justify-content:flex-start; gap:.82rem; } }

.future-feature-dialog { position:fixed; inset:0; width:min(440px,calc(100vw - 32px)); max-height:calc(100dvh - 32px); margin:auto; padding:0; overflow:auto; border:1px solid var(--apple-outline,#e4e9f0); border-radius:28px; color:var(--apple-ink,#1d1d1f); background:var(--apple-surface,#fff); box-shadow:0 32px 90px #0a183459,0 3px 14px #0a18341c; }
.future-feature-dialog[open] { animation:futureFeatureEnter .38s cubic-bezier(.2,.8,.2,1) both; }
.future-feature-dialog::backdrop { background:#0b183b9c; backdrop-filter:blur(10px); -webkit-backdrop-filter:blur(10px); }
.future-feature-shell { position:relative; padding:30px 30px 26px; text-align:center; overflow:hidden; }
.future-feature-shell::before { content:''; position:absolute; top:0; left:14%; right:14%; height:3px; background:linear-gradient(90deg,transparent,#315cf5,#26bfa9,transparent); }
.future-feature-close { position:absolute; top:16px; right:16px; display:grid; place-items:center; width:35px; height:35px; padding:0; border:1px solid var(--apple-outline,#e4e9f0); border-radius:11px; color:var(--apple-muted,#718094); background:var(--apple-surface,#fff); cursor:pointer; }
.future-feature-close:hover { background:var(--apple-hover,#f3f5f8); }
.future-feature-content[hidden] { display:none !important; }
.future-feature-art { position:relative; display:grid; place-items:center; width:156px; height:156px; margin:8px auto 20px; }
.future-feature-art::before { content:''; position:absolute; inset:12px; border-radius:50%; background:radial-gradient(circle,#5ecbe75e,transparent 70%); filter:blur(10px); }
.future-feature-orbit { position:absolute; inset:8px; border:1px solid #93cced85; border-radius:50%; animation:futureFeatureOrbit 15s linear infinite; }
.future-feature-orbit::after { content:''; position:absolute; top:7px; left:16px; width:7px; height:7px; border-radius:50%; background:#33c9ad; box-shadow:0 0 12px #33c9ad; }
.future-feature-face { position:relative; width:112px; height:112px; border-radius:44%; background:radial-gradient(ellipse 6px 12px at 38% 42%,#fff 96%,transparent 100%),radial-gradient(ellipse 6px 12px at 62% 42%,#fff 96%,transparent 100%),linear-gradient(135deg,#315cf5,#34d399); box-shadow:0 15px 30px #166eb34d,inset 0 2px 8px #ffffff69; animation:futureFeatureFloat 4.5s ease-in-out infinite; }
.future-feature-shop-icon { display:grid; place-items:center; width:100px; height:100px; margin:30px auto 28px; border:1px solid #cfe4ed; border-radius:28px; color:#1a9d8a; background:linear-gradient(145deg,#eff8ff,#e4f7ef); font-size:2.4rem; box-shadow:0 15px 32px #1673ae29; }
.future-feature-dressing-icon { color:#5c55d9; background:linear-gradient(145deg,#f4f4ff,#e7f7f5); border-color:#d9ddf4; }
.future-feature-eyebrow { display:block; color:#138f80; font-size:.69rem; font-weight:850; letter-spacing:.15em; }
.future-feature-content h2 { margin:9px 0 11px; font-size:clamp(1.5rem,4vw,1.92rem); line-height:1.13; letter-spacing:-.045em; }
.future-feature-content p { margin:0; color:var(--apple-muted,#66768b); font-size:.88rem; line-height:1.55; }
.future-feature-promise { display:flex; align-items:center; gap:10px; margin:20px 0; padding:12px 14px; border:1px solid var(--apple-outline,#e5edf5); border-radius:13px; background:var(--apple-hover,#f7f9fc); color:var(--apple-ink,#1d1d1f); font-size:.78rem; line-height:1.4; text-align:left; }
.future-feature-promise i { color:#139b81; }
.future-feature-status { display:block; margin:18px 0 0; color:#177d71; font-size:.79rem; font-weight:760; }
.future-feature-done { width:100%; min-height:46px; margin-top:23px; border:0; border-radius:13px; color:#fff; background:linear-gradient(105deg,#245fe4,#158baf); box-shadow:0 9px 20px #1d5ed02e; font:inherit; font-size:.88rem; font-weight:760; cursor:pointer; transition:transform .2s ease,box-shadow .2s ease; }
.future-feature-done:hover { transform:translateY(-2px); box-shadow:0 13px 24px #1d5ed03d; }
.future-feature-done:active { transform:scale(.98); }
.future-feature-dialog button:focus-visible { outline:3px solid #2764e7; outline-offset:3px; }
body.dark-mode .future-feature-shop-icon { background:linear-gradient(145deg,#203450,#1c3b3d); border-color:#3e6475; }
@keyframes futureFeatureEnter { from { opacity:0; transform:translateY(16px) scale(.95); } to { opacity:1; transform:translateY(0) scale(1); } }
@keyframes futureFeatureOrbit { to { transform:rotate(360deg); } }
@keyframes futureFeatureFloat { 50% { transform:translateY(-6px) rotate(2deg); } }
@media (max-width:420px) { .future-feature-shell { padding:26px 22px 22px; } .future-feature-art { width:134px; height:134px; margin-bottom:14px; } .future-feature-face { width:100px; height:100px; } }
@media (prefers-reduced-motion:reduce) { .future-feature-dialog,.future-feature-dialog * { animation:none !important; transition:none !important; } }


/* assets/css/sidebar-selection.css */
/* Barre de comptes et repère de navigation : surfaces mates, sans effet vitré. */
.accounts-sidebar-legacy-list[hidden] { display:none !important; }
body.freev-apple .sidebar-header { border-bottom:1px solid var(--apple-outline,#e6e6eb); background:transparent; }
.sidebar-quickbar { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:center; justify-items:center; gap:7px 8px; width:100%; max-width:78px; margin:auto; }
body.freev-apple .sidebar-quick-action { display:grid; place-items:center; min-width:0; width:35px; height:35px; padding:0; border:1px solid var(--apple-outline,#e6e6eb); border-radius:11px; color:var(--apple-muted,#697488); background:var(--apple-surface,#fff); font-size:.82rem; cursor:pointer; transition:transform .22s cubic-bezier(.2,.8,.2,1),background-color .2s ease,color .2s ease,box-shadow .2s ease; }
body.freev-apple .sidebar-account-picker { grid-column:1 / -1; width:46px; height:46px; border-radius:16px; background:var(--apple-tint,#eaf3ff); box-shadow:0 6px 15px #2059b01a; }
body.freev-apple .sidebar-quick-action:hover { color:var(--apple-accent,#2563eb); background:var(--apple-tint,#eaf3ff); transform:translateY(-2px); }
body.freev-apple .sidebar-quick-action:active { transform:scale(.94); }
body.dark-mode.freev-apple .sidebar-account-picker { background:color-mix(in srgb,var(--apple-accent,#83b5ff) 17%,var(--apple-surface,#24334b)); }
.sidebar-quick-action:focus-visible { outline:3px solid var(--apple-accent,#2563eb); outline-offset:2px; }
#sidebarCurrentAccountMark { display:grid; place-items:center; width:31px; height:31px; border:2px solid var(--apple-surface,#fff); border-radius:50%; color:#fff; background:linear-gradient(145deg,#7190fc,#1f61db); box-shadow:0 3px 9px #2059b033; font-size:.72rem; font-weight:800; }
.sidebar-account-menu[hidden] { display:none !important; }
.sidebar-account-menu { position:absolute; top:.8rem; left:calc(100% + .55rem); z-index:1200; width:min(280px,calc(100vw - 110px)); padding:.7rem; border:1px solid var(--apple-outline,#e6e6eb); border-radius:18px; background:var(--apple-surface,#fff); box-shadow:0 18px 46px #142d4b2b; color:var(--apple-ink,#1c2535); animation:sidebarMenuIn .2s cubic-bezier(.2,.8,.2,1) both; }
.sidebar-account-menu-head { display:flex; align-items:center; justify-content:space-between; gap:.6rem; padding:.2rem .3rem .55rem; }
.sidebar-account-menu-head strong { font-size:.83rem; letter-spacing:-.01em; }
.sidebar-account-menu-hint { margin:0 .3rem .6rem; color:var(--apple-muted,#64748b); font-size:.72rem; line-height:1.35; }
.sidebar-account-menu-head button { display:grid; place-items:center; width:26px; height:26px; border:0; border-radius:8px; background:var(--apple-hover,#f1f4f8); color:var(--apple-muted,#64748b); cursor:pointer; }
.sidebar-account-menu-list { display:grid; gap:4px; max-height:min(48vh,330px); overflow-y:auto; }
.sidebar-account-option { display:flex; align-items:center; gap:.7rem; width:100%; min-height:45px; padding:.4rem .5rem; border:1px solid transparent; border-radius:11px; background:transparent; color:var(--apple-ink,#1c2535); text-align:left; font-family:inherit; font-size:.79rem; font-weight:600; line-height:1.3; cursor:pointer; }
.sidebar-account-option:hover,.sidebar-account-option.is-active { border-color:var(--apple-outline,#e6e6eb); background:var(--apple-tint,#eaf3ff); }
.sidebar-account-option:focus-visible,.sidebar-account-menu-head button:focus-visible { outline:3px solid var(--apple-accent,#2563eb); outline-offset:2px; }
.sidebar-account-option-avatar { display:grid; flex:0 0 28px; place-items:center; width:28px; height:28px; border-radius:9px; color:#fff; font-size:.68rem; font-weight:800; }
.sidebar-account-option-name { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sidebar-account-option > i { color:var(--apple-accent,#2563eb); font-size:.75rem; }
@keyframes sidebarMenuIn { from { opacity:0; transform:translateY(-5px) scale(.98); } to { opacity:1; transform:translateY(0) scale(1); } }
@media (min-width:768px) {
  body.freev-apple .sidebar { position:relative; z-index:20; }
  body.freev-apple .sidebar-header { width:100%; padding:.8rem .25rem .9rem; }
  body.freev-apple .sidebar-nav .nav-item { overflow:visible; }
  body.freev-apple .sidebar-nav .nav-item.active,
  body.freev-apple .sidebar-nav .nav-item[aria-current="page"] { background:var(--apple-tint,#eaf3ff); border-color:transparent; box-shadow:0 6px 16px #2563eb16; animation:sidebarSelectIn .38s cubic-bezier(.2,.8,.2,1) both; }
  body.freev-apple .sidebar-nav .nav-item.active::before,
  body.freev-apple .sidebar-nav .nav-item[aria-current="page"]::before { content:''; position:absolute; top:12px; bottom:12px; left:-5px; width:3px; border-radius:3px; background:var(--apple-accent,#2563eb); box-shadow:0 0 9px color-mix(in srgb,var(--apple-accent,#2563eb) 45%,transparent); animation:sidebarMarkerIn .32s ease-out both; }
  body.freev-apple .sidebar-nav .nav-item.active i,
  body.freev-apple .sidebar-nav .nav-item[aria-current="page"] i { animation:sidebarIconIn .34s cubic-bezier(.2,.8,.2,1) both; }
  body.freev-apple .sidebar-nav .nav-item:hover { transform:translateY(-1px); }
  body.dark-mode.freev-apple .sidebar-nav .nav-item.active,
  body.dark-mode.freev-apple .sidebar-nav .nav-item[aria-current="page"] { background:color-mix(in srgb,var(--apple-accent,#2563eb) 18%,var(--apple-surface,#24334b)); box-shadow:0 5px 14px #0002; }
}
@keyframes sidebarSelectIn { from { opacity:.55; transform:scale(.88); } to { opacity:1; transform:scale(1); } }
@keyframes sidebarMarkerIn { from { opacity:0; transform:scaleY(.35); } to { opacity:1; transform:scaleY(1); } }
@keyframes sidebarIconIn { from { transform:scale(.72); } to { transform:scale(1); } }
@media (max-width:767px) {
  body.freev-apple .sidebar-header { padding:.9rem 3.5rem .85rem 1rem; }
  .sidebar-quickbar { display:flex; justify-content:flex-start; max-width:none; margin:0; gap:10px; }
  body.freev-apple .sidebar-quick-action { flex:0 0 43px; width:43px; height:43px; border-color:var(--apple-outline,#e6e6eb); border-radius:13px; background:var(--apple-surface,#fff); font-size:.93rem; }
  body.freev-apple .sidebar-account-picker { flex:0 0 48px; width:48px; height:48px; }
  #sidebarCurrentAccountMark { width:30px; height:30px; }
  .sidebar-account-menu { top:calc(100% + .4rem); left:.8rem; width:min(270px,calc(100vw - 1.6rem)); }
}
@media (prefers-reduced-motion:reduce) { .sidebar-quick-action,.sidebar-nav .nav-item,.sidebar-nav .nav-item::before,.sidebar-nav .nav-item i,.sidebar-account-menu { animation:none !important; transition:none !important; } }


/* assets/css/dashboard-calm.css */
/* Une décision à la fois : le détail reste accessible sur demande. */
.dashboard-focus { display:flex; align-items:center; justify-content:space-between; gap:1.25rem; margin:1rem 0 1.1rem; padding:1.25rem 1.4rem; border:1px solid var(--apple-outline,#e1e8f1); border-radius:22px; background:var(--apple-surface,#fff); box-shadow:0 9px 28px #193f7610; }
.dashboard-focus-main { min-width:0; }
.dashboard-focus-eyebrow { display:inline-flex; align-items:center; gap:.45rem; color:var(--apple-accent,#2563eb); font-size:.68rem; font-weight:800; letter-spacing:.11em; }
.dashboard-focus-eyebrow i { font-size:.74rem; }
.dashboard-focus h2 { margin:.3rem 0 .25rem; color:var(--apple-ink,#1c2535); font-size:clamp(1.08rem,1.7vw,1.35rem); font-weight:750; letter-spacing:-.025em; }
.dashboard-focus p { margin:0; color:var(--apple-muted,#64748b); line-height:1.5; font-size:.88rem; }
.dashboard-focus-action { display:inline-flex; align-items:center; gap:.55rem; margin-top:.8rem; padding:.56rem .85rem; border:0; border-radius:11px; background:var(--apple-accent,#2563eb); color:#fff; font-family:inherit; font-size:.79rem; font-weight:700; line-height:1.2; cursor:pointer; transition:transform .2s ease,box-shadow .2s ease; }
.dashboard-focus-action:hover { transform:translateY(-2px); box-shadow:0 7px 15px #2563eb30; }
.dashboard-focus-action:focus-visible,.dashboard-focus-details summary:focus-visible,.dashboard-more-alerts summary:focus-visible { outline:3px solid var(--apple-accent,#2563eb); outline-offset:3px; }
.dashboard-focus-details { flex:0 1 320px; align-self:stretch; padding:.8rem .95rem; border:1px solid var(--apple-outline,#e1e8f1); border-radius:15px; background:var(--apple-hover,#f7f9fc); }
.dashboard-focus-details summary { display:flex; align-items:center; justify-content:space-between; gap:.8rem; color:var(--apple-ink,#1c2535); font-size:.8rem; font-weight:720; cursor:pointer; list-style:none; }
.dashboard-focus-details summary::-webkit-details-marker,.dashboard-more-alerts summary::-webkit-details-marker { display:none; }
.dashboard-focus-details summary i { color:var(--apple-muted,#64748b); font-size:.7rem; transition:transform .2s ease; }
.dashboard-focus-details[open] summary i { transform:rotate(180deg); }
.dashboard-focus-details p { margin:.8rem 0 0; font-size:.77rem; }
.dashboard-more-alerts { padding:.7rem .95rem; border:1px solid var(--apple-outline,#e1e8f1); border-radius:14px; background:var(--apple-surface,#fff); }
.dashboard-more-alerts summary { color:var(--apple-muted,#64748b); font-size:.78rem; font-weight:700; cursor:pointer; list-style:none; }
.dashboard-more-alerts[open] summary { margin-bottom:.7rem; }
.dashboard-more-alerts-content { display:grid; gap:.55rem; }
@media (max-width:720px) { .dashboard-focus { flex-direction:column; align-items:stretch; padding:1rem; } .dashboard-focus-details { flex:auto; } }
@media (prefers-reduced-motion:reduce) { .dashboard-focus-action,.dashboard-focus-details summary i { transition:none !important; } }


/* assets/css/accessibility-hardening.css */
/* Lot 2026-10-28 : accessibilité clavier, tactile et pliables. */
:where(button, a[href], input, select, textarea, summary, [tabindex]:not([tabindex="-1"])):focus-visible {
  outline: 3px solid #2169dc !important;
  outline-offset: 3px !important;
}
:where(button, a[href], input, select, textarea, summary):focus-visible {
  box-shadow: 0 0 0 5px rgba(255,255,255,.8);
}
@media (pointer: coarse) {
  :where(.btn, .btn-icon, .bottom-nav-item, .freev-select-trigger, .receipt-scan-entry-button, .auth-tab, .rec-month, summary) {
    min-height: 44px;
  }
  :where(.btn-icon, .rec-month) { min-width: 44px; }
  :where(.bottom-nav-item, .v5-tabs button) { touch-action: manipulation; }
}
@media (max-width: 360px) {
  :where(.fp2-audit, .fp2-panel, .v4-card, .card) { min-width: 0; overflow-wrap: anywhere; }
}
@media (prefers-reduced-motion: reduce) {
  html:focus-within { scroll-behavior: auto !important; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
@media (horizontal-viewport-segments:2) {
  dialog, [role="dialog"] { max-width: env(viewport-segment-width 0 0, 50vw); }
}

/* Textes secondaires sur les surfaces claires des espaces financiers. */
body:not(.dark-mode) #dashboard-view .dashboard-chart-segment button:not(.active),
body:not(.dark-mode) #analytics-view .analytics-range button:not(.active),
body:not(.dark-mode) #smart-view .v5-tabs button:not(.active),
body:not(.dark-mode) #smart-view .v5-tabs button:not(.active) span,
body:not(.dark-mode) #planner-view .v43-planner-intelligence :is(span, small),
body:not(.dark-mode) #planner-view .v4-story-heading p,
body:not(.dark-mode) #smart-view .v5-story-heading p,
body:not(.dark-mode) #analytics-view .text-slate-400.text-xs.mb-4,
body:not(.dark-mode) #savings-view .empty-state > p,
body:not(.dark-mode) #historyList .empty-state > p,
body:not(.dark-mode) #debts-view [data-freev-layout-scope="debts"] > p {
  color: #475569;
}
body:not(.dark-mode) #planner-view .v4-story-heading .v4-eyebrow { color: #087466; }
body:not(.dark-mode) #settings-view #darkModeLabel { color: #0f172a; }

/* Le thème sombre conserve des surfaces et libellés lisibles dans chaque espace. */
body.dark-mode #dashboard-view .dashboard-focus-action { color: #102033; }
body.dark-mode #dashboard-view .text-yellow-800 { color: #fde68a; }
body.dark-mode #dashboard-view .text-yellow-800 span[style*="#059669"] { color: #86efac !important; }
body.dark-mode #dashboard-view .text-yellow-800 span[style*="#dc2626"] { color: #fca5a5 !important; }
body.dark-mode #transactions-view :is(#transactionTemplatesPanel, #transactionDraftsPanel) {
  background: #202126 !important;
  border-color: #475569 !important;
}
body.dark-mode #transactions-view :is(label[for="txFrom"], label[for="txTo"]) { color: #cbd5e1 !important; }
body.dark-mode #recurring-view .recurring-stat span { color: #cbd5e1; }
body.dark-mode #recurring-view .freev-trial-kicker { color: #86efac; }
body.dark-mode #analytics-view .analytics-range { background: #202126; }
body.dark-mode #analytics-view .analytics-range button { color: #cbd5e1; }
body.dark-mode #analytics-view .analytics-range button.active { background: #111827; color: #bfdbfe; }
body.dark-mode #smart-view .v5-story-heading .v5-eyebrow { color: #c4b5fd; }


/* assets/css/onboarding.css */
.freev-onboarding[hidden],.auth-legal-agreement[hidden]{display:none!important}
body.freev-onboarding-open{overflow:hidden}
.freev-onboarding{position:fixed;inset:0;z-index:10050;display:grid;place-items:center;padding:clamp(12px,3vw,32px);background:rgba(15,29,52,.64);backdrop-filter:blur(18px);animation:freevOnboardingFade .4s ease both}
.freev-onboarding-panel{display:grid;grid-template-columns:minmax(220px,.7fr) minmax(0,1.3fr);width:min(880px,100%);max-height:min(94dvh,850px);overflow:auto;border:1px solid rgba(255,255,255,.7);border-radius:30px;background:#fff;box-shadow:0 30px 95px rgba(10,29,63,.28);animation:freevOnboardingRise .58s cubic-bezier(.2,.8,.2,1) both}
.freev-onboarding-aside{position:relative;isolation:isolate;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:13px;min-height:460px;padding:32px;text-align:center;color:white;background:radial-gradient(circle at 50% 25%,#70d5ca70,transparent 38%),linear-gradient(150deg,#134c7e,#1e64a6 47%,#159b89);overflow:hidden}.freev-onboarding-orbit{display:none}
.freev-onboarding-aside:before,.freev-onboarding-aside:after{content:"";position:absolute;border:1px solid #ffffff55;border-radius:50%;width:280px;height:280px;top:15%;left:50%;transform:translateX(-50%);z-index:-1;animation:freevOnboardingOrbit 9s linear infinite}
.freev-onboarding-aside:after{width:340px;height:340px;top:9%;opacity:.45;animation-duration:13s;animation-direction:reverse}
.freev-onboarding-aside morph-bot{display:block;min-width:170px;min-height:170px;filter:drop-shadow(0 15px 30px #072f6670);animation:freevOnboardingFloat 4.5s ease-in-out infinite}
.freev-onboarding-aside morph-bot:not(:defined){border-radius:46%;background:radial-gradient(ellipse 6% 12% at 38% 42%,#fff 96%,transparent 100%),radial-gradient(ellipse 6% 12% at 62% 42%,#fff 96%,transparent 100%),linear-gradient(135deg,#315cf5,#34d399)}
.freev-onboarding-aside strong{font-size:22px;letter-spacing:-.04em;line-height:1.15}.freev-onboarding-aside>span:last-child{font-size:13px;color:#e2f8f6}
.freev-onboarding-content{padding:clamp(25px,4vw,46px);color:#17233a}.freev-onboarding-eyebrow{font-size:11px;font-weight:800;letter-spacing:.16em;color:#118b83}.freev-onboarding-content h2{font-size:clamp(27px,3vw,37px);line-height:1.08;letter-spacing:-.05em;margin:10px 0}.freev-onboarding-content>p{font-size:14px;color:#5e6c82;line-height:1.5;margin:0 0 25px}
.freev-onboarding-types{display:grid;grid-template-columns:1fr 1fr;gap:9px;border:0;padding:0;margin:0 0 19px}.freev-onboarding-types legend{font-size:13px;font-weight:750;margin-bottom:9px}.freev-onboarding-types label{cursor:pointer;position:relative}.freev-onboarding-types input{position:absolute;opacity:0}.freev-onboarding-types label span{display:flex;align-items:center;gap:9px;min-height:55px;padding:12px;border:1px solid #dce5ef;border-radius:15px;background:#fff;color:#34445c;transition:border-color .2s,background .2s,transform .2s,box-shadow .2s}.freev-onboarding-types label:hover span{transform:translateY(-2px);box-shadow:0 7px 20px #173b5d14}.freev-onboarding-types input:checked+span{border-color:#2371e7;background:#f0f6ff;box-shadow:0 0 0 3px #2371e71a}.freev-onboarding-types input:focus-visible+span{outline:3px solid #2371e7;outline-offset:2px}.freev-onboarding-types i{color:#1d8c83}.freev-onboarding-types strong{font-size:12px}
.freev-onboarding-field{display:block;position:relative;font-size:13px;font-weight:750;color:#27364d;margin:0 0 17px}.freev-onboarding-field input{display:block;width:100%;height:47px;margin:8px 0 5px;padding:0 13px;border:1px solid #d8e2ed;border-radius:13px;background:#fafdff;color:#17233a;font:inherit;font-weight:600;outline:none;transition:border-color .2s,box-shadow .2s}.freev-onboarding-field input:focus{border-color:#2371e7;box-shadow:0 0 0 3px #2371e71b}.freev-onboarding-field small{display:block;color:#738096;font-size:11px;font-weight:450}.freev-onboarding-field>span{float:right;color:#6a7c94}.freev-onboarding-money{display:grid;grid-template-columns:1fr 1fr;gap:12px}.freev-onboarding-submit{width:100%;min-height:48px;border:0;border-radius:14px;background:linear-gradient(110deg,#2465e6,#208fb5);color:white;font-size:14px;font-weight:800;cursor:pointer;box-shadow:0 9px 22px #2465e638;transition:transform .2s,box-shadow .2s}.freev-onboarding-submit:hover{transform:translateY(-2px);box-shadow:0 13px 28px #2465e64a}.freev-onboarding-submit:disabled{opacity:.65;cursor:wait}.freev-onboarding-foot{font-size:10px;line-height:1.5;color:#75839a;margin:12px 0 0}.freev-onboarding-foot a,.auth-privacy-foot a,.auth-legal-agreement a,.freev-privacy-settings a{color:#1766ce;text-decoration:underline;text-underline-offset:2px}.freev-onboarding-error{padding:10px;border-radius:10px;background:#fff1f1;color:#a52432;font-size:12px;margin:0 0 12px}.freev-onboarding-error[hidden]{display:none}
.auth-legal-agreement{display:flex;gap:9px;align-items:flex-start;padding:10px 4px;font-size:11px;line-height:1.45;color:#596780}.auth-legal-agreement input{margin-top:2px;accent-color:#2266e3}.auth-privacy-foot{text-align:center;font-size:11px;color:#6b7890;margin:12px 0 0}.freev-privacy-settings{background:linear-gradient(115deg,#fff,#f4fbff)}.freev-privacy-kicker{font-size:11px;letter-spacing:.12em;font-weight:800;color:#078f7e}.freev-privacy-settings>p{max-width:670px;font-size:14px;color:#56677e;line-height:1.6}.freev-privacy-actions{display:flex;flex-wrap:wrap;gap:9px;margin:16px 0}.freev-privacy-contact{font-size:12px!important}
.freev-storage-notice[hidden]{display:none!important}.freev-storage-notice{position:fixed;z-index:10070;bottom:18px;left:18px;display:flex;align-items:center;gap:20px;max-width:min(520px,calc(100vw - 36px));padding:15px 17px;background:#fff;border:1px solid #d5e5ed;border-radius:17px;box-shadow:0 15px 45px #172c4c2e;color:#17233a;animation:freevOnboardingRise .45s ease both}.freev-storage-notice div{display:grid;gap:3px}.freev-storage-notice strong{font-size:13px}.freev-storage-notice span,.freev-storage-notice a{font-size:11px;line-height:1.4}.freev-storage-notice span{color:#617089}.freev-storage-notice a{color:#1766ce}.freev-storage-notice button{border:0;border-radius:10px;background:#1768d8;color:#fff;font-size:11px;font-weight:750;padding:10px;white-space:nowrap;cursor:pointer}
@keyframes freevOnboardingFade{from{opacity:0}to{opacity:1}}@keyframes freevOnboardingRise{from{opacity:0;transform:translateY(20px) scale(.98)}to{opacity:1;transform:none}}@keyframes freevOnboardingFloat{50%{transform:translateY(-9px) rotate(2deg)}}@keyframes freevOnboardingOrbit{50%{transform:translateX(-50%) rotate(180deg)}}
@media(max-width:670px){.freev-onboarding{padding:0;place-items:stretch}.freev-onboarding-panel{display:block;max-height:100dvh;min-height:100dvh;border-radius:0}.freev-onboarding-aside{min-height:125px;padding:13px 20px;display:grid;grid-template-columns:80px 1fr;text-align:left;gap:4px 12px}.freev-onboarding-aside morph-bot{grid-row:1/3;min-width:72px;min-height:72px;width:72px;height:72px}.freev-onboarding-aside strong{font-size:18px}.freev-onboarding-aside>span:last-child{font-size:11px}.freev-onboarding-aside:before,.freev-onboarding-aside:after{display:none}.freev-onboarding-content{padding:23px 20px 34px}.freev-onboarding-content>p{margin-bottom:19px}.freev-onboarding-money{grid-template-columns:1fr;gap:0}.freev-onboarding-types strong{font-size:11px}.freev-storage-notice{bottom:10px;left:10px;max-width:calc(100vw - 20px);gap:8px;padding:10px}.freev-storage-notice button{padding:9px 7px}}
@media(prefers-reduced-motion:reduce){.freev-onboarding,.freev-onboarding-panel,.freev-onboarding-aside:before,.freev-onboarding-aside:after,.freev-onboarding-aside morph-bot{animation:none!important}.freev-onboarding-types label span,.freev-onboarding-submit{transition:none!important}}

/* Parcours de bienvenue : questionnaire court, avec la dette facultative révélée à la demande. */
.freev-onboarding-panel{width:min(940px,100%);grid-template-columns:minmax(230px,.65fr) minmax(0,1.35fr)}
.freev-onboarding-content{padding:clamp(24px,3vw,36px)}
.freev-onboarding-content>p{margin-bottom:20px}
.freev-onboarding-step{padding:18px 0;border-top:1px solid #e5ebf2}
.freev-onboarding-step:first-of-type{padding-top:0;border-top:0}
.freev-onboarding-step-head{display:flex;align-items:flex-start;gap:11px;margin-bottom:15px}
.freev-onboarding-step-head>span{display:grid;flex:0 0 29px;height:29px;place-items:center;border-radius:10px;background:#e9f7f4;color:#087d71;font-size:11px;font-weight:850}
.freev-onboarding-step-head h3{margin:0;color:#17233a;font-size:15px;line-height:1.3;letter-spacing:-.02em}
.freev-onboarding-step-head p{margin:3px 0 0;color:#66768b;font-size:11px;line-height:1.45}
.freev-onboarding-chosen-type{display:inline-flex;align-items:center;margin:0 0 15px;padding:8px 12px;border:1px solid #cde8e4;border-radius:999px;background:#edf9f6;color:#087d71;font-size:12px;font-weight:750}
.freev-onboarding-types{margin-bottom:12px}
.freev-onboarding-types label span{display:grid;grid-template-columns:24px 1fr;gap:1px 8px;min-height:67px}
.freev-onboarding-types i{grid-row:1/3;align-self:center}
.freev-onboarding-types strong{font-size:13px}
.freev-onboarding-types small{color:#66768b;font-size:11px;line-height:1.35}
.freev-onboarding-field{margin-bottom:12px}
.freev-onboarding-field input,.freev-onboarding-field select{height:44px;margin-top:6px}
.freev-onboarding-field select{display:block;width:100%;padding:0 12px;border:1px solid #d8e2ed;border-radius:13px;background:#fafdff;color:#17233a;font:inherit;outline:none}
.freev-onboarding-field select:focus-visible{outline:3px solid #2371e7;outline-offset:2px}
.freev-onboarding-option{display:flex;align-items:center;gap:12px;padding:13px;border:1px solid #d7e5ea;border-radius:15px;background:#f5fbfa;cursor:pointer;transition:border-color .2s,background .2s,transform .2s}
.freev-onboarding-option:hover{transform:translateY(-1px);border-color:#2da695}
.freev-onboarding-option:has(input:checked){border-color:#0b9a84;background:#eaf8f4}
.freev-onboarding-option input{flex:0 0 auto;width:18px;height:18px;accent-color:#0b917d}
.freev-onboarding-option>span{display:grid;grid-template-columns:21px 1fr;gap:2px 8px;min-width:0}
.freev-onboarding-option i{grid-row:1/3;align-self:center;color:#0b917d}
.freev-onboarding-option strong{color:#263c4e;font-size:12px;line-height:1.35}
.freev-onboarding-option small{color:#617a79;font-size:11px;line-height:1.45}
.freev-onboarding-debt-fields{display:grid;grid-template-columns:1fr 1fr;gap:0 12px;margin-top:12px;padding:14px;border:1px solid #e3ebf1;border-radius:15px;background:#fafcfe}
.freev-onboarding-debt-fields[hidden]{display:none}
.freev-onboarding-debt-fields .freev-onboarding-field:first-child{grid-column:1/-1}
.freev-onboarding-debt-fields p{grid-column:1/-1;margin:0;color:#6d7c8e;font-size:11px}
.freev-onboarding-foot{margin-top:10px}
@media(max-width:670px){.freev-onboarding-panel{display:block;max-height:100dvh;min-height:100dvh;border-radius:0}.freev-onboarding-content{padding:22px 18px 36px}.freev-onboarding-aside{position:relative}.freev-onboarding-money,.freev-onboarding-debt-fields{grid-template-columns:1fr}.freev-onboarding-debt-fields .freev-onboarding-field:first-child{grid-column:auto}.freev-onboarding-step{padding:16px 0}.freev-onboarding-types label span{padding:10px;grid-template-columns:1fr;min-height:78px}.freev-onboarding-types i{grid-row:auto}.freev-onboarding-types small{font-size:10px}}
@media(prefers-reduced-motion:reduce){.freev-onboarding-option{transition:none}}

/* Profil professionnel : deux repères séparés, statut et taille. */
.freev-business-profile[hidden],.freev-business-profile label[hidden]{display:none!important}
.freev-business-profile{margin:0 0 15px;padding:16px;border:1px solid #cfe2ee;border-radius:16px;background:linear-gradient(130deg,#f5faff,#f5fbfa);color:#253a52}
.freev-business-profile>strong{display:block;font-size:13px;letter-spacing:-.01em}
.freev-business-profile>p:not(.freev-business-threshold){margin:4px 0 13px;color:#64748b;font-size:11px;line-height:1.5}
.freev-business-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}
.freev-business-profile :is(label,input,select,.freev-select){min-width:0;max-width:100%}
.freev-business-profile label{display:block;margin:0 0 10px;font-size:12px;font-weight:700;line-height:1.4}
.freev-business-profile select{display:block;width:100%;min-height:43px;margin-top:6px;padding:0 11px;border:1px solid #d7e2ed;border-radius:11px;background:#fff;color:#253a52;font:inherit;font-weight:600}
.freev-business-profile input{display:block;width:100%;min-height:43px;margin-top:6px;padding:0 11px;border:1px solid #d7e2ed;border-radius:11px;background:#fff;color:#253a52;font:inherit;font-weight:600;box-sizing:border-box}
.freev-business-profile label small{display:inline;color:#657991;font-size:11px;font-weight:500}
.freev-business-profile select:focus-visible,.freev-business-profile input:focus-visible{outline:3px solid #2371e7;outline-offset:2px}
.freev-business-threshold{margin:4px 0 0;padding:11px 12px;border-left:3px solid #14a88d;border-radius:9px;background:#eaf8f4;color:#416275;font-size:11px;line-height:1.55}
.freev-business-threshold a{color:#075f85;text-decoration:underline;text-underline-offset:2px}
.freev-business-profile-settings{margin-top:13px}
.freev-business-history{margin:6px 0 13px;padding:10px 12px;border:1px solid #d4e4ee;border-radius:11px;background:#fff}
.freev-business-history summary{cursor:pointer;color:#1a5b85;font-size:12px;font-weight:750}
.freev-business-history>p{margin:9px 0 12px;color:#64748b;font-size:11px;line-height:1.5}
.freev-business-history .freev-business-fields{margin-top:10px}
.freev-business-profile>.freev-business-caution{margin:9px 0 13px;padding:10px 11px;border-radius:10px;background:#e9f6f3;color:#406875;font-size:11px;line-height:1.5}
@media(max-width:670px){.freev-business-fields{grid-template-columns:minmax(0,1fr);gap:0}.freev-business-profile{padding:13px}}

/* Fenêtre d’accueil : lecture rapide, puis détails professionnels à la demande. */
@media(min-width:671px){
  .freev-onboarding-panel{width:min(1040px,100%);grid-template-columns:minmax(245px,.55fr) minmax(0,1.45fr);grid-template-rows:minmax(0,1fr);overflow:hidden}
  .freev-onboarding-content{min-height:0;min-width:0;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
  .freev-onboarding-aside{align-self:stretch;min-height:0}
}
#freevOnboardingBusiness{margin:2px 0 20px;padding:0;overflow:hidden;border-color:#d4e3ec;border-radius:21px;background:#fff;box-shadow:0 13px 32px #1c48670d,0 2px 6px #1c486706}
.freev-business-heading{display:flex;align-items:center;gap:13px;padding:17px 19px;border-bottom:1px solid #e4edf2;background:linear-gradient(105deg,#f1f8ff,#eefaf7)}
.freev-business-heading-icon{display:grid;place-items:center;flex:none;width:43px;height:43px;border:1px solid #cce1f0;border-radius:13px;background:#fff;color:#2179a7;box-shadow:0 4px 13px #1e69931a}
.freev-business-heading-icon svg{width:23px;height:23px}
.freev-business-heading strong{display:block;color:#183a55;font-size:15px;line-height:1.25;letter-spacing:-.02em;text-wrap:balance}
.freev-business-heading p{margin:3px 0 0;color:#627990;font-size:11px;line-height:1.45;text-wrap:pretty}
.freev-business-core{padding:18px 19px 8px}
#freevOnboardingBusiness label{color:#2b4057;font-size:12px}
#freevOnboardingBusiness label small{color:#728499;font-size:10px}
#freevOnboardingBusiness input,#freevOnboardingBusiness select{min-height:45px;border-color:#d7e3ed;border-radius:11px;background:#fff;box-shadow:0 2px 5px #1c486708;transition:border-color .18s ease,box-shadow .18s ease}
#freevOnboardingBusiness input:hover,#freevOnboardingBusiness select:hover{border-color:#a7c5dd}
#freevOnboardingBusiness input:focus-visible,#freevOnboardingBusiness select:focus-visible{outline:3px solid #3179df36;outline-offset:0;border-color:#357cdb;box-shadow:0 4px 13px #2674c21a}
#freevOnboardingBusiness .freev-business-fields{gap:0 13px}
#freevOnboardingBusiness .freev-business-fields>label{min-width:0}
#freevOnboardingBusiness select{width:100%;min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;box-sizing:border-box}
#freevOnboardingBusiness .freev-business-history{margin:0 19px 9px;padding:0;border:1px solid #dbe7ef;border-radius:13px;background:#fff;box-shadow:0 2px 6px #1c486706}
.freev-business-history summary{display:flex;align-items:center;gap:11px;min-height:59px;padding:10px 13px;list-style:none;cursor:pointer;border-radius:12px;transition:background-color .18s ease}
.freev-business-history summary::-webkit-details-marker{display:none}
.freev-business-history summary:hover{background:#f5f9fc}
.freev-business-history summary:focus-visible{outline:3px solid #3179df;outline-offset:2px}
.freev-business-history summary>span:last-child{display:grid;gap:2px;min-width:0}
.freev-business-history summary strong{color:#1e4e70;font-size:12px;line-height:1.3}
.freev-business-history summary small{color:#728699;font-size:10px;line-height:1.3}
.freev-business-detail-icon{display:grid;place-items:center;flex:none;width:28px;height:28px;border-radius:9px;background:#edf5fb;color:#2473ac;font-size:18px;font-weight:500;line-height:1}
.freev-business-history[open] .freev-business-detail-icon{font-size:0;background:#e6f5f0;color:#0d927d}
.freev-business-history[open] .freev-business-detail-icon::after{content:'−';font-size:18px}
.freev-business-detail-body{padding:1px 15px 12px;border-top:1px solid #edf2f6}
.freev-business-detail-body>p{margin:11px 0;color:#697d91;font-size:11px;line-height:1.5}
#freevOnboardingBusiness .freev-business-threshold{margin:13px 19px 9px;border-radius:10px;font-size:10px}
#freevOnboardingBusiness>.freev-business-caution{margin:0;padding:12px 19px;border-top:1px solid #e4edf2;border-radius:0;background:#f7fafc;color:#67798a;font-size:10px;line-height:1.5}
@media(max-width:670px){
  #freevOnboardingBusiness{border-radius:19px}
  .freev-business-heading{padding:15px}
  .freev-business-heading-icon{width:39px;height:39px}
  .freev-business-core{padding:15px 15px 5px}
  #freevOnboardingBusiness .freev-business-history{margin:0 15px 9px}
  #freevOnboardingBusiness .freev-business-threshold{margin:12px 15px 9px}
  #freevOnboardingBusiness>.freev-business-caution{padding:11px 15px}
  .freev-business-history summary{min-height:64px}
}
@media(prefers-reduced-motion:reduce){.freev-business-history summary,#freevOnboardingBusiness input,#freevOnboardingBusiness select{transition:none}}
#freevOnboardingAccountNameLabel,#freevOnboardingSavingsLabel{float:none}
.freev-first-run[hidden] { display:none !important; }
.freev-first-run { position:fixed; inset:0; z-index:20000; display:grid; place-items:end center; padding:clamp(1rem,3vw,2rem); background:rgba(10,22,35,.48); backdrop-filter:blur(5px); }
.freev-first-run-card { width:min(100%,31rem); padding:clamp(1.4rem,3vw,2rem); border:1px solid rgba(255,255,255,.6); border-radius:1.45rem; background:linear-gradient(145deg,#fff,#f4f9ff); box-shadow:0 25px 85px rgba(8,30,52,.24); }
.freev-first-run-eyebrow { color:#297d70; font-size:.68rem; font-weight:850; letter-spacing:.11em; }
.freev-first-run-icon { display:grid; place-items:center; width:3rem; height:3rem; margin:1.15rem 0 .8rem; border-radius:1rem; background:linear-gradient(135deg,#e2f4ec,#e8f0ff); color:#167866; font-size:1.25rem; }
.freev-first-run-card h2 { margin:0 0 .5rem; color:#15283a; font-size:clamp(1.35rem,3vw,1.8rem); letter-spacing:-.03em; }
.freev-first-run-card p { margin:0; color:#526575; line-height:1.55; }
.freev-first-run-progress { display:flex; gap:.35rem; margin:1.5rem 0 1.2rem; }
.freev-first-run-progress span { flex:1; height:.34rem; border-radius:999px; background:#d9e5ee; }
.freev-first-run-progress span.is-complete { background:linear-gradient(90deg,#1caa80,#2584d0); }
.freev-first-run-actions { display:flex; justify-content:space-between; align-items:center; gap:.75rem; }
.freev-first-run-actions button { min-height:2.75rem; padding:.6rem .9rem; border-radius:.8rem; font:inherit; font-weight:750; cursor:pointer; }
.freev-first-run-skip { border:1px solid #d7e3eb; background:#fff; color:#506478; }
.freev-first-run-next { border:0; background:#1b8069; color:#fff; box-shadow:0 7px 18px rgba(27,128,105,.23); }
.freev-first-run-actions button:focus-visible { outline:3px solid #75bff8; outline-offset:2px; }
@media(max-width:767px) { .freev-first-run { padding:.6rem .6rem calc(.6rem + env(safe-area-inset-bottom)); } .freev-first-run-card { border-radius:1.2rem; } .freev-first-run-actions button { font-size:.82rem; } }


/* assets/css/business-workspace.css */
#businessNav[hidden],#businessDashboardShortcut[hidden],#freevProContent[hidden],#freevProInactive[hidden],#freevProGoalCard[hidden]{display:none!important}
.freev-pro-shortcut{display:flex;align-items:center;justify-content:space-between;width:100%;gap:15px;margin-bottom:18px;padding:15px 18px;border:1px solid #c7dfeb;border-radius:17px;background:linear-gradient(110deg,#edf7fc,#edfaf6);color:#17618b;text-align:left;cursor:pointer;box-shadow:0 8px 22px #2044690a}
.freev-pro-shortcut>span{display:grid;grid-template-columns:24px 1fr;gap:2px 9px;align-items:center}.freev-pro-shortcut>span i{grid-row:1/3}.freev-pro-shortcut strong{font-size:13px}.freev-pro-shortcut small{color:#5e7a8b;font-size:11px}.freev-pro-shortcut:hover{border-color:#7fcbbb}.freev-pro-shortcut:focus-visible{outline:3px solid #2371e7;outline-offset:2px}
#business-view{display:grid;grid-template-columns:minmax(0,1fr);gap:18px;color:var(--text-primary,#1c2b3e);overflow-wrap:anywhere}
#business-view.hidden{display:none}
.freev-pro-context{margin:2px 2px 13px;color:#486178;font-size:12px;line-height:1.5;text-wrap:pretty}
.freev-pro-overview,.freev-pro-priorities{
  padding:clamp(16px,2.4vw,30px);border:1px solid var(--border-color,#dce7f1);
  border-radius:20px;margin-bottom:14px;min-width:0;
}
.freev-pro-overview{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.45rem 1rem;align-items:start;
  color:#112e50;background:linear-gradient(120deg,#edf6ff,#fff 72%);}
.freev-pro-overview h3{margin:0;color:inherit;font-size:clamp(1.3rem,2.4vw,2rem);letter-spacing:-.04em;overflow-wrap:anywhere}
.freev-pro-overview-brand,.freev-pro-brand-editor{display:flex;align-items:center;gap:.9rem;min-width:0}
.freev-pro-overview-brand>div:last-child,.freev-pro-brand-editor>div:last-child{min-width:0}
.freev-pro-brand-mark{
  flex:none;width:72px;height:72px;display:grid;place-items:center;padding:8px;
  border:1px solid #b8d2ef;border-radius:17px;background:#fff;color:#254c80;
  font-size:1.15rem;font-weight:800;letter-spacing:-.04em
}
.freev-pro-brand-mark img,.freev-account-business-mark{
  display:block;width:100%;height:100%;min-width:0;min-height:0;object-fit:contain
}
.freev-account-business-mark{border-radius:inherit;background:#fff;padding:3px}
.freev-pro-shortcut-icon{grid-row:1/3}
.freev-pro-shortcut-icon img{background-color:#fff;border-radius:6px;object-fit:contain;padding:2px}
.freev-pro-shortcut-icon [hidden]{display:none!important}
.freev-pro-brand-on-dark{background:#263b56;color:#fff}
.freev-pro-shortcut-icon img.freev-pro-brand-on-dark{background-color:#263b56}
.freev-pro-brand-actions{display:flex;flex-wrap:wrap;gap:.4rem}
.freev-pro-brand-editor p{margin:0 0 .4rem;font-size:.8rem;color:var(--text-secondary,#435e77)}
.freev-pro-brand-notice{margin:0;font-size:.79rem;line-height:1.45;color:var(--text-secondary,#435e77)}
.freev-pro-brand-notice:empty{display:none}
.freev-pro-overview>#freevProChooseLogo,.freev-pro-overview>.freev-pro-brand-notice{grid-column:1/-1;justify-self:start}
.freev-pro-brand-editor [hidden],.freev-pro-brand-mark [hidden]{display:none!important}
.freev-pro-overview .freev-pro-identity{grid-column:1/-1;margin:0}
.freev-pro-overview .freev-pro-context{margin:0}
.freev-pro-activity{color:#375b78;font-size:.91rem;margin:.35rem 0;overflow-wrap:anywhere}
.freev-pro-priorities{background:var(--card-bg,#fff);color:var(--text-primary,#182741)}
.freev-pro-priorities>h3{margin:0;font-size:1.12rem;letter-spacing:-.025em}
.freev-pro-priorities>p{margin:.22rem 0 .85rem;color:var(--text-secondary,#455a70);font-size:.85rem}
.freev-pro-priority-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.freev-pro-priority-grid article{
  display:flex;flex-direction:column;align-items:flex-start;gap:.38rem;min-width:0;
  padding:14px;border:1px solid var(--border-color,#dce7f1);border-radius:14px;background:var(--surface-2,#f5f8fc);
}
.freev-pro-priority-grid article:first-child{border-color:#7ea6df;background:#edf5ff}
.freev-pro-priority-grid h4{font-size:.84rem;margin:0;line-height:1.35;overflow-wrap:anywhere}
.freev-pro-priority-grid strong{font-size:clamp(1.2rem,2.15vw,1.65rem);font-variant-numeric:tabular-nums;line-height:1.2;overflow-wrap:anywhere}
.freev-pro-priority-grid small{color:var(--text-secondary,#455a70);overflow-wrap:anywhere}
.freev-pro-priority-grid button{margin-top:auto}
.freev-pro-weeks h3{font-size:1.05rem;font-weight:800;margin:0 0 .5rem}
.freev-pro-weeks-signals{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:.65rem 0}
.freev-pro-weeks-signals>div{display:grid;gap:.2rem;padding:.65rem .8rem;border:1px solid var(--border-color,#dce7f1);border-radius:12px;min-width:0}
.freev-pro-weeks-signals strong{font-variant-numeric:tabular-nums;font-size:1.12rem;overflow-wrap:anywhere}
.freev-pro-weeks-signals :is(span,small){font-size:.79rem;color:var(--text-secondary,#455a70)}
#freevProUpcoming li>button{font-size:.75rem}
@media(max-width:420px){.freev-pro-weeks-signals{grid-template-columns:minmax(0,1fr)}}
.freev-pro-catalog{
  min-width:0;padding:10px;margin:0 0 12px;border:1px solid var(--border-color,#cad9e7);
  border-radius:12px;background:#f8fbff;color:#223c56
}
.freev-pro-catalog legend{font-size:.82rem;font-weight:750;padding:0 4px}
.freev-pro-catalog>p{font-size:.76rem;margin:0 0 .65rem}
.freev-pro-lookup{margin-top:6px;border:1px solid var(--border-color,#d6e1ee);border-radius:10px;background:#fff}
.freev-pro-lookup summary{font-size:.78rem;padding:10px;cursor:pointer;overflow-wrap:anywhere;font-weight:750}
.freev-pro-lookup-panel{padding:6px 10px 10px}
.freev-pro-lookup-status{font-size:.77rem;color:#415d76;margin:.25rem 0}
.freev-pro-lookup-results{max-height:min(42vh,275px);overflow:auto;margin:0;padding:0;list-style:none}
.freev-pro-lookup-results button{
  display:block;width:100%;padding:8px;text-align:start;color:inherit;background:transparent;
  border:0;border-bottom:1px solid var(--border-color,#e1eaf1);border-radius:4px;font-size:.8rem;line-height:1.4;overflow-wrap:anywhere;
}
.freev-pro-lookup-results button:hover,.freev-pro-lookup-results button[aria-pressed=true]{background:#e8f2ff;color:#113e78}
.freev-pro-lookup :is(summary,button):focus-visible{outline:2px solid #2371e7;outline-offset:-2px}
.freev-pro-lookup-choice{display:flex;align-items:center;justify-content:space-between;gap:.45rem;margin-top:.5rem;font-size:.77rem}
.freev-pro-lookup-choice[hidden],.freev-pro-overview [hidden],#freevProFinancial[hidden],#freevProError[hidden]{display:none!important}
.freev-pro-lookup-choice span{overflow-wrap:anywhere;min-width:0}
body.dark-mode :is(.freev-pro-overview,.freev-pro-lookup,.freev-pro-catalog){background:#172943;color:#edf4ff;border-color:#49627d}
body.dark-mode #freevProName{color:#edf4ff}
body.dark-mode :is(.freev-pro-activity,.freev-pro-overview .freev-pro-context,.freev-pro-lookup-status){color:#b7cbe1}
body.dark-mode .freev-pro-priorities{background:#142135;border-color:#40556d}
body.dark-mode .freev-pro-priority-grid article{background:#1b2d45;border-color:#49627d;color:#e6effd}
body.dark-mode .freev-pro-priority-grid article:first-child{background:#203c60;border-color:#7299bf}
body.dark-mode .freev-pro-lookup-results button:hover,body.dark-mode .freev-pro-lookup-results button[aria-pressed=true]{background:#294668;color:#f3f7ff}
@media(max-width:690px){
  .freev-pro-overview{grid-template-columns:minmax(0,1fr)}
  .freev-pro-overview,.freev-pro-priorities{padding:13px;margin-bottom:11px}
  .freev-pro-overview>button{justify-self:start}
  .freev-pro-overview-brand,.freev-pro-brand-editor{gap:.65rem}
  .freev-pro-brand-mark{width:52px;height:52px;padding:5px;border-radius:12px}
  .freev-pro-priority-grid{grid-template-columns:minmax(0,1fr)}
  .freev-pro-priority-grid article{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.35rem .6rem}
  .freev-pro-priority-grid article strong{grid-column:1}
  .freev-pro-priority-grid article small{grid-column:1/-1}
  .freev-pro-priority-grid article button{grid-column:2;grid-row:1/3;align-self:center;margin:0}
}
.freev-pro-panel button:hover{transform:translateY(-2px)}
.freev-pro-panel button:focus-visible,.freev-pro-empty button:focus-visible{outline:3px solid #72e6d0;outline-offset:3px}
.freev-pro-identity{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 18px}
.freev-pro-identity span{padding:7px 11px;border:1px solid #d9e5ed;border-radius:100px;background:#f7fafc;color:#486176;font-size:12px;font-weight:700}
.freev-pro-identity span:first-child{background:#e8f7f3;border-color:#bde3d6;color:#117b69}
.freev-pro-profile-note{margin:-5px 0 17px;padding:11px 14px;border:1px solid #d5e4ee;border-radius:12px;background:#f5f9fc;color:#486176;font-size:12px;line-height:1.5}
.freev-pro-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.freev-pro-kpis article,.freev-pro-panel,.freev-pro-goal,.freev-pro-empty{border:1px solid #e0e8f0;border-radius:20px;background:#fff;box-shadow:0 8px 25px #2144690b}
.freev-pro-kpis article{display:flex;flex-direction:column;gap:10px;min-width:0;padding:21px}
.freev-pro-kpis article span{color:#61758a;font-size:12px;font-weight:750}
.freev-pro-kpis article strong{color:#173d69;font-size:clamp(20px,2.1vw,29px);letter-spacing:-.04em;overflow-wrap:anywhere}
.freev-pro-kpis article:nth-child(3) strong{color:#087b70}
.freev-pro-kpis article small,.freev-pro-panel small{color:#52657a;font-size:11px;line-height:1.45}
.freev-pro-kpis article strong,.freev-pro-panel>strong{font-variant-numeric:tabular-nums}
.freev-pro-pilot{margin-top:14px;padding:23px 25px;border:1px solid #cbdce9;border-radius:22px;background:linear-gradient(120deg,#fff,#f5f9fd);box-shadow:0 10px 26px #2144690b}
.freev-pro-pilot-heading{display:flex;justify-content:space-between;align-items:end;gap:20px;margin-bottom:17px}
.freev-pro-pilot-eyebrow{color:#267aa0;font-size:10px;font-weight:850;letter-spacing:.13em}
.freev-pro-pilot h3{margin:5px 0 0;color:#173d60;font-size:clamp(18px,2vw,23px);letter-spacing:-.03em;text-wrap:balance}
.freev-pro-pilot-heading p{max-width:38ch;margin:0;color:#60768a;font-size:11px;line-height:1.5;text-wrap:pretty}
.freev-pro-pilot-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.freev-pro-pilot-grid article{display:flex;flex-direction:column;gap:7px;min-width:0;min-height:114px;padding:16px;border:1px solid #e1eaf1;border-radius:15px;background:#fff}
.freev-pro-pilot-grid article span{color:#567086;font-size:11px;font-weight:750}.freev-pro-pilot-grid article strong{color:#164a72;font-size:clamp(20px,2.1vw,27px);font-variant-numeric:tabular-nums;letter-spacing:-.04em;overflow-wrap:anywhere}
.freev-pro-pilot-grid article small{color:#52657a;font-size:10px;line-height:1.45;text-wrap:pretty}
.freev-pro-pilot-grid article.freev-pro-pilot-emphasis{border-color:#afe0d5;background:#ecfaf5}.freev-pro-pilot-grid article.freev-pro-pilot-emphasis strong{color:#0d766b}
.freev-pro-insights{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px;margin-top:14px}
.freev-pro-panel-heading{display:flex;justify-content:space-between;align-items:center;gap:10px}
.freev-pro-count{display:grid;place-items:center;min-width:28px;height:28px;padding:0 7px;border-radius:9px;background:#e5f4f5;color:#11766e;font-size:12px;font-weight:850;font-variant-numeric:tabular-nums}
.freev-pro-insights .freev-pro-panel li{align-items:center}.freev-pro-insights .freev-pro-panel li span{min-width:0;overflow-wrap:anywhere}
.freev-pro-insights .freev-pro-panel li button{flex:0 0 auto;min-height:40px;padding:0 10px;border:1px solid #c5dde3;border-radius:10px;background:#f5fbfc;color:#176a83;font-size:11px;font-weight:800;cursor:pointer;transition:background-color .16s ease,transform .16s ease}
.freev-pro-insights .freev-pro-panel li button:hover{background:#e8f8f8;transform:translateY(-1px)}
.freev-pro-insights .freev-pro-panel li button:focus-visible{outline:3px solid #2371e7;outline-offset:2px}
.freev-pro-sector{display:grid;grid-template-columns:56px minmax(0,1fr);gap:18px;margin-top:14px;padding:23px 26px;border:1px solid #cfe3e5;border-radius:22px;background:radial-gradient(circle at 92% 3%,#b8efe438,transparent 31%),linear-gradient(125deg,#f8fcff,#f1fbf8);box-shadow:0 13px 32px #1d6c7710}
.freev-pro-sector-icon{display:grid;place-items:center;width:54px;height:54px;border:1px solid #bde4dc;border-radius:17px;background:#fff;color:#087e82;box-shadow:0 7px 18px #1c8f8715;font-size:19px;font-weight:850;letter-spacing:-.06em}
.freev-pro-sector-main{min-width:0}.freev-pro-sector-eyebrow{color:#087b77;font-size:10px;font-weight:850;letter-spacing:.14em}
.freev-pro-sector h3{margin:6px 0 5px;color:#173d55;font-size:clamp(18px,2vw,23px);line-height:1.18;letter-spacing:-.03em;text-wrap:balance}
.freev-pro-sector p{max-width:70ch;margin:0;color:#5e7280;font-size:12px;line-height:1.55;text-wrap:pretty}
.freev-pro-sector ul{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin:17px 0 18px;padding:0;list-style:none}
.freev-pro-sector li{position:relative;min-width:0;padding:12px 13px 12px 30px;border:1px solid #dceae9;border-radius:12px;background:#ffffffd9;color:#36566a;font-size:11px;line-height:1.5;text-wrap:pretty}
.freev-pro-sector li::before{content:"";position:absolute;left:13px;top:18px;width:7px;height:7px;border-radius:50%;background:#19b39b;box-shadow:0 0 0 3px #dff7ef}
.freev-pro-sector-actions{display:flex;flex-wrap:wrap;align-items:center;gap:9px}
.freev-pro-sector-actions button{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:0 16px;border:1px solid #0d8c86;border-radius:11px;background:#0d817b;color:#fff;font:750 12px/1.3 system-ui,-apple-system,"Segoe UI",sans-serif;cursor:pointer;transition:background-color .16s ease,transform .16s ease,box-shadow .16s ease}
.freev-pro-sector-actions button:hover{background:#086e6a;box-shadow:0 5px 14px #086e6a24;transform:translateY(-1px)}
.freev-pro-sector-actions button:active{transform:scale(.98)}
.freev-pro-sector-actions button:focus-visible{outline:3px solid #2371e7;outline-offset:3px}
.freev-pro-sector-actions button.freev-pro-sector-secondary{border-color:#cbdde1;background:#fff;color:#28637a}
.freev-pro-sector-actions button.freev-pro-sector-secondary:hover{background:#ecf8f6}
.freev-pro-goal{display:grid;grid-template-columns:1fr minmax(180px,.8fr);align-items:center;gap:20px;margin-top:14px;padding:20px 23px;background:linear-gradient(110deg,#f4fafc,#f1fbf7)}
.freev-pro-goal h3,.freev-pro-panel h3{margin:0 0 5px;color:#193c5c;font-size:16px}
.freev-pro-goal p,.freev-pro-panel p{margin:0;color:#60768a;font-size:12px;line-height:1.5}
.freev-pro-progress{height:11px;border-radius:100px;background:#dbeae9;overflow:hidden}
.freev-pro-progress span{display:block;width:0;height:100%;border-radius:inherit;background:linear-gradient(90deg,#2876e3,#22b89b);transition:width .35s ease}
.freev-pro-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px;margin-top:14px}
.freev-pro-panel{display:flex;flex-direction:column;gap:10px;min-width:0;min-height:190px;padding:22px}
.freev-pro-panel>strong{color:#173d69;font-size:28px;letter-spacing:-.04em}
.freev-pro-panel ul{display:grid;gap:8px;padding:0;margin:2px 0 0;list-style:none}
.freev-pro-panel li{display:flex;flex-wrap:wrap;justify-content:space-between;gap:6px 15px;padding:8px 0;border-bottom:1px solid var(--border-color,#edf1f5);color:#50657c;font-size:12px}
.freev-pro-panel li strong{color:#173d69}
.freev-pro-panel button,.freev-pro-empty button{align-self:flex-start;display:inline-flex;gap:7px;align-items:center;border:0;background:transparent;color:#176ab7;font-size:12px;font-weight:800;cursor:pointer}
.freev-pro-data-note{margin:13px 2px 0;color:#52657a;font-size:11px;line-height:1.5}

#analyticsStatsCards { --analytics-positive:#047857; --analytics-negative:#b91c1c; --analytics-warning:#92400e; }
body.dark-mode #analyticsStatsCards { --analytics-positive:#86efac; --analytics-negative:#fca5a5; --analytics-warning:#fcd34d; }
#analytics-view .analytics-insight-text, .receipt-scan-entry .receipt-scan-entry-copy p {
  color:var(--text-secondary,#475569);
}
body.dark-mode #analytics-view .analytics-insight { background:#2a2b32; }

#freevProWeeks .table-container { max-width:100%; overflow-x:auto; }
#freevProWeeks .table { display:table; width:100%; min-width:34rem; }
#freevProWeeks .table thead { display:table-header-group; }
#freevProWeeks .table tbody { display:table-row-group; }
#freevProWeeks .table tbody tr { display:table-row; }
#freevProWeeks .table tbody td { display:table-cell; white-space:nowrap; margin:0; padding:.65rem .75rem; }
#freevProWeeks .table tbody td:first-child { color:var(--text-secondary,#475569); }
.freev-pro-empty{padding:25px}.freev-pro-empty strong{color:#173d69}.freev-pro-empty p{color:#63768b;font-size:13px}
@media(max-width:1050px){.freev-pro-kpis,.freev-pro-pilot-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.freev-pro-sector ul{grid-template-columns:1fr}}
@media(max-width:670px){.freev-pro-kpis{gap:8px}.freev-pro-kpis article{padding:15px;min-height:120px}.freev-pro-kpis article strong{font-size:21px}.freev-pro-columns,.freev-pro-goal,.freev-pro-insights{grid-template-columns:1fr}.freev-pro-panel{min-height:0;padding:18px}.freev-pro-panel li{flex-direction:column;gap:2px}.freev-pro-insights .freev-pro-panel li{flex-direction:row}.freev-pro-identity{margin:0 0 14px}.freev-pro-pilot{padding:19px}.freev-pro-pilot-heading{align-items:start;flex-direction:column;gap:6px}.freev-pro-pilot-grid{grid-template-columns:1fr;gap:7px}.freev-pro-pilot-grid article{min-height:0}.freev-pro-sector{grid-template-columns:1fr;gap:11px;padding:19px;border-radius:19px}.freev-pro-sector-icon{width:45px;height:45px;border-radius:14px;font-size:18px}.freev-pro-sector ul{gap:7px;margin:14px 0}.freev-pro-sector-actions button{flex:1 1 140px}}
body.dark-mode .freev-pro-sector{border-color:#295665;background:linear-gradient(125deg,#102839,#102e33)}
body.dark-mode .freev-pro-sector-icon,body.dark-mode .freev-pro-sector li{border-color:#335b66;background:#183843;color:#d8e9eb}
body.dark-mode .freev-pro-sector h3{color:#f2fbfc}body.dark-mode .freev-pro-sector p{color:#b1c8d0}
body.dark-mode .freev-pro-sector-actions button.freev-pro-sector-secondary{border-color:#4c7180;background:#193e4a;color:#e3f5f7}
body.dark-mode .freev-pro-pilot{border-color:#385868;background:linear-gradient(120deg,#142c3b,#163343)}
body.dark-mode .freev-pro-pilot h3,body.dark-mode .freev-pro-pilot-grid article strong{color:#ecf7fa}
body.dark-mode .freev-pro-pilot-grid article{border-color:#315063;background:#1b394c}
body.dark-mode .freev-pro-pilot-grid article.freev-pro-pilot-emphasis{border-color:#2f706b;background:#16433f}
body.dark-mode .freev-pro-pilot-grid article.freev-pro-pilot-emphasis strong{color:#9ef1de}
body.dark-mode .freev-pro-insights .freev-pro-panel li button{border-color:#376578;background:#1d4354;color:#d4f5f3}
body.dark-mode :is(.freev-pro-kpis article,.freev-pro-panel,.freev-pro-goal,.freev-pro-empty,.freev-pro-identity span,.freev-pro-profile-note){
  border-color:var(--border-color);background:var(--bg-card);color:var(--text-secondary)
}
body.dark-mode :is(.freev-pro-kpis article strong,.freev-pro-panel h3,.freev-pro-panel>strong,.freev-pro-panel li strong,.freev-pro-goal h3,.freev-pro-empty strong){color:var(--text-primary)}
body.dark-mode :is(.freev-pro-context,.freev-pro-kpis article span,.freev-pro-kpis article small,.freev-pro-pilot-heading p,.freev-pro-pilot-grid article span,.freev-pro-pilot-grid article small,.freev-pro-panel p,.freev-pro-panel small,.freev-pro-panel li,.freev-pro-goal p,.freev-pro-empty p,.freev-pro-data-note){color:var(--text-secondary)}
body.dark-mode :is(.freev-pro-panel button,.freev-pro-empty button,.freev-pro-pilot-eyebrow,.freev-pro-sector-eyebrow){color:var(--apple-accent)}
@media(prefers-reduced-motion:reduce){.freev-pro-progress span{transition:none}.freev-pro-panel button:hover{transform:none}}


/* assets/css/intro-overlay.css */
.freev-intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 30000;
  overflow: hidden;
  background: #f4f6f7;
  opacity: 1;
  visibility: visible;
  transition: opacity .42s ease, visibility .42s ease;
}

.freev-intro-overlay iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #f4f6f7;
}

.freev-intro-skip {
  position: absolute;
  z-index: 1;
  top: calc(18px + env(safe-area-inset-top));
  right: calc(18px + env(safe-area-inset-right));
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 11px 16px;
  border: 1px solid rgba(69, 111, 130, .22);
  border-radius: 999px;
  background: rgba(255, 255, 255, .86);
  color: #24495b;
  box-shadow: 0 8px 30px rgba(30, 80, 103, .10);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font: 600 12px/1.2 system-ui, -apple-system, "Segoe UI", sans-serif;
  letter-spacing: .015em;
  cursor: pointer;
}

.freev-intro-skip:hover { background: #fff; }
.freev-intro-skip:focus-visible { outline: 3px solid #167ed2; outline-offset: 3px; }
.freev-intro-overlay.is-closing { opacity: 0; visibility: hidden; pointer-events: none; }
body.freev-intro-playing { overflow: hidden; }

@media (prefers-color-scheme: dark) {
  .freev-intro-overlay, .freev-intro-overlay iframe { background: #080d15; }
  .freev-intro-skip {
    border-color: rgba(176, 226, 237, .22);
    background: rgba(14, 29, 41, .82);
    color: #e9f8fb;
  }
  .freev-intro-skip:hover { background: #163043; }
}

@media (prefers-reduced-motion: reduce) {
  .freev-intro-overlay { display: none; transition: none; }
}

/* Rythme des écrans de consultation */
.dashboard-follow-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-bottom: .85rem;
}
.dashboard-follow-actions .btn { min-height: 42px; }
.dashboard-follow-actions i { color: var(--apple-accent); }
.dashboard-focus-details { align-self: flex-start; }

body.freev-apple .premium-workspace-head {
  padding: clamp(.85rem, 2.2vw, 1.65rem);
  border: 1px solid var(--apple-outline);
  border-radius: clamp(1.05rem, 2vw, 1.5rem);
}
body.freev-apple.dark-mode .dashboard-chart-segment button:is(.active, [aria-pressed="true"]) { color: #0c1930; }
#settingsLayout .freev-layout-controls > .form-label { color: var(--text-primary); }
body.freev-apple[data-freev-view="dashboard"] .premium-workspace-head {
  min-height: 0;
  padding: clamp(.9rem, 2.2vw, 1.65rem);
}
body.freev-apple[data-freev-view="dashboard"] .premium-workspace-head h1 {
  font-size: clamp(1.55rem, 2.7vw, 2.65rem);
}
body.freev-apple[data-freev-view="dashboard"] .freev-dashboard-explore { margin-top: .5rem; }
body.freev-apple #dashboard-view .premium-v4-stat {
  justify-content: flex-start;
  min-height: 0;
  gap: .65rem;
}
body.freev-apple #dashboard-view .premium-v4-stat > .flex-1 {
  min-width: 0;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

.freev-pro-shortcut { margin-bottom: .85rem; }
.freev-pro-shortcut-icon { display: grid; place-items: center; }
body.dark-mode .freev-pro-shortcut {
  background: linear-gradient(110deg, #172c40, #192e30);
  color: #b0d7ff;
  border-color: #3a566b;
}
body.dark-mode .freev-pro-shortcut small { color: #c1cbd9; }
body.freev-apple .receipt-scan-entry-copy h2 { color: var(--text-primary); }

body.freev-apple .premium-v4-filter-bar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem;
  box-shadow: none;
  background: var(--apple-hover);
}
body.freev-apple .premium-v4-filter-bar > #txSearch { grid-column: 1 / -1; }
body.freev-apple .premium-v4-filter-bar :is(.form-input, .form-select, .freev-select, .btn) {
  min-width: 0;
  max-width: 100%;
}
body.freev-apple .premium-v4-filter-bar :is(.form-input, .freev-select-trigger, .btn) { min-height: 44px; }
.premium-v4-filter-bar > .freev-select { width: 100%; }
.premium-v4-filter-bar .freev-select-trigger { height: 100%; gap: .35rem; padding: .45rem .6rem; }
.premium-v4-filter-bar .freev-select-trigger > span {
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.2;
}
.premium-v4-filter-bar .btn { justify-content: center; line-height: 1.25; text-align: center; }
.premium-v4-filter-bar .btn i { flex: none; }
.tx-filter-field { display: grid; min-width: 0; gap: .2rem; }
.tx-filter-field label { color: var(--text-secondary); font-size: .75rem; font-weight: 600; }
.tx-filter-field input { width: 100%; }

.settings-anchors a {
  justify-content: space-between;
  gap: .4rem;
  min-width: 0;
  padding: .5rem .75rem;
  background: var(--apple-surface);
  font-size: .84rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.settings-anchors a:hover { background: var(--apple-hover); border-color: var(--apple-accent); }
#settings-view > section { scroll-margin-block: .85rem 5.25rem; }

@media (min-width: 768px) {
  body.freev-apple .top-bar {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
  }
  body.freev-apple .top-bar > .flex:last-child {
    display: flex;
    flex: 1 1 36rem;
    flex-wrap: wrap;
    width: auto;
  }
  body.freev-apple .premium-v4-filter-bar { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 768px) and (max-width: 1220px) {
  body.freev-apple .top-bar > .flex:last-child { flex-basis: 18rem; }
  body.freev-apple .top-bar > .flex:last-child > .btn-primary { gap: .35rem; }
}
@media (min-width: 768px) and (max-width: 900px) {
  body.freev-apple .top-bar > .flex:last-child { justify-content: flex-start; }
}

@media (min-width: 1221px) {
  body.freev-apple .premium-v4-filter-bar { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  body.freev-apple .premium-v4-filter-bar > #txSearch { grid-column: span 2; }
}
@media (min-width: 1221px) and (max-width: 1550px) {
  body.freev-apple .top-bar .v4-search-trigger kbd { display: none; }
  body.freev-apple .top-bar > .flex:last-child .btn { padding-inline: .7rem; }
}

@media (max-width: 767px) {
  body.freev-apple #dashboard-view .premium-v4-stat-balance { min-height: 6.8rem; }
  body.freev-apple .receipt-scan-entry { display: none; }
  body.freev-apple .bottom-nav {
    background: var(--apple-surface);
    box-shadow: 0 -5px 16px rgba(17, 31, 51, .08);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  body.freev-apple .bottom-nav-item { font-size: clamp(.61rem, 2.4vw, .73rem); gap: .2rem; }
  body.freev-apple #dashboard-view :is(.freev-mobile-finance, .dashboard-follow-actions) .btn { min-height: 44px; }
  body.freev-apple .premium-workspace-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }
  body.freev-apple .premium-workspace-actions :is(.premium-workspace-add-wrap, .premium-workspace-action) { width: 100%; }
  .dashboard-focus-details { align-self: stretch; }
  .dashboard-focus-details summary { min-height: 24px; }
  .settings-anchors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem; }
  .settings-anchors a::after {
    content: "";
    flex: none;
    width: .38rem;
    height: .38rem;
    border-block-start: 1px solid currentColor;
    border-inline-end: 1px solid currentColor;
    transform: rotate(45deg);
  }
}
