/* v129.3 — Réglages et Profil : navigation par vraies pages, sans accordéons. */

.section-menu-view,
.section-page {
  width: 100%;
  box-sizing: border-box;
}

.section-menu-kicker {
  margin: 14px 18px 6px;
  color: var(--muted, #77838D);
  font-size: 11px;
  line-height: 1.2;
  font-weight: 650;
  letter-spacing: .01em;
}

.section-menu-list {
  margin: 0 18px 22px;
}

.section-menu-row {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 2px;
  border: 0;
  border-bottom: 1px solid rgba(31, 42, 55, .10);
  border-radius: 0 !important;
  background: transparent !important;
  color: inherit;
  text-align: left;
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.section-menu-row:last-child { border-bottom-color: transparent; }

.section-menu-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.section-menu-copy strong {
  color: var(--ink, #18202A);
  font-size: 14px;
  line-height: 1.25;
  font-weight: 720;
}

.section-menu-copy small {
  color: var(--muted, #73808B);
  font-size: 11px;
  line-height: 1.35;
  font-weight: 500;
}

.section-menu-chevron {
  flex: 0 0 auto;
  color: var(--muted, #8A949C);
  font-size: 25px;
  line-height: 1;
  font-weight: 400;
}

.section-page[hidden],
.section-menu-view[hidden] { display: none !important; }

.section-page-head {
  position: sticky;
  top: 0;
  z-index: 35;
  margin: 0;
  padding: 8px 18px 14px;
  background: color-mix(in srgb, var(--paper, #fff) 94%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  border-bottom: 1px solid rgba(31, 42, 55, .07);
}

.section-page-back {
  appearance: none;
  -webkit-appearance: none;
  min-height: 34px;
  margin: 0 0 8px;
  padding: 0;
  border: 0;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--ca-accent, #087F68);
  font: inherit;
  font-size: 14px;
  line-height: 1;
  font-weight: 650;
  cursor: pointer;
}

.section-page-title {
  color: var(--ink, #18202A);
  font-size: 22px;
  line-height: 1.12;
  font-weight: 780;
  letter-spacing: -.025em;
}

.section-page-subtitle {
  max-width: 560px;
  margin-top: 5px;
  color: var(--muted, #73808B);
  font-size: 11.5px;
  line-height: 1.4;
  font-weight: 500;
}

.section-page-content {
  padding: 16px 18px max(28px, calc(var(--safe-bottom) + 18px));
}

/* Les anciens contenus conservent leur logique mais deviennent des contenus de page. */
.section-page-content > .v110-settings-section,
.section-page-content > .v112-settings-section {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

.section-page-content > .v110-settings-section::before,
.section-page-content > .v112-settings-section::before {
  display: none !important;
}

.section-page-content .v110-section-head {
  margin: 0 0 14px !important;
  padding: 0 !important;
}

.section-page-content > .settings-list,
.section-page-content > .profile-settings-list,
.section-page-content > .household-summary,
.section-page-content > .profile-section-head {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Profil : carte personnelle toujours visible sur le menu, elle mène à la page Compte. */
#profile-menu-view #settings-account {
  margin: 8px 18px 14px !important;
}

#profile-account-open.is-clickable {
  min-height: 48px;
}

#profile-menu-view .profile-account-chevron {
  display: inline-block !important;
}

/* Les anciens labels nus ne doivent pas recréer une longue page. */
.section-page-content > .profile-section-label {
  margin: 16px 0 7px !important;
}

/* Diagnostic et listes gardent une largeur naturelle dans leur propre page. */
#settings-diagnostic-details .v129-diagnostic-card,
#profile-household-details .household-settings-list,
#profile-backup-details .cloud-backup-list {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Feedback tactile visuel discret, sans animation JS. */
@media (hover: none) and (pointer: coarse) {
  .section-menu-row:active { opacity: .62; }
  .section-page-back:active { opacity: .56; }
}

html.is-ios .section-menu-list,
html.is-ios .section-menu-kicker {
  margin-left: 16px;
  margin-right: 16px;
}

html.is-ios .section-menu-row {
  min-height: 60px;
  padding-top: 11px;
  padding-bottom: 11px;
}

html.is-ios .section-page-head {
  padding-left: 16px;
  padding-right: 16px;
}

html.is-ios .section-page-content {
  padding-left: 16px;
  padding-right: 16px;
}

/* Dark / OLED */
html[data-theme="dark"] .section-menu-row,
html[data-ui-theme="oled"] .section-menu-row,
html[data-theme="dark"] .section-page-head,
html[data-ui-theme="oled"] .section-page-head {
  border-color: rgba(255,255,255,.09);
}

html[data-theme="dark"] .section-page-head {
  background: color-mix(in srgb, var(--paper, #171A1D) 94%, transparent);
}

html[data-ui-theme="oled"] .section-page-head {
  background: rgba(0,0,0,.94);
}

/* Windows 98 reste volontairement plus anguleux, mais garde la navigation par pages. */
html[data-ui-theme="win98"] .section-page-head {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border-bottom: 2px solid #808080;
}
html[data-ui-theme="win98"] .section-menu-row {
  min-height: 52px;
}

@media (prefers-reduced-motion: reduce) {
  .section-menu-row,
  .section-page-back { transition: none !important; }
}
