/* Phase Bonus-2.12 — Account / Tier upgrade page */

.account-body {
  background: var(--th-bg, #F7F7F9);
  color: var(--th-text, #1C1C2E);
  padding-bottom: 80px;
}

.account-shell {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px 14px 80px;
}

.account-current-card {
  display: flex;
  gap: 14px;
  align-items: center;
  background: linear-gradient(135deg, #6750A4, #7F67BE);
  color: #fff;
  padding: 18px 16px;
  border-radius: 16px;
  box-shadow: 0 4px 14px rgba(103, 80, 164, 0.20);
  margin-bottom: 18px;
}

.current-tier-badge {
  flex: 0 0 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 0.04em;
  border: 2px solid rgba(255, 255, 255, 0.5);
}

.current-tier-info h2 {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 800;
}
.current-tier-info p {
  margin: 0;
  font-size: 13px;
  opacity: 0.95;
}

.account-tier-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.account-tier-card {
  background: var(--th-card-bg, #fff);
  border-radius: 16px;
  padding: 16px 16px 14px;
  border: 1.5px solid var(--th-border, #E5E5EA);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  position: relative;
  transition: transform 0.15s, border-color 0.15s;
}
.account-tier-card.active {
  border-color: #10B981;
  background: linear-gradient(180deg, #ECFDF5, var(--th-card-bg, #fff));
}
.account-tier-card.recommended {
  border-color: #6750A4;
}
.account-tier-card.recommended::before {
  content: '★ Recommandé';
  position: absolute;
  top: -10px;
  left: 14px;
  background: #6750A4;
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 3px 10px;
  border-radius: 10px;
}

.account-tier-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}
.account-tier-name {
  font-size: 18px;
  font-weight: 800;
  margin: 0;
  flex: 1;
}
.account-tier-price {
  font-weight: 800;
  font-size: 16px;
  color: #6750A4;
  white-space: nowrap;
}
.account-tier-price small {
  font-size: 11px;
  color: #6B6B7A;
  font-weight: 500;
  margin-left: 4px;
}

.account-tier-features {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: grid;
  gap: 6px;
}
.account-tier-features li {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 13px;
  color: var(--th-text, #1C1C2E);
  line-height: 1.4;
}
.account-tier-features li i {
  flex: 0 0 14px;
  color: #10B981;
  font-size: 11px;
  margin-top: 4px;
}
.account-tier-features li.disabled {
  opacity: 0.45;
}
.account-tier-features li.disabled i { color: #9CA3AF; }

.account-tier-cta {
  width: 100%;
  padding: 11px;
  border-radius: 12px;
  border: 0;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  background: #6750A4;
  color: #fff;
  transition: opacity 0.15s, transform 0.1s;
}
.account-tier-cta:hover { opacity: 0.92; }
.account-tier-cta:disabled {
  background: #E5E5EA;
  color: #9CA3AF;
  cursor: default;
}
.account-tier-cta.current {
  background: #10B981;
  color: #fff;
}
.account-tier-cta.downgrade {
  background: #F1F1F4;
  color: #6B6B7A;
}

.account-footer-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 14px;
  background: #ECFDF5;
  color: #047857;
  border-radius: 12px;
  margin-top: 18px;
  font-size: 12.5px;
  line-height: 1.4;
}
.account-footer-note i { font-size: 16px; margin-top: 2px; flex-shrink: 0; }

/* /account/family */
.family-shell {
  max-width: 600px;
  margin: 0 auto;
  padding: 16px 14px;
}
.family-member-card {
  background: var(--th-card-bg, #fff);
  border: 1.5px solid var(--th-border, #E5E5EA);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.family-invite-form {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.family-invite-form input {
  flex: 1;
  padding: 11px 13px;
  border-radius: 10px;
  border: 1.5px solid var(--th-border, #E5E5EA);
  background: var(--th-card-bg, #fff);
  color: var(--th-text, #1C1C2E);
  font-size: 14px;
}
.family-invite-form button {
  padding: 11px 18px;
  border-radius: 10px;
  background: #6750A4;
  color: #fff;
  border: 0;
  font-weight: 700;
  cursor: pointer;
}

/* /settings tier section */
.settings-tier-card {
  display: flex;
  align-items: center;
  gap: 12px;
}
.settings-tier-name {
  font-weight: 800;
  font-size: 15px;
}
.settings-tier-quota-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.settings-tier-quota-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--th-text, #1C1C2E);
}
.settings-tier-quota-label {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
}
.settings-tier-quota-bar {
  height: 6px;
  background: #F1F1F4;
  border-radius: 3px;
  overflow: hidden;
}
.settings-tier-quota-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #6750A4, #7F67BE);
  border-radius: 3px;
  transition: width 0.3s;
}
.settings-tier-quota-bar-fill.danger { background: #EF4444; }
.settings-tier-quota-bar-fill.warning { background: #F59E0B; }

/* ─────────────────────────────────────────────────────────────────
   Phase tier-requests 2026-05-18 — Pending request banner + request flow modal
   ───────────────────────────────────────────────────────────────── */
.pending-request-banner {
  margin: 0 0 16px;
}
.prb-card {
  background: linear-gradient(135deg, #FFF8E1, #FFECB3);
  border: 1.5px solid #FFC107;
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: 0 4px 14px rgba(255, 193, 7, 0.18);
}
.prb-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.prb-icon {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
}
.prb-text { flex: 1; min-width: 0; }
.prb-title {
  margin: 0;
  font-size: 16px;
  font-weight: 900;
  color: #7C2D12;
}
.prb-sub {
  margin: 2px 0 0;
  font-size: 12.5px;
  font-weight: 600;
  color: #92400E;
}
.prb-info {
  margin: 8px 0;
  font-size: 13px;
  line-height: 1.5;
  color: #5C3317;
}
.prb-ref {
  margin: 6px 0 10px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 8px;
  font-size: 12.5px;
  color: #5C3317;
}
.prb-ref strong { font-family: monospace; }
.prb-cancel {
  width: 100%;
  padding: 11px;
  border: 1.5px solid #D97706;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.8);
  color: #92400E;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}
.prb-cancel:hover { background:var(--card-bg); }
.prb-cancel:active { transform: scale(0.98); }

/* Tier card states for pending / disabled */
.account-tier-cta.pending {
  background: linear-gradient(135deg, #FFC107, #FFA000) !important;
  color: #5C3317 !important;
  cursor: default;
}
.account-tier-cta.disabled-pending {
  background: #E5E7EB !important;
  color: #9CA3AF !important;
  cursor: not-allowed;
}

/* Tier request modal (sheet bottom-up) */
.tier-req-modal,
.tier-req-success {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
}
.trm-backdrop,
.trs-backdrop {
  position: absolute;
  inset: 0;
  cursor: pointer;
}
.trm-sheet,
.trs-sheet {
  position: relative;
  background:var(--card-bg);
  width: 100%;
  max-width: 520px;
  max-height: 92vh;
  overflow-y: auto;
  border-radius: 20px 20px 0 0;
  padding: 14px 22px max(24px, calc(env(safe-area-inset-bottom) + 16px));
  box-shadow: 0 -10px 36px rgba(0, 0, 0, 0.28);
  animation: trmSlideUp 0.3s cubic-bezier(.22, 1, .36, 1);
}
@keyframes trmSlideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.trm-handle,
.trs-sheet::before {
  width: 44px;
  height: 4px;
  border-radius: 2px;
  background: #E5E7EB;
  margin: 0 auto 14px;
}
.trm-handle { display: block; }
.trm-title {
  margin: 0 0 4px;
  text-align: center;
  font-size: 21px;
  font-weight: 900;
  color: #1C1C2E;
}
.trm-price {
  margin: 0 0 18px;
  text-align: center;
  font-size: 26px;
  font-weight: 900;
  color: #6750A4;
}
.trm-price small {
  font-size: 14px;
  color: #6B6B7A;
  font-weight: 700;
  margin-left: 4px;
}

.trm-step {
  display: flex;
  gap: 12px;
  margin: 0 0 18px;
}
.trm-step-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6750A4, #7F67BE);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 14px;
  box-shadow: 0 2px 8px rgba(103, 80, 164, 0.32);
}
.trm-step-body { flex: 1; min-width: 0; }
.trm-step-body h3 {
  margin: 4px 0 6px;
  font-size: 14px;
  font-weight: 800;
  color: #1C1C2E;
}
.trm-step-body p {
  margin: 0 0 6px;
  font-size: 13.5px;
  line-height: 1.5;
  color: #3C3C4E;
}
.trm-providers {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  font-size: 13.5px;
  color: #3C3C4E;
}
.trm-providers li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  background: #FFF8F0;
  border: 1px solid #FFE0B2;
  border-radius: 10px;
  margin-bottom: 6px;
}
.trm-providers li.trm-ref-note {
  display: block;
  background: transparent;
  border: none;
  padding: 8px 4px 0;
  font-size: 12.5px;
  color: #6C6C7E;
}
.trm-prov-label {
  font-weight: 700;
  color: #1C1C2E;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.trm-prov-label i { color: #6750A4; }
.trm-paynum {
  display: inline-block;
  padding: 4px 10px;
  background: #6750A4;
  color: #fff;
  border-radius: 8px;
  font-family: 'SF Mono', Menlo, monospace;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  user-select: all;
  transition: background 120ms;
  box-shadow: 0 1px 3px rgba(103, 80, 164, 0.3);
}
.trm-paynum:active { transform: scale(0.97); }
.trm-paynum.copied {
  background: #43A047;
  box-shadow: 0 1px 3px rgba(67, 160, 71, 0.4);
}
.trm-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 8px 0;
}
.trm-field > span {
  font-size: 11px;
  font-weight: 800;
  color: #6B6B7A;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.trm-field > span small {
  text-transform: none;
  font-weight: 600;
  color: #9CA3AF;
  margin-left: 4px;
}
.trm-field input,
.trm-field select,
.trm-field textarea {
  padding: 10px 12px;
  border: 1.5px solid #E5E7EB;
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  color: #1C1C2E;
  background:var(--card-bg);
  width: 100%;
  resize: vertical;
}
.trm-field input:focus,
.trm-field select:focus,
.trm-field textarea:focus {
  outline: none;
  border-color: #6750A4;
  box-shadow: 0 0 0 3px rgba(103, 80, 164, 0.16);
}
.trm-info {
  font-size: 12.5px;
  color: #6B6B7A;
}
.trm-fb {
  font-size: 12.5px;
  color: #6B6B7A;
}
.trm-fb a {
  color: #1877F2;
  font-weight: 700;
  text-decoration: none;
}
.trm-error {
  margin: 4px 0 6px;
  min-height: 18px;
  font-size: 13px;
  font-weight: 700;
  color: #E53935;
  text-align: center;
}
.trm-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}
.trm-btn {
  flex: 1;
  padding: 14px 16px;
  border: 0;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform 0.15s, opacity 0.15s, box-shadow 0.15s;
}
.trm-btn:active { transform: scale(0.98); }
.trm-btn-cancel {
  background: #F1F1F4;
  color: #6B6B7A;
}
.trm-btn-submit {
  background: linear-gradient(135deg, #6750A4, #7F67BE);
  color: #fff;
  box-shadow: 0 4px 14px rgba(103, 80, 164, 0.4);
  letter-spacing: 0.02em;
}
.trm-btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

/* Success modal */
.trs-sheet {
  text-align: center;
  padding-top: 24px;
}
.trs-icon {
  font-size: 56px;
  margin-bottom: 10px;
  animation: trsBounce 0.5s cubic-bezier(.5, 1.7, .8, 1);
}
@keyframes trsBounce {
  0% { transform: scale(0); }
  60% { transform: scale(1.2); }
  100% { transform: scale(1); }
}
.trs-sheet h2 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 900;
  color: #1C1C2E;
}
.trs-sheet p {
  margin: 4px 0;
  font-size: 14px;
  color: #3C3C4E;
  line-height: 1.5;
}
.trs-info { color: #6B6B7A; font-size: 13px; }
.trs-btn {
  margin: 18px 0 4px;
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, #6750A4, #7F67BE);
  color: #fff;
  border: 0;
  border-radius: 12px;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(103, 80, 164, 0.36);
}
.trs-btn:active { transform: scale(0.98); }
