/* ═══════════════════════════════════════════════════════════════
   DevisVox — Page Abonnement
   Mobile-first · Aucun @media query
   Scopé sous .abo-* pour éviter les conflits globaux.
   Fond sombre (#0F172A) propre à cette page de paywall.
   ═══════════════════════════════════════════════════════════════ */

/* ── Cache header/nav quand abonnement visible ─────────────────── */
body:has(#abonnement-page:not(.hidden)) #bottom-nav { display:none !important; }
body:has(#abonnement-page:not(.hidden)) #header { display:none !important; }

body:has(#recharges-page:not(.hidden)) {
  background: #0F172A;
}

/* ── Page wrapper ────────────────────────────────────────────── */
#abonnement-page {
  min-height: 100%;
}

#recharges-page {
  background: #0F172A;
  min-height: 100dvh;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 100;
  overflow-y: auto;
}

.abo-page {
  position: relative;
  background: #0F172A;
  min-height: 100vh;
  padding: 24px 20px 64px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  color: #F8FAFC;
  box-sizing: border-box;
}

#abonnement-page .abo-page {
  padding-bottom: 120px;
}

/* ── Bouton retour ───────────────────────────────────────────── */
.abo-back-btn {
  position: absolute;
  top: 16px;
  left: 16px;
  background: transparent;
  border: none;
  color: #F8FAFC;
  font-size: 28px;
  cursor: pointer;
  padding: 8px;
}

/* ── Header ──────────────────────────────────────────────────── */
.abo-header {
  text-align: center;
  padding: 12px 0 4px;
}

.abo-logo {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -1.5px;
  line-height: 1;
  margin-bottom: 12px;
}

.abo-logo-devis { color: #F8FAFC; }
.abo-logo-vox   { color: #FF3300; }

.abo-tagline {
  font-size: 15px;
  color: #94A3B8;
  line-height: 1.5;
  margin: 0 auto;
  max-width: 280px;
  text-wrap: pretty;
}

/* ── Billing Toggle ──────────────────────────────────────────── */
.abo-toggle-wrap {
  display: flex;
  justify-content: center;
}

.abo-toggle {
  display: flex;
  background: #1E293B;
  border-radius: 9999px;
  padding: 4px;
  gap: 2px;
}

.abo-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 20px;
  border-radius: 9999px;
  border: none;
  background: transparent;
  color: #64748B;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  font-family: inherit;
  white-space: nowrap;
  line-height: 1;
}

.abo-toggle-btn.active {
  background: #FF6B00;
  color: #FFFFFF;
}

.abo-toggle-btn:not(.active):hover {
  color: #CBD5E1;
}

.abo-toggle-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 9999px;
  background: rgba(255, 107, 0, 0.20);
  color: #FF6B00;
  font-size: 11px;
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease;
}

.abo-toggle-btn.active .abo-toggle-badge {
  background: rgba(255, 255, 255, 0.20);
  color: #FFFFFF;
}

