:root {
  --bg: #f4f3ef;
  --surface: #ffffff;
  --surface-soft: #f8f7f3;
  --ink: #101917;
  --muted: #61716b;
  --green-950: #0f3f31;
  --green-900: #155640;
  --green-800: #1f6f52;
  --green-700: #2b8562;
  --green-100: #e4f0eb;
  --line: #e1ded6;
  --danger: #a94b32;
  --shadow: 0 18px 50px rgba(26, 38, 33, 0.1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 80% 0%, rgba(255, 255, 255, 0.96), transparent 34rem), linear-gradient(135deg, #f8f7f3 0%, var(--bg) 48%, #ece8df 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, select, input { font: inherit; }
button, select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  color: var(--ink);
  background: white;
}
button { cursor: pointer; font-weight: 800; }
a { color: inherit; text-decoration: none; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  width: 250px;
  padding: 24px 14px;
  color: white;
  overflow-y: auto;
  background: linear-gradient(180deg, rgba(21, 86, 64, 0.96), rgba(11, 57, 43, 0.98)), radial-gradient(circle at 70% 100%, rgba(142, 180, 151, 0.42), transparent 18rem);
  box-shadow: 20px 0 60px rgba(7, 42, 32, 0.25);
}
.brand { display: grid; justify-items: center; gap: 8px; padding: 0 12px 28px; text-align: center; }
.brand-mark {
  display: grid; place-items: center; width: 46px; height: 46px; border: 1px solid rgba(255, 255, 255, 0.38); border-radius: 50%;
  font-family: Georgia, serif; font-size: 1.05rem;
}
.brand strong { font-family: Georgia, "Times New Roman", serif; font-size: 1.55rem; font-weight: 400; letter-spacing: 0.04em; text-transform: uppercase; }
.brand span { color: rgba(255, 255, 255, 0.82); font-size: 0.86rem; }
.side-nav { display: grid; flex: 1 1 auto; gap: 8px; min-height: 0; }
.side-nav a { display: flex; align-items: center; min-height: 50px; border-radius: 8px; padding: 0 18px; color: rgba(255, 255, 255, 0.88); }
.side-nav a.active, .side-nav a:hover { background: rgba(255, 255, 255, 0.12); color: white; }
.side-note {
  flex: 0 0 auto;
  margin: 18px 4px 0;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 8px;
  padding: 18px 16px;
  font-family: Georgia, serif;
  font-size: 1rem;
  line-height: 1.4;
  background: rgba(255, 255, 255, 0.08);
}
.page { width: calc(100% - 250px); margin-left: 250px; padding: 28px 30px 36px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 4px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2rem, 4vw, 2.8rem); line-height: 1; }
.topbar p { margin-bottom: 0; color: #263b34; font-family: Georgia, serif; font-style: italic; font-size: 1.12rem; }
.top-actions { display: flex; align-items: center; gap: 12px; color: #263b34; font-size: 0.92rem; }
.top-actions button, .primary-button { border: 0; color: white; background: var(--green-800); }
.primary-button,
#saveSettingsButton {
  position: relative;
  z-index: 2;
  pointer-events: auto;
}
.avatar { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; color: white; background: linear-gradient(135deg, var(--green-700), var(--green-950)); box-shadow: var(--shadow); font-family: Georgia, serif; font-size: 1.45rem; }
.dashboard { display: grid; gap: 18px; }
.card, .status-card { border: 1px solid rgba(225, 222, 214, 0.82); border-radius: 8px; background: rgba(255, 255, 255, 0.86); box-shadow: var(--shadow); }
.status-card { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; }
.status-card span, .card span, dt, .muted { color: var(--muted); }
.status-card strong { display: block; margin-top: 2px; font-size: 0.96rem; }
.status-card em { border-radius: 999px; padding: 7px 11px; color: #5a4b23; background: #efe6cb; font-size: 0.82rem; font-style: normal; font-weight: 800; white-space: nowrap; }
.status-card em.ok { color: var(--green-800); background: var(--green-100); }
.status-card em.error { color: var(--danger); background: #f6dfd9; }
.hero-grid { display: grid; grid-template-columns: 1.12fr 0.94fr 1.35fr 1.28fr; gap: 18px; }
.card { padding: 20px; }
.total-card {
  position: relative; overflow: hidden; min-height: 158px; color: white;
  background: radial-gradient(circle at 82% 18%, rgba(228, 240, 235, 0.3), transparent 10rem), linear-gradient(135deg, var(--green-900), #09271f);
}
.total-card::after { content: ""; position: absolute; inset: auto -34px -48px auto; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, 0.23), transparent 70%); }
.total-card span, .total-card small { color: rgba(255, 255, 255, 0.82); }
.total-card strong { display: block; margin: 12px 0; font-family: Georgia, serif; font-size: clamp(2.4rem, 4.5vw, 3.6rem); font-weight: 400; line-height: 1; }
.metric-card { min-height: 158px; }
.metric-card > strong, .metric-row strong { display: block; margin: 12px 0 8px; font-family: Georgia, serif; font-size: clamp(1.8rem, 3vw, 2.3rem); line-height: 1; }
.metric-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
mark { display: inline-flex; margin-top: 10px; border-radius: 8px; padding: 6px 10px; color: #1a4b3b; background: var(--green-100); font-weight: 800; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; }
.main-stack { display: grid; gap: 18px; min-width: 0; }
.chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.lower-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.donut-card { grid-column: 1 / -1; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h2, .rail-title h2 { margin: 0; font-family: Georgia, serif; font-size: 1.25rem; }
.card-head button { min-height: 32px; padding: 0 10px; font-size: 0.82rem; }
.card-head button,
.top-actions button,
.top-actions select {
  white-space: nowrap;
}
.line-chart { min-height: 230px; }
.line-chart svg { width: 100%; height: 230px; display: block; }
.chart-grid text { fill: #31443e; font-size: 12px; }
.donut-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 22px; align-items: center; }
.donut { display: grid; place-items: center; width: 190px; height: 190px; border-radius: 50%; background: radial-gradient(circle, white 0 45%, transparent 46%), conic-gradient(var(--green-800) 0 22%, #6d977e 22% 60%, #a9aa7e 60% 72%, #d5ceb4 72% 100%); }
.donut strong { align-self: end; font-family: Georgia, serif; font-size: 1.45rem; }
.donut span { align-self: start; font-size: 0.85rem; }
.legend { display: grid; gap: 10px; }
.legend-row, .transaction-row, .recommendation { display: grid; gap: 8px; border-radius: 8px; padding: 11px 12px; background: var(--surface-soft); }
.legend-row { grid-template-columns: 10px minmax(150px, 1fr) max-content 46px; align-items: center; column-gap: 10px; }
.legend-row strong,
.legend-row span,
.legend-row small {
  white-space: nowrap;
}
.legend-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
}
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green-800); }
.ring { display: grid; place-items: center; width: 92px; height: 92px; border-radius: 50%; background: radial-gradient(circle, white 0 55%, transparent 56%), conic-gradient(var(--green-800) calc(var(--value) * 1%), #e3e8e5 0); }
.ring.large { width: 150px; height: 150px; margin: 4px auto 18px; }
.ring.pale { background: radial-gradient(circle, white 0 55%, transparent 56%), conic-gradient(#0e7a5d calc(var(--value) * 1%), #e3e8e5 0); }
.ring b { font-family: Georgia, serif; font-size: 1.15rem; }
.ring.large b { font-size: 2rem; }
dl { display: grid; gap: 8px; margin: 0; }
dl div { display: flex; justify-content: space-between; gap: 12px; }
dd { margin: 0; font-weight: 900; }
.indicators { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.indicators article { min-width: 0; border-right: 1px solid var(--line); padding-right: 12px; }
.indicators article:last-child { border-right: 0; }
.indicators strong { display: block; margin-top: 8px; color: var(--green-800); font-family: Georgia, serif; font-size: 1.6rem; }
.right-rail { min-width: 0; }
.recommendations { position: sticky; top: 24px; }
.rail-title { display: grid; grid-template-columns: 34px 1fr; gap: 10px; margin-bottom: 18px; }
.rail-title > span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: #7f651e; background: #f4e9c9; font-weight: 900; }
.rail-title p { margin: 8px 0 0; color: var(--muted); font-size: 0.9rem; line-height: 1.35; }
#recommendationsList { display: grid; gap: 12px; }
.recommendation { background: white; border: 1px solid var(--line); }
.recommendation.priority { background: var(--green-100); }
.recommendation strong { color: var(--ink); }
.recommendation p { margin: 0; color: #40524c; font-size: 0.92rem; line-height: 1.35; }
.transaction-row { grid-template-columns: 1fr auto; align-items: center; border: 1px solid var(--line); }
.transaction-row strong { overflow-wrap: anywhere; }
.transaction-row small, .legend-row small, .indicators small { color: var(--muted); }
.positive { color: var(--green-800); }
.negative { color: var(--danger); }
.settings-panel { scroll-margin-top: 18px; }
summary { cursor: pointer; color: var(--green-800); font-weight: 900; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; margin-top: 14px; }
label { display: grid; gap: 6px; color: var(--muted); font-size: 0.92rem; font-weight: 800; }
input { width: 100%; min-height: 42px; border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; color: var(--ink); background: white; }
.mobile-nav { display: none; }

@media (max-width: 1180px) {
  .content-grid { grid-template-columns: 1fr; }
  .recommendations { position: static; }
  #recommendationsList { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .sidebar { display: none; }
  .page { width: 100%; margin-left: 0; padding: 22px 18px 96px; }
  .hero-grid, .chart-grid, .lower-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .donut-card { grid-column: 1 / -1; }
  .mobile-nav {
    position: fixed; right: 10px; bottom: 10px; left: 10px; z-index: 10; display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px;
    border: 1px solid rgba(255, 255, 255, 0.45); border-radius: 8px; padding: 6px; background: rgba(8, 45, 35, 0.94); box-shadow: 0 10px 32px rgba(0, 0, 0, 0.28); backdrop-filter: blur(14px);
  }
  .mobile-nav a { border-radius: 8px; padding: 9px 4px; color: rgba(255, 255, 255, 0.78); text-align: center; font-size: 0.76rem; font-weight: 800; }
  .mobile-nav a.active { color: white; background: rgba(255, 255, 255, 0.14); }
}
@media (max-width: 720px) {
  body { background: #f4f3ef; }
  .page { padding: 18px 12px 94px; }
  .topbar, .top-actions { align-items: flex-start; flex-direction: column; }
  .top-actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .top-actions span, .avatar { display: none; }
  .top-actions select, .top-actions button { width: 100%; }
  .hero-grid, .chart-grid, .lower-grid, .indicators, #recommendationsList, .settings-grid { grid-template-columns: 1fr; }
  .card, .status-card { padding: 16px; }
  .total-card, .metric-card { min-height: 132px; }
  .donut-layout { grid-template-columns: 1fr; justify-items: center; }
  .legend { width: 100%; }
  .line-chart, .line-chart svg { min-height: 210px; height: 210px; }
  .indicators article { border-right: 0; border-bottom: 1px solid var(--line); padding: 0 0 12px; }
  .indicators article:last-child { border-bottom: 0; padding-bottom: 0; }
}


/* Navigation conditionnelle v5.8 */
.view-heading {
  display: none;
  margin: 0 0 18px;
  padding: 18px 20px;
  border: 1px solid rgba(10, 59, 45, .12);
  border-radius: 16px;
  background: #fff;
}
.view-heading.visible { display: block; }
.view-heading span {
  display: block;
  margin-bottom: 4px;
  color: #6a746f;
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.view-heading h2 {
  margin: 0 0 4px;
  color: #143f33;
  font-size: 1.45rem;
}
.view-heading p {
  margin: 0;
  color: #6a746f;
}

.view-item.view-hidden {
  display: none !important;
}

.view-container.view-empty {
  display: none !important;
}

/* Quand une rubrique précise est ouverte, les cartes visibles utilisent la largeur disponible. */
body[data-current-view]:not([data-current-view="synthese"]) .hero-grid,
body[data-current-view]:not([data-current-view="synthese"]) .chart-grid,
body[data-current-view]:not([data-current-view="synthese"]) .lower-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
body[data-current-view]:not([data-current-view="synthese"]) .content-grid {
  grid-template-columns: minmax(0, 1fr);
}
body[data-current-view]:not([data-current-view="synthese"]) .right-rail:not(.view-hidden) {
  width: 100%;
}
.side-nav a,
.mobile-nav a {
  cursor: pointer;
}
.side-nav a:focus-visible,
.mobile-nav a:focus-visible {
  outline: 3px solid rgba(255,255,255,.65);
  outline-offset: 2px;
}


/* Animation douce sur les graphiques */
@keyframes chartFlashGlow {
  0%, 100% {
    filter: drop-shadow(0 0 0 rgba(20, 95, 71, 0));
    transform: translateZ(0) scale(1);
  }
  50% {
    filter: drop-shadow(0 0 10px rgba(20, 95, 71, 0.28));
    transform: translateZ(0) scale(1.006);
  }
}

.chart-card canvas,
.chart-card svg,
[id*="chart"] canvas,
[id*="chart"] svg,
[class*="chart"] canvas,
[class*="chart"] svg {
  animation: chartFlashGlow 2.8s ease-in-out infinite;
  transform-origin: center;
  will-change: filter, transform;
}

/* Petit halo sur la carte du graphique au survol */
.chart-card {
  transition: box-shadow .25s ease, transform .25s ease;
}

.chart-card:hover {
  box-shadow: 0 10px 30px rgba(20, 95, 71, .14);
  transform: translateY(-2px);
}

/* Accessibilité : aucune animation si l'utilisateur préfère réduire les mouvements */
@media (prefers-reduced-motion: reduce) {
  .chart-card canvas,
  .chart-card svg,
  [id*="chart"] canvas,
  [id*="chart"] svg,
  [class*="chart"] canvas,
  [class*="chart"] svg {
    animation: none !important;
  }

  .chart-card {
    transition: none !important;
  }

  .chart-card:hover {
    transform: none !important;
  }
}


/* =========================================================
   Animation graphique visible — v5.8
   Active uniquement dans Prévisions et Analyse.
   ========================================================= */

@keyframes chartCardPulseVisible {
  0%, 100% {
    box-shadow:
      0 8px 22px rgba(10, 59, 45, .08),
      0 0 0 0 rgba(22, 112, 82, 0);
  }
  50% {
    box-shadow:
      0 14px 34px rgba(10, 59, 45, .18),
      0 0 0 5px rgba(22, 112, 82, .10),
      0 0 28px rgba(22, 112, 82, .20);
  }
}

@keyframes chartSweep {
  0%   { transform: translateX(-145%) skewX(-18deg); opacity: 0; }
  15%  { opacity: .08; }
  45%  { opacity: .24; }
  70%  { opacity: .08; }
  100% { transform: translateX(245%) skewX(-18deg); opacity: 0; }
}

@keyframes chartLineGlow {
  0%, 100% {
    filter: drop-shadow(0 0 1px rgba(13,77,59,.15));
    stroke-width: 4;
  }
  50% {
    filter:
      drop-shadow(0 0 4px rgba(13,77,59,.55))
      drop-shadow(0 0 9px rgba(27,125,91,.35));
    stroke-width: 5;
  }
}

@keyframes chartAreaBreath {
  0%, 100% { opacity: .70; }
  50% { opacity: 1; }
}

@keyframes chartPointPulse {
  0%, 100% {
    r: 6px;
    filter: drop-shadow(0 0 1px rgba(13,77,59,.2));
  }
  50% {
    r: 8px;
    filter: drop-shadow(0 0 7px rgba(13,77,59,.55));
  }
}

.chart-card {
  position: relative;
  overflow: hidden;
}

/* Le balayage lumineux est volontairement doux et lent. */
body[data-current-view="previsions"] .chart-card:not(.view-hidden),
body[data-current-view="analyse"] .chart-card:not(.view-hidden) {
  animation: chartCardPulseVisible 3.2s ease-in-out infinite;
}

body[data-current-view="previsions"] .chart-card:not(.view-hidden)::after,
body[data-current-view="analyse"] .chart-card:not(.view-hidden)::after {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: -20% auto -20% -35%;
  width: 26%;
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0),
    rgba(172,229,207,.48),
    rgba(255,255,255,.72),
    rgba(172,229,207,.32),
    rgba(255,255,255,0)
  );
  filter: blur(4px);
  animation: chartSweep 3.6s ease-in-out infinite;
  z-index: 4;
}

body[data-current-view="previsions"] .chart-line-animated,
body[data-current-view="analyse"] .chart-line-animated {
  animation: chartLineGlow 2.2s ease-in-out infinite;
}

body[data-current-view="previsions"] .chart-area-animated,
body[data-current-view="analyse"] .chart-area-animated {
  animation: chartAreaBreath 2.6s ease-in-out infinite;
}

body[data-current-view="previsions"] .chart-point-animated,
body[data-current-view="analyse"] .chart-point-animated {
  animation: chartPointPulse 1.8s ease-in-out infinite;
}

/* Si l'ancienne animation générique est présente, on la neutralise pour
   éviter que deux animations se superposent. */
.chart-card svg,
[id*="chart"] svg,
[class*="chart"] svg {
  animation: none;
}

/* Accessibilité */
@media (prefers-reduced-motion: reduce) {
  body[data-current-view="previsions"] .chart-card:not(.view-hidden),
  body[data-current-view="analyse"] .chart-card:not(.view-hidden),
  body[data-current-view="previsions"] .chart-card:not(.view-hidden)::after,
  body[data-current-view="analyse"] .chart-card:not(.view-hidden)::after,
  body[data-current-view="previsions"] .chart-line-animated,
  body[data-current-view="analyse"] .chart-line-animated,
  body[data-current-view="previsions"] .chart-area-animated,
  body[data-current-view="analyse"] .chart-area-animated,
  body[data-current-view="previsions"] .chart-point-animated,
  body[data-current-view="analyse"] .chart-point-animated {
    animation: none !important;
  }
}


.chart-period-select {
  appearance: none;
  border: 1px solid rgba(13, 77, 59, .16);
  background:
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(247,245,239,.96));
  color: #123f32;
  border-radius: 10px;
  padding: 8px 34px 8px 12px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  min-width: 110px;
  background-image:
    linear-gradient(45deg, transparent 50%, #315e50 50%),
    linear-gradient(135deg, #315e50 50%, transparent 50%),
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(247,245,239,.96));
  background-position:
    calc(100% - 16px) 50%,
    calc(100% - 11px) 50%,
    0 0;
  background-size: 5px 5px, 5px 5px, 100% 100%;
  background-repeat: no-repeat;
}

.chart-period-select:hover,
.chart-period-select:focus {
  border-color: rgba(13, 77, 59, .38);
  outline: none;
  box-shadow: 0 0 0 3px rgba(13, 77, 59, .08);
}


.chart-period-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 8px 0 14px;
}

.chart-period-stats span {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid rgba(13, 77, 59, .10);
  border-radius: 10px;
  background: rgba(255,255,255,.58);
}

.chart-period-stats small {
  color: #6a776f;
  font-size: .76rem;
}

.chart-period-stats strong {
  color: #123f32;
  font-size: .94rem;
}

.chart-period-stats strong.negative { color: #a64040; }
.chart-period-stats strong.positive { color: #246b50; }

@media (max-width: 720px) {
  .chart-period-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


.week-select {
  min-width: 190px;
}

.week-select[hidden] {
  display: none !important;
}

@media (max-width: 720px) {
  .week-select {
    min-width: 0;
    max-width: 100%;
  }
}


/* Lisibilité des valeurs dans les cartouches des graphiques */
.chart-value-label,
.chart-end-label,
.chart-tooltip-value {
  fill: #ffffff !important;
  color: #ffffff !important;
  font-weight: 700 !important;
}

svg .value-label,
svg .end-label {
  fill: #ffffff !important;
  font-weight: 700 !important;
}


/* Sélecteurs de période avancés */
.month-select[hidden], .year-select[hidden], .week-select[hidden] { display: none !important; }
.month-select, .year-select, .week-select { min-width: 132px; }
.secondary-button { white-space: nowrap; }

/* Analyse enrichie */
.insight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 16px 0;
}
.compact-insight { min-height: 150px; }
.compact-insight > strong { display: block; font-size: 1.35rem; margin-top: 14px; }
.period-summary { font-size: 1.02rem; line-height: 1.5; margin: 12px 0 8px; }
.period-badge {
  display: inline-flex;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef3ef;
  color: #0a3b2d;
  font-weight: 700;
}
.mini-list { display: grid; gap: 8px; margin-top: 10px; }
.mini-list > div, .category-budget-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #ece8df;
}
.category-budget-row {
  width: 100%;
  text-align: left;
  background: transparent;
  border-left: 0;
  border-right: 0;
  border-top: 0;
  cursor: pointer;
}
.category-budget-row small { grid-column: 1 / -1; }
.split-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}
.split-stats span {
  padding: 12px;
  border-radius: 12px;
  background: #f7f5ef;
}
.split-stats small, .split-stats strong { display: block; }
.category-row-button {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font: inherit;
}
.category-row-button:hover { background: rgba(10,59,45,.04); }
.category-detail-card { margin: 16px 0; }

@media (max-width: 980px) {
  .insight-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .insight-grid { grid-template-columns: 1fr; }
  .month-select, .year-select, .week-select { max-width: 100%; min-width: 0; }
}


/* Graphiques financiers : lisibilité et responsive */
.chart-axis-label {
  fill: #5f6b66;
  font-size: 12px;
  font-weight: 600;
}
.balance-chart svg,
.projection-chart svg,
#balanceChart svg,
#projectionChart svg {
  width: 100%;
  height: auto;
  overflow: visible;
}
@media (max-width: 720px) {
  .chart-axis-label { font-size: 11px; }
}


/* Audit pass 2 : robustesse de mise en page */
.card h2,
.card-head h2 {
  overflow-wrap: anywhere;
}
#balanceChart,
#projectionChart {
  min-width: 0;
  overflow: hidden;
}
#balanceChart svg,
#projectionChart svg {
  display: block;
  max-width: 100%;
}
.top-actions {
  flex-wrap: wrap;
}
@media (max-width: 760px) {
  .top-actions select,
  .top-actions button {
    max-width: 100%;
  }
}


/* Budget par catégorie / remboursement du découvert */
.category-cap-card { margin: 16px 0; }
.debt-plan,
.category-cap-footer {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 12px;
  margin: 14px 0;
}
.debt-plan span,
.category-cap-footer span {
  padding: 12px;
  border-radius: 14px;
  background: #f7f5ef;
}
.debt-plan small,
.debt-plan strong,
.category-cap-footer small,
.category-cap-footer strong {
  display: block;
}
.category-caps-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}
.category-cap-row {
  border: 1px solid #e4e0d7;
  border-radius: 14px;
  padding: 12px;
}
.category-cap-title,
.category-cap-values {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
.category-cap-title small {
  font-weight: 700;
  color: #66736d;
}
.category-cap-values {
  margin: 10px 0;
  flex-wrap: wrap;
}
.category-cap-values label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.category-cap-input {
  width: 92px;
  padding: 7px 9px;
  border: 1px solid #cfd6d1;
  border-radius: 9px;
  font: inherit;
  text-align: right;
}
.cap-progress {
  height: 8px;
  border-radius: 999px;
  background: #ece9e1;
  overflow: hidden;
}
.cap-progress i {
  display: block;
  height: 100%;
  background: #0a3b2d;
  border-radius: inherit;
}
@media (max-width: 720px) {
  .debt-plan,
  .category-cap-footer {
    grid-template-columns: 1fr;
  }
  .category-cap-values {
    align-items: flex-start;
    flex-direction: column;
  }
}


/* Projection budget */
.budget-projection-card { margin: 16px 0; }
.projection-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.projection-metrics span {
  padding: 14px;
  border-radius: 14px;
  background: #f7f5ef;
}
.projection-metrics small,
.projection-metrics strong {
  display: block;
}
.projection-metrics strong {
  margin-top: 5px;
  font-size: 1.25rem;
}
.budget-projection-message {
  margin: 14px 0 0;
  line-height: 1.5;
}
@media (max-width: 720px) {
  .projection-metrics { grid-template-columns: 1fr; }
}


/* Prévisions mensuelles par catégorie */
.future-category-forecast { margin: 16px 0; }
.forecast-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 12px;
  margin: 14px 0;
}
.forecast-summary span {
  padding: 12px;
  background: #f7f5ef;
  border-radius: 14px;
}
.forecast-summary small,
.forecast-summary strong { display: block; }
.forecast-table-wrap {
  overflow-x: auto;
  border: 1px solid #e4e0d7;
  border-radius: 14px;
}
.forecast-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}
.forecast-table th,
.forecast-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #ece8df;
  text-align: right;
  white-space: nowrap;
}
.forecast-table th:first-child {
  text-align: left;
  position: sticky;
  left: 0;
  background: #fff;
  z-index: 2;
}
.forecast-table thead th {
  background: #f7f5ef;
  font-weight: 800;
}
.forecast-month-alert {
  background: #fff0ee !important;
}
.forecast-category-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.forecast-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}
.forecast-dot.essential { background: #0a3b2d; }
.forecast-dot.adjustable { background: #a8a47b; }
.forecast-dot.alert { background: #b64236; }
.forecast-total-row th,
.forecast-total-row td {
  font-weight: 800;
  border-top: 2px solid #cfc9bb;
}
.forecast-balance-row th,
.forecast-balance-row td {
  font-weight: 800;
}
.forecast-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 12px;
  font-size: .9rem;
}
.forecast-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
@media (max-width: 720px) {
  .forecast-summary { grid-template-columns: 1fr; }
}


/* Dépenses fixes mensuelles */
.recurring-fixed-card { margin: 16px 0; }
.recurring-fixed-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}
.recurring-fixed-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #ece8df;
}
.recurring-fixed-row span strong,
.recurring-fixed-row span small {
  display: block;
}
.recurring-fixed-row span small {
  color: #6c7671;
  margin-top: 2px;
}
.recurring-fixed-row label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}
.recurring-fixed-row input {
  width: 104px;
  padding: 8px 10px;
  border: 1px solid #cfd6d1;
  border-radius: 9px;
  text-align: right;
  font: inherit;
}
.recurring-fixed-total {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-top: 14px;
  padding: 14px;
  border-radius: 14px;
  background: #f7f5ef;
}
.recurring-fixed-total strong {
  font-size: 1.2rem;
}
@media (max-width: 620px) {
  .recurring-fixed-row {
    align-items: flex-start;
    flex-direction: column;
  }
}


