/* ============================================================================
 * Account page — profil, premium, settings rows
 * ============================================================================ */

.fr-account-page {
  padding: 0 20px 120px;
}

.fr-back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--fr-card);
  border: 1px solid var(--fr-hair);
  color: var(--fr-ink2);
  cursor: pointer;
  margin-bottom: 8px;
  padding: 0;
  transition: transform 0.12s ease, background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.fr-back-btn:hover { background: var(--fr-bg-warm); }
.fr-back-btn:active { transform: scale(0.92); }
.fr-back-btn svg { width: 14px; height: 14px; }

/* ---------- Profile card ---------- */

.fr-account-profile {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--fr-card);
  border: 1px solid var(--fr-hair);
  border-radius: var(--fr-radius-large);
}

.fr-account-profile .info { min-width: 0; flex: 1; }

.fr-account-profile .name {
  font-family: var(--fr-font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--fr-ink);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fr-account-profile .email {
  font-size: 13px;
  color: var(--fr-ink3);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- Premium card ---------- */

.fr-account-premium {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  margin-top: 14px;
  background: var(--fr-primary-tint);
  border: 1px solid rgba(224, 138, 0, 0.25);
  border-radius: var(--fr-radius-large);
  cursor: pointer;
  transition: transform 0.12s var(--fr-ease);
  -webkit-tap-highlight-color: transparent;
}

.fr-account-premium:active { transform: scale(0.99); }

.fr-account-premium .badge {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--fr-primary), var(--fr-primary-deep));
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--fr-shadow-primary-btn);
}
.fr-account-premium .badge svg { width: 22px; height: 22px; }

.fr-account-premium .text { flex: 1; min-width: 0; }
.fr-account-premium .text .title {
  font-family: var(--fr-font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--fr-ink);
  letter-spacing: -0.005em;
}
.fr-account-premium .text .sub {
  font-size: 12px;
  color: var(--fr-ink3);
  margin-top: 2px;
  line-height: 1.4;
}
.fr-account-premium .chev { color: var(--fr-ink3); flex-shrink: 0; }
.fr-account-premium .chev svg { width: 12px; height: 12px; }

/* ---------- Section title (mimic iOS frSectionTitle) ---------- */

.fr-account-section-title {
  font-family: var(--fr-font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--fr-ink);
  letter-spacing: -0.005em;
  margin: 24px 0 10px;
}

/* ---------- Settings rows ---------- */

.fr-settings-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fr-settings-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  background: var(--fr-card);
  border: 1px solid var(--fr-hair);
  border-radius: var(--fr-radius-large);
  cursor: pointer;
  transition: background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
}

.fr-settings-row:hover { background: var(--fr-bg-warm); }
.fr-settings-row:active { transform: scale(0.99); }

.fr-settings-row .icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.fr-settings-row .icon svg { width: 18px; height: 18px; }

.fr-settings-row .label {
  flex: 1;
  font-family: var(--fr-font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--fr-ink);
}

.fr-settings-row .value {
  font-size: 13px;
  color: var(--fr-ink3);
  flex-shrink: 0;
}

.fr-settings-row .chev { color: var(--fr-ink3); flex-shrink: 0; }
.fr-settings-row .chev svg { width: 12px; height: 12px; }

/* Tints for icon backgrounds */
.fr-settings-row .icon.tint-primary  { background: rgba(224, 138, 0, 0.15); color: var(--fr-primary-deep); }
.fr-settings-row .icon.tint-dessert  { background: rgba(232, 122, 158, 0.15); color: var(--fr-cat-dessert); }
.fr-settings-row .icon.tint-boisson  { background: rgba(108, 156, 200, 0.15); color: var(--fr-cat-boisson); }
.fr-settings-row .icon.tint-plat     { background: rgba(212, 122, 51, 0.15); color: var(--fr-cat-plat); }
.fr-settings-row .icon.tint-ink      { background: rgba(0, 0, 0, 0.06); color: var(--fr-ink2); }

/* ---------- Sign out button ---------- */

.fr-account-signout {
  margin-top: 26px;
  width: 100%;
  padding: 14px;
  background: rgba(220, 53, 69, 0.08);
  border: 1px solid rgba(220, 53, 69, 0.3);
  border-radius: var(--fr-radius-large);
  color: #dc3545;
  font-family: var(--fr-font-display);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.15s ease;
}
.fr-account-signout:hover { background: rgba(220, 53, 69, 0.14); }
.fr-account-signout svg { width: 16px; height: 16px; }

/* ============================================================================
 * Edit Profile (G2)
 * ============================================================================ */

.fr-edit-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--fr-card);
  border-bottom: 1px solid var(--fr-hair);
  position: sticky;
  top: 0;
  z-index: 5;
}

