/* ============================================================
   AUTH STYLES — login.html & pricing.html
   Police : Inter + Space Grotesk  |  Accent : #2563EB
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: #F1F5F9;
    color: #1E293B;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

a { color: #2563EB; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── AUTH CARD ── */
.auth-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

.auth-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.07);
    width: 100%;
    max-width: 420px;
    padding: 40px 36px;
}

@media (max-width: 480px) {
    .auth-card { padding: 28px 20px; border-radius: 12px; }
}

.auth-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 28px;
}
.auth-logo-icon {
    width: 40px; height: 40px;
    background: #2563EB;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
}
.auth-logo-icon svg { color: #fff; }
.auth-logo-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #1E293B;
    line-height: 1.2;
}
.auth-logo-sub {
    font-size: 0.7rem;
    font-weight: 500;
    color: #94A3B8;
    display: block;
}

/* Tabs */
.auth-tabs {
    display: flex;
    background: #F1F5F9;
    border-radius: 8px;
    padding: 3px;
    margin-bottom: 24px;
}
.auth-tab {
    flex: 1;
    padding: 8px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    border: none;
    background: transparent;
    color: #64748B;
    transition: all .15s;
}
.auth-tab.active {
    background: #FFFFFF;
    color: #1E293B;
    box-shadow: 0 1px 3px rgba(0,0,0,.1);
}

/* Form */
.auth-form { display: flex; flex-direction: column; gap: 14px; }

