/* ============================================================
   BUDGETCLAIR — ACCUEIL PUBLIC
   Référence desktop : 1920 x 1200
   Règle projet : aucun texte sous 16 px
   ============================================================ */

.welcome-scroll {
  overflow: hidden;
}

.welcome-page {
  width: min(1760px, calc(100% - 80px));
  height: 100%;
  min-height: 0;
  margin: 0 auto;
  display: grid;
  grid-template-rows: 350px minmax(0, 1fr);
  gap: 22px;
  padding: 28px 0 20px;
}

/* ---------- Intro ---------- */
.welcome-intro {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(520px, 0.55fr);
  align-items: center;
  gap: 96px;
}

.welcome-intro-copy {
  max-width: 930px;
}

.welcome-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  color: #8fdaff;
  font-size: 16px;
  font-weight: 750;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.welcome-eyebrow .material-symbols-outlined {
  color: #9de24e;
  font-size: 22px;
}

.welcome-intro h1 {
  margin: 0;
  color: #f5fbff;
  font-size: clamp(56px, 3.7vw, 72px);
  font-weight: 520;
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.welcome-intro h1 span {
  color: #9de24e;
}

.welcome-lead {
  max-width: 900px;
  margin: 24px 0 0;
  color: #a6c1cd;
  font-size: 18px;
  line-height: 1.65;
}

.welcome-actions {
  display: flex;
  align-items: center;
  margin-top: 28px;
}

.welcome-signup-reminder {
  margin: 0;
  color: #7999a8;
  font-size: 16px;
}

.welcome-signup-reminder a {
  margin-left: 6px;
  color: #d7edf5;
  font-weight: 700;
  text-underline-offset: 4px;
}

.welcome-promises {
  display: grid;
  align-self: center;
}

.welcome-promises > div {
  display: grid;
  grid-template-columns: 48px 1fr;
  grid-template-rows: auto auto;
  column-gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid rgba(133,203,228,0.11);
}

.welcome-promises > div:last-child {
  border-bottom: 0;
}

.welcome-promises .material-symbols-outlined {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  grid-row: 1 / 3;
  border: 1px solid rgba(157,226,78,0.18);
  border-radius: 11px;
  color: #9de24e;
  background: rgba(157,226,78,0.055);
  font-size: 24px;
}

.welcome-promises strong {
  color: #dcecf2;
  font-size: 17px;
}

.welcome-promises small {
  margin-top: 5px;
  color: #829eab;
  font-size: 16px;
  line-height: 1.4;
}

/* ---------- Bandeau modules ---------- */
.module-showcase {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 16px;
  padding-top: 18px;
  border-top: 1px solid rgba(135,207,236,0.15);
}

.module-showcase-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
}

.module-showcase-kicker {
  color: #81bdd3;
  font-size: 16px;
  font-weight: 750;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}

.module-showcase h2 {
  margin: 6px 0 0;
  color: #eaf5f9;
  font-size: 28px;
  font-weight: 680;
  letter-spacing: -0.02em;
}

.module-showcase-header p {
  margin: 6px 0 0;
  color: #7995a3;
  font-size: 16px;
}

.module-carousel-controls {
  display: flex;
  gap: 10px;
}

