/* Inter auto-hebergee (woff2 locaux) : latin + latin-ext, poids 400/500/600/700/800.
   Necessaire pour un rendu fiable sur connexion intermittente (marche RDC) : si le
   CDN Google Fonts est injoignable, la police doit rester disponible localement. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/inter/inter-latin-ext-400.0a6ff1a7c1e4.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/inter/inter-latin-400.da03732a27e1.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/inter/inter-latin-ext-500.90ff4f7e8bcb.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/inter/inter-latin-500.51205681a1ba.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/inter/inter-latin-ext-600.65aed4e1ef63.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/inter/inter-latin-600.2ede57db1a3a.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/inter/inter-latin-ext-700.aa4c26661f64.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/inter/inter-latin-700.8ca0a5155296.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("../fonts/inter/inter-latin-ext-800.8191a7d51904.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("../fonts/inter/inter-latin-800.900ae45e40b8.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #10232a;
  --brand: #087b67;
  --brand-soft: #dff3ec;
  --paper: #f3f6f6;
  --surface: #ffffff;
  --line: #e1e7e8;
  --muted: #64747a;
  --danger: #c43d32;
  --amber: #b66c10;
  --blue: #246bce;
  --shadow: 0 8px 28px rgba(16, 35, 42, 0.07);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
}

body {
  min-height: 100vh;
  display: block;
  padding: 0;
}

/* Le wrapper global n'impose plus de largeur max ni de padding : chaque
   écran apporte son propre shell plein écran (.ft-app-shell / .ft-auth-shell,
   voir fintrack-theme.css) ou son propre conteneur centré (.ft-container,
   ci-dessous, pour les pages simples qui n'ont pas de shell interne). */
.page-shell {
  width: 100%;
  margin: 0;
}

/* Conteneur centré et lisible pour les pages "simples" sans shell interne
   (home, notice de confidentialité, métriques, compte supprimé, vitrine des
   composants) — jamais utilisé par les écrans .ft-app-shell / .ft-auth-shell,
   qui gèrent déjà tout le viewport eux-mêmes. */
.ft-container {
  width: min(100%, 1100px);
  margin: 0 auto;
  padding: 24px 16px;
}

.page-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 20px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.page-header.narrow {
  margin-bottom: 18px;
}

.top-nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.nav-link {
  text-decoration: none;
  color: var(--ink);
  background: #f3f5f5;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.85rem;
  font-weight: 700;
}

.nav-link.active {
  background: var(--brand-soft);
  color: var(--brand);
  border-color: rgba(8, 123, 103, 0.15);
}

.summary-card {
  background: linear-gradient(135deg, rgba(8, 123, 103, 0.05), rgba(8, 123, 103, 0.12));
  border: 1px solid rgba(8, 123, 103, 0.12);
  border-radius: 18px;
  padding: 20px;
  margin-bottom: 18px;
}

.summary-card h2 {
  margin: 0 0 8px;
  font-size: clamp(1.4rem, 4vw, 2rem);
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  border-radius: 12px;
  padding: 10px 16px;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn.primary {
  background: var(--brand);
  color: white;
}

.btn.secondary {
  background: white;
  border-color: var(--line);
  color: var(--ink);
}

.btn.danger {
  background: var(--danger);
  color: white;
  border-color: var(--danger);
}

.btn.danger:hover,
.btn.danger:focus-visible {
  background: #a3352b;
  border-color: #a3352b;
}

.btn.small {
  padding: 8px 12px;
  font-size: 0.82rem;
}

.currencies {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}

.currencies span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  background: var(--brand-soft);
  color: var(--brand);
  border: 1px solid rgba(8, 123, 103, 0.14);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.8rem;
  font-weight: 800;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.filter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  flex: 1;
}

.filter-form input,
.filter-form select,
.finance-form input,
.finance-form select,
.finance-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fbfcfc;
  padding: 11px 12px;
  border-radius: 12px;
  color: var(--ink);
  font: inherit;
}

.list-stack {
  display: grid;
  gap: 12px;
}

.entry-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fbfcfc;
  padding: 16px;
}

.entry-card.received {
  border-left: 4px solid var(--brand);
}

.entry-card.planned {
  border-left: 4px solid var(--amber);
}