/* Charges logement fixes : non modifiables */
.recurring-fixed-row input:disabled {
  background: #f1efe9;
  color: #4f5a55;
  cursor: not-allowed;
  opacity: 1;
  font-weight: 700;
}


.annual-expense-card { margin: 16px 0; }
.annual-expense-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 14px;
  border-radius: 14px;
  background: #f7f5ef;
}
.annual-expense-row > span:last-child { text-align: right; }
.annual-expense-row strong,
.annual-expense-row small { display: block; }
@media (max-width: 620px) {
  .annual-expense-row { flex-direction: column; }
  .annual-expense-row > span:last-child { text-align: left; }
}


/* Correctif superposition contenu principal / colonne recommandations */
.content-grid {
  align-items: start;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 320px);
}
.content-grid > .main-stack,
.content-grid > .right-rail {
  min-width: 0;
  max-width: 100%;
}
.main-stack {
  min-width: 0;
  overflow: hidden;
}
.right-rail {
  min-width: 0;
  width: 100%;
  align-self: start;
  position: relative;
  z-index: 1;
}
.recommendations {
  width: 100%;
  max-width: 100%;
  position: sticky;
  top: 24px;
}
.recurring-fixed-card,
.future-category-forecast,
.category-cap-card,
.budget-projection-card,
.chart-card,
.compact-insight {
  width: 100%;
  max-width: 100%;
}
.recurring-fixed-row {
  grid-template-columns: 1fr auto;
}
.recurring-fixed-row label {
  justify-self: end;
  white-space: nowrap;
}
@media (max-width: 1400px) {
  .content-grid {
    grid-template-columns: 1fr;
  }
  .recommendations {
    position: static;
  }
  #recommendationsList {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 720px) {
  #recommendationsList {
    grid-template-columns: 1fr;
  }
}


/* Historique mensuel du total des comptes */
.monthly-total-history {
  margin: 0;
}
.monthly-total-history .line-chart {
  min-height: 280px;
}
.monthly-total-history svg {
  width: 100%;
  height: 280px;
  display: block;
  overflow: visible;
}
.monthly-history-path {
  fill: none;
  stroke: var(--green-800);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.monthly-zero-line {
  stroke: #b9c0bc;
  stroke-width: 1.5;
  stroke-dasharray: 6 5;
}
.monthly-history-points circle {
  fill: var(--green-800);
  stroke: white;
  stroke-width: 2;
}
.monthly-history-labels text,
.monthly-value-label {
  fill: #31443e;
  font-size: 12px;
  font-weight: 700;
}
.monthly-value-label.negative-label {
  fill: var(--danger);
}
.monthly-history-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.monthly-history-stats span {
  padding: 12px;
  border-radius: 12px;
  background: #f7f5ef;
}
.monthly-history-stats small,
.monthly-history-stats strong {
  display: block;
}
.monthly-history-stats strong {
  margin-top: 4px;
}
@media (max-width: 720px) {
  .monthly-history-stats {
    grid-template-columns: 1fr;
  }
}


/* Lisibilité renforcée des dépenses fixes mensuelles */
.recurring-fixed-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  align-items: center;
  gap: 18px;
}
.recurring-fixed-row label {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-weight: 800;
}
.recurring-fixed-row input {
  width: 118px;
  min-width: 118px;
  background: #ffffff;
  color: #101917;
  border-color: #c9cfc9;
  font-weight: 800;
  opacity: 1;
}
.recurring-fixed-row input:disabled {
  background: #f4f1e9;
  color: #263b34;
  border-color: #d7d2c7;
}
.recurring-fixed-total {
  font-size: 1rem;
}
.recurring-fixed-total strong {
  color: var(--green-900);
  font-size: 1.3rem;
}
@media (max-width: 620px) {
  .recurring-fixed-row {
    grid-template-columns: 1fr;
  }
  .recurring-fixed-row label {
    justify-content: flex-start;
  }
}


/* Mise en page desktop plus large */
@media (min-width: 1401px) {
  .page {
    width: calc(100% - 250px);
    max-width: none;
    margin-left: 250px;
    padding-right: 34px;
  }
  .dashboard {
    width: 100%;
  }
  .content-grid {
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 20px;
  }
}


.forecast-balance-row th,
.forecast-balance-row td {
  background: #f7f5ef;
  font-weight: 900;
}
.forecast-variation-row th,
.forecast-variation-row td {
  font-weight: 800;
}


/* v5.9 - montants fixes explicitement visibles */
.recurring-fixed-visible-amount {
  display: inline-block;
  min-width: 92px;
  text-align: right;
  color: #0f3f31 !important;
  font-weight: 900;
  font-size: 1rem;
}
.recurring-fixed-row label {
  display: grid !important;
  grid-template-columns: 92px 118px !important;
  align-items: center !important;
  justify-content: end !important;
  gap: 10px !important;
}
#liveBuildBadge {
  box-shadow: 0 6px 18px rgba(15,63,49,.18);
}


/* v5.9.1 — navigation latérale sans chevauchement */
.sidebar {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.side-nav {
  flex: 0 0 auto;
  min-height: auto;
}
.side-note {
  margin-top: 24px;
  position: static;
  flex: 0 0 auto;
}
@media (min-height: 880px) {
  .side-note {
    margin-top: auto;
  }
}


/* =========================================================
   v5.9.2 — Correctif mise en page desktop des graphiques
   ========================================================= */
@media (min-width: 1181px) {
  /* Plus de place aux données, sans écraser les graphiques. */
  .content-grid {
    grid-template-columns: minmax(0, 1fr) 300px !important;
    gap: 22px !important;
    align-items: start;
  }

  .main-stack {
    overflow: visible !important;
    min-width: 0;
  }

  /* Solde CCF prioritaire, projection plus compacte mais lisible. */
  .chart-grid {
    grid-template-columns: minmax(560px, 1.65fr) minmax(360px, 1fr) !important;
    gap: 22px !important;
    align-items: stretch;
  }

  .chart-grid > .chart-card {
    min-width: 0;
    min-height: 370px;
    padding: 22px 24px;
  }

  .chart-grid .line-chart {
    min-height: 300px !important;
    height: 300px;
  }

  .chart-grid .line-chart svg {
    width: 100% !important;
    height: 300px !important;
    max-width: 100%;
    overflow: visible;
  }

  /* Historique pleine largeur, plus haut pour éviter les libellés tassés. */
  .monthly-total-history {
    width: 100%;
    min-width: 0;
    padding: 22px 24px;
  }

  .monthly-total-history .line-chart {
    min-height: 330px !important;
    height: 330px;
  }

  .monthly-total-history svg {
    width: 100% !important;
    height: 330px !important;
    max-width: 100%;
    overflow: visible;
  }

  /* Les titres ne doivent pas réduire le graphique. */
  .chart-card .card-head,
  .monthly-total-history .card-head {
    min-height: 42px;
    align-items: flex-start;
  }

  .chart-card .card-head h2,
  .monthly-total-history .card-head h2 {
    line-height: 1.2;
    max-width: calc(100% - 110px);
  }

  /* Donut et graphiques circulaires mieux proportionnés sur desktop. */
  .donut-layout {
    grid-template-columns: 240px minmax(0, 1fr) !important;
    gap: 32px !important;
  }

  .donut {
    width: 210px !important;
    height: 210px !important;
  }

  .ring.large {
    width: 170px !important;
    height: 170px !important;
  }

  /* Eviter tout débordement horizontal des cartes de graphiques. */
  .chart-card,
  .monthly-total-history,
  .donut-card,
  .progress-card {
    box-sizing: border-box;
    max-width: 100%;
    overflow: hidden;
  }
}

/* Ecrans desktop intermédiaires : une seule colonne pour les deux courbes. */
@media (min-width: 1181px) and (max-width: 1450px) {
  .content-grid {
    grid-template-columns: minmax(0, 1fr) 285px !important;
  }

  .chart-grid {
    grid-template-columns: 1fr !important;
  }

  .chart-grid > .chart-card {
    min-height: 350px;
  }
}

/* Ne pas animer la taille du SVG : cela provoquait un effet de flottement sur desktop. */
@media (min-width: 1181px) {
  .chart-card svg,
  .monthly-total-history svg {
    transform: none !important;
  }
}


/* =========================================================
   v5.9.3 — Menu mobile uniquement
   Aucun impact sur le bureau (desktop >= 981 px)
   ========================================================= */
.mobile-menu-backdrop,
.mobile-more-sheet {
  display: none;
}

@media (max-width: 980px) {
  .page {
    padding-bottom: 108px;
  }

  .mobile-nav {
    right: max(10px, env(safe-area-inset-right));
    bottom: max(10px, env(safe-area-inset-bottom));
    left: max(10px, env(safe-area-inset-left));
    z-index: 60;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 3px;
    border-radius: 20px;
    padding: 7px;
    background: rgba(8, 45, 35, .97);
    box-shadow: 0 14px 40px rgba(0,0,0,.28);
  }

  .mobile-nav a,
  .mobile-nav button {
    min-width: 0;
    min-height: 56px;
    border: 0;
    border-radius: 15px;
    padding: 7px 3px 6px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 3px;
    color: rgba(255,255,255,.78);
    background: transparent;
    font: inherit;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-nav a > span,
  .mobile-nav button > span {
    display: block;
    color: inherit;
    font-size: 1.16rem;
    line-height: 1;
    font-weight: 900;
  }

  .mobile-nav a > b,
  .mobile-nav button > b {
    display: block;
    max-width: 100%;
    overflow: hidden;
    color: inherit;
    font-size: .68rem;
    line-height: 1.05;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-nav a.active {
    color: #fff;
    background: rgba(255,255,255,.14);
  }

  #mobileMoreButton[aria-expanded="true"] {
    color: #fff;
    background: rgba(255,255,255,.14);
  }

  .mobile-menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 70;
    display: block;
    visibility: hidden;
    opacity: 0;
    background: rgba(5,22,17,.34);
    backdrop-filter: blur(2px);
    transition: opacity .2s ease, visibility .2s ease;
  }

  .mobile-menu-backdrop.open {
    visibility: visible;
    opacity: 1;
  }

  .mobile-more-sheet {
    position: fixed;
    right: 10px;
    bottom: calc(84px + env(safe-area-inset-bottom));
    left: 10px;
    z-index: 80;
    display: block;
    visibility: hidden;
    max-height: min(64vh, 480px);
    border: 1px solid rgba(10,59,45,.12);
    border-radius: 24px;
    padding: 8px 14px 18px;
    color: #11251f;
    background: rgba(255,255,255,.98);
    box-shadow: 0 22px 60px rgba(0,0,0,.25);
    opacity: 0;
    transform: translateY(22px) scale(.985);
    transform-origin: bottom center;
    transition: transform .22s ease, opacity .22s ease, visibility .22s ease;
  }

  .mobile-more-sheet.open {
    visibility: visible;
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  .mobile-more-handle {
    width: 44px;
    height: 4px;
    margin: 3px auto 12px;
    border-radius: 999px;
    background: #d4d8d5;
  }

  .mobile-more-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
  }

  .mobile-more-head strong,
  .mobile-more-head small {
    display: block;
  }

  .mobile-more-head strong {
    font-family: Georgia, serif;
    font-size: 1.15rem;
  }

  .mobile-more-head small {
    margin-top: 2px;
    color: #6a746f;
  }

  #mobileMoreClose {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    color: #143f33;
    background: #f0f3f1;
    font-size: 1.5rem;
    line-height: 1;
  }

  .mobile-more-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .mobile-more-grid a {
    min-height: 66px;
    border: 1px solid #e2e5e2;
    border-radius: 16px;
    padding: 11px 12px;
    display: grid;
    grid-template-columns: 32px minmax(0,1fr);
    align-items: center;
    gap: 10px;
    color: #17392f;
    background: #f8f8f5;
  }

  .mobile-more-grid a > span {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    color: #fff;
    background: #0a3b2d;
    font-weight: 900;
  }

  .mobile-more-grid a > b {
    min-width: 0;
    font-size: .84rem;
    line-height: 1.15;
    overflow-wrap: anywhere;
  }

  .mobile-more-grid a.active {
    border-color: rgba(10,59,45,.25);
    background: #e9f1ed;
  }

  body.mobile-menu-open {
    overflow: hidden;
  }
}