.module-arrow {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(119,196,229,0.28);
  border-radius: 50%;
  color: #dff6ff;
  background: rgba(4,42,61,0.62);
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.module-arrow:hover {
  color: #adf05f;
  border-color: rgba(157,226,78,0.52);
  background: rgba(7,57,75,0.90);
  box-shadow: 0 0 18px rgba(56,195,174,0.12);
}

.module-arrow:focus-visible,
.module-carousel:focus-visible {
  outline: 2px solid #8ddf55;
  outline-offset: 3px;
}

.module-arrow .material-symbols-outlined {
  font-size: 24px;
}

.module-carousel {
  min-width: 0;
  overflow: hidden;
  border-radius: 18px;
  mask-image: linear-gradient(90deg, transparent 0, #000 28px, #000 calc(100% - 28px), transparent 100%);
}

.module-track {
  height: 100%;
  display: flex;
  align-items: stretch;
  gap: 20px;
  width: max-content;
  padding: 4px 30px 10px;
  will-change: transform;
  transform: translate3d(0, 0, 0);
}

.module-card {
  flex: 0 0 650px;
  width: 650px;
  min-height: 470px;
  position: relative;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 14px;
  overflow: hidden;
  padding: 22px;
  border: 1px solid rgba(126,200,229,0.18);
  border-radius: 18px;
  background:
    radial-gradient(circle at 88% 10%, rgba(39,181,199,0.12), transparent 34%),
    linear-gradient(145deg, rgba(7,48,67,0.96), rgba(3,31,47,0.985));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.035);
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.module-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 3px;
  background: linear-gradient(90deg, #20aeb3 0%, #9de24e 74%, transparent 100%);
  opacity: 0.65;
}

.module-card:hover,
.module-card.is-inspected {
  border-color: rgba(157,226,78,0.48);
  background:
    radial-gradient(circle at 88% 10%, rgba(63,198,176,0.18), transparent 36%),
    linear-gradient(145deg, rgba(8,56,74,0.985), rgba(3,35,51,0.995));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 0 30px rgba(53,190,169,0.09);
}

.module-card:hover::after,
.module-card.is-inspected::after {
  opacity: 1;
}

.module-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.module-icon {
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(157,226,78,0.22);
  border-radius: 13px;
  color: #a5e65a;
  background: linear-gradient(145deg, rgba(157,226,78,0.10), rgba(33,167,183,0.07));
}

.module-icon .material-symbols-outlined {
  font-size: 27px;
}

.module-number {
  display: block;
  color: #6d92a3;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.10em;
}

.module-card h3 {
  margin: 2px 0 0;
  color: #f0f8fb;
  font-size: 24px;
  font-weight: 700;
}

.module-purpose {
  margin: 0;
  color: #a0bac6;
  font-size: 16px;
  line-height: 1.5;
}

.module-purpose strong {
  color: #dceef4;
}

.module-preview {
  min-height: 0;
  overflow: hidden;
  padding: 16px;
  border: 1px solid rgba(126,200,229,0.11);
  border-radius: 14px;
  background: rgba(2,27,41,0.48);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.025);
}

.module-preview span,
.module-preview small,
.module-preview p,
.module-preview em,
.module-preview b {
  font-size: 16px;
}

/* Budget */
.preview-budget {
  display: grid;
  gap: 14px;
}

.preview-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.preview-kpis > div {
  padding: 12px;
  border-radius: 10px;
  background: rgba(255,255,255,0.032);
}

.preview-kpis span,
.preview-kpis small {
  color: #83a0ae;
}

.preview-kpis strong {
  display: block;
  margin: 4px 0;
  color: #e0f1f6;
  font-size: 22px;
}

.preview-kpis .is-positive strong {
  color: #a6e95d;
}

.preview-section-title {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: #86cfd2;
}

.preview-bars {
  display: grid;
  gap: 9px;
}

.preview-bars > div {
  display: grid;
  grid-template-columns: 120px 1fr 84px;
  align-items: center;
  gap: 10px;
}

.preview-bars span,
.preview-bars em {
  color: #8ca8b5;
  font-style: normal;
}

.preview-bars em {
  text-align: right;
  color: #d2e5eb;
}

.preview-bars i,
.saving-goals-list i,
.goal-progress {
  height: 8px;
  display: block;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255,255,255,0.065);
}

.preview-bars i b,
.saving-goals-list i b,
.goal-progress b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #24aeb8, #9de24e);
}

/* Épargne */
.preview-saving {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 20px;
  align-items: center;
}

.saving-summary {
  display: grid;
  gap: 14px;
  justify-items: center;
  text-align: center;
}

.saving-ring {
  width: 132px;
  height: 132px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(#9de24e 0 68%, rgba(255,255,255,0.07) 68% 100%);
  position: relative;
}

.saving-ring::after {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  background: #062a3c;
}

.saving-ring span {
  position: relative;
  z-index: 1;
}

.saving-ring strong {
  display: block;
  color: #eaf7fb;
  font-size: 28px;
}

.saving-ring small,
.saving-detail span,
.saving-detail small {
  color: #86a2af;
}

.saving-detail strong {
  display: block;
  margin: 4px 0;
  color: #a6e95d;
  font-size: 24px;
}

.saving-goals-list {
  display: grid;
  gap: 13px;
}

.saving-goals-list > div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 16px;
}

.saving-goals-list span {
  color: #d5e8ee;
}

.saving-goals-list strong {
  color: #9eb9c5;
}

.saving-goals-list i {
  grid-column: 1 / -1;
}

/* Patrimoine */
.preview-assets {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 18px;
}

.asset-total {
  align-self: center;
  padding: 18px;
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
}

.asset-total span {
  color: #88a6b4;
}

.asset-total strong {
  display: block;
  margin: 8px 0;
  color: #eaf6fa;
  font-size: 30px;
}

.asset-total em {
  color: #9de24e;
  font-style: normal;
}