.entry-card.expense {
  border-left: 4px solid var(--danger);
}

.entry-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.entry-head h2 {
  margin: 0 0 4px;
  font-size: 1.05rem;
}

.entry-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.amount-pill {
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 800;
  font-size: 0.8rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.amount-pill.usd {
  background: rgba(8, 123, 103, 0.1);
  color: var(--brand);
}

.amount-pill.fc {
  background: rgba(182, 108, 16, 0.08);
  color: var(--amber);
}

.entry-actions {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.text-link {
  text-decoration: none;
  color: var(--brand);
  font-weight: 700;
}

.link-button {
  background: none;
  border: 0;
  color: var(--danger);
  font: inherit;
  cursor: pointer;
  font-weight: 700;
}

.inline-form {
  margin: 0;
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: 20px;
  background: #fbfcfc;
  padding: 28px 18px;
  text-align: center;
}

.empty-state h2 {
  margin: 0 0 8px;
}

.empty-state p {
  margin: 0 0 16px;
  color: var(--muted);
}

.message-stack {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.message {
  border-radius: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(8, 123, 103, 0.12);
  background: rgba(8, 123, 103, 0.08);
  color: var(--brand);
  font-size: 0.9rem;
}

.form-panel {
  max-width: 680px;
  margin: 0 auto;
}

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

.field {
  display: flex;
  flex-direction: column;
}

.full-width {
  grid-column: 1 / -1;
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  color: var(--ink);
}

.checkbox-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
}

@media (max-width: 700px) {
  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .field-grid {
    grid-template-columns: 1fr;
  }

  .toolbar {
    align-items: stretch;
  }

  .filter-form {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
  }
}

.period-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.currency-display-selector {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}

.seg-control {
  display: inline-flex;
  gap: 3px;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 13px;
}

.seg-option {
  border: 0;
  background: transparent;
  border-radius: 9px;
  padding: 8px 14px;
  color: var(--muted);
  font-weight: 800;
  font-size: 0.82rem;
  cursor: pointer;
  font: inherit;
}

.seg-option.seg-on {
  background: var(--ink);
  color: #fff;
}

.period-title {
  margin: 0;
  font-size: 1.1rem;
  text-align: center;
}

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

.currency-column {
  background: #fbfcfc;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  min-width: 0;
}

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

.curr-badge {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 3px 8px;
  background: var(--surface);
}

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

.metric-box {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 11px;
  background: var(--surface);
  min-width: 0;
}

.metric-label {
  font-size: 0.68rem;
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.metric-value {
  font-size: 1.05rem;
  font-weight: 900;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.metric-value.muted-value {
  color: var(--muted);
}

.metric-subvalue {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 3px;
}

.value-positive {
  color: var(--brand);
}

.value-danger {
  color: var(--danger);
}

.budget-bar-wrap {
  margin: 14px 0;
}

.budget-bar-track {
  height: 10px;
  border-radius: 999px;
  background: #eaeff0;
  overflow: hidden;
  margin-top: 5px;
}

.budget-bar-fill {
  height: 100%;
  border-radius: 999px;
}

.budget-bar-normal {
  background: var(--brand);
}

.budget-bar-warning {
  background: var(--amber);
}

.budget-bar-danger {
  background: var(--danger);
}

.breakdown-block,
.forecast-block,
.top-expenses-block {
  margin-top: 16px;
}

.breakdown-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.breakdown-table td {
  padding: 7px 4px;
  border-bottom: 1px solid var(--line);
}

.breakdown-table td:first-child {
  color: var(--muted);
}

.amount-cell {
  text-align: right;
  font-weight: 800;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.amount-cell.positive {
  color: var(--brand);
}

.amount-cell.negative {
  color: var(--danger);
}

.breakdown-table tr.total-row td {
  border-bottom: 0;
  font-size: 0.95rem;
  padding-top: 10px;
}

.tag {
  display: inline-flex;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 900;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
}

.top-expense-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.85rem;
}

.top-expense-row:last-child {
  border-bottom: 0;
}

.top-expense-rank {
  font-size: 0.68rem;
  font-weight: 900;
  color: var(--muted);
  min-width: 20px;
}

.top-expense-dot {
  width: 10px;
  height: 10px;
  border-radius: 4px;
  flex: 0 0 auto;
}

.top-expense-name {
  flex: 1;
  font-weight: 700;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-expense-amount {
  font-weight: 900;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.alert {
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.85rem;
  line-height: 1.45;
  border: 1px solid;
  margin-bottom: 10px;
}

.alert-info {
  background: #eaf1fd;
  border-color: rgba(36, 107, 206, 0.25);
  color: var(--ink);
}

.alert-info strong {
  color: var(--blue);
}

.alert-warning {
  background: #fff7e8;
  border-color: rgba(182, 108, 16, 0.3);
  color: var(--ink);
}

.alert-warning strong {
  color: var(--amber);
}

.alert-danger {
  background: #fcedea;
  border-color: rgba(196, 61, 50, 0.3);
  color: var(--ink);
}

.alert-danger strong {
  color: var(--danger);
}

@media (max-width: 700px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

.ceiling-status-block {
  margin-top: 16px;
}

.ceiling-status-row {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 11px;
  background: var(--surface);
  margin-bottom: 8px;
}

.ceiling-status-figures {
  margin-top: 6px;
  color: var(--muted);
}

.ceiling-status-tag {
  font-size: 0.68rem;
  font-weight: 900;
  padding: 3px 8px;
  border-radius: 999px;
}

.ceiling-status-normal {
  background: var(--brand-soft);
  color: var(--brand);
}

.ceiling-status-warning {
  background: #fff2da;
  color: var(--amber);
}

.ceiling-status-danger {
  background: #fbdedb;
  color: var(--danger);
}

.message.warning {
  background: #fff7e8;
  border-color: rgba(182, 108, 16, 0.25);
  color: var(--amber);
}

.message.error {
  background: #fcedea;
  border-color: rgba(196, 61, 50, 0.25);
  color: var(--danger);
}

.settings-section {
  background: #fbfcfc;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  margin-bottom: 18px;
}

.section-title {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.section-hint {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

.info-line {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 0.88rem;
}

.info-line-warning {
  background: #fff7e8;
  color: var(--amber);
}

.ceiling-grid {
  display: grid;
  gap: 10px;
}

.ceiling-grid-header {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 10px;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.03em;
}

.ceiling-grid-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 10px;
  align-items: start;
}

.ceiling-category {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.88rem;
  padding-top: 10px;
}

.ceiling-input-cell input {
  width: 100%;
  border: 1px solid var(--line);
  background: #fbfcfc;
  padding: 9px 10px;
  border-radius: 10px;
  color: var(--ink);
  font: inherit;
}

@media (max-width: 700px) {
  .ceiling-grid-header {
    display: none;
  }

  .ceiling-grid-row {
    grid-template-columns: 1fr 1fr;
  }

  .ceiling-category {
    grid-column: 1 / -1;
    padding-top: 0;
  }
}

.rule-paused {
  opacity: 0.65;
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.tag-active {
  background: var(--brand-soft);
  color: var(--brand);
}

.tag-paused {
  background: #eef1f2;
  color: var(--muted);
}

.auth-shell {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 24px 16px;
}

.narrow-shell {
  min-height: auto;
}

.auth-card {
  width: min(100%, 460px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px 20px;
  box-shadow: var(--shadow);
}

.brand-mark {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: var(--ink);
  color: white;
  font-weight: 900;
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand);
  font-size: 0.72rem;
  font-weight: 800;
  margin: 0 0 8px;
}

h1 {
  margin: 0 0 8px;
  font-size: clamp(1.9rem, 5vw, 2.4rem);
  line-height: 1.1;
}

.subtitle {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 0.96rem;
}

.field {
  margin-bottom: 14px;
}

label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
}

input[type="email"],
input[type="password"],
input[type="text"] {
  width: 100%;
  border: 1px solid var(--line);
  background: #fbfcfc;
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--ink);
  font: inherit;
}

input[type="email"]:focus,
input[type="password"]:focus,
input[type="text"]:focus {
  outline: 2px solid rgba(8, 123, 103, 0.12);
  border-color: var(--brand);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 12px 16px;
  background: var(--brand);
  color: white;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
}

.btn.primary {
  margin-top: 6px;
}

.auth-link-row {
  margin-top: 18px;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: var(--muted);
}

.auth-link-row a {
  color: var(--brand);
  font-weight: 700;
  text-decoration: none;
}

.small-row {
  margin-top: 8px;
}

.error-box,
.field-error {
  color: var(--danger);
  font-size: 0.78rem;
  margin-top: 6px;
}

.error-box {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(196, 61, 50, 0.06);
  border: 1px solid rgba(196, 61, 50, 0.12);
}

.consent-card {
  padding-bottom: 18px;
}

.consent-box {
  border: 1px solid var(--line);
  background: #fbfcfc;
  border-radius: 14px;
  padding: 12px;
  margin: 18px 0;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--ink);
  margin: 0;
}

.checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--brand);
}

.checkbox-row.secondary {
  margin-top: 12px;
}

.notice-box {
  background: #f8fafb;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 18px;
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.6;
}

.notice-box p {
  margin: 0 0 10px;
}

.notice-box p:last-child {
  margin-bottom: 0;
}

.notice-box.danger-zone,
.settings-section.danger-zone {
  background: rgba(196, 61, 50, 0.05);
  border-color: rgba(196, 61, 50, 0.3);
}

.notice-box.danger-zone ul {
  margin: 0 0 10px;
  padding-left: 20px;
}

.notice-box.danger-zone ul li {
  margin-bottom: 4px;
}

.privacy-copy {
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.7;
}

.privacy-copy p {
  margin: 0 0 14px;
}

@media (max-width: 560px) {
  body {
    padding: 12px;
  }

  .auth-card {
    padding: 22px 16px;
  }

  h1 {
    font-size: 1.8rem;
  }
}

.feedback-fab {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--brand);
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: 0.85rem;
  padding: 12px 18px;
  border-radius: 999px;
  box-shadow: var(--shadow);
}

.feedback-fab:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

.feedback-invite {
  background: var(--brand-soft);
  border: 1px solid rgba(8, 123, 103, 0.2);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.feedback-invite p {
  margin: 0;
  color: var(--ink);
  font-size: 0.9rem;
  flex: 1 1 220px;
}

.feedback-invite-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

@media (max-width: 560px) {
  .feedback-fab {
    right: 12px;
    bottom: 12px;
    padding: 10px 14px;
    font-size: 0.8rem;
  }
}

@media print {
  .feedback-fab,
  .feedback-invite {
    display: none !important;
  }
}


/* ---- Page de connexion client (anciennement en style/script inline) ------ */
/* Tokens --ft-* uniquement. Les bordures des encarts prennent la couleur
   d'état pleine (plus de teinte claire codée en dur). */
.ft-auth-title { margin: 0 0 6px; font-size: var(--ft-fs-h2); }
.ft-auth-lead { font-size: var(--ft-fs-small); margin: 0 0 var(--ft-s4); }
.ft-auth-alert { display: flex; gap: 10px; padding: 12px 14px; margin-bottom: var(--ft-s4); }
.ft-auth-alert--danger { background: var(--ft-danger-tint); border: 1px solid var(--ft-danger); border-radius: var(--ft-radius); }
.ft-auth-alert--warn { background: var(--ft-amber-tint); border: 1px solid var(--ft-amber); border-radius: var(--ft-radius-sm); }
.ft-auth-alert__title { font-weight: 600; font-size: var(--ft-fs-small); color: var(--ft-danger); }
.ft-auth-alert__text { font-size: var(--ft-fs-caption); }
.ft-auth-alert__warn-text { font-size: var(--ft-fs-caption); color: var(--ft-amber); }
.ft-auth-remember { margin-bottom: var(--ft-s4); }
.ft-auth-alt { text-align: center; font-size: var(--ft-fs-small); color: var(--ft-muted); margin-top: var(--ft-s4); }
.ft-auth-alt--small { font-size: var(--ft-fs-caption); margin-top: var(--ft-s2); }
.ft-auth-alt__link { font-weight: 600; color: var(--ft-ink); }
/* Bouton de soumission pleine largeur, page de connexion seulement.
   La classe ft-auth-login est propre à login.html. Spécificité (0,2,0) : bat
   .ft-btn (0,1,0, min-height 44px via --ft-tap, chargé après app.css) sans
   toucher consent.html, onboarding_setup.html ni signup.html. */
.ft-auth-login .ft-auth-submit { width: 100%; min-height: 52px; }