@media (max-width: 420px) {
  .mobile-nav {
    right: 6px;
    left: 6px;
    padding: 6px 4px;
  }

  .mobile-nav a,
  .mobile-nav button {
    min-height: 53px;
  }

  .mobile-nav a > b,
  .mobile-nav button > b {
    font-size: .62rem;
  }

  .mobile-more-sheet {
    right: 6px;
    left: 6px;
  }

  .mobile-more-grid {
    grid-template-columns: 1fr 1fr;
  }
}


/* =========================================================
   v5.9.4 — Correctif mobile : masquer totalement le menu desktop
   Aucun impact sur le desktop >= 981 px
   ========================================================= */
@media (max-width: 980px) {
  .sidebar {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transform: none !important;
  }

  .page {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    padding-left: 18px !important;
    padding-right: 18px !important;
  }

  .mobile-nav {
    display: grid !important;
  }

  body.sidebar-open .sidebar,
  body.menu-open .sidebar,
  body.drawer-open .sidebar {
    display: none !important;
  }
}

@media (max-width: 720px) {
  .page {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
}


/* =========================================================
   v5.9.5 — Isolation stricte mobile / desktop
   Mobile <= 980 px : aucune sidebar desktop possible.
   Desktop >= 981 px : aucune règle ci-dessous ne s'applique.
   ========================================================= */
@media screen and (max-width: 980px) {
  html,
  body {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  body > .app-shell,
  .app-shell {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .sidebar,
  body .sidebar,
  body.sidebar-open .sidebar,
  body.menu-open .sidebar,
  body.drawer-open .sidebar,
  .sidebar.open,
  .sidebar[aria-hidden="false"] {
    display: none !important;
    position: absolute !important;
    width: 0 !important;
    min-width: 0 !important;
    max-width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translateX(-110%) !important;
    z-index: -1 !important;
  }

  .page,
  body .page {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    margin-left: 0 !important;
    padding-left: 18px !important;
    padding-right: 18px !important;
    transform: none !important;
  }

  .mobile-nav {
    display: grid !important;
  }
}

@media screen and (max-width: 720px) {
  .page,
  body .page {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
}


/* =========================================================
   v5.9.6 — Résolution téléphone corrigée
   Détection par appareil tactile + taille physique écran.
   Aucun impact desktop.
   ========================================================= */

/* Mode téléphone forcé même si le navigateur simule un viewport desktop. */
html.phone-device,
html.phone-device body {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
}

html.phone-device .sidebar {
  display: none !important;
  position: absolute !important;
  left: -10000px !important;
  width: 0 !important;
  min-width: 0 !important;
  max-width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

html.phone-device .page {
  box-sizing: border-box !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  margin: 0 !important;
  margin-left: 0 !important;
  padding: 16px 12px 108px !important;
  transform: none !important;
}

html.phone-device .dashboard,
html.phone-device .content-grid,
html.phone-device .main-stack,
html.phone-device .hero-grid,
html.phone-device .chart-grid,
html.phone-device .lower-grid,
html.phone-device .indicators,
html.phone-device .settings-grid,
html.phone-device #recommendationsList {
  min-width: 0 !important;
  max-width: 100% !important;
}

html.phone-device .content-grid,
html.phone-device .hero-grid,
html.phone-device .chart-grid,
html.phone-device .lower-grid,
html.phone-device .indicators,
html.phone-device .settings-grid,
html.phone-device #recommendationsList {
  grid-template-columns: 1fr !important;
}

html.phone-device .topbar {
  display: block !important;
  width: 100% !important;
}

html.phone-device .top-actions {
  width: 100% !important;
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 8px !important;
  margin-top: 14px !important;
}

html.phone-device .top-actions > span,
html.phone-device .avatar {
  display: none !important;
}

html.phone-device .top-actions select,
html.phone-device .top-actions button {
  box-sizing: border-box !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
}

html.phone-device .card,
html.phone-device .status-card,
html.phone-device .chart-card,
html.phone-device .monthly-total-history,
html.phone-device .future-category-forecast,
html.phone-device .category-cap-card,
html.phone-device .budget-projection-card,
html.phone-device .recurring-fixed-card {
  box-sizing: border-box !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
}

html.phone-device .line-chart,
html.phone-device .line-chart svg {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: 220px !important;
  min-height: 220px !important;
  overflow: hidden !important;
}

html.phone-device .donut-layout {
  grid-template-columns: 1fr !important;
  justify-items: center !important;
}

html.phone-device .legend {
  width: 100% !important;
}

html.phone-device .forecast-table-wrap {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
}

html.phone-device .mobile-nav {
  display: grid !important;
}

/* Filet de sécurité si la classe JS n'est pas encore posée. */
@media (hover: none) and (pointer: coarse) and (max-device-width: 900px) {
  .sidebar { display: none !important; }
  .page {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
  }
  .mobile-nav { display: grid !important; }
}



/* =========================================================
   v6.2 — Portail responsive mobile + desktop / design premium
   ========================================================= */
.mobile-portal-shell,.finance-mobile-tabs{display:none}
body{background:#fbfaf6!important;color:#10283c!important}
.mobile-portal-shell{display:block;min-height:100vh;padding-bottom:92px;background:linear-gradient(180deg,#fffefa 0%,#faf9f4 100%)}
.portal-page{display:none;box-sizing:border-box;width:100%;max-width:760px;min-height:100vh;margin:0 auto;padding:18px 16px 32px}
.portal-page.active{display:block}
html.phone-device:not(.portal-finance-open) .page{display:none!important}
html.phone-device.portal-finance-open .mobile-portal-shell{display:none!important}
html.phone-device.portal-finance-open .page{display:block!important}
html.phone-device.portal-finance-open .finance-mobile-tabs{display:block;position:sticky;top:0;z-index:60;padding:9px 10px 8px;border-bottom:1px solid #e4e3dc;background:rgba(255,254,250,.97);backdrop-filter:blur(14px)}
.finance-mobile-tabs>button{border:0;background:transparent;color:#154936;font-weight:800;padding:5px 2px 8px}
.finance-mobile-tabs>div{display:grid;grid-template-columns:repeat(4,1fr);gap:6px}.finance-mobile-tabs a{padding:8px 3px;border:1px solid #dfe2dc;border-radius:10px;background:white;color:#49605a;text-align:center;font-size:.72rem;font-weight:800}.finance-mobile-tabs a.active{background:#0c4f3b;color:#fff;border-color:#0c4f3b}

.mb-header{display:grid;grid-template-columns:1fr auto 42px;gap:10px;align-items:center;margin-bottom:26px}.mb-brand{display:flex;align-items:center;gap:10px;color:#123d2e;font-family:Georgia,serif;font-size:1.35rem}.mb-shield{display:grid;place-items:center;width:38px;height:44px;border:1.5px solid #1e634a;border-radius:12px 12px 15px 15px;color:#0f573f;background:#f5faf6}.mb-private,.sub-private{padding:8px 12px;border-radius:999px;background:#f0f5ea;color:#315d42;font-size:.78rem;font-weight:800;white-space:nowrap}.mb-profile,.round-profile{width:40px;height:40px;border:1px solid #cfb16a;border-radius:50%;background:#fff;color:#17354f;font-size:1.2rem}.mb-greeting h1{margin:0 0 14px;font-family:Georgia,serif;font-size:clamp(2.15rem,10vw,3rem);font-weight:500;color:#10283c}.mb-mode{display:grid;grid-template-columns:repeat(3,1fr);max-width:390px;padding:4px;border:1px solid #e2e2dc;border-radius:15px;background:#fff;box-shadow:0 4px 12px rgba(24,48,38,.04);margin-bottom:20px}.mb-mode button{border:0;border-radius:11px;padding:10px 6px;background:transparent;color:#50615c;font-weight:700}.mb-mode button.active{background:#f2f4e9;color:#496344}
.mb-card,.lux-card{border:1px solid #e7e6df;border-radius:21px;background:#fff;box-shadow:0 7px 22px rgba(23,44,35,.065);padding:17px;margin-bottom:14px}.mb-card-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:6px}.mb-card-head>div{display:flex;align-items:center;gap:11px}.mb-card-head h2,.lux-card h2{margin:0;color:#164632;font-family:Georgia,serif;font-size:1.35rem}.mb-card-head p{margin:3px 0 0;color:#707b77}.mb-icon{display:grid;place-items:center;width:48px;height:48px;border-radius:50%;font-size:1.4rem;flex:0 0 48px}.soft-green{background:#f1f5e9;color:#55734d}.soft-blue{background:#edf3fa;color:#244d7c}.soft-gold{background:#fff7e7;color:#b78a2d}.mb-outline{min-height:38px;padding:0 14px;border:1px solid #6e8b72;border-radius:10px;background:#fff;color:#48634f;font-weight:800}.mb-task{display:grid;grid-template-columns:28px 30px 1fr 18px;align-items:center;gap:10px;width:100%;min-height:66px;border:0;border-top:1px solid #edf0ec;background:transparent;text-align:left;color:#26384d;font:inherit}.mb-task b{justify-self:end;font-size:1.7rem;font-weight:400;color:#607078}.mb-check{width:23px;height:23px;border:1.6px solid #90a283;border-radius:50%}.mb-line-icon{color:#5e7d60;text-align:center}.mb-three-actions{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:14px}.mb-three-actions button{min-height:65px;border:1px solid #dfe6ee;border-radius:13px;background:#f9fbff;color:#173a61;font-size:1.1rem}.mb-three-actions span{display:block;margin-top:4px;font-size:.78rem;font-weight:800}.mb-duo{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:14px 0 22px}.mb-feature{display:grid;grid-template-columns:48px 1fr 18px;gap:10px;align-items:center;min-height:126px;border:1px solid #e3e5df;border-radius:19px;background:white;box-shadow:0 7px 20px rgba(23,44,35,.055);text-align:left;padding:15px}.mb-feature strong,.mb-feature small{display:block}.mb-feature strong{font:1.2rem Georgia,serif;color:#214d38}.mb-feature small{margin-top:4px;color:#65736d}.mb-feature b{font-size:1.5rem;color:#345a73}.mb-feature.tomorrow{background:linear-gradient(140deg,#fff,#f3f6ec)}.mb-feature.drawing{background:linear-gradient(140deg,#fff,#f3f7fc)}.mb-spaces-preview h2{margin:0 0 10px;color:#26394e;font-size:1.05rem}.mb-space-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.mb-space-grid button{min-height:111px;border:1px solid #e5e7e2;border-radius:17px;background:#fff;box-shadow:0 6px 16px rgba(23,44,35,.05);color:#20364f}.mb-space-grid span{display:grid;place-items:center;width:45px;height:45px;margin:0 auto 7px;border-radius:50%;background:#f4f7ef;color:#507252;font-size:1.45rem}.mb-space-grid b{font-size:.86rem}.mb-security-strip,.warning-strip{display:grid;grid-template-columns:38px 1fr 16px;gap:11px;align-items:center;margin-top:14px;padding:12px 14px;border:1px solid #dce6d7;border-radius:14px;background:linear-gradient(90deg,#f3f8ed,#fbfcf7);color:#315d39}.mb-security-strip strong,.mb-security-strip small,.warning-strip strong,.warning-strip small{display:block}.mb-security-strip small,.warning-strip small{margin-top:3px;color:#65716c;font-size:.75rem}

.sub-header{display:grid;grid-template-columns:42px 1fr auto;align-items:center;gap:10px;margin:2px 0 16px}.sub-header>button{width:42px;height:42px;border:1px solid #e0c98d;border-radius:50%;background:#fff;color:#17354f;font-size:1.8rem}.sub-header h1{margin:0;text-align:center;font:2.2rem Georgia,serif;color:#102a43}.sub-header.deluxe>div h1{font-size:2rem;text-align:left;color:#153f30}.sub-header.deluxe>div span{display:inline-block;margin-top:4px;padding:5px 10px;border-radius:9px;background:#eff5ec;color:#315b42}.sub-private.green{background:#07533d;color:#fff}.center-title h1{font-size:1.9rem}.center-title small{display:block;text-align:center;color:#7a858c}.ornament-line{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:12px;margin:-3px 0 15px;color:#caa454}.ornament-line i{height:1px;background:#ddc58f}.ornament-line span{font-size:1.2rem}.folder-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:14px}.folder-card{position:relative;min-height:235px;padding:16px;border:1px solid #e7e2d7;border-radius:18px;background:#fff;box-shadow:0 7px 20px rgba(25,45,34,.055);text-align:left}.folder-art{position:relative;display:block;width:115px;height:82px;margin:4px auto 14px;border-radius:9px 9px 13px 13px;background:linear-gradient(145deg,#154f3a,#093b2b);box-shadow:0 7px 13px rgba(11,65,46,.18)}.folder-art:before{content:"";position:absolute;top:-12px;left:10px;width:55px;height:18px;border-radius:8px 8px 0 0;background:#174d39}.folder-art i{position:absolute;inset:0;display:grid;place-items:center;color:#d8b765;font:normal 2.5rem Georgia,serif}.folder-card strong,.folder-card small{display:block}.folder-card strong{font:1.35rem Georgia,serif;color:#173f30}.folder-card small{margin-top:4px;color:#737a78}.folder-card>b{position:absolute;right:16px;bottom:24px;color:#164d38;font-size:1.6rem}.quick-card h2{font-size:1.45rem}.quick-pills{display:grid;grid-template-columns:repeat(3,1fr);gap:9px;margin-top:12px}.quick-pills button{min-height:48px;border:1px solid #e2ded3;border-radius:13px;background:#fff;color:#204635;font-weight:800}.orange-dot{display:inline-block;width:18px;height:18px;border-radius:4px;background:#ff7900;vertical-align:-4px}.security-card{padding:13px 17px}.security-title{display:flex;justify-content:space-between;align-items:center;padding-bottom:8px;border-bottom:1px solid #ece9e1}.security-title h2{font-size:1.4rem}.security-row{display:grid;grid-template-columns:34px 1fr 28px;gap:10px;align-items:center;padding:11px 0;border-bottom:1px solid #efeee8}.security-row:last-child{border-bottom:0}.security-row>span{display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:#0c4d39;color:white}.security-row strong,.security-row small{display:block}.security-row small{margin-top:3px;color:#7a817e;font-size:.75rem}.warning-strip{grid-template-columns:38px 1fr;background:#fffaf0;border-color:#eddfbd;color:#ab7a19}.warning-strip>span{font-size:1.5rem}

.journey-hero{display:grid;grid-template-columns:72px 1fr;gap:18px;align-items:center;padding:22px;margin-bottom:15px;border:1px solid #e8e0cf;border-radius:21px;background:#fff;box-shadow:0 7px 20px rgba(26,43,34,.055)}.journey-hero>span{display:grid;place-items:center;width:66px;height:66px;border-radius:50%;background:#0b513b;color:#d6b25f;font-size:2rem}.journey-hero h2{margin:0;font:1.7rem Georgia,serif;color:#153d2f}.journey-hero p{margin:5px 0 0;color:#6c7672}.journey-hero.dark{background:linear-gradient(135deg,#062a46,#063852);border-color:#173f56}.journey-hero.dark h2{color:white}.journey-hero.dark p{color:#d3ad57}.journey-hero.practical{grid-template-columns:66px 1fr 65px}.journey-hero.practical>b{font-size:2.4rem;color:#c9a553}.journey-card{display:grid;grid-template-columns:125px 1fr;gap:8px;align-items:center;padding:14px;margin-bottom:12px;border:1px solid #e8e2d8;border-radius:20px;background:#fff;box-shadow:0 6px 18px rgba(24,43,34,.05)}.journey-brand{display:grid;gap:8px}.journey-brand>span{display:grid;place-items:center;width:82px;height:82px;border-radius:13px;background:#07503a;color:#dfbe70;font:700 1.4rem Georgia,serif}.journey-brand>strong{font:1.15rem Georgia,serif;color:#15374c}.journey-brand.sheets>span{background:#2a9c59;color:white}.journey-steps,.mini-steps,.service-steps,.daily-steps{display:grid;grid-template-columns:repeat(7,auto);align-items:start;justify-content:space-between;gap:3px}.journey-steps button,.mini-steps button,.service-steps button,.daily-steps button{display:grid;place-items:center;align-content:start;width:56px;min-height:83px;border:0;background:transparent;color:#0c513c;font-size:1.45rem}.journey-steps button:before,.mini-steps button:before,.service-steps button:before,.daily-steps button:before{content:"";position:absolute}.journey-steps small,.mini-steps small,.service-steps small,.daily-steps small{display:block;margin-top:8px;color:#23394f;font-size:.66rem;line-height:1.05}.journey-steps i,.mini-steps i,.service-steps i,.daily-steps i{padding-top:22px;color:#c89d3c;font-style:normal;font-size:1.4rem}.assistant-banner{padding:15px;margin-top:14px;border:1px solid #d6e0d2;border-radius:18px;background:linear-gradient(135deg,#f4f8ef,#fbfbf7)}.assistant-banner.dark{background:linear-gradient(135deg,#07503b,#014333);border-color:#c6a657;color:white}.assistant-banner>div:first-child{display:flex;align-items:center;gap:12px}.assistant-banner>div:first-child>span{display:grid;place-items:center;width:54px;height:54px;border-radius:50%;background:#07503b;color:#e0bd69;font-size:1.7rem}.assistant-banner.dark>div:first-child>span{border:1px solid #d7b35f}.assistant-banner h2{margin:0;font:1.55rem Georgia,serif}.assistant-banner p{margin:3px 0 0;color:#d9e5df}.assistant-actions{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:12px}.assistant-actions button{min-height:62px;border:1px solid #d8dfd3;border-radius:11px;background:rgba(255,255,255,.72);color:#124b39;font-weight:800}.assistant-banner.dark .assistant-actions button{border-color:#d0ae5c;background:rgba(5,71,53,.48);color:#fff}.secure-footer,.info-footer{margin-top:10px;padding:11px 12px;border-radius:10px;background:#07503b;color:white;text-align:center;font-size:.78rem}.info-footer{background:#fbfaf5;border:1px solid #e7e1d3;color:#365149}

.mini-card{padding:12px 14px;margin-bottom:11px;border:1px solid #e8e2d9;border-radius:18px;background:white;box-shadow:0 6px 17px rgba(24,43,34,.05)}.mini-title{display:flex;align-items:center;gap:10px;margin-bottom:7px}.mini-title>span{display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:#07503b;color:white}.mini-title>b{font-size:1.2rem;color:#174b37}.mini-title h2{margin:0;font:1.28rem Georgia,serif;color:#15354a}.mini-steps{padding-left:42px}.gmail-mark{color:#d84c3d!important}.service-card{display:grid;grid-template-columns:95px 1fr 20px;gap:10px;align-items:center;padding:12px;margin-bottom:10px;border:1px solid #e9e2d5;border-radius:18px;background:white;box-shadow:0 6px 16px rgba(24,43,34,.045)}.service-brand{display:grid;place-items:center;width:78px;height:72px;border-radius:11px;background:#f2f2ef;color:white;font-weight:900}.service-brand.sncf{background:#8b1b6c}.service-brand.ouigo{background:#1ba8d9}.service-brand.blabla{background:#1a8d83}.service-brand.edf{background:#f36b27}.service-brand.macif{background:#183f86}.service-brand.orange{background:#ff7900}.service-card h2{margin:0 0 5px;font:1.32rem Georgia,serif;color:#133b2e}.service-steps button{width:52px}.service-card>b{color:#c99e40;font-size:1.6rem}

.sub-header.daily{grid-template-columns:42px 1fr auto}.sub-header.daily>div:nth-child(2){text-align:center}.sub-header.daily h1{font-size:2.2rem}.mb-crest{display:grid;place-items:center;width:62px;height:62px;border-radius:50%;background:#07503b;color:#d7b35d;font:1.5rem Georgia,serif;border:1px solid #d7b35d}.mb-crest small{display:block;position:absolute;margin-top:84px;width:100px;color:#23384d;font:normal .62rem sans-serif}.journey-hero.daily-hero{grid-template-columns:72px 1fr 30px}.journey-hero.daily-hero>b{font-size:1.7rem;color:#c6a04b}.daily-card{display:grid;grid-template-columns:88px 1fr 18px;gap:10px;align-items:center;padding:12px;margin-bottom:10px;border:1px solid #e8e2d9;border-radius:18px;background:white;box-shadow:0 6px 16px rgba(24,43,34,.045)}.daily-badge{display:grid;place-items:center;width:78px;height:78px;border-radius:50%;background:#07503b;color:#d7b35d;font-size:2rem;border:1px solid #d7b35d}.daily-card h2{margin:0 0 5px;font:1.25rem Georgia,serif;color:#15354a}.daily-steps button{width:49px}.daily-card>b{font-size:1.6rem;color:#c79d40}.today-counts{text-align:center;color:#315d42}.today-counts b{color:#b98a2f}.daily-assistant{margin-top:12px}

.sncf-actions{padding:22px 16px;margin-bottom:15px;border:1px solid #e7dfd1;border-left:2px solid #caa34c;border-radius:18px;background:white;box-shadow:0 7px 20px rgba(24,43,34,.05)}.sncf-actions h2{margin:0 0 15px;font:1.75rem Georgia,serif;color:#16344d}.sncf-actions>button{display:grid;grid-template-columns:55px 1fr 18px;align-items:center;width:100%;min-height:82px;margin:0 0 10px;padding:0 16px;border:1px solid #e7e3db;border-radius:13px;background:white;box-shadow:0 4px 13px rgba(21,43,34,.04);color:#17334d;text-align:left;font-size:1rem}.sncf-actions>button:first-of-type,.sncf-actions>button:nth-of-type(2),.sncf-actions>button:nth-of-type(3),.sncf-actions>button:nth-of-type(4){font-size:1.6rem;color:#d0a749}.sncf-actions>button span{font-size:1rem;color:#17334d;font-weight:800}.sncf-actions>button b{font-size:1.7rem}.sncf-security{display:grid;grid-template-columns:80px 1fr 58px;gap:12px;align-items:center;padding:16px;margin-bottom:15px;border:1px solid #e5e3dc;border-radius:18px;background:white}.sncf-security>span{display:grid;place-items:center;width:70px;height:70px;border-radius:50%;background:#f3f5ef;color:#0d503b;font-size:2.3rem}.sncf-security h2{margin:0 0 5px;font:1.5rem Georgia,serif}.sncf-security p{margin:4px 0;color:#37534c}.sncf-security>b{font-size:3rem;color:#dfe5dd}.upcoming-card{padding:18px;border:1px solid #e5e2da;border-radius:18px;background:white}.upcoming-card>div:first-child{display:flex;justify-content:space-between}.upcoming-card h2{margin:0;font:1.7rem Georgia,serif}.empty-train{text-align:center;padding:20px 0;color:#7b8983;font-size:2.3rem}.empty-train p{font-size:.95rem}.upcoming-card>button{width:100%;min-height:52px;border:0;border-radius:11px;background:#07503b;color:white;font-weight:800}

.departure-hero{padding:18px;margin-bottom:16px;border-radius:20px;background:linear-gradient(135deg,#07543f,#004b39);color:white;box-shadow:0 10px 24px rgba(5,78,58,.2)}.departure-hero>div{display:flex;align-items:center;gap:12px;margin-bottom:13px}.departure-hero>div span{display:grid;place-items:center;width:55px;height:55px;border:1px solid #d8b45e;border-radius:50%;color:#d8b45e;font-size:1.6rem}.departure-hero h2{margin:0;font:1.7rem Georgia,serif}.departure-hero>button{display:grid;grid-template-columns:35px 1fr;align-items:center;width:100%;min-height:64px;margin-bottom:9px;padding:0 14px;border:1px solid rgba(255,255,255,.22);border-radius:12px;background:rgba(1,64,48,.24);color:#d6d8d2;text-align:left;font:inherit}.departure-hero>button.gold{grid-template-columns:1fr 20px;background:#e6bf68;color:#0d4535;font-weight:900;border:0;text-align:center}.check-title{font-size:1.2rem}.departure-list button{display:grid;grid-template-columns:28px 35px 1fr 18px;align-items:center;width:100%;min-height:68px;margin-bottom:8px;border:1px solid #e7e4de;border-radius:13px;background:white;color:#19354e;text-align:left}.departure-list i{width:22px;height:22px;border:1px solid #cfd4ce;border-radius:50%}.departure-list b{font-size:1.5rem}.mode-low{display:grid;grid-template-columns:48px 1fr auto;gap:10px;align-items:center;margin-top:12px;padding:13px;border:1px solid #d9e3d5;border-radius:15px;background:#f5f9f2}.mode-low>span{display:grid;place-items:center;width:44px;height:44px;border-radius:50%;background:#edf4e8;color:#3f6848;font-size:1.4rem}.mode-low strong,.mode-low small{display:block}.mode-low small{margin-top:3px;color:#6d7671}.mode-low button{min-height:42px;border:0;border-radius:10px;background:#07503b;color:white;padding:0 14px}.mode-low.assistant{background:#fffaf2;border-color:#eee0c4}.mode-low.assistant button{background:#d7a84c}.trust-line{text-align:center;padding:18px 0;color:#6d7774}

.ticket-hero{position:relative;margin:-18px -16px 18px;padding:22px 16px 56px;border-radius:0 0 50% 50%/0 0 18% 18%;background:#071e36;color:white;text-align:center;border-bottom:2px solid #c99c39}.ticket-hero>button{position:absolute;left:20px;top:22px;width:42px;height:42px;border:1px solid #40546a;border-radius:50%;background:transparent;color:#d9b15a;font-size:1.8rem}.ticket-hero>strong{font-size:1.6rem}.ticket-hero h1{margin:14px 0 8px;font:2rem Georgia,serif}.ticket-hero>span{display:inline-block;padding:7px 13px;border:1px solid #d6ad50;border-radius:999px;color:#e4c477}.ticket-hero>i{position:absolute;bottom:-22px;left:calc(50% - 24px);display:grid;place-items:center;width:48px;height:48px;border-radius:0 0 14px 14px;background:#0b3d4c;border:2px solid #c99c39;color:#e3bd5c}.drive-ticket{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:18px;margin-bottom:16px;border:1px solid #e8e3d8;border-radius:18px;background:white;box-shadow:0 7px 19px rgba(24,43,34,.05)}.drive-ticket>div{display:flex;align-items:center;gap:11px}.drive-ticket>div>span{display:grid;place-items:center;width:64px;height:64px;border-radius:50%;background:#f5f6f1;color:#1d7e52;font-size:2rem}.drive-ticket h2{margin:0;font:1.25rem Georgia,serif}.drive-ticket p{margin:3px 0 0;color:#7b837f}.drive-ticket>button{min-height:45px;border:0;border-radius:10px;background:#07503b;color:white;padding:0 15px}.section-label{font-size:1.15rem}.ticket-actions{border:1px solid #e8e4da;border-radius:17px;background:white;overflow:hidden}.ticket-actions button{display:grid;grid-template-columns:44px 1fr 18px;align-items:center;width:100%;min-height:65px;border:0;border-bottom:1px solid #ece9e1;background:white;text-align:left;color:#17344b}.ticket-actions button:last-child{border-bottom:0}.ticket-actions button b{color:#c89b3c;font-size:1.5rem}.ticket-assistant{margin-top:15px;padding:14px;border-radius:17px;background:linear-gradient(135deg,#f4f7ef,#fbfbf7);border:1px solid #dce4d8}.ticket-assistant>div:first-child{display:flex;align-items:center;gap:10px}.ticket-assistant>div:first-child>span{display:grid;place-items:center;width:48px;height:48px;border-radius:50%;background:#07503b;color:#d9b25d}.ticket-assistant h2{margin:0;font:1.25rem Georgia,serif}.ticket-assistant p{margin:3px 0 0;color:#717a76}.ticket-assistant>div:last-child{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:12px}.ticket-assistant button{min-height:58px;border:1px solid #dde1d9;border-radius:10px;background:white;color:#174735}.empty-doc{text-align:center;padding:24px;border:1px solid #e8e4db;border-radius:17px;background:white;color:#9aa2a0}.empty-doc h3{color:#18334a}.empty-doc p{color:#777f7d}

.portal-bottom-nav{display:grid!important;grid-template-columns:repeat(5,1fr)!important;right:0!important;left:0!important;bottom:0!important;border:0!important;border-top:1px solid #e2e4df!important;border-radius:0!important;background:rgba(255,255,255,.98)!important;padding:8px 6px calc(8px + env(safe-area-inset-bottom))!important;box-shadow:0 -8px 24px rgba(18,44,35,.06)!important;z-index:120!important}.portal-bottom-nav button{min-height:56px!important;background:transparent!important;color:#536171!important}.portal-bottom-nav button.active{color:#315f47!important}.portal-bottom-nav .portal-plus{width:62px!important;min-width:62px!important;height:62px!important;margin-top:-27px!important;border-radius:50%!important;background:linear-gradient(145deg,#55795d,#31553b)!important;color:white!important;box-shadow:0 8px 20px rgba(39,79,53,.25)!important}.portal-bottom-nav .portal-plus span{font-size:2rem!important}
@media(max-width:390px){.portal-page{padding-left:11px;padding-right:11px}.mb-duo{grid-template-columns:1fr}.folder-card{min-height:210px}.journey-card{grid-template-columns:95px 1fr;padding:10px}.journey-brand>span{width:70px;height:70px}.journey-steps button,.mini-steps button,.service-steps button,.daily-steps button{width:45px;font-size:1.25rem}.journey-steps small,.mini-steps small,.service-steps small,.daily-steps small{font-size:.58rem}.service-card{grid-template-columns:78px 1fr 16px}.service-brand{width:65px}.daily-card{grid-template-columns:72px 1fr 14px}.daily-badge{width:64px;height:64px}.quick-pills{grid-template-columns:repeat(2,1fr)}}


/* =========================================================
   v6.2 — Adaptation desktop identique à l’interface mobile
   Les données financières, IDs et calculs restent inchangés.
   ========================================================= */
@media (min-width: 981px) {
  body {
    background: linear-gradient(180deg,#fffefa 0%,#f7f6f1 100%) !important;
  }

  .sidebar { display: none !important; }
  .mobile-portal-shell {
    display: block;
    min-height: 100vh;
    padding-bottom: 104px;
    background:
      radial-gradient(circle at 8% 4%, rgba(216,183,101,.10), transparent 25%),
      radial-gradient(circle at 94% 8%, rgba(49,95,71,.08), transparent 23%),
      linear-gradient(180deg,#fffefa 0%,#faf9f4 100%);
  }
  .portal-page {
    width: min(1380px, calc(100% - 64px));
    max-width: 1380px;
    padding: 34px 34px 46px;
  }

  html:not(.portal-finance-open) .page { display: none !important; }
  html.portal-finance-open .mobile-portal-shell { display: none !important; }
  html.portal-finance-open .page {
    display: block !important;
    width: min(1460px, calc(100% - 56px)) !important;
    max-width: 1460px !important;
    margin: 0 auto !important;
    padding: 28px 30px 120px !important;
  }
  html.portal-finance-open .finance-mobile-tabs {
    display: block;
    position: sticky;
    top: 0;
    z-index: 80;
    width: min(920px, calc(100% - 56px));
    margin: 0 auto;
    padding: 12px 14px 10px;
    border: 1px solid #e3e0d7;
    border-top: 0;
    border-radius: 0 0 18px 18px;
    background: rgba(255,254,250,.97);
    box-shadow: 0 8px 24px rgba(22,49,38,.08);
    backdrop-filter: blur(14px);
  }
  .finance-mobile-tabs > div { grid-template-columns: repeat(4,minmax(120px,1fr)); }

  .mb-header {
    grid-template-columns: 1fr auto 48px;
    margin-bottom: 34px;
  }
  .mb-brand { font-size: 1.6rem; }
  .mb-greeting h1 { font-size: clamp(3rem,4.6vw,5rem); margin-bottom: 18px; }
  .mb-mode { max-width: 500px; }

  .portal-page[data-portal-page="home"] {
    display: none;
    grid-template-columns: repeat(12,minmax(0,1fr));
    gap: 18px 20px;
    align-items: start;
  }
  .portal-page[data-portal-page="home"].active { display: grid; }
  .portal-page[data-portal-page="home"] > .mb-header,
  .portal-page[data-portal-page="home"] > .mb-greeting,
  .portal-page[data-portal-page="home"] > .mb-security-strip { grid-column: 1 / -1; }
  .portal-page[data-portal-page="home"] > .mb-essential { grid-column: 1 / span 7; min-height: 330px; }
  .portal-page[data-portal-page="home"] > .mb-ai { grid-column: 8 / -1; min-height: 330px; }
  .portal-page[data-portal-page="home"] > .mb-duo { grid-column: 1 / span 6; margin: 0; align-self: stretch; }
  .portal-page[data-portal-page="home"] > .mb-spaces-preview { grid-column: 7 / -1; }
  .mb-card { padding: 24px; border-radius: 25px; }
  .mb-task { min-height: 74px; }
  .mb-duo { gap: 18px; }
  .mb-feature { min-height: 170px; padding: 20px; }
  .mb-space-grid { grid-template-columns: repeat(3,1fr); gap: 14px; }
  .mb-space-grid button { min-height: 144px; }
  .mb-security-strip { margin-top: 8px; }

  .folder-grid { grid-template-columns: repeat(4,1fr); gap: 18px; }
  .folder-card { min-height: 260px; padding: 22px; }
  .folder-art { width: 140px; height: 98px; margin-top: 14px; }
  .quick-pills { grid-template-columns: repeat(7,minmax(0,1fr)); }

  .journey-list, .mini-list, .service-list, .daily-list {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 16px;
  }
  .journey-card, .mini-card, .service-card, .daily-card { margin-bottom: 0; min-height: 178px; }
  .journey-card { grid-template-columns: 135px 1fr; }
  .journey-brand > span { width: 92px; height: 92px; }
  .journey-steps button, .mini-steps button, .service-steps button, .daily-steps button { width: 58px; }
  .assistant-banner, .secure-footer, .info-footer { margin-top: 18px; }

  .sncf-actions { max-width: 100%; }
  .portal-page[data-portal-page="sncf"] {
    grid-template-columns: minmax(0,1.35fr) minmax(340px,.65fr);
    gap: 18px 22px;
  }
  .portal-page[data-portal-page="sncf"].active { display: grid; }
  .portal-page[data-portal-page="sncf"] > .sub-header { grid-column: 1 / -1; }
  .portal-page[data-portal-page="sncf"] > .sncf-actions { grid-row: span 2; }

  .portal-page[data-portal-page="depart"] { width: min(1120px, calc(100% - 64px)); }
  .portal-page[data-portal-page="tickets"] { width: min(1120px, calc(100% - 64px)); }
  .ticket-hero { margin: -34px -34px 26px; padding: 34px 34px 70px; }

  .portal-bottom-nav {
    position: fixed !important;
    left: 50% !important;
    right: auto !important;
    bottom: 18px !important;
    width: min(720px, calc(100% - 48px)) !important;
    transform: translateX(-50%);
    border: 1px solid #dde2dc !important;
    border-radius: 24px !important;
    padding: 8px 10px !important;
    box-shadow: 0 14px 36px rgba(21,48,37,.16) !important;
  }
  .portal-bottom-nav .portal-plus { margin-top: -28px !important; }

  .mobile-menu-backdrop {
    position: fixed; inset: 0; z-index: 110; display: block; visibility: hidden; opacity: 0;
    background: rgba(5,22,17,.32); backdrop-filter: blur(3px); transition: .2s ease;
  }
  .mobile-menu-backdrop.open { visibility: visible; opacity: 1; }
  .mobile-more-sheet {
    position: fixed; left: 50%; bottom: 102px; z-index: 120; display: block; visibility: hidden;
    width: min(620px, calc(100% - 48px)); max-height: 520px; padding: 10px 18px 20px;
    border: 1px solid #dfe3dc; border-radius: 24px; background: rgba(255,255,255,.99);
    box-shadow: 0 26px 70px rgba(0,0,0,.22); opacity: 0; transform: translate(-50%,22px) scale(.985);
    transition: transform .22s ease,opacity .22s ease,visibility .22s ease;
  }
  .mobile-more-sheet.open { visibility: visible; opacity: 1; transform: translate(-50%,0) scale(1); }
  .mobile-more-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .mobile-more-grid a { min-height: 72px; border: 1px solid #e1e5df; border-radius: 15px; padding: 12px; display: grid; grid-template-columns: 34px 1fr; align-items: center; gap: 10px; color:#17392f; background:#fbfbf8; }
  .mobile-more-grid a > span { display:grid; place-items:center; width:34px; height:34px; border-radius:10px; background:#0a3b2d; color:#fff; }
}

@media (min-width: 981px) and (max-width: 1180px) {
  .portal-page { width: min(1060px, calc(100% - 40px)); padding: 28px 24px 40px; }
  .portal-page[data-portal-page="home"] > .mb-essential,
  .portal-page[data-portal-page="home"] > .mb-ai,
  .portal-page[data-portal-page="home"] > .mb-duo,
  .portal-page[data-portal-page="home"] > .mb-spaces-preview { grid-column: 1 / -1; }
  .folder-grid { grid-template-columns: repeat(2,1fr); }
  .quick-pills { grid-template-columns: repeat(4,1fr); }
  .journey-list, .mini-list, .service-list, .daily-list { grid-template-columns: 1fr; }
}

/* =========================================================
   v6.3 — données live + interactions réelles du portail
   ========================================================= */
.portal-finance-live{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:0 0 16px}
.live-finance-card{appearance:none;border:1px solid rgba(14,73,55,.10);background:rgba(255,255,255,.94);border-radius:20px;padding:15px 16px;text-align:left;box-shadow:0 10px 28px rgba(21,54,43,.07);min-width:0;cursor:pointer;color:#153c31}
.live-finance-card span{display:block;font-size:12px;font-weight:700;color:#66736d;margin-bottom:6px}
.live-finance-card strong{display:block;font-family:Georgia,'Times New Roman',serif;font-size:22px;line-height:1.05;color:#0d4737;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.live-finance-card small{display:block;margin-top:8px;color:#8a7561;font-size:10px}
.live-finance-card.saving{background:linear-gradient(145deg,#fffdf8,#f6f1e4)}
.live-finance-card.income{background:linear-gradient(145deg,#fbfdff,#edf4f8)}
.mb-task.task-done,.daily-steps button.step-done,.departure-list button.step-done{opacity:.64}
.mb-task.task-done>span:nth-of-type(3),.daily-steps button.step-done small,.departure-list button.step-done span{text-decoration:line-through}
.mb-task.task-done .mb-check{background:#0d5a43;border-color:#0d5a43;box-shadow:inset 0 0 0 3px #fff}
.daily-steps button.step-done,.departure-list button.step-done{background:#edf6f1!important;border-color:#b7d3c6!important}
.portal-toast{position:fixed;left:50%;bottom:92px;transform:translate(-50%,18px);z-index:10000;background:#0d4737;color:#fff;border:1px solid rgba(207,176,105,.55);border-radius:999px;padding:10px 16px;font-size:12px;font-weight:700;box-shadow:0 14px 42px rgba(8,35,28,.22);opacity:0;pointer-events:none;transition:.22s ease;max-width:min(90vw,520px);text-align:center}
.portal-toast.show{opacity:1;transform:translate(-50%,0)}
.portal-dialog{border:0;border-radius:24px;padding:0;background:transparent;width:min(92vw,520px)}
.portal-dialog::backdrop{background:rgba(6,24,20,.38);backdrop-filter:blur(3px)}
.portal-dialog form{position:relative;background:#fffdf9;border:1px solid rgba(14,73,55,.12);border-radius:24px;padding:28px;box-shadow:0 30px 80px rgba(7,31,25,.28);color:#163f34}
.portal-dialog-close{position:absolute;right:14px;top:12px;border:0;background:#f1eee7;width:34px;height:34px;border-radius:50%;font-size:22px;color:#244d41;cursor:pointer}
.portal-dialog-icon{display:grid;place-items:center;width:48px;height:48px;border-radius:50%;background:#e7f1ec;color:#0d5a43;font-size:22px;margin-bottom:12px}
.portal-dialog h2{font-family:Georgia,'Times New Roman',serif;font-size:27px;margin:0 0 8px}.portal-dialog p{margin:0 0 18px;color:#69736f;line-height:1.45}.portal-dialog-actions{display:grid;gap:9px}.portal-dialog-actions button{border:1px solid #d7dfda;background:#fff;border-radius:14px;padding:13px 15px;text-align:left;font-weight:700;color:#17483a;cursor:pointer}.portal-dialog-actions button.primary{background:#0d513e;color:white;border-color:#0d513e}
@media (min-width:760px){.portal-finance-live{grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}.live-finance-card{padding:19px 20px}.live-finance-card strong{font-size:25px}}
@media (min-width:1180px){.portal-toast{bottom:32px}.portal-finance-live{margin-bottom:22px}.live-finance-card{min-height:112px}}

/* v6.4 — boutons Administratif & Santé réellement interactifs */
.mini-steps button[data-url],
.mini-steps button[data-action] {
  cursor: pointer;
  touch-action: manipulation;
  position: relative;
  z-index: 2;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.mini-steps button[data-url]:active,
.mini-steps button[data-action]:active {
  transform: translateY(1px) scale(.97);
}
.mini-steps button[data-url]:focus-visible,
.mini-steps button[data-action]:focus-visible {
  outline: 3px solid rgba(201,158,64,.36);
  outline-offset: 3px;
}


/* v6.5 — Assistant Administratif actif + proportions desktop plus proches du mobile */
.admin-assistant .assistant-actions button{cursor:pointer;touch-action:manipulation;transition:transform .12s ease,background .12s ease,box-shadow .12s ease}
.admin-assistant .assistant-actions button:active{transform:translateY(1px) scale(.985)}
.admin-assistant .assistant-actions button:focus-visible{outline:3px solid rgba(216,180,94,.34);outline-offset:3px}
@media (min-width:1181px){
  .portal-page[data-portal-page="admin"] .admin-assistant{max-width:1080px;margin:22px auto 0;padding:18px 20px}
  .portal-page[data-portal-page="admin"] .admin-assistant>div:first-child{justify-content:flex-start}
  .portal-page[data-portal-page="admin"] .admin-assistant .assistant-actions{max-width:920px;margin:14px auto 0;gap:12px}
  .portal-page[data-portal-page="admin"] .admin-assistant .assistant-actions button{min-height:56px;font-size:.92rem}
}

/* =========================================================
   v6.6 — destinations et espaces spécialisés
   ========================================================= */
.mb-private{appearance:none;border:0;font:inherit;cursor:pointer}
.mb-security-strip,.warning-button{width:100%;font:inherit;text-align:left;cursor:pointer}
.security-title-button{appearance:none;width:100%;border:0;background:transparent;padding:0;color:inherit;text-align:left;cursor:pointer}
.warning-button{grid-template-columns:38px 1fr 16px}
.portal-page[data-portal-page="health"] .admin-assistant,
.portal-page[data-portal-page="drivehub"] .assistant-banner,
.portal-page[data-portal-page="maison"] .assistant-banner,
.portal-page[data-portal-page="oska"] .assistant-banner,
.portal-page[data-portal-page="security"] .assistant-banner{margin-top:18px}
@media (min-width:1181px){
  .portal-page[data-portal-page="spaces"] .folder-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .portal-page[data-portal-page="health"] .mini-list,
  .portal-page[data-portal-page="drivehub"] .mini-list,
  .portal-page[data-portal-page="activity"] .mini-list{grid-template-columns:repeat(2,minmax(0,1fr))}
  .portal-page[data-portal-page="maison"] .service-list{grid-template-columns:repeat(3,minmax(0,1fr))}
  .portal-page[data-portal-page="oska"] .daily-list{grid-template-columns:repeat(3,minmax(0,1fr))}
  .portal-page[data-portal-page="security"]{width:min(1040px,calc(100% - 64px))}
}


/* v6.7 — e-Documents : un seul titre de page + import réellement cliquable */
.documents-panel{max-width:980px;margin-inline:auto}.documents-head{align-items:flex-start}.documents-head>div{min-width:0}.documents-head p{margin:5px 0 0;max-width:620px}.document-import-state{display:grid;grid-template-columns:52px 1fr;gap:13px;align-items:center;padding:18px;border:1px dashed #d8d8cf;border-radius:16px;background:#fbfcf8}.document-import-icon{display:grid;place-items:center;width:50px;height:50px;border-radius:50%;background:#eef5eb;color:#18563f;font-size:1.45rem}.document-import-state strong,.document-import-state small{display:block}.document-import-state small{margin-top:4px;color:#727c78}.document-import-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:12px}.document-import-actions button{min-height:44px;border:1px solid #d9d7cc;border-radius:12px;background:#fff;color:#174a37;font-weight:800}.document-import-actions button:first-child{background:#0f573f;color:#fff;border-color:#0f573f}@media(max-width:720px){.documents-head{display:grid;grid-template-columns:1fr}.documents-head .primary-button{width:100%;margin-top:8px}.document-import-actions{grid-template-columns:1fr}.documents-panel{margin-inline:0}}


/* =========================================================
   v6.8 — continuité, accessibilité, e-Documents, mise à jour PWA
   ========================================================= */
.mb-resume{border-color:rgba(190,151,63,.28);background:linear-gradient(135deg,#fffdf8,#f8faf7)}
.mb-resume .mb-card-head{margin-bottom:0}
.session-activity{margin-bottom:18px}
.session-activity-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:14px}
.session-activity-head h2{margin:0;color:#0c2940;font-size:21px}
.session-activity-head p{margin:4px 0 0;color:#6f7773;font-size:13px;line-height:1.45}
.session-activity-list{display:grid;gap:8px}
.session-activity-row,.session-activity-empty{border:1px solid #e8e5de;border-radius:14px;background:#fff;padding:12px 14px}
.session-activity-row{display:flex;align-items:center;gap:11px}
.session-activity-row>span{width:28px;height:28px;border-radius:50%;display:grid;place-items:center;background:#edf6ef;color:#176043;font-weight:900}
.session-activity-row div{display:flex;flex:1;align-items:center;justify-content:space-between;gap:12px}
.session-activity-row strong{font-size:14px;color:#153246}.session-activity-row small,.session-activity-empty{color:#7a817d;font-size:12px}
.document-local-preview{margin-top:14px;padding:14px;border:1px solid #e4e6df;border-radius:16px;background:#fbfcfa;display:flex;align-items:center;gap:14px}
.document-local-preview[hidden]{display:none!important}
.document-local-preview img{width:88px;height:72px;object-fit:cover;border-radius:12px;border:1px solid #e1e3dc;background:#fff}
.document-local-preview>div{display:flex;flex-direction:column;gap:3px}.document-local-preview strong{color:#123b2f}.document-local-preview small{color:#7a817d}
.document-preview-mark{width:72px;height:58px;border-radius:12px;display:grid;place-items:center;background:#eef5f0;color:#0f5f46;font-weight:800;font-size:15px}
.document-next-step{margin-top:10px;padding:12px 14px;border-left:3px solid #c8a34a;background:#fffaf0;border-radius:10px;display:grid;gap:3px;color:#5e5749}
.document-next-step[hidden]{display:none!important}.document-next-step strong{color:#6f581f;font-size:13px}.document-next-step span{font-size:12px;line-height:1.45}
.pwa-update-banner{position:fixed;z-index:1200;left:max(14px,env(safe-area-inset-left));right:max(14px,env(safe-area-inset-right));bottom:calc(84px + env(safe-area-inset-bottom));max-width:760px;margin:auto;padding:12px 14px;border-radius:16px;background:#092f25;color:#fff;box-shadow:0 16px 40px rgba(7,42,32,.28);display:flex;align-items:center;justify-content:space-between;gap:16px}
.pwa-update-banner[hidden]{display:none!important}.pwa-update-banner div{display:grid;gap:2px}.pwa-update-banner strong{font-size:14px}.pwa-update-banner small{font-size:11px;color:#dce9e2}.pwa-update-banner button{min-height:42px;padding:0 16px;border-radius:12px;border:1px solid #d6b55e;background:#fff8e5;color:#153d31;font-weight:800}
button,a,[role="button"]{touch-action:manipulation}
button:focus-visible,a:focus-visible,[tabindex]:focus-visible{outline:3px solid rgba(34,106,167,.35)!important;outline-offset:3px!important}
.mobile-portal-shell button,.mobile-more-sheet button,.mobile-more-sheet a{min-height:44px}
@media (prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}
@media (min-width:901px){.pwa-update-banner{bottom:24px}.session-activity{max-width:980px;margin-left:auto;margin-right:auto}.document-local-preview img{width:108px;height:82px}}


/* =========================================================
   v6.9 — rapprochement bancaire guidé
   ========================================================= */
.bank-reconcile{margin:0 0 18px;padding:18px;border:1px solid #e2dccd;border-radius:22px;background:linear-gradient(145deg,#fffdfa,#f5f7f0);box-shadow:0 8px 24px rgba(19,55,42,.06)}
.bank-reconcile-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:14px}
.bank-reconcile-head h2{margin:4px 0 5px;font:1.55rem Georgia,serif;color:#15374c}
.bank-reconcile-head p{margin:0;max-width:700px;color:#68736f;font-size:.84rem;line-height:1.45}
.reconcile-kicker{display:inline-flex;align-items:center;gap:6px;color:#936f27;font-weight:900;font-size:.72rem;letter-spacing:.06em;text-transform:uppercase}
.reconcile-status{flex:0 0 auto;padding:8px 11px;border:1px solid #e2cf9b;border-radius:999px;background:#fff9e9;color:#76581e;font-weight:900;font-size:.72rem;white-space:nowrap}
.reconcile-status.ready{border-color:#b8d7c6;background:#edf7f0;color:#15573e}
.reconcile-status.validated{border-color:#9cc8ae;background:#e3f3e8;color:#0b5538}
.reconcile-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:12px 0 14px}
.reconcile-summary article{min-width:0;padding:14px;border:1px solid #e8e4d9;border-radius:16px;background:#fff}
.reconcile-summary small,.reconcile-summary span{display:block;color:#78817d;font-size:.68rem;line-height:1.25}
.reconcile-summary strong{display:block;margin:5px 0;color:#103f31;font-size:1.08rem;line-height:1.15;overflow-wrap:anywhere}
.reconcile-flow{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}
.reconcile-flow button{display:grid;grid-template-columns:34px 1fr auto;align-items:center;gap:9px;min-width:0;padding:12px;border:1px solid #e3e0d8;border-radius:15px;background:#fff;color:#163a30;text-align:left;cursor:pointer}
.reconcile-flow button:hover{border-color:#b9cdbf;box-shadow:0 5px 15px rgba(16,67,49,.07)}
.reconcile-flow button:disabled{cursor:not-allowed;opacity:.55;background:#f4f4f1}
.reconcile-flow button>b{display:grid;place-items:center;width:32px;height:32px;border-radius:50%;background:#0c513c;color:#e4c370;font-size:.8rem}
.reconcile-flow button>span{min-width:0}.reconcile-flow button strong,.reconcile-flow button small{display:block}.reconcile-flow button strong{font-size:.78rem}.reconcile-flow button small{margin-top:3px;color:#7b817e;font-size:.62rem;line-height:1.2}
.reconcile-flow button>i{color:#ba8e35;font-style:normal;font-size:1.1rem}
.reconcile-flow button.done{border-color:#b7d1bf;background:#f1f8f3}.reconcile-flow button.done>b{background:#176043;color:#fff}
.reconcile-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.reconcile-actions button{min-height:42px;padding:9px 13px;border:1px solid #d9d8cf;border-radius:12px;background:#fff;color:#164836;font-weight:900;cursor:pointer}
.reconcile-actions .reconcile-primary{border-color:#0e563e;background:#0e563e;color:#fff}
@media(max-width:820px){.bank-reconcile-head{display:grid}.reconcile-status{justify-self:start}.reconcile-summary{grid-template-columns:1fr}.reconcile-flow{grid-template-columns:1fr 1fr}.reconcile-actions{display:grid;grid-template-columns:1fr}.reconcile-actions button{width:100%}}
@media(max-width:480px){.bank-reconcile{padding:14px;border-radius:18px}.reconcile-flow{grid-template-columns:1fr}.bank-reconcile-head h2{font-size:1.3rem}}
@media(min-width:1180px){.bank-reconcile{padding:22px 24px}.reconcile-summary article{padding:17px}.reconcile-flow button{min-height:92px}}


/* =========================================================
   v7.0 — centre À faire unifié
   ========================================================= */
.tasks-hub-hero{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:6px 0 18px;border:1px solid #d9ded8;border-radius:22px;padding:22px 24px;background:linear-gradient(135deg,#fbfaf6,#eef4ef);box-shadow:0 14px 34px rgba(25,56,45,.07)}
.tasks-hub-hero>div{display:flex;align-items:center;gap:16px}.tasks-hub-icon{display:grid;place-items:center;width:54px;height:54px;border-radius:18px;color:#fff;background:#1b5d45;font-size:1.45rem;font-weight:900}.tasks-hub-hero small,.tasks-hub-section-head small{display:block;margin-bottom:4px;color:#8a7650;font-weight:900;letter-spacing:.08em;text-transform:uppercase}.tasks-hub-hero h2{margin:0 0 4px;font-family:Georgia,serif;font-size:1.6rem}.tasks-hub-hero p{margin:0;color:#62706b}.tasks-hub-filter{border-color:#c9d6cf;background:#fff;color:#1a5a44;white-space:nowrap}
.tasks-progress-card{margin-bottom:18px;border:1px solid #dedbd2;border-radius:18px;padding:18px 20px;background:#fff}.tasks-progress-head{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin-bottom:12px}.tasks-progress-head small{display:block;color:#718078;font-weight:800}.tasks-progress-head strong{font-family:Georgia,serif;font-size:1.3rem}.tasks-progress-head>span{color:#1f6f52;font-weight:900}.tasks-progress-track{height:9px;border-radius:999px;overflow:hidden;background:#edf0eb}.tasks-progress-track i{display:block;width:0;height:100%;border-radius:inherit;background:linear-gradient(90deg,#1b5d45,#7b9a79);transition:width .25s ease}
.tasks-hub-section{margin:0 0 20px}.tasks-hub-section-head{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin-bottom:10px}.tasks-hub-section-head h2{margin:0;font-family:Georgia,serif;font-size:1.45rem}.tasks-hub-section-head>span{color:#78847f;font-size:.86rem}.tasks-hub-list{display:grid;gap:10px}.task-hub-item{display:grid;grid-template-columns:52px minmax(0,1fr);gap:10px}.task-hub-check{min-height:72px;border-radius:17px;border:1px solid #d9ded8;color:transparent;background:#fff;font-size:1.1rem}.task-hub-item.done .task-hub-check{color:#fff;border-color:#1f6f52;background:#1f6f52}.task-hub-main{display:grid;grid-template-columns:48px minmax(0,1fr) auto;align-items:center;gap:12px;min-height:72px;border-radius:17px;border:1px solid #dedbd2;padding:10px 16px;text-align:left;background:#fff}.task-hub-symbol{display:grid;place-items:center;width:42px;height:42px;border-radius:14px;color:#1b5d45;background:#eaf2ed;font-size:1.1rem}.task-hub-main strong{display:block;font-size:1rem}.task-hub-main small{display:block;margin-top:3px;color:#748079;font-weight:600}.task-hub-main>b{color:#8a7650;font-size:1.2rem}.task-hub-item.done .task-hub-main{opacity:.68}.task-hub-item.done .task-hub-main strong{text-decoration:line-through;text-decoration-thickness:1px}
.tasks-prep-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.tasks-prep-card{display:grid;grid-template-columns:46px minmax(0,1fr) auto;align-items:center;gap:12px;min-height:92px;border-radius:18px;border:1px solid #dedbd2;padding:14px 16px;text-align:left;background:#fff}.tasks-prep-card>span{display:grid;place-items:center;width:42px;height:42px;border-radius:14px;color:#fff;background:#193c4b}.tasks-prep-card strong{display:block}.tasks-prep-card small{display:block;margin-top:5px;color:#718078;font-weight:650}.tasks-prep-card>b{color:#8a7650}.tasks-done-card{display:flex;align-items:center;gap:14px;margin:8px 0 18px;border:1px solid #e1ded6;border-radius:18px;padding:16px 18px;background:#faf8f2}.tasks-done-card>span{font-size:1.25rem;color:#9b8155}.tasks-done-card strong,.tasks-done-card small{display:block}.tasks-done-card small{margin-top:3px;color:#718078}
@media (max-width:720px){.tasks-hub-hero{align-items:flex-start;padding:18px}.tasks-hub-hero>div{align-items:flex-start}.tasks-hub-filter{min-height:38px;padding:0 10px}.tasks-hub-hero p{font-size:.9rem}.tasks-prep-grid{grid-template-columns:1fr}.tasks-hub-section-head>span{display:none}.task-hub-item{grid-template-columns:46px minmax(0,1fr)}.task-hub-check{min-height:70px}.task-hub-main{grid-template-columns:42px minmax(0,1fr) auto;padding:10px 12px}.task-hub-symbol{width:38px;height:38px}.tasks-progress-card{padding:16px}.tasks-hub-hero h2{font-size:1.35rem}}
@media (prefers-reduced-motion:reduce){.tasks-progress-track i{transition:none}}

/* =========================================================
   v7.1 — ajout rapide unifié + tâches personnelles
   ========================================================= */
.quick-add-grid button{
  width:100%; min-width:0; min-height:72px; border:1px solid #e1e5df; border-radius:15px;
  padding:12px; display:grid; grid-template-columns:38px minmax(0,1fr); align-items:center; gap:11px;
  color:#17392f; background:#fbfbf8; text-align:left; cursor:pointer; font:inherit;
}
.quick-add-grid button:hover,.quick-add-grid button:focus-visible{background:#f3f7f1;border-color:#b9cabc;outline:0;box-shadow:0 0 0 3px rgba(40,91,65,.10)}
.quick-add-grid button>span:first-child{display:grid;place-items:center;width:38px;height:38px;border-radius:11px;background:#0a3b2d;color:#fff;font-weight:900;font-size:1.05rem}
.quick-add-copy{display:block;min-width:0}.quick-add-copy b,.quick-add-copy small{display:block}.quick-add-copy b{font-size:.86rem}.quick-add-copy small{margin-top:3px;color:#6c7772;font-size:.68rem;line-height:1.2}
.tasks-user-section{margin-top:14px}
.quick-task-form{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:9px;margin-top:11px}
.quick-task-form input{min-width:0;min-height:48px;border:1px solid #d9e0da;border-radius:13px;padding:0 14px;background:#fff;color:#183a30;font:inherit;box-shadow:inset 0 1px 0 rgba(255,255,255,.8)}
.quick-task-form input:focus{outline:0;border-color:#6d9279;box-shadow:0 0 0 3px rgba(64,113,80,.12)}
.quick-task-form button{min-height:48px;border:0;border-radius:13px;padding:0 17px;background:#0b513b;color:#fff;font-weight:800;cursor:pointer}
.custom-task-list{display:grid;gap:8px;margin-top:10px}
.custom-task-empty{padding:12px 13px;border:1px dashed #d8dfd8;border-radius:13px;color:#748079;background:#fafbf8;font-size:.78rem}
.custom-task-row{display:grid;grid-template-columns:38px minmax(0,1fr) 38px;gap:9px;align-items:center;padding:8px 9px;border:1px solid #e3e7e2;border-radius:14px;background:#fff}
.custom-task-row.done .custom-task-text{text-decoration:line-through;color:#89928d}
.custom-task-check,.custom-task-delete{width:38px;height:38px;min-height:38px;border:0;border-radius:10px;cursor:pointer;font:inherit;font-weight:900}
.custom-task-check{background:#edf4ef;color:#0a513b}.custom-task-row.done .custom-task-check{background:#0a513b;color:#fff}.custom-task-delete{background:#f8f5ef;color:#7d6d5b}
.custom-task-text{min-width:0;color:#203b33;font-size:.84rem;line-height:1.25;overflow-wrap:anywhere}
.quick-add-flash{animation:quickAddFlash 1.1s ease}
@keyframes quickAddFlash{0%,100%{box-shadow:none}35%{box-shadow:0 0 0 5px rgba(205,169,82,.22)}}
@media(max-width:560px){.quick-add-grid{grid-template-columns:1fr 1fr!important}.quick-add-grid button{grid-template-columns:34px minmax(0,1fr);padding:10px;min-height:78px}.quick-add-grid button>span:first-child{width:34px;height:34px}.quick-add-copy b{font-size:.78rem}.quick-add-copy small{font-size:.62rem}.quick-task-form{grid-template-columns:1fr}.quick-task-form button{width:100%}}

/* =========================================================
   v7.2 — suivi santé structuré
   ========================================================= */
.health-tracker{margin:0 0 18px;padding:20px;border:1px solid #e0ddd3;border-radius:22px;background:linear-gradient(145deg,#fffdfa,#f4f7f3);box-shadow:0 10px 28px rgba(20,54,43,.06)}
.health-tracker-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:14px}.health-kicker{display:inline-block;margin-bottom:4px;color:#9a792f;font-size:.7rem;font-weight:900;letter-spacing:.08em;text-transform:uppercase}.health-tracker-head h2{margin:0 0 5px;font:1.55rem Georgia,serif;color:#15374c}.health-tracker-head p{margin:0;max-width:720px;color:#68736f;font-size:.84rem;line-height:1.45}.health-add-primary{flex:0 0 auto;min-height:44px;padding:0 15px;border:1px solid #0e563e;border-radius:13px;background:#0e563e;color:#fff;font-weight:900;cursor:pointer}
.health-status-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin:12px 0 14px}.health-status-summary button{min-height:70px;border:1px solid #e0e2dc;border-radius:15px;background:#fff;color:#214238;text-align:left;padding:11px 13px;cursor:pointer}.health-status-summary button strong,.health-status-summary button span{display:block}.health-status-summary button strong{font:1.25rem Georgia,serif;color:#154b38}.health-status-summary button span{margin-top:3px;color:#748079;font-size:.72rem;font-weight:800}.health-status-summary button.active{border-color:#9fc3ae;background:#edf6f0;box-shadow:0 0 0 2px rgba(37,104,75,.06)}
.health-quick-add{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin:0 0 14px}.health-quick-add button{display:grid;grid-template-columns:40px minmax(0,1fr);grid-template-rows:auto auto;column-gap:10px;align-items:center;min-height:74px;padding:11px 13px;border:1px solid #e0e3de;border-radius:15px;background:#fff;color:#1b4035;text-align:left;cursor:pointer}.health-quick-add button>span{grid-row:1/3;display:grid;place-items:center;width:40px;height:40px;border-radius:13px;background:#173e4d;color:#fff;font-weight:900}.health-quick-add b{font-size:.82rem}.health-quick-add small{color:#73807a;font-size:.66rem;line-height:1.2}
.health-tracker-form{margin:4px 0 14px;padding:15px;border:1px solid #d8dfd8;border-radius:17px;background:#fff}.health-tracker-form[hidden]{display:none!important}.health-form-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:12px}.health-form-head strong,.health-form-head small{display:block}.health-form-head strong{font:1.08rem Georgia,serif}.health-form-head small{margin-top:3px;color:#758079;font-size:.7rem}.health-form-head>button{width:38px;height:38px;min-height:38px;border:0;border-radius:11px;background:#f5f3ee;color:#6e6558;font-size:1.2rem;cursor:pointer}.health-form-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}.health-form-grid label{display:grid;gap:5px;color:#55655f;font-size:.7rem;font-weight:850}.health-form-grid input,.health-form-grid select{min-width:0;min-height:44px;border:1px solid #d9dfda;border-radius:11px;padding:0 10px;background:#fbfcfa;color:#17392f;font:inherit}.health-form-grid input:focus,.health-form-grid select:focus{outline:0;border-color:#77a08a;box-shadow:0 0 0 3px rgba(44,109,76,.11)}.health-form-actions{display:flex;gap:8px;margin-top:11px}.health-form-actions button{min-height:42px;padding:0 14px;border:1px solid #d8ddd9;border-radius:11px;background:#fff;color:#315146;font-weight:850;cursor:pointer}.health-form-actions .health-save{border-color:#0e563e;background:#0e563e;color:#fff}
.health-tracker-list{display:grid;gap:9px}.health-tracker-empty{padding:14px;border:1px dashed #d8dfd8;border-radius:14px;background:#fafbf8;color:#76817c;font-size:.78rem}.health-track-row{display:grid;grid-template-columns:42px minmax(0,1fr) auto;gap:11px;align-items:center;padding:11px 12px;border:1px solid #e0e4df;border-radius:15px;background:#fff}.health-track-icon{display:grid;place-items:center;width:42px;height:42px;border-radius:13px;background:#edf4ef;color:#0e563e;font-weight:900}.health-track-copy{min-width:0}.health-track-copy strong,.health-track-copy small{display:block}.health-track-copy strong{color:#213e35;font-size:.86rem;overflow-wrap:anywhere}.health-track-copy small{margin-top:3px;color:#78817d;font-size:.66rem}.health-track-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap;justify-content:flex-end}.health-status-btn,.health-open-btn,.health-delete-btn{min-height:36px;border-radius:10px;padding:0 10px;border:1px solid #dce1dd;background:#fff;color:#315146;font-size:.68rem;font-weight:850;cursor:pointer}.health-status-btn.todo{border-color:#e4cf99;background:#fff9e9;color:#76581e}.health-status-btn.waiting{border-color:#bad0df;background:#f0f6fa;color:#285a77}.health-status-btn.done{border-color:#a8ceb8;background:#edf7f0;color:#15573e}.health-delete-btn{width:36px;padding:0;background:#faf6f0;color:#816c58}.health-tracker-note{margin-top:12px;color:#68736f;font-size:.68rem;text-align:center}.health-tracker-note b{color:#b68d37}
@media(max-width:900px){.health-form-grid{grid-template-columns:1fr 1fr}.health-status-summary{grid-template-columns:1fr 1fr}.health-quick-add{grid-template-columns:1fr}.health-track-row{grid-template-columns:42px minmax(0,1fr)}.health-track-actions{grid-column:1/3;justify-content:flex-start;padding-left:53px}}
@media(max-width:560px){.health-tracker{padding:15px;border-radius:18px}.health-tracker-head{display:grid}.health-add-primary{width:100%}.health-form-grid{grid-template-columns:1fr}.health-form-actions{display:grid}.health-form-actions button{width:100%}.health-track-actions{padding-left:0}.health-status-btn{flex:1 1 30%}.health-open-btn{flex:1 1 auto}}


/* =========================================================
   v7.3 — suivi administratif structuré
   ========================================================= */
.admin-tracker{margin:0 0 18px;padding:20px;border:1px solid #dddcd3;border-radius:22px;background:linear-gradient(145deg,#fffdfa,#f7f6f1);box-shadow:0 10px 28px rgba(31,54,49,.06)}
.admin-tracker-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:14px}.admin-kicker{display:inline-block;margin-bottom:4px;color:#9a792f;font-size:.7rem;font-weight:900;letter-spacing:.08em;text-transform:uppercase}.admin-tracker-head h2{margin:0 0 5px;font:1.55rem Georgia,serif;color:#15374c}.admin-tracker-head p{margin:0;max-width:720px;color:#68736f;font-size:.84rem;line-height:1.45}.admin-add-primary{flex:0 0 auto;min-height:44px;padding:0 15px;border:1px solid #153f4f;border-radius:13px;background:#153f4f;color:#fff;font-weight:900;cursor:pointer}
.admin-status-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin:12px 0 14px}.admin-status-summary button{min-height:70px;border:1px solid #e0e2dc;border-radius:15px;background:#fff;color:#214238;text-align:left;padding:11px 13px;cursor:pointer}.admin-status-summary button strong,.admin-status-summary button span{display:block}.admin-status-summary button strong{font:1.25rem Georgia,serif;color:#153f4f}.admin-status-summary button span{margin-top:3px;color:#748079;font-size:.72rem;font-weight:800}.admin-status-summary button.active{border-color:#aabfca;background:#f0f5f7;box-shadow:0 0 0 2px rgba(41,84,103,.06)}
.admin-quick-add{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin-bottom:14px}.admin-quick-add button{display:grid;grid-template-columns:34px minmax(0,1fr);grid-template-rows:auto auto;column-gap:9px;align-items:center;min-height:68px;padding:10px 12px;border:1px solid #dedfd9;border-radius:14px;background:#fff;color:#24443a;text-align:left;cursor:pointer}.admin-quick-add button>span{grid-row:1/3;display:grid;place-items:center;width:34px;height:34px;border-radius:11px;background:#f0f4f5;color:#153f4f;font-weight:900}.admin-quick-add button b{font-size:.78rem}.admin-quick-add button small{color:#7a817e;font-size:.62rem;line-height:1.25}
.admin-tracker-form{margin:4px 0 14px;padding:15px;border:1px solid #d8dfd8;border-radius:17px;background:#fff}.admin-tracker-form[hidden]{display:none!important}.admin-form-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:12px}.admin-form-head strong,.admin-form-head small{display:block}.admin-form-head strong{font:1.08rem Georgia,serif}.admin-form-head small{margin-top:3px;color:#758079;font-size:.7rem}.admin-form-head>button{width:38px;height:38px;min-height:38px;border:0;border-radius:11px;background:#f5f3ee;color:#6e6558;font-size:1.2rem;cursor:pointer}.admin-form-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}.admin-form-grid label{display:grid;gap:5px;color:#55655f;font-size:.7rem;font-weight:850}.admin-form-grid input,.admin-form-grid select{min-width:0;min-height:44px;border:1px solid #d9dfda;border-radius:11px;padding:0 10px;background:#fbfcfa;color:#17392f;font:inherit}.admin-form-grid input:focus,.admin-form-grid select:focus{outline:0;border-color:#7e9eaa;box-shadow:0 0 0 3px rgba(41,84,103,.11)}.admin-form-actions{display:flex;gap:8px;margin-top:11px}.admin-form-actions button{min-height:42px;padding:0 14px;border:1px solid #d8ddd9;border-radius:11px;background:#fff;color:#315146;font-weight:850;cursor:pointer}.admin-form-actions .admin-save{border-color:#153f4f;background:#153f4f;color:#fff}
.admin-tracker-list{display:grid;gap:9px}.admin-tracker-empty{padding:14px;border:1px dashed #d8dfd8;border-radius:14px;background:#fafbf8;color:#76817c;font-size:.78rem}.admin-track-row{display:grid;grid-template-columns:42px minmax(0,1fr) auto;gap:11px;align-items:center;padding:11px 12px;border:1px solid #e0e4df;border-radius:15px;background:#fff}.admin-track-icon{display:grid;place-items:center;width:42px;height:42px;border-radius:13px;background:#eef3f5;color:#153f4f;font-weight:900}.admin-track-copy{min-width:0}.admin-track-copy strong,.admin-track-copy small{display:block}.admin-track-copy strong{color:#213e35;font-size:.86rem;overflow-wrap:anywhere}.admin-track-copy small{margin-top:3px;color:#78817d;font-size:.66rem}.admin-track-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap;justify-content:flex-end}.admin-status-btn,.admin-open-btn,.admin-delete-btn{min-height:36px;border-radius:10px;padding:0 10px;border:1px solid #dce1dd;background:#fff;color:#315146;font-size:.68rem;font-weight:850;cursor:pointer}.admin-status-btn.todo{border-color:#e4cf99;background:#fff9e9;color:#76581e}.admin-status-btn.waiting{border-color:#bad0df;background:#f0f6fa;color:#285a77}.admin-status-btn.done{border-color:#a8ceb8;background:#edf7f0;color:#15573e}.admin-delete-btn{width:36px;padding:0;background:#faf6f0;color:#816c58}.admin-tracker-note{margin-top:12px;color:#68736f;font-size:.68rem;text-align:center}.admin-tracker-note b{color:#b68d37}
@media(max-width:980px){.admin-quick-add{grid-template-columns:1fr 1fr}}
@media(max-width:900px){.admin-form-grid{grid-template-columns:1fr 1fr}.admin-status-summary{grid-template-columns:1fr 1fr}.admin-track-row{grid-template-columns:42px minmax(0,1fr)}.admin-track-actions{grid-column:1/3;justify-content:flex-start;padding-left:53px}}
@media(max-width:560px){.admin-tracker{padding:15px;border-radius:18px}.admin-tracker-head{display:grid}.admin-add-primary{width:100%}.admin-quick-add{grid-template-columns:1fr}.admin-form-grid{grid-template-columns:1fr}.admin-form-actions{display:grid}.admin-form-actions button{width:100%}.admin-track-actions{padding-left:0}.admin-status-btn{flex:1 1 30%}.admin-open-btn{flex:1 1 auto}}


/* =========================================================
   v7.4 — suivi Maison : factures, contrats, interventions, échéances
   ========================================================= */
.house-tracker{margin:0 0 18px;padding:20px;border:1px solid #dddcd3;border-radius:22px;background:linear-gradient(145deg,#fffdfa,#f5f7f2);box-shadow:0 10px 28px rgba(31,54,49,.06)}
.house-tracker-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:14px}.house-kicker{display:inline-block;margin-bottom:4px;color:#9a792f;font-size:.7rem;font-weight:900;letter-spacing:.08em;text-transform:uppercase}.house-tracker-head h2{margin:0 0 5px;font:1.55rem Georgia,serif;color:#15374c}.house-tracker-head p{margin:0;max-width:760px;color:#68736f;font-size:.84rem;line-height:1.45}.house-add-primary{flex:0 0 auto;min-height:44px;padding:0 15px;border:1px solid #315c48;border-radius:13px;background:#315c48;color:#fff;font-weight:900;cursor:pointer}
.house-status-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin:12px 0 14px}.house-status-summary button{min-height:70px;border:1px solid #e0e2dc;border-radius:15px;background:#fff;color:#214238;text-align:left;padding:11px 13px;cursor:pointer}.house-status-summary button strong,.house-status-summary button span{display:block}.house-status-summary button strong{font:1.25rem Georgia,serif;color:#315c48}.house-status-summary button span{margin-top:3px;color:#748079;font-size:.72rem;font-weight:800}.house-status-summary button.active{border-color:#a8c1b2;background:#f0f6f2;box-shadow:0 0 0 2px rgba(49,92,72,.06)}
.house-quick-add{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin-bottom:14px}.house-quick-add button{display:grid;grid-template-columns:36px minmax(0,1fr);grid-template-rows:auto auto;column-gap:9px;align-items:center;min-height:70px;padding:10px 12px;border:1px solid #dedfd9;border-radius:14px;background:#fff;color:#24443a;text-align:left;cursor:pointer}.house-quick-add button>span{grid-row:1/3;display:grid;place-items:center;width:36px;height:36px;border-radius:11px;background:#edf3ee;color:#315c48;font-weight:900}.house-quick-add button b{font-size:.78rem}.house-quick-add button small{color:#7a817e;font-size:.62rem;line-height:1.25}
.house-tracker-form{margin:4px 0 14px;padding:15px;border:1px solid #d8dfd8;border-radius:17px;background:#fff}.house-tracker-form[hidden]{display:none!important}.house-form-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:12px}.house-form-head strong,.house-form-head small{display:block}.house-form-head strong{font:1.08rem Georgia,serif}.house-form-head small{margin-top:3px;color:#758079;font-size:.7rem}.house-form-head>button{width:38px;height:38px;min-height:38px;border:0;border-radius:11px;background:#f5f3ee;color:#6e6558;font-size:1.2rem;cursor:pointer}.house-form-grid{display:grid;grid-template-columns:1fr 1fr 1.35fr 1fr 1fr;gap:9px}.house-form-grid label{display:grid;gap:5px;color:#55655f;font-size:.7rem;font-weight:850}.house-form-grid input,.house-form-grid select{min-width:0;min-height:44px;border:1px solid #d9dfda;border-radius:11px;padding:0 10px;background:#fbfcfa;color:#17392f;font:inherit}.house-form-grid input:focus,.house-form-grid select:focus{outline:0;border-color:#82a28f;box-shadow:0 0 0 3px rgba(49,92,72,.11)}.house-form-actions{display:flex;gap:8px;margin-top:11px}.house-form-actions button{min-height:42px;padding:0 14px;border:1px solid #d8ddd9;border-radius:11px;background:#fff;color:#315146;font-weight:850;cursor:pointer}.house-form-actions .house-save{border-color:#315c48;background:#315c48;color:#fff}
.house-tracker-list{display:grid;gap:9px}.house-tracker-empty{padding:14px;border:1px dashed #d8dfd8;border-radius:14px;background:#fafbf8;color:#76817c;font-size:.78rem}.house-track-row{display:grid;grid-template-columns:42px minmax(0,1fr) auto;gap:11px;align-items:center;padding:11px 12px;border:1px solid #e0e4df;border-radius:15px;background:#fff}.house-track-row.urgent{border-color:#e0bd75;background:#fffaf0}.house-track-icon{display:grid;place-items:center;width:42px;height:42px;border-radius:13px;background:#edf3ee;color:#315c48;font-weight:900}.house-track-copy{min-width:0}.house-track-copy strong,.house-track-copy small{display:block}.house-track-copy strong{color:#213e35;font-size:.86rem;overflow-wrap:anywhere}.house-track-copy small{margin-top:3px;color:#78817d;font-size:.66rem}.house-track-copy small .due{color:#8a641c;font-weight:900}.house-track-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap;justify-content:flex-end}.house-status-btn,.house-open-btn,.house-delete-btn{min-height:36px;border-radius:10px;padding:0 10px;border:1px solid #dce1dd;background:#fff;color:#315146;font-size:.68rem;font-weight:850;cursor:pointer}.house-status-btn.todo{border-color:#e4cf99;background:#fff9e9;color:#76581e}.house-status-btn.waiting{border-color:#bad0df;background:#f0f6fa;color:#285a77}.house-status-btn.done{border-color:#a8ceb8;background:#edf7f0;color:#15573e}.house-delete-btn{width:36px;padding:0;background:#faf6f0;color:#816c58}.house-tracker-note{margin-top:12px;color:#68736f;font-size:.68rem;text-align:center}.house-tracker-note b{color:#b68d37}
@media(max-width:1100px){.house-form-grid{grid-template-columns:1fr 1fr 1fr}.house-quick-add{grid-template-columns:1fr 1fr}}
@media(max-width:900px){.house-form-grid{grid-template-columns:1fr 1fr}.house-status-summary{grid-template-columns:1fr 1fr}.house-track-row{grid-template-columns:42px minmax(0,1fr)}.house-track-actions{grid-column:1/3;justify-content:flex-start;padding-left:53px}}
@media(max-width:560px){.house-tracker{padding:15px;border-radius:18px}.house-tracker-head{display:grid}.house-add-primary{width:100%}.house-quick-add{grid-template-columns:1fr}.house-form-grid{grid-template-columns:1fr}.house-form-actions{display:grid}.house-form-actions button{width:100%}.house-track-actions{padding-left:0}.house-status-btn{flex:1 1 30%}.house-open-btn{flex:1 1 auto}}


/* =========================================================
   v7.5 — suivi Oska : sorties, vétérinaire, documents, dépenses
   ========================================================= */
.oska-tracker{margin:0 0 18px;padding:20px;border:1px solid #dddcd3;border-radius:22px;background:linear-gradient(145deg,#fffdf8,#f3f7f2);box-shadow:0 10px 28px rgba(31,54,49,.06)}
.oska-tracker-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:14px}.oska-kicker{display:inline-block;margin-bottom:4px;color:#9a792f;font-size:.7rem;font-weight:900;letter-spacing:.08em;text-transform:uppercase}.oska-tracker-head h2{margin:0 0 5px;font:1.55rem Georgia,serif;color:#173f36}.oska-tracker-head p{margin:0;max-width:780px;color:#68736f;font-size:.84rem;line-height:1.45}.oska-add-primary{flex:0 0 auto;min-height:44px;padding:0 15px;border:1px solid #315c48;border-radius:13px;background:#315c48;color:#fff;font-weight:900;cursor:pointer}
.oska-status-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin:12px 0 14px}.oska-status-summary button{min-height:70px;border:1px solid #e0e2dc;border-radius:15px;background:#fff;color:#214238;text-align:left;padding:11px 13px;cursor:pointer}.oska-status-summary button strong,.oska-status-summary button span{display:block}.oska-status-summary button strong{font:1.25rem Georgia,serif;color:#315c48}.oska-status-summary button span{margin-top:3px;color:#748079;font-size:.72rem;font-weight:800}.oska-status-summary button.active{border-color:#a8c1b2;background:#f0f6f2;box-shadow:0 0 0 2px rgba(49,92,72,.06)}
.oska-quick-add{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin-bottom:14px}.oska-quick-add button{display:grid;grid-template-columns:36px minmax(0,1fr);grid-template-rows:auto auto;column-gap:9px;align-items:center;min-height:70px;padding:10px 12px;border:1px solid #dedfd9;border-radius:14px;background:#fff;color:#24443a;text-align:left;cursor:pointer}.oska-quick-add button>span{grid-row:1/3;display:grid;place-items:center;width:36px;height:36px;border-radius:11px;background:#edf3ee;color:#315c48;font-weight:900}.oska-quick-add button b{font-size:.78rem}.oska-quick-add button small{color:#7a817e;font-size:.62rem;line-height:1.25}
.oska-tracker-form{margin:4px 0 14px;padding:15px;border:1px solid #d8dfd8;border-radius:17px;background:#fff}.oska-tracker-form[hidden]{display:none!important}.oska-form-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:12px}.oska-form-head strong,.oska-form-head small{display:block}.oska-form-head strong{font:1.08rem Georgia,serif}.oska-form-head small{margin-top:3px;color:#758079;font-size:.7rem}.oska-form-head>button{width:38px;height:38px;min-height:38px;border:0;border-radius:11px;background:#f5f3ee;color:#6e6558;font-size:1.2rem;cursor:pointer}.oska-form-grid{display:grid;grid-template-columns:1fr 1.6fr 1fr 1fr;gap:9px}.oska-form-grid label{display:grid;gap:5px;color:#55655f;font-size:.7rem;font-weight:850}.oska-form-grid input,.oska-form-grid select{min-width:0;min-height:44px;border:1px solid #d9dfda;border-radius:11px;padding:0 10px;background:#fbfcfa;color:#17392f;font:inherit}.oska-form-grid input:focus,.oska-form-grid select:focus{outline:0;border-color:#82a28f;box-shadow:0 0 0 3px rgba(49,92,72,.11)}.oska-form-actions{display:flex;gap:8px;margin-top:11px}.oska-form-actions button{min-height:42px;padding:0 14px;border:1px solid #d8ddd9;border-radius:11px;background:#fff;color:#315146;font-weight:850;cursor:pointer}.oska-form-actions .oska-save{border-color:#315c48;background:#315c48;color:#fff}
.oska-tracker-list{display:grid;gap:9px}.oska-tracker-empty{padding:14px;border:1px dashed #d8dfd8;border-radius:14px;background:#fafbf8;color:#76817c;font-size:.78rem}.oska-track-row{display:grid;grid-template-columns:42px minmax(0,1fr) auto;gap:11px;align-items:center;padding:11px 12px;border:1px solid #e0e4df;border-radius:15px;background:#fff}.oska-track-row.urgent{border-color:#e0bd75;background:#fffaf0}.oska-track-icon{display:grid;place-items:center;width:42px;height:42px;border-radius:13px;background:#edf3ee;color:#315c48;font-weight:900}.oska-track-copy{min-width:0}.oska-track-copy strong,.oska-track-copy small{display:block}.oska-track-copy strong{color:#213e35;font-size:.86rem;overflow-wrap:anywhere}.oska-track-copy small{margin-top:3px;color:#78817d;font-size:.66rem}.oska-track-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap;justify-content:flex-end}.oska-status-btn,.oska-open-btn,.oska-delete-btn{min-height:36px;border-radius:10px;padding:0 10px;border:1px solid #dce1dd;background:#fff;color:#315146;font-size:.68rem;font-weight:850;cursor:pointer}.oska-status-btn.todo{border-color:#e4cf99;background:#fff9e9;color:#76581e}.oska-status-btn.waiting{border-color:#bad0df;background:#f0f6fa;color:#285a77}.oska-status-btn.done{border-color:#a8ceb8;background:#edf7f0;color:#15573e}.oska-delete-btn{width:36px;padding:0;background:#faf6f0;color:#816c58}.oska-tracker-note{margin-top:12px;color:#68736f;font-size:.68rem;text-align:center}.oska-tracker-note b{color:#b68d37}
@media(max-width:1100px){.oska-form-grid{grid-template-columns:1fr 1fr}.oska-quick-add{grid-template-columns:1fr 1fr}}
@media(max-width:900px){.oska-status-summary{grid-template-columns:1fr 1fr}.oska-track-row{grid-template-columns:42px minmax(0,1fr)}.oska-track-actions{grid-column:1/3;justify-content:flex-start;padding-left:53px}}
@media(max-width:560px){.oska-tracker{padding:15px;border-radius:18px}.oska-tracker-head{display:grid}.oska-add-primary{width:100%}.oska-quick-add{grid-template-columns:1fr}.oska-form-grid{grid-template-columns:1fr}.oska-form-actions{display:grid}.oska-form-actions button{width:100%}.oska-track-actions{padding-left:0}.oska-status-btn{flex:1 1 30%}.oska-open-btn{flex:1 1 auto}}

/* =========================================================
   v7.6 — suivi Transport : trajets, billets, remboursements, documents
   ========================================================= */
.transport-tracker{margin:0 0 18px;padding:20px;border:1px solid #dddcd3;border-radius:22px;background:linear-gradient(145deg,#fffdf9,#f3f6f6);box-shadow:0 10px 28px rgba(31,54,49,.06)}
.transport-tracker-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:14px}.transport-kicker{display:inline-block;margin-bottom:4px;color:#9a792f;font-size:.7rem;font-weight:900;letter-spacing:.08em;text-transform:uppercase}.transport-tracker-head h2{margin:0 0 5px;font:1.55rem Georgia,serif;color:#15374c}.transport-tracker-head p{margin:0;max-width:800px;color:#68736f;font-size:.84rem;line-height:1.45}.transport-add-primary{flex:0 0 auto;min-height:44px;padding:0 15px;border:1px solid #153f4f;border-radius:13px;background:#153f4f;color:#fff;font-weight:900;cursor:pointer}
.transport-status-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin:12px 0 14px}.transport-status-summary button{min-height:70px;border:1px solid #e0e2dc;border-radius:15px;background:#fff;color:#214238;text-align:left;padding:11px 13px;cursor:pointer}.transport-status-summary button strong,.transport-status-summary button span{display:block}.transport-status-summary button strong{font:1.25rem Georgia,serif;color:#153f4f}.transport-status-summary button span{margin-top:3px;color:#748079;font-size:.72rem;font-weight:800}.transport-status-summary button.active{border-color:#aabfca;background:#f0f5f7;box-shadow:0 0 0 2px rgba(41,84,103,.06)}
.transport-quick-add{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin-bottom:14px}.transport-quick-add button{display:grid;grid-template-columns:36px minmax(0,1fr);grid-template-rows:auto auto;column-gap:9px;align-items:center;min-height:70px;padding:10px 12px;border:1px solid #dedfd9;border-radius:14px;background:#fff;color:#24443a;text-align:left;cursor:pointer}.transport-quick-add button>span{grid-row:1/3;display:grid;place-items:center;width:36px;height:36px;border-radius:11px;background:#eef3f5;color:#153f4f;font-weight:900}.transport-quick-add button b{font-size:.78rem}.transport-quick-add button small{color:#7a817e;font-size:.62rem;line-height:1.25}
.transport-tracker-form{margin:4px 0 14px;padding:15px;border:1px solid #d8dfd8;border-radius:17px;background:#fff}.transport-tracker-form[hidden]{display:none!important}.transport-form-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:12px}.transport-form-head strong,.transport-form-head small{display:block}.transport-form-head strong{font:1.08rem Georgia,serif}.transport-form-head small{margin-top:3px;color:#758079;font-size:.7rem}.transport-form-head>button{width:38px;height:38px;min-height:38px;border:0;border-radius:11px;background:#f5f3ee;color:#6e6558;font-size:1.2rem;cursor:pointer}.transport-form-grid{display:grid;grid-template-columns:1fr 1fr 1.35fr 1fr 1fr;gap:9px}.transport-form-grid label{display:grid;gap:5px;color:#55655f;font-size:.7rem;font-weight:850}.transport-form-grid input,.transport-form-grid select{min-width:0;min-height:44px;border:1px solid #d9dfda;border-radius:11px;padding:0 10px;background:#fbfcfa;color:#17392f;font:inherit}.transport-form-grid input:focus,.transport-form-grid select:focus{outline:0;border-color:#7e9eaa;box-shadow:0 0 0 3px rgba(41,84,103,.11)}.transport-form-actions{display:flex;gap:8px;margin-top:11px}.transport-form-actions button{min-height:42px;padding:0 14px;border:1px solid #d8ddd9;border-radius:11px;background:#fff;color:#315146;font-weight:850;cursor:pointer}.transport-form-actions .transport-save{border-color:#153f4f;background:#153f4f;color:#fff}
.transport-tracker-list{display:grid;gap:9px}.transport-tracker-empty{padding:14px;border:1px dashed #d8dfd8;border-radius:14px;background:#fafbf8;color:#76817c;font-size:.78rem}.transport-track-row{display:grid;grid-template-columns:42px minmax(0,1fr) auto;gap:11px;align-items:center;padding:11px 12px;border:1px solid #e0e4df;border-radius:15px;background:#fff}.transport-track-row.urgent{border-color:#e0bd75;background:#fffaf0}.transport-track-icon{display:grid;place-items:center;width:42px;height:42px;border-radius:13px;background:#eef3f5;color:#153f4f;font-weight:900}.transport-track-copy{min-width:0}.transport-track-copy strong,.transport-track-copy small{display:block}.transport-track-copy strong{color:#213e35;font-size:.86rem;overflow-wrap:anywhere}.transport-track-copy small{margin-top:3px;color:#78817d;font-size:.66rem}.transport-track-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap;justify-content:flex-end}.transport-status-btn,.transport-open-btn,.transport-delete-btn{min-height:36px;border-radius:10px;padding:0 10px;border:1px solid #dce1dd;background:#fff;color:#315146;font-size:.68rem;font-weight:850;cursor:pointer}.transport-status-btn.todo{border-color:#e4cf99;background:#fff9e9;color:#76581e}.transport-status-btn.waiting{border-color:#bad0df;background:#f0f6fa;color:#285a77}.transport-status-btn.done{border-color:#a8ceb8;background:#edf7f0;color:#15573e}.transport-delete-btn{width:36px;padding:0;background:#faf6f0;color:#816c58}.transport-tracker-note{margin-top:12px;color:#68736f;font-size:.68rem;text-align:center}.transport-tracker-note b{color:#b68d37}
@media(max-width:1100px){.transport-form-grid{grid-template-columns:1fr 1fr 1fr}.transport-quick-add{grid-template-columns:1fr 1fr}}
@media(max-width:900px){.transport-form-grid{grid-template-columns:1fr 1fr}.transport-status-summary{grid-template-columns:1fr 1fr}.transport-track-row{grid-template-columns:42px minmax(0,1fr)}.transport-track-actions{grid-column:1/3;justify-content:flex-start;padding-left:53px}}
@media(max-width:560px){.transport-tracker{padding:15px;border-radius:18px}.transport-tracker-head{display:grid}.transport-add-primary{width:100%}.transport-quick-add{grid-template-columns:1fr}.transport-form-grid{grid-template-columns:1fr}.transport-form-actions{display:grid}.transport-form-actions button{width:100%}.transport-track-actions{padding-left:0}.transport-status-btn{flex:1 1 30%}.transport-open-btn{flex:1 1 auto}}


/* =========================================================
   v7.7 — pilotage global consolidé
   ========================================================= */
.pilot-folder-card{border-color:#d8c79f;background:linear-gradient(145deg,#fffdf7 0%,#f7f1e2 100%)}
.global-pilot{margin:0 0 20px}
.global-pilot-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin:2px 0 14px}
.global-pilot-head h2{margin:2px 0 4px;color:#102f3f;font-size:24px;line-height:1.1}
.global-pilot-head p{margin:0;max-width:720px;color:#6b7470;font-size:13px;line-height:1.5}
.pilot-kicker{display:block;color:#8a6a27;font-size:11px;font-weight:900;text-transform:uppercase;letter-spacing:.11em}
.global-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:14px}
.global-summary-card{appearance:none;border:1px solid #e5e1d7;background:#fff;border-radius:18px;padding:15px 16px;text-align:left;cursor:pointer;box-shadow:0 8px 24px rgba(16,47,63,.06);transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease}
.global-summary-card:hover{transform:translateY(-1px);box-shadow:0 11px 28px rgba(16,47,63,.09)}
.global-summary-card.active{border-color:#b69a5b;box-shadow:0 0 0 2px rgba(182,154,91,.12),0 10px 28px rgba(16,47,63,.08)}
.global-summary-card small{display:block;color:#66736d;font-size:12px;font-weight:800}
.global-summary-card strong{display:block;margin:4px 0 3px;color:#12384a;font-size:34px;line-height:1}
.global-summary-card span{display:block;color:#818784;font-size:11px;line-height:1.35}
.global-summary-card.todo strong{color:#9b5c20}.global-summary-card.waiting strong{color:#315c77}.global-summary-card.done strong{color:#28634b}
.global-space-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:14px}
.global-space-card{appearance:none;display:grid;grid-template-columns:40px 1fr auto;align-items:center;gap:10px;width:100%;border:1px solid #e7e3da;background:#fff;border-radius:16px;padding:12px 13px;text-align:left;cursor:pointer}
.global-space-card:hover{border-color:#cbbd98;background:#fffdf8}.global-space-card>span{width:38px;height:38px;border-radius:13px;background:#eef5f0;color:#174c39;display:grid;place-items:center;font-size:18px;font-weight:900}
.global-space-card div{min-width:0}.global-space-card strong{display:block;color:#18374a;font-size:14px}.global-space-card small{display:block;margin-top:2px;color:#747c78;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.global-space-card>b{color:#9b8249;font-size:17px}
.global-space-card.has-priority{border-color:#e5cfaa}.global-space-card.has-waiting>span{background:#edf3f7;color:#315c77}.global-space-card.is-clear>span{background:#edf6ef;color:#28634b}
.global-priority-card{padding:18px;margin-bottom:12px}
.global-list-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:12px}.global-list-head h2{margin:0;color:#102f3f;font-size:20px}.global-list-head p{margin:3px 0 0;color:#7a817d;font-size:12px}.global-all-btn{border:1px solid #d9d4c9;background:#fff;border-radius:999px;padding:8px 12px;color:#244758;font-weight:800;cursor:pointer}.global-all-btn[aria-pressed="true"]{background:#123f31;color:#fff;border-color:#123f31}
.global-priority-list{display:grid;gap:8px}.global-item,.global-empty{border:1px solid #ebe7df;border-radius:15px;background:#fff;padding:12px 13px}.global-item{display:grid;grid-template-columns:34px minmax(0,1fr) auto;align-items:center;gap:10px}.global-item-icon{width:32px;height:32px;border-radius:11px;display:grid;place-items:center;background:#eef5f0;color:#174c39;font-weight:900}.global-item-copy{min-width:0}.global-item-copy strong{display:block;color:#153649;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.global-item-copy small{display:block;margin-top:2px;color:#7a817d;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.global-item-open{border:0;background:#f3f0e8;border-radius:10px;padding:8px 10px;color:#6e5a2f;font-weight:900;cursor:pointer}.global-item.urgent{border-color:#e6bf8d;background:#fffaf2}.global-item.waiting .global-item-icon{background:#edf3f7;color:#315c77}.global-item.done .global-item-icon{background:#edf6ef;color:#28634b}.global-empty{color:#7b817e;font-size:12px;text-align:center;padding:18px}
.global-privacy-note{border:1px solid #e5e0d5;background:#faf8f2;border-radius:14px;padding:10px 12px;color:#69736e;font-size:11px;line-height:1.45}
@media (max-width:720px){.global-pilot-head{display:block}.global-pilot-head .mb-outline{margin-top:10px}.global-summary{grid-template-columns:1fr}.global-space-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.global-item{grid-template-columns:32px minmax(0,1fr) auto}.global-summary-card strong{font-size:30px}}
@media (max-width:390px){.global-space-grid{grid-template-columns:1fr}}
@media (prefers-reduced-motion:reduce){.global-summary-card{transition:none}.global-summary-card:hover{transform:none}}

/* =========================================================
   v7.8 — accueil intelligent : 3 priorités maximum
   ========================================================= */
.mb-smart-priority{position:relative;overflow:hidden}
.mb-smart-priority::after{content:"";position:absolute;right:-54px;top:-62px;width:170px;height:170px;border-radius:50%;background:radial-gradient(circle,rgba(185,160,96,.10),rgba(185,160,96,0) 70%);pointer-events:none}
.home-smart-head{align-items:flex-start;margin-bottom:14px}
.home-smart-head>div>div{min-width:0}
.home-smart-head p{font-size:12px;line-height:1.45;max-width:480px}
.home-smart-list{display:grid;gap:9px;position:relative;z-index:1}
.home-smart-item{appearance:none;display:grid;grid-template-columns:42px minmax(0,1fr) auto;align-items:center;gap:11px;width:100%;min-height:68px;border:1px solid #e6e4dc;border-radius:16px;background:#fff;padding:11px 12px;text-align:left;cursor:pointer;color:#173b30;transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease}
.home-smart-item:hover{transform:translateY(-1px);border-color:#cfc3a6;box-shadow:0 8px 20px rgba(17,52,41,.07)}
.home-smart-item.urgent{border-color:#e4bd8c;background:linear-gradient(90deg,#fffaf2,#fff)}
.home-smart-item.waiting{background:linear-gradient(90deg,#f7fbfd,#fff)}
.home-smart-icon{display:grid;place-items:center;width:40px;height:40px;border-radius:13px;background:#eef5f0;color:#17513c;font-size:18px;font-weight:900}
.home-smart-item.urgent .home-smart-icon{background:#fff0da;color:#8c531f}
.home-smart-item.waiting .home-smart-icon{background:#edf3f7;color:#315c77}
.home-smart-copy{min-width:0}
.home-smart-copy strong{display:block;color:#17384b;font-size:13px;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.home-smart-copy small{display:block;margin-top:4px;color:#777f7b;font-size:11px;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.home-smart-open{display:grid;place-items:center;min-width:58px;min-height:34px;border:0;border-radius:10px;background:#f2efe7;color:#705c31;font-size:11px;font-weight:900}
.home-smart-empty{border:1px dashed #dcd8cc;border-radius:16px;padding:20px 14px;text-align:center;color:#6f7874;background:#fbfcf8;font-size:12px;line-height:1.5}
.home-smart-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:12px;padding-top:10px;border-top:1px solid #eeece6;color:#7a827e;font-size:10px}
.home-smart-foot button{border:0;background:transparent;color:#456953;font-weight:900;cursor:pointer;padding:7px 4px}
@media (min-width:1181px){
  .portal-page[data-portal-page="home"] > .portal-finance-live,
  .portal-page[data-portal-page="home"] > .mb-resume{grid-column:1/-1}
  .portal-page[data-portal-page="home"] > .mb-smart-priority{grid-column:1/span 7;min-height:330px}
}
@media (min-width:981px) and (max-width:1180px){
  .portal-page[data-portal-page="home"] > .portal-finance-live,
  .portal-page[data-portal-page="home"] > .mb-resume,
  .portal-page[data-portal-page="home"] > .mb-smart-priority{grid-column:1/-1}
}
@media (max-width:720px){
  .home-smart-head{display:flex}.home-smart-head .mb-outline{padding-inline:11px;white-space:nowrap}
  .home-smart-item{grid-template-columns:38px minmax(0,1fr) auto;min-height:64px;padding:10px}
  .home-smart-icon{width:36px;height:36px;border-radius:12px;font-size:16px}
  .home-smart-open{min-width:48px;padding:0 7px}
}
@media (max-width:390px){.home-smart-head .mb-outline{font-size:11px;padding-inline:9px}.home-smart-copy small{white-space:normal}.home-smart-item{align-items:start}}
@media (prefers-reduced-motion:reduce){.home-smart-item{transition:none}.home-smart-item:hover{transform:none}}


/* =========================================================
   v7.9 — centre de notifications interne
   ========================================================= */
.mb-header{grid-template-columns:1fr auto 42px 42px}
.mb-notification-btn{position:relative;width:40px;height:40px;border:1px solid #d9d5c9;border-radius:50%;background:#fff;color:#24493a;font-size:1.05rem;cursor:pointer}
.mb-notification-btn.has-alerts{border-color:#d6b66d;background:#fffaf0;color:#7a5a18}
.mb-notification-btn b{position:absolute;right:-5px;top:-6px;min-width:19px;height:19px;padding:0 5px;border:2px solid #fff;border-radius:999px;background:#9a6823;color:#fff;font:800 10px/15px system-ui,sans-serif;text-align:center}
.mb-notification-btn b[hidden]{display:none!important}
.notification-hero{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:14px;padding:18px;border:1px solid #e4dfd4;border-radius:20px;background:linear-gradient(135deg,#fffdf7,#f7f4ea);box-shadow:0 7px 22px rgba(24,43,34,.05)}
.notification-hero>div{display:flex;align-items:center;gap:13px;min-width:0}.notification-hero-icon{display:grid;place-items:center;flex:0 0 54px;width:54px;height:54px;border:1px solid #d9bd7e;border-radius:17px;background:#fff;color:#7a5a18;font-size:1.4rem}.notification-hero small,.notification-hero h2,.notification-hero p{display:block;margin:0}.notification-hero small{color:#7a806f;font-size:.68rem;font-weight:900;text-transform:uppercase;letter-spacing:.08em}.notification-hero h2{margin-top:3px;color:#173a2f;font:1.45rem Georgia,serif}.notification-hero p{margin-top:5px;color:#6f7771;font-size:.78rem;line-height:1.4}.notification-hero>.mb-outline{flex:0 0 auto}
.notification-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin-bottom:14px}.notification-summary-card{min-height:84px;border:1px solid #e2ded6;border-radius:16px;background:#fff;padding:12px;text-align:left;color:#214238;cursor:pointer}.notification-summary-card small,.notification-summary-card strong,.notification-summary-card span{display:block}.notification-summary-card small{font-size:.66rem;font-weight:900;color:#768078;text-transform:uppercase;letter-spacing:.05em}.notification-summary-card strong{margin-top:4px;font:1.55rem Georgia,serif;color:#173b2f}.notification-summary-card span{margin-top:3px;color:#7a817c;font-size:.67rem}.notification-summary-card.active{box-shadow:0 0 0 2px rgba(48,84,66,.07)}.notification-summary-card.urgent.active{border-color:#dfb576;background:#fff9ef}.notification-summary-card.soon.active{border-color:#cfc49b;background:#fffdf5}.notification-summary-card.waiting.active{border-color:#b7cedb;background:#f4f8fa}
.notification-center-card{margin-bottom:14px}.notification-list-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:12px}.notification-list-head h2{margin:0;color:#102f3f;font-size:20px}.notification-list-head p{margin:3px 0 0;color:#7a817d;font-size:12px}.notification-list{display:grid;gap:8px}.notification-row,.notification-empty{border:1px solid #ebe7df;border-radius:15px;background:#fff;padding:12px 13px}.notification-row{display:grid;grid-template-columns:36px minmax(0,1fr) auto;align-items:center;gap:10px}.notification-row.urgent{border-color:#e6bd85;background:#fffaf2}.notification-row.soon{border-color:#e5dcc2;background:#fffdf8}.notification-row.waiting{border-color:#d7e2e8;background:#f8fbfc}.notification-row-icon{display:grid;place-items:center;width:34px;height:34px;border-radius:11px;background:#eef4ef;color:#174c39;font-weight:900}.notification-row.waiting .notification-row-icon{background:#edf3f7;color:#315c77}.notification-row-copy{min-width:0}.notification-row-copy strong{display:block;color:#153649;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.notification-row-copy small{display:block;margin-top:3px;color:#7a817d;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.notification-open{border:0;background:#f3f0e8;border-radius:10px;padding:8px 10px;color:#6e5a2f;font-weight:900;cursor:pointer}.notification-empty{color:#7b817e;font-size:12px;text-align:center;padding:18px}.notification-privacy-note{margin:12px 0 2px;padding:11px 13px;border:1px solid #e8e4dc;border-radius:14px;background:#faf9f5;color:#6e7671;font-size:.68rem;line-height:1.4}
@media (max-width:640px){.mb-header{grid-template-columns:1fr 42px 42px}.mb-private{display:none}.notification-hero{align-items:flex-start;flex-direction:column}.notification-summary{grid-template-columns:1fr}.notification-row{grid-template-columns:36px minmax(0,1fr)}.notification-open{grid-column:2;justify-self:start}.notification-row-copy strong,.notification-row-copy small{white-space:normal}}
@media (min-width:900px){.mb-header{grid-template-columns:1fr auto 48px 48px}.mb-notification-btn{width:44px;height:44px}.portal-page[data-portal-page="notifications"].active{max-width:980px;margin:0 auto}.notification-summary{gap:14px}.notification-summary-card{min-height:98px}.notification-center-card{padding:22px}}


/* =========================================================
   v8.0 — programme de demain structuré
   ========================================================= */
.tomorrow-planner{margin:0 0 18px;padding:18px;border:1px solid #dfddd4;border-radius:20px;background:linear-gradient(180deg,#fff,#fbfaf6);box-shadow:0 8px 24px rgba(25,45,34,.055)}
.tomorrow-planner-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:14px}.tomorrow-planner-head>div{display:flex;gap:12px;align-items:flex-start}.tomorrow-planner-icon{display:grid;place-items:center;flex:0 0 46px;width:46px;height:46px;border-radius:50%;background:#eef4ec;color:#215941;font-size:1.45rem}.tomorrow-planner-head small{display:block;color:#7a817c;font-weight:850;text-transform:capitalize}.tomorrow-planner-head h2{margin:2px 0 4px;font:1.42rem Georgia,serif;color:#173f30}.tomorrow-planner-head p{margin:0;color:#68736e;font-size:.84rem}.tomorrow-plan-state{flex:0 0 auto;padding:7px 10px;border-radius:999px;background:#f5f0e5;color:#8a6a25;font-size:.7rem;font-weight:900}.tomorrow-plan-state.ready{background:#e8f2eb;color:#225e45}
.tomorrow-plan-grid{display:grid;grid-template-columns:2fr 1fr;gap:10px}.tomorrow-plan-grid label{display:grid;gap:5px;color:#52635c;font-size:.72rem;font-weight:850}.tomorrow-plan-grid .tomorrow-plan-wide{grid-column:span 1}.tomorrow-plan-grid input,.tomorrow-plan-grid select{width:100%;min-width:0;min-height:44px;padding:0 11px;border:1px solid #d8ddd8;border-radius:11px;background:#fff;color:#17392f;font:inherit}.tomorrow-plan-grid input:focus,.tomorrow-plan-grid select:focus{outline:0;border-color:#7d9e89;box-shadow:0 0 0 3px rgba(49,92,72,.1)}
.tomorrow-plan-actions{display:grid;grid-template-columns:auto 1fr auto auto;gap:8px;align-items:center;margin-top:12px}.tomorrow-plan-actions button{min-height:42px;padding:0 13px;border:1px solid #d8ddd9;border-radius:11px;background:#fff;color:#315146;font-weight:850;cursor:pointer}.tomorrow-plan-actions .tomorrow-plan-save{border-color:#174f3b;background:#174f3b;color:#fff}
.tomorrow-plan-summary{padding:14px;border:1px solid #dfe5df;border-radius:16px;background:#fff}.tomorrow-plan-summary>div:first-child small{display:block;color:#77817c;font-size:.68rem;font-weight:850;text-transform:uppercase;letter-spacing:.04em}.tomorrow-plan-summary>div:first-child strong{display:block;margin:3px 0 4px;font:1.28rem Georgia,serif;color:#173f30}.tomorrow-plan-summary>div:first-child span{color:#65706b;font-size:.82rem}.tomorrow-plan-summary ol{display:grid;gap:8px;margin:13px 0;padding:0;list-style:none}.tomorrow-plan-summary li{display:grid;grid-template-columns:28px 1fr;gap:9px;align-items:center}.tomorrow-plan-summary li b{display:grid;place-items:center;width:26px;height:26px;border-radius:50%;background:#eef4ec;color:#245c45;font-size:.72rem}.tomorrow-plan-summary li span{color:#344d43;font-size:.86rem}.tomorrow-plan-summary-foot{display:flex;align-items:center;justify-content:space-between;gap:10px;padding-top:10px;border-top:1px solid #eceae4;color:#65726c;font-size:.76rem;font-weight:800}.tomorrow-plan-summary-foot button{min-height:36px;padding:0 11px;border:1px solid #d8ddd9;border-radius:10px;background:#fff;color:#315146;font-weight:850}
.tomorrow-plan-note{margin-top:10px;color:#7a817d;font-size:.67rem}
@media(max-width:700px){.tomorrow-plan-grid{grid-template-columns:1fr}.tomorrow-plan-grid .tomorrow-plan-wide{grid-column:auto}.tomorrow-plan-actions{grid-template-columns:1fr 1fr}.tomorrow-plan-actions span{display:none}.tomorrow-plan-actions button{width:100%}.tomorrow-planner-head{align-items:flex-start}.tomorrow-planner-head p{font-size:.78rem}}
@media(max-width:420px){.tomorrow-planner{padding:15px}.tomorrow-planner-head{display:grid;grid-template-columns:1fr auto}.tomorrow-planner-head>div{gap:9px}.tomorrow-planner-icon{width:40px;height:40px;flex-basis:40px}.tomorrow-planner-head h2{font-size:1.2rem}.tomorrow-plan-actions{grid-template-columns:1fr}}