.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #374151;
    letter-spacing: .01em;
}
.form-input {
    padding: 10px 13px;
    border: 1.5px solid #E2E8F0;
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
    color: #1E293B;
    background: #F8FAFC;
    transition: border-color .15s, box-shadow .15s;
    outline: none;
}
.form-input:focus {
    border-color: #2563EB;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}

.btn-auth {
    padding: 11px;
    background: #2563EB;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: background .15s, transform .1s;
    margin-top: 4px;
}
.btn-auth:hover   { background: #1D4ED8; }
.btn-auth:active  { transform: scale(.98); }
.btn-auth:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.auth-divider {
    text-align: center;
    font-size: 0.78rem;
    color: #94A3B8;
    margin: 4px 0;
}

/* Messages */
.auth-msg {
    padding: 10px 13px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 500;
    display: none;
}
.auth-msg.error   { background: #FEF2F2; border: 1px solid #FECACA; color: #DC2626; display: block; }
.auth-msg.success { background: #F0FDF4; border: 1px solid #BBF7D0; color: #16A34A; display: block; }

/* ── AUTH BAR (barre du haut dans index.html) ── */
.auth-bar {
    background: #1E293B;
    color: #94A3B8;
    font-size: 0.75rem;
    padding: 7px 0;
}
.auth-bar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.auth-bar-left { display: flex; align-items: center; gap: 8px; }
.auth-bar-email { color: #CBD5E1; font-weight: 500; }
.plan-badge {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.plan-badge.free    { background: #334155; color: #94A3B8; }
.plan-badge.premium { background: #FEF3C7; color: #92400E; }

.auth-bar-right { display: flex; align-items: center; gap: 12px; }
.auth-bar-link {
    color: #94A3B8;
    text-decoration: none;
    font-weight: 500;
    transition: color .15s;
}
.auth-bar-link:hover { color: #fff; }
.auth-bar-btn {
    background: #2563EB;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 4px 12px;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s;
    font-family: 'Inter', sans-serif;
}
.auth-bar-btn:hover { background: #1D4ED8; }
.auth-bar-btn.secondary {
    background: transparent;
    border: 1px solid #475569;
    color: #94A3B8;
}
.auth-bar-btn.secondary:hover { border-color: #94A3B8; color: #fff; background: transparent; }

/* ── UPGRADE BANNER ── */
.upgrade-banner {
    background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
    border: 1px solid #BFDBFE;
    border-radius: 12px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.upgrade-banner-text {
    font-size: 0.82rem;
    color: #1E40AF;
    font-weight: 500;
    flex: 1;
}
.upgrade-banner-text strong { font-weight: 700; }
.upgrade-banner-btn {
    background: #2563EB;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    font-family: 'Inter', sans-serif;
    transition: background .15s;
    flex-shrink: 0;
}
.upgrade-banner-btn:hover { background: #1D4ED8; }

/* ── LOCK BADGE sur les fonctions premium ── */
.premium-lock {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    background: #FEF3C7;
    color: #92400E;
    border: 1px solid #FDE68A;
    border-radius: 999px;
    padding: 1px 7px;
    text-transform: uppercase;
    letter-spacing: .05em;
    vertical-align: middle;
    margin-left: 6px;
}

/* ── UPGRADE MODAL ── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 16px;
}
.modal-overlay.open { display: flex; }

.modal-card {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    max-width: 440px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
    text-align: center;
}
.modal-icon {
    width: 56px; height: 56px;
    background: #FEF3C7;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 16px;
}
.modal-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #1E293B;
    margin-bottom: 8px;
}
.modal-desc {
    font-size: 0.85rem;
    color: #64748B;
    line-height: 1.6;
    margin-bottom: 20px;
}
.modal-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.modal-btn-primary {
    background: #2563EB;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: background .15s;
}
.modal-btn-primary:hover { background: #1D4ED8; }
.modal-btn-secondary {
    background: #F1F5F9;
    color: #475569;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: background .15s;
}
.modal-btn-secondary:hover { background: #E2E8F0; }

/* ── PRICING PAGE ── */
.pricing-header {
    text-align: center;
    padding: 48px 20px 32px;
}
.pricing-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 700;
    color: #1E293B;
    margin-bottom: 10px;
    letter-spacing: -.02em;
}
.pricing-sub {
    font-size: 1rem;
    color: #64748B;
    max-width: 480px;
    margin: 0 auto;
}

.billing-toggle {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: #F1F5F9;
    border-radius: 999px;
    padding: 4px;
    margin: 24px auto 0;
}
.billing-option {
    padding: 8px 18px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    background: transparent;
    color: #64748B;
    transition: all .15s;
    font-family: 'Inter', sans-serif;
}
.billing-option.active { background: #fff; color: #1E293B; box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.billing-save {
    font-size: 0.68rem;
    font-weight: 700;
    background: #DCFCE7;
    color: #166534;
    padding: 2px 7px;
    border-radius: 999px;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    max-width: 780px;
    margin: 32px auto;
    padding: 0 20px 48px;
}

.plan-card {
    background: #fff;
    border: 2px solid #E2E8F0;
    border-radius: 16px;
    padding: 28px;
    position: relative;
    transition: box-shadow .2s;
}
.plan-card:hover { box-shadow: 0 8px 30px rgba(0,0,0,.08); }
.plan-card.featured {
    border-color: #2563EB;
    box-shadow: 0 4px 20px rgba(37,99,235,.15);
}
.plan-popular {
    position: absolute;
    top: -13px;
    left: 50%;
    transform: translateX(-50%);
    background: #2563EB;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 14px;
    border-radius: 999px;
    white-space: nowrap;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.plan-name {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #1E293B;
    margin-bottom: 4px;
}
.plan-price-wrap { margin: 16px 0; }
.plan-price {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.4rem;
    font-weight: 700;
    color: #1E293B;
    letter-spacing: -.02em;
}
.plan-currency { font-size: 1.2rem; vertical-align: top; margin-top: 8px; display: inline-block; }
.plan-period { font-size: 0.82rem; color: #94A3B8; margin-left: 4px; }
.plan-yearly-note { font-size: 0.75rem; color: #64748B; margin-top: 4px; }

.plan-features { list-style: none; margin: 20px 0; display: flex; flex-direction: column; gap: 9px; }
.plan-feature {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.85rem;
    color: #374151;
}
.plan-feature svg { flex-shrink: 0; margin-top: 1px; }
.plan-feature.locked { color: #94A3B8; }

.btn-plan {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    border: none;
    transition: all .15s;
    margin-top: 4px;
}
.btn-plan.primary {
    background: #2563EB;
    color: #fff;
    box-shadow: 0 4px 14px rgba(37,99,235,.3);
}
.btn-plan.primary:hover { background: #1D4ED8; box-shadow: 0 6px 18px rgba(37,99,235,.4); }
.btn-plan.secondary { background: #F1F5F9; color: #475569; }
.btn-plan.secondary:hover { background: #E2E8F0; }
.btn-plan:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }

/* Alert success/cancel sur pricing */
.pricing-alert {
    max-width: 520px;
    margin: 0 auto 16px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
    display: none;
}
.pricing-alert.success { background: #F0FDF4; border: 1px solid #BBF7D0; color: #16A34A; display: block; }
.pricing-alert.error   { background: #FEF2F2; border: 1px solid #FECACA; color: #DC2626; display: block; }

/* Footer minimal */
.auth-footer {
    text-align: center;
    padding: 16px;
    font-size: 0.75rem;
    color: #94A3B8;
    border-top: 1px solid #E2E8F0;
    background: #fff;
}