.fr-edit-cancel,
.fr-edit-save {
  background: transparent;
  border: 0;
  font: inherit;
  cursor: pointer;
  padding: 6px 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--fr-ink2);
  -webkit-tap-highlight-color: transparent;
}

.fr-edit-cancel { justify-self: start; }
.fr-edit-save {
  justify-self: end;
  font-weight: 700;
  color: var(--fr-primary-deep);
}
.fr-edit-save:disabled { color: var(--fr-ink3); cursor: not-allowed; }

.fr-edit-title {
  font-family: var(--fr-font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--fr-ink);
  margin: 0;
  text-align: center;
  letter-spacing: -0.005em;
}

.fr-spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: fr-spin 0.7s linear infinite;
  vertical-align: middle;
}
@keyframes fr-spin { to { transform: rotate(360deg); } }

.fr-account-edit-page {
  padding: 24px 20px 120px;
}

/* Avatar picker */

.fr-avatar-picker {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding-bottom: 6px;
}

.fr-avatar-large {
  position: relative;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: var(--fr-primary-soft);
  color: var(--fr-primary-deep);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 4px solid var(--fr-primary-tint);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}
.fr-avatar-large img {
  width: 100%; height: 100%; object-fit: cover;
}
.fr-avatar-large .fallback {
  font-family: var(--fr-font-display);
  font-size: 38px;
  font-weight: 700;
}

.fr-avatar-camera {
  position: absolute;
  top: 78px;
  left: calc(50% + 24px);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--fr-primary-deep);
  color: white;
  border: 3px solid white;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--fr-shadow-primary-btn);
  transition: transform 0.12s ease;
  -webkit-tap-highlight-color: transparent;
  padding: 0;
}
.fr-avatar-camera:active { transform: scale(0.92); }
.fr-avatar-camera svg { width: 16px; height: 16px; }

.fr-avatar-email {
  font-size: 12px;
  color: var(--fr-ink3);
  margin-top: 4px;
}

/* Fields */

.fr-edit-fields {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 22px;
}

.fr-edit-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fr-edit-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--fr-ink3);
  text-transform: uppercase;
}

.fr-edit-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--fr-hair);
  border-radius: 12px;
  background: var(--fr-card);
  font-family: inherit;
  font-size: 15px;
  color: var(--fr-ink);
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
  box-sizing: border-box;
}
.fr-edit-input:focus { border-color: var(--fr-primary); }

.fr-edit-input-readonly {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: rgba(0, 0, 0, 0.04);
  color: var(--fr-ink2);
  cursor: not-allowed;
}
.fr-edit-input-readonly svg {
  width: 12px; height: 12px;
  color: var(--fr-ink3);
  flex-shrink: 0;
}

.fr-edit-hint {
  font-size: 11px;
  color: var(--fr-ink3);
  line-height: 1.4;
}

.fr-edit-error {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: rgba(220, 53, 69, 0.08);
  border: 1px solid rgba(220, 53, 69, 0.3);
  border-radius: 12px;
  font-size: 12.5px;
  color: var(--fr-ink2);
}
.fr-edit-error svg {
  width: 18px; height: 18px;
  color: #dc3545;
  flex-shrink: 0;
}

/* ============================================================================
 * Notifications preferences (G3)
 * ============================================================================ */

.fr-notif-page {
  padding: 18px 20px 120px;
}

.fr-notif-header { margin-bottom: 18px; }
.fr-notif-header .kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fr-primary-deep);
}
.fr-notif-header .title {
  font-family: var(--fr-font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--fr-ink);
  letter-spacing: -0.005em;
  margin: 4px 0 4px;
  line-height: 1.3;
}
.fr-notif-header .hint {
  font-size: 13px;
  color: var(--fr-ink3);
  line-height: 1.45;
  margin: 0;
}

.fr-notif-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fr-notif-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  width: 100%;
  text-align: left;
  background: var(--fr-card);
  border: 1px solid var(--fr-hair);
  border-radius: var(--fr-radius-large);
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}
.fr-notif-option:active { transform: scale(0.99); }

.fr-notif-option.is-active {
  background: rgba(232, 138, 0, 0.08);
  border-color: var(--fr-primary);
}

.fr-notif-option .icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.fr-notif-option .icon svg { width: 22px; height: 22px; }
.fr-notif-option .icon.tint-primary  { background: rgba(232, 138, 0, 0.18); color: var(--fr-primary-deep); }
.fr-notif-option .icon.tint-dessert  { background: rgba(232, 122, 158, 0.18); color: var(--fr-cat-dessert); }
.fr-notif-option .icon.tint-ink      { background: rgba(0, 0, 0, 0.08); color: var(--fr-ink3); }

.fr-notif-option .text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.fr-notif-option .text .title {
  font-family: var(--fr-font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--fr-ink);
  letter-spacing: -0.005em;
}
.fr-notif-option .text .sub {
  font-size: 12px;
  color: var(--fr-ink3);
  line-height: 1.45;
}