.asset-ledger {
  display: grid;
  gap: 8px;
}

.asset-ledger > div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 7px;
  border-bottom: 1px solid rgba(255,255,255,0.055);
}

.asset-ledger span {
  color: #9cb6c1;
}

.asset-ledger strong {
  color: #deedf2;
}

.asset-ledger .debt strong {
  color: #ffb98c;
}

/* Conseils */
.preview-advice {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 18px;
}

.advice-highlight {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px;
  border-radius: 12px;
  background: rgba(157,226,78,0.06);
  border: 1px solid rgba(157,226,78,0.12);
}

.advice-highlight > .material-symbols-outlined {
  color: #9de24e;
  font-size: 28px;
}

.advice-highlight small {
  color: #80a0ae;
}

.advice-highlight strong {
  display: block;
  margin: 5px 0;
  color: #b4f16f;
  font-size: 22px;
}

.advice-highlight p,
.advice-list p {
  margin: 0;
  color: #a4bdc8;
  line-height: 1.45;
}

.advice-list {
  display: grid;
  gap: 10px;
}

.advice-list > div {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 10px;
  align-items: start;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.055);
}

.advice-list .material-symbols-outlined {
  color: #72d6d4;
  font-size: 24px;
}

.advice-list strong {
  color: #dcebf0;
}

/* Objectifs */
.preview-goals {
  display: grid;
  gap: 9px;
}

.goal-row {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
}

.goal-row span {
  color: #dcecf2;
}

.goal-row small {
  display: block;
  margin-top: 3px;
  color: #819daa;
}

.goal-row strong {
  color: #a6e95d;
  font-size: 20px;
}

.goal-plan {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 16px;
  margin-top: 8px;
  padding: 14px;
  border-radius: 12px;
  background: rgba(36,174,184,0.075);
}

.goal-plan span,
.goal-plan small {
  color: #90abb7;
}

.goal-plan strong {
  color: #eaf7fb;
  font-size: 20px;
}

.goal-plan small {
  grid-column: 1 / -1;
}

/* Vue d'ensemble */
.preview-overview {
  display: grid;
  gap: 14px;
}

.overview-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
}

.overview-kpis > div {
  padding: 11px;
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
}

.overview-kpis span,
.overview-kpis small {
  color: #83a0ae;
}

.overview-kpis strong {
  display: block;
  margin: 4px 0;
  color: #e4f1f5;
  font-size: 21px;
}

.overview-bottom {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 14px;
}

.overview-chart,
.overview-alerts {
  padding: 12px;
  border-radius: 10px;
  background: rgba(255,255,255,0.025);
}

.overview-chart > span,
.overview-alerts > span {
  color: #9eb7c2;
}

.overview-chart svg {
  width: 100%;
  height: 90px;
  margin-top: 8px;
  color: #74d4c8;
}

.overview-alerts p {
  margin: 10px 0 0;
  color: #9bb5c0;
  line-height: 1.4;
}

.overview-alerts strong {
  color: #dcecf2;
}

/* 1920 x 1200 est la référence. Le responsive détaillé sera traité séparément. */
@media (max-width: 1500px) {
  .welcome-page {
    width: min(1420px, calc(100% - 48px));
  }

  .welcome-intro {
    grid-template-columns: minmax(0, 1.25fr) minmax(430px, 0.75fr);
    gap: 48px;
  }

  .module-card {
    flex-basis: 610px;
    width: 610px;
  }
}

/* ============================================================
   ACCUEIL MOBILE SIMPLIFIÉ - V6
   Le desktop conserve l'accueil original.
   ============================================================ */

.mobile-home {
  display: none;
}