/* ── Plan cards ──────────────────────────────────────────────── */
.abo-plans {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.abo-plan-card {
  position: relative;
  background: #1E293B;
  border: 1.5px solid #334155;
  border-radius: 16px;
  padding: 20px;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
  box-sizing: border-box;
}

.abo-plan-check {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #FF6600;
    border-radius: 50%;
    border: 2px solid var(--bg);
    box-shadow: 0 2px 8px rgba(255,102,0,0.3);
    animation: aboCheckPop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes aboCheckPop {
    from { transform: scale(0); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.abo-plan-check svg { width: 14px; height: 14px; }

.abo-plan-card:hover {
  border-color: rgba(255, 107, 0, 0.45);
}

.abo-plan-card:focus-visible {
  box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.35);
}

.abo-plan-card.selected {
  border-color: #FF6B00;
  box-shadow: 0 0 0 1px rgba(255, 107, 0, 0.25), 0 4px 16px rgba(255, 107, 0, 0.12);
}

/* ── Plan header ─────────────────────────────────────────────── */
.abo-plan-header {
  margin-bottom: 16px;
}

.abo-plan-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.abo-plan-name {
  font-size: 18px;
  font-weight: 700;
  color: #F8FAFC;
}

.abo-badge-popular {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 9999px;
  background: #FF6B00;
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.abo-badge-savings {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 9999px;
  background: rgba(16, 185, 129, 0.15);
  color: #10B981;
  font-size: 11px;
  font-weight: 700;
}

.abo-plan-price-row {
  display: flex;
  align-items: baseline;
  gap: 2px;
  flex-wrap: wrap;
}

.abo-plan-price {
  font-size: 36px;
  font-weight: 900;
  color: #F8FAFC;
  line-height: 1;
}

.abo-plan-period {
  font-size: 14px;
  color: #94A3B8;
  font-weight: 400;
  padding-left: 2px;
}

.abo-plan-strike {
  font-size: 17px;
  color: #94A3B8;
  text-decoration: line-through;
  line-height: 1;
}

.abo-plan-yearly-note {
  font-size: 13px;
  color: #475569;
  margin-left: 8px;
  align-self: flex-end;
  padding-bottom: 2px;
}

/* ── Features list ───────────────────────────────────────────── */
.abo-features-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.abo-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: #CBD5E1;
  line-height: 1.4;
}

.abo-check-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* CSS overrides SVG presentation attributes for selected state */
.abo-plan-card.selected .abo-check-icon circle {
  fill: #FF6B00;
  fill-opacity: 0.22;
}

.abo-plan-card.selected .abo-check-icon path {
  stroke: #FF6B00;
}

.abo-feature-divider {
  font-size: 11px;
  font-weight: 700;
  color: #FF6B00;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding-top: 6px;
  border-top: 1px solid #243352;
  margin-top: 2px;
}

/* ── Bannière essai gratuit (trial) ───────────────────────────── */
.abo-trial-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(255, 107, 0, 0.10);
  border: 1px solid rgba(255, 107, 0, 0.25);
  border-radius: 10px;
  padding: 11px 13px;
  font-size: 13px;
  font-weight: 500;
  color: #CBD5E1;
  line-height: 1.45;
}

.abo-trial-banner-ico {
  font-size: 15px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ── CTA Button ──────────────────────────────────────────────── */
.abo-cta-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px;
  background: linear-gradient(to top, #0F172A 80%, transparent);
  z-index: 10;
}

.abo-cta-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 54px;
  padding: 16px 20px;
  background: #FF6B00;
  color: #FFFFFF;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  letter-spacing: 0.01em;
  line-height: 1.3;
  text-align: center;
  transition: background 0.2s ease, transform 0.15s ease;
  box-shadow: 0 4px 16px rgba(255, 107, 0, 0.35);
  box-sizing: border-box;
}

.abo-cta-btn:hover:not(:disabled) {
  background: #FF8533;
  box-shadow: 0 6px 20px rgba(255, 107, 0, 0.45);
}

.abo-cta-btn:active:not(:disabled) {
  transform: scale(0.98);
}

.abo-cta-btn:disabled,
.abo-cta-btn.abo-loading {
  opacity: 0.68;
  cursor: not-allowed;
}

.abo-btn-text {
  transition: opacity 0.15s ease;
  line-height: 1.3;
}

.abo-btn-spinner {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
}

.abo-spinner-svg {
  width: 22px;
  height: 22px;
  animation: abo-spin 0.8s linear infinite;
}

.abo-cta-sub {
  text-align: center;
  font-size: 12px;
  color: #FFFFFF;
  margin: 0;
  line-height: 1.5;
}

/* ── Inline error message ────────────────────────────────────── */
.abo-inline-error {
  padding: 12px 16px;
  background: rgba(255, 51, 0, 0.10);
  border: 1px solid rgba(255, 51, 0, 0.30);
  border-radius: 10px;
  color: #FFA591;
  font-size: 14px;
  line-height: 1.4;
  animation: abo-fade-in 0.2s ease;
}

/* ── Recharges ponctuelles (packs) ───────────────────────────── */
.abo-packs-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.abo-packs-title {
  font-size: 18px;
  font-weight: 700;
  color: #F8FAFC;
  margin: 0;
}

.abo-packs-grid {
  display: flex;
  gap: 12px;
}

.abo-pack-card {
  flex: 1;
  background: #1E293B;
  border: 1.5px solid #334155;
  border-radius: 16px;
  padding: 20px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.abo-pack-name {
  font-size: 15px;
  font-weight: 700;
  color: #F8FAFC;
  min-height: 2.6em;
}

.abo-pack-price {
  font-size: 28px;
  font-weight: 900;
  color: #F8FAFC;
  line-height: 1;
}

.abo-pack-features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: #CBD5E1;
}

.abo-pack-note {
    font-size: 11px;
    color: var(--text2);
    opacity: 0.7;
    margin: 8px 0 0 0;
    line-height: 1.4;
    font-style: italic;
}

.abo-pack-btn {
  margin-top: auto;
  padding: 10px 16px;
  background: transparent;
  color: #FF6B00;
  border: 1.5px solid #FF6B00;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.abo-pack-btn:hover:not(:disabled) {
  background: #FF6B00;
  color: #FFFFFF;
}

.abo-pack-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ── Animations ──────────────────────────────────────────────── */
@keyframes abo-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes abo-fade-in {
  from { opacity: 0; transform: translateY(-5px); }
  to   { opacity: 1; transform: translateY(0); }
}