.fr-notif-option .check {
  flex-shrink: 0;
  color: var(--fr-hair-strong);
}
.fr-notif-option .check svg { width: 22px; height: 22px; }
.fr-notif-option.is-active .check { color: var(--fr-primary); }

/* ============================================================================
 * Privacy (G4)
 * ============================================================================ */

.fr-privacy-page {
  padding: 18px 20px 120px;
}

.fr-privacy-header { margin-bottom: 6px; }
.fr-privacy-header .kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fr-primary-deep);
}
.fr-privacy-header .hint {
  font-size: 13px;
  color: var(--fr-ink3);
  line-height: 1.5;
  margin: 6px 0 0;
}

.fr-privacy-disclaimer {
  font-size: 11px;
  color: var(--fr-ink3);
  line-height: 1.45;
  margin: 8px 4px 0;
}

/* Toggle row */

.fr-toggle-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  background: var(--fr-card);
  border: 1px solid var(--fr-hair);
  border-radius: var(--fr-radius-large);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.fr-toggle-row .icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.fr-toggle-row .icon svg { width: 18px; height: 18px; }
.fr-toggle-row .icon.tint-boisson { background: rgba(108, 156, 200, 0.18); color: var(--fr-cat-boisson); }

.fr-toggle-row .text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.fr-toggle-row .text .title {
  font-family: var(--fr-font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--fr-ink);
}
.fr-toggle-row .text .sub {
  font-size: 12px;
  color: var(--fr-ink3);
  line-height: 1.45;
}

/* Switch (iOS-like) */

.fr-switch {
  position: relative;
  width: 46px;
  height: 28px;
  flex-shrink: 0;
}
.fr-switch input {
  opacity: 0;
  position: absolute;
  inset: 0;
  margin: 0;
  cursor: pointer;
  z-index: 1;
}
.fr-switch .track {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: var(--fr-hair-strong, #d8d8d8);
  position: relative;
  transition: background 0.2s ease;
}
.fr-switch .track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
  transition: transform 0.22s var(--fr-ease, cubic-bezier(.2,.8,.2,1));
}
.fr-switch input:checked + .track {
  background: var(--fr-primary-deep);
}
.fr-switch input:checked + .track::after {
  transform: translateX(18px);
}

/* Settings rows à 2 lignes (export, delete) */

.fr-settings-row .label-block {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
}
.fr-settings-row .label-block .title {
  font-family: var(--fr-font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--fr-ink);
}
.fr-settings-row .label-block .sub {
  font-size: 12px;
  color: var(--fr-ink3);
  line-height: 1.45;
}

/* Danger row (Delete account) */

.fr-settings-danger {
  border-color: rgba(220, 53, 69, 0.3);
}
.fr-settings-danger:hover {
  background: rgba(220, 53, 69, 0.04);
}
.fr-settings-danger .label-block .title { color: #dc3545; }
.fr-settings-row .icon.tint-danger { background: rgba(220, 53, 69, 0.12); color: #dc3545; }
.fr-settings-row .chev.danger { color: rgba(220, 53, 69, 0.6); }
.fr-settings-row[disabled] { opacity: 0.7; cursor: not-allowed; }

/* ============================================================================
 * Support / FAQ (G5)
 * ============================================================================ */

.fr-support-page {
  padding: 18px 20px 120px;
}

.fr-faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fr-faq-row {
  background: var(--fr-card);
  border: 1px solid var(--fr-hair);
  border-radius: var(--fr-radius-large);
  overflow: hidden;
  transition: box-shadow 0.15s ease;
}
.fr-faq-row.is-open { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04); }

.fr-faq-q {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}
.fr-faq-q .text {
  flex: 1;
  font-family: var(--fr-font-display);
  font-size: 14.5px;
  font-weight: 700;
  color: var(--fr-ink);
  line-height: 1.4;
}
.fr-faq-q .chev {
  width: 14px;
  height: 14px;
  color: var(--fr-primary-deep);
  flex-shrink: 0;
  margin-top: 3px;
  transition: transform 0.2s ease;
}
.fr-faq-row.is-open .fr-faq-q .chev { transform: rotate(180deg); }

.fr-faq-a {
  padding: 0 14px 14px;
  font-size: 13px;
  color: var(--fr-ink2);
  line-height: 1.55;
  white-space: pre-wrap;
}

.fr-support-note {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 14px 4px 0;
  font-size: 11px;
  color: var(--fr-ink3);
  line-height: 1.5;
}
.fr-support-note svg {
  width: 13px; height: 13px;
  flex-shrink: 0;
  margin-top: 1px;
}

.fr-settings-row .icon.tint-entree { background: rgba(212, 80, 76, 0.18); color: var(--fr-cat-entree); }