@media (max-width: 760px) {
  .welcome-page > .welcome-intro,
  .welcome-page > .module-showcase {
    display: none;
  }

  .mobile-home {
    display: block;
    width: 100%;
    padding: 2px 0 18px;
  }

  .mobile-home-hero {
    padding: 18px 4px 22px;
  }

  .mobile-home-kicker {
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 7px;
    color: #a8e84f;
    font-size: 14px;
    font-weight: 750;
    letter-spacing: 0.055em;
    text-transform: uppercase;
  }

  .mobile-home-kicker .material-symbols-outlined {
    font-size: 20px;
  }

  .mobile-home-hero h1 {
    margin: 0;
    max-width: 440px;
    color: #f1f8fb;
    font-size: clamp(31px, 9.2vw, 40px);
    font-weight: 650;
    line-height: 1.05;
    letter-spacing: -0.03em;
  }

  .mobile-home-hero h1 span {
    color: #a8e84f;
  }

  .mobile-home-lead {
    margin: 15px 0 0;
    max-width: 520px;
    color: #aac2cd;
    font-size: 15px;
    line-height: 1.55;
  }

  .mobile-home-actions {
    margin-top: 20px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .mobile-home-primary,
  .mobile-home-secondary {
    min-height: 50px;
    padding: 0 16px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    font-size: 16px;
    font-weight: 750;
    text-decoration: none;
  }

  .mobile-home-primary {
    margin-top: 20px;
    border: 1px solid rgba(210, 255, 128, 0.55);
    color: #fff;
    background: linear-gradient(120deg, #00a990 0%, #75c84a 68%, #a8db5b 100%);
  }

  .mobile-home-actions .mobile-home-primary {
    margin-top: 0;
  }

  .mobile-home-secondary {
    border: 1px solid rgba(111, 203, 244, 0.34);
    color: #dff5fd;
    background: rgba(3, 50, 70, 0.72);
  }

  .mobile-home-primary .material-symbols-outlined,
  .mobile-home-secondary .material-symbols-outlined {
    font-size: 21px;
  }

  .mobile-home-benefits,
  .mobile-home-modules {
    border-top: 1px solid rgba(111, 203, 244, 0.15);
  }

  .mobile-home-benefits {
    padding: 22px 4px;
  }

  .mobile-home-benefits h2,
  .mobile-home-modules h2 {
    margin: 0;
    color: #eef7fa;
    font-size: 21px;
    line-height: 1.2;
  }

  .mobile-home-benefit {
    min-height: 68px;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(111, 203, 244, 0.09);
  }

  .mobile-home-benefit:last-child {
    border-bottom: 0;
  }

  .mobile-home-benefit > .material-symbols-outlined {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(168, 232, 79, 0.2);
    border-radius: 11px;
    color: #a8e84f;
    background: rgba(168, 232, 79, 0.06);
    font-size: 22px;
  }

  .mobile-home-benefit strong,
  .mobile-home-benefit small {
    display: block;
  }

  .mobile-home-benefit strong {
    color: #e6f1f5;
    font-size: 15px;
  }

  .mobile-home-benefit small {
    margin-top: 3px;
    color: #88a5b2;
    font-size: 14px;
    line-height: 1.35;
  }

  .mobile-home-modules {
    padding: 22px 4px 8px;
  }

  .mobile-home-section-head > span {
    display: block;
    margin-bottom: 4px;
    color: #7fc7df;
    font-size: 14px;
    font-weight: 750;
    letter-spacing: 0.07em;
    text-transform: uppercase;
  }

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

  .mobile-module-card {
    min-width: 0;
    min-height: 106px;
    position: relative;
    padding: 14px;
    border: 1px solid rgba(111, 203, 244, 0.2);
    border-radius: 13px;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    gap: 9px 10px;
    color: inherit;
    background: linear-gradient(145deg, rgba(5, 53, 73, 0.9), rgba(2, 35, 52, 0.96));
    text-decoration: none;
  }

  .mobile-module-card-wide {
    grid-column: 1 / -1;
    min-height: 84px;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    grid-template-rows: 1fr;
    align-items: center;
  }

  .mobile-module-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: #a8e84f;
    background: rgba(168, 232, 79, 0.08);
    font-size: 22px;
  }

  .mobile-module-copy {
    min-width: 0;
    align-self: center;
  }

  .mobile-module-copy strong,
  .mobile-module-copy small {
    display: block;
  }

  .mobile-module-copy strong {
    color: #eef8fb;
    font-size: 16px;
  }

  .mobile-module-copy small {
    margin-top: 3px;
    color: #88a8b5;
    font-size: 14px;
    line-height: 1.3;
  }

  .mobile-module-arrow {
    position: absolute;
    right: 10px;
    bottom: 9px;
    color: #668b9a;
    font-size: 19px;
  }

  .mobile-module-card-wide .mobile-module-arrow {
    position: static;
    align-self: center;
  }
}

@media (max-width: 375px) {
  .mobile-home-hero {
    padding-top: 14px;
  }

  .mobile-home-hero h1 {
    font-size: 30px;
  }

  .mobile-module-card {
    min-height: 102px;
    padding: 12px;
  }
}

@media (max-width: 340px) {
  .mobile-home-hero h1 {
    font-size: 28px;
  }

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

  .mobile-module-card,
  .mobile-module-card-wide {
    grid-column: auto;
    min-height: 78px;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    grid-template-rows: 1fr;
    align-items: center;
  }

  .mobile-module-arrow {
    position: static;
  }
}
