/* ─── Reset & Variables ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    /* Brand */
    --blue:       #2563EB;
    --blue-dk:    #1D4ED8;
    --blue-lt:    #DBEAFE;
    --violet:     #7C3AED;
    --violet-dk:  #6D28D9;
    --violet-lt:  #EDE9FE;
    --grad:       linear-gradient(135deg, #2563EB 0%, #7C3AED 100%);
    --grad-soft:  linear-gradient(135deg, #EFF6FF 0%, #F5F3FF 100%);

    /* Semantic */
    --primary:    var(--blue);
    --primary-dk: var(--blue-dk);
    --success:    #059669;
    --danger:     #DC2626;
    --warning:    #D97706;

    /* Neutral */
    --bg:         #F7F8FD;
    --card:       #FFFFFF;
    --text:       #0F172A;
    --text-2:     #334155;
    --muted:      #64748B;
    --border:     #E2E8F0;
    --border-lt:  #F1F5F9;

    /* Design tokens */
    --radius:     14px;
    --radius-sm:  8px;
    --radius-lg:  20px;
    --shadow-sm:  0 1px 4px rgba(15,23,42,.06);
    --shadow:     0 4px 20px rgba(15,23,42,.08);
    --shadow-md:  0 8px 32px rgba(15,23,42,.12);
    --shadow-lg:  0 20px 60px rgba(37,99,235,.15);
    --font:       'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --transition: .2s cubic-bezier(.4,0,.2,1);
}

/* ─── Base ──────────────────────────────────────────────── */
html { scroll-behavior: smooth; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

/* ─── Layout ────────────────────────────────────────────── */
.container { max-width: 1120px; margin: 0 auto; padding: 0 1.25rem; }

/* ─── Header ────────────────────────────────────────────── */
.site-header {
    background: rgba(255,255,255,.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: .9rem 0;
    position: sticky; top: 0; z-index: 200;
}
.site-header .container {
    display: flex; align-items: center; justify-content: space-between;
}
.logo {
    display: flex; align-items: center; gap: .55rem;
    font-size: 1.25rem; font-weight: 800;
    background: var(--grad);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text; letter-spacing: -.02em;
}
.header-badge {
    font-size: .78rem; font-weight: 600; color: var(--muted);
    background: var(--border-lt); padding: .3rem .75rem;
    border-radius: 99px; border: 1px solid var(--border); display: none;
}
@media (min-width: 480px) { .header-badge { display: block; } }

.main-content { padding: 0 0 5rem; }
.site-footer {
    border-top: 1px solid var(--border); padding: 2rem 0;
    text-align: center; color: var(--muted); font-size: .875rem;
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--blue); }

/* ─── Alertes ───────────────────────────────────────────── */
.alerts { margin: 1.5rem 0 0; }
.alert {
    display: flex; align-items: flex-start; gap: .75rem;
    padding: 1rem 1.25rem; border-radius: var(--radius-sm);
    margin-bottom: .75rem; font-size: .93rem; font-weight: 500;
    animation: slideDown .25s ease;
}
.alert-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: .05rem; }
.alert-error   { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }
.alert-success { background: #ECFDF5; color: #065F46; border: 1px solid #A7F3D0; }
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ─── Hero ──────────────────────────────────────────────── */
.hero {
    position: relative; text-align: center;
    padding: 5rem 1rem 4rem; overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; background: var(--grad-soft); }
.hero-blob {
    position: absolute; border-radius: 50%;
    filter: blur(80px); opacity: .35;
}
.hero-blob--1 {
    width: 500px; height: 500px;
    background: radial-gradient(circle, #BFDBFE, transparent 70%);
    top: -180px; left: -150px;
}
.hero-blob--2 {
    width: 400px; height: 400px;
    background: radial-gradient(circle, #DDD6FE, transparent 70%);
    bottom: -120px; right: -100px;
}
.hero-content { position: relative; z-index: 1; max-width: 600px; margin: 0 auto; }
.hero-eyebrow {
    display: inline-flex; align-items: center; gap: .45rem;
    background: white; border: 1px solid var(--border); border-radius: 99px;
    padding: .35rem .9rem; font-size: .8rem; font-weight: 600; color: var(--violet);
    margin-bottom: 1.25rem; box-shadow: var(--shadow-sm);
}
.hero-eyebrow span { color: var(--muted); }
.hero h1 {
    font-size: clamp(2rem, 5vw, 3rem); font-weight: 900;
    line-height: 1.15; letter-spacing: -.035em; margin-bottom: 1rem;
}
.hero h1 .grad-text {
    background: var(--grad);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero p { font-size: 1.1rem; color: var(--text-2); margin-bottom: 2.5rem; line-height: 1.7; }
.hero-trust {
    display: flex; align-items: center; justify-content: center;
    flex-wrap: wrap; gap: 1.25rem;
}
.hero-trust-item {
    display: flex; align-items: center; gap: .4rem;
    font-size: .83rem; font-weight: 600; color: var(--muted);
}
.hero-trust-item .dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--success); display: inline-block;
}

/* ─── Plans Section ─────────────────────────────────────── */
.plans-section { padding: 3rem 0 0; }
.section-label {
    display: flex; align-items: flex-end; justify-content: space-between;
    margin-bottom: 1.5rem;
}
.section-label h2 { font-size: 1.4rem; font-weight: 800; letter-spacing: -.02em; }
.section-label p { color: var(--muted); font-size: .9rem; }
.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

/* Plan card */
.plan-card {
    background: var(--card); border: 1.5px solid var(--border);
    border-radius: var(--radius); padding: 1.75rem;
    display: flex; flex-direction: column; gap: 1rem;
    box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.plan-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0;
    height: 3px; background: var(--grad);
    opacity: 0; transition: opacity var(--transition);
}
.plan-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: transparent; }
.plan-card:hover::before { opacity: 1; }
.plan-card--featured { border-color: transparent; box-shadow: var(--shadow-lg); }
.plan-card--featured::before { opacity: 1; }
.plan-card--unavailable { opacity: .55; pointer-events: none; }

.plan-badge {
    position: absolute; top: 1rem; right: 1rem;
    background: var(--grad); color: white;
    font-size: .72rem; font-weight: 700; padding: .2rem .6rem;
    border-radius: 99px; letter-spacing: .03em; text-transform: uppercase;
}
.plan-card__top {
    display: flex; align-items: center; justify-content: space-between;
}
.plan-card__icon {
    width: 44px; height: 44px; border-radius: 12px;
    background: var(--grad-soft);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; border: 1px solid var(--border);
}
.plan-card__duration {
    font-size: .8rem; font-weight: 700; color: var(--blue);
    background: var(--blue-lt); padding: .3rem .7rem; border-radius: 99px;
}
.plan-card__name { font-size: 1.15rem; font-weight: 800; letter-spacing: -.02em; }
.plan-card__desc { font-size: .9rem; color: var(--muted); line-height: 1.55; }
.plan-card__pricing { display: flex; align-items: baseline; gap: .3rem; margin-top: .25rem; }
.plan-card__price {
    font-size: 2rem; font-weight: 900; letter-spacing: -.04em;
    background: var(--grad);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.plan-card__currency { font-size: .9rem; font-weight: 600; color: var(--muted); }
.plan-card__stock {
    font-size: .8rem; color: var(--success); font-weight: 600;
    display: flex; align-items: center; gap: .3rem;
}
.plan-card__stock::before {
    content: ''; width: 6px; height: 6px; border-radius: 50%;
    background: var(--success); display: inline-block;
    animation: pulse 2s infinite;
}
.plan-card__footer { margin-top: auto; }

/* ─── How It Works ──────────────────────────────────────── */
.hiw-section { padding: 4rem 0 0; text-align: center; }
.hiw-section .section-header { margin-bottom: 2.5rem; }
.hiw-section .section-header h2 {
    font-size: 1.6rem; font-weight: 800; letter-spacing: -.03em; margin-bottom: .4rem;
}
.hiw-section .section-header p { color: var(--muted); }
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}
.step-card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1.75rem 1.25rem;
    text-align: center; box-shadow: var(--shadow-sm);
    transition: transform var(--transition);
}
.step-card:hover { transform: translateY(-3px); }
.step-num {
    width: 48px; height: 48px; border-radius: 14px;
    background: var(--grad); color: white;
    font-size: 1.1rem; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1rem;
}
.step-icon { font-size: 1.5rem; margin-bottom: .75rem; }
.step-card h3 { font-size: .95rem; font-weight: 700; margin-bottom: .3rem; }
.step-card p { font-size: .85rem; color: var(--muted); line-height: 1.5; }

/* ─── Trust strip ───────────────────────────────────────── */
.trust-strip {
    margin-top: 4rem; padding: 1.75rem;
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow-sm);
    display: flex; align-items: center; justify-content: center;
    flex-wrap: wrap; gap: 1.5rem 2.5rem; text-align: center;
}
.trust-strip p {
    width: 100%; font-size: .8rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: .1em; color: var(--muted);
}
.trust-item {
    display: flex; align-items: center; gap: .5rem;
    font-size: .9rem; font-weight: 700; color: var(--text-2);
}
.trust-item span { font-size: 1.2rem; }

/* ─── Checkout ──────────────────────────────────────────── */
.checkout-page {
    min-height: calc(100vh - 120px);
    display: flex; align-items: flex-start; padding-top: 2.5rem;
}
.checkout-inner { width: 100%; max-width: 920px; margin: 0 auto; }
.back-link {
    display: inline-flex; align-items: center; gap: .45rem;
    color: var(--muted); font-size: .9rem; font-weight: 500;
    margin-bottom: 1.75rem; transition: color var(--transition);
}
.back-link:hover { color: var(--text); text-decoration: none; }

/* Steps progress */
.checkout-steps {
    display: flex; align-items: center; gap: 0; margin-bottom: 2rem;
}
.checkout-step {
    display: flex; align-items: center; gap: .5rem;
    font-size: .83rem; font-weight: 600; color: var(--muted);
}
.checkout-step.active { color: var(--blue); }
.checkout-step.done { color: var(--success); }
.checkout-step__num {
    width: 26px; height: 26px; border-radius: 50%;
    background: var(--border); color: var(--muted);
    display: flex; align-items: center; justify-content: center;
    font-size: .78rem; font-weight: 700; flex-shrink: 0;
}
.checkout-step.active .checkout-step__num { background: var(--blue); color: white; }
.checkout-step.done   .checkout-step__num { background: var(--success); color: white; }
.checkout-step__sep { flex: 1; height: 1px; background: var(--border); margin: 0 .75rem; }

/* Checkout grid */
.checkout-grid {
    display: grid; grid-template-columns: 1fr; gap: 1.5rem;
}
@media (min-width: 700px) {
    .checkout-grid { grid-template-columns: 1fr 380px; }
}

/* Plan summary */
.plan-summary {
    background: var(--card); border: 1.5px solid var(--border);
    border-radius: var(--radius); padding: 1.5rem;
    box-shadow: var(--shadow-sm); order: 2;
}
@media (min-width: 700px) { .plan-summary { order: 0; } }
.plan-summary__header {
    display: flex; align-items: center; gap: 1rem;
    padding-bottom: 1rem; margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-lt);
}
.plan-summary__icon {
    width: 52px; height: 52px; border-radius: 14px;
    background: var(--grad);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; flex-shrink: 0;
}
.plan-summary__name { font-size: 1rem; font-weight: 800; }
.plan-summary__dur  { font-size: .85rem; color: var(--muted); }
.plan-summary__rows { display: flex; flex-direction: column; gap: .55rem; }
.plan-summary__row  {
    display: flex; justify-content: space-between;
    font-size: .9rem; color: var(--text-2);
}
.plan-summary__row strong { font-weight: 700; color: var(--text); }
.plan-summary__total {
    display: flex; justify-content: space-between; align-items: center;
    padding-top: 1rem; margin-top: .75rem; border-top: 1.5px solid var(--border);
}
.plan-summary__total-label { font-weight: 700; }
.plan-summary__total-price {
    font-size: 1.5rem; font-weight: 900;
    background: var(--grad);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.plan-summary__features { margin-top: 1.25rem; display: flex; flex-direction: column; gap: .5rem; }
.feature-item {
    display: flex; align-items: center; gap: .55rem;
    font-size: .86rem; color: var(--text-2);
}
.feature-item .check {
    width: 18px; height: 18px; border-radius: 50%;
    background: #ECFDF5; border: 1px solid #A7F3D0;
    color: var(--success);
    display: flex; align-items: center; justify-content: center;
    font-size: .7rem; flex-shrink: 0;
}

/* Payment form */
.payment-form-card {
    background: var(--card); border: 1.5px solid var(--border);
    border-radius: var(--radius); padding: 1.75rem;
    box-shadow: var(--shadow-sm); order: 1;
}
.payment-form-card h2 {
    font-size: 1.2rem; font-weight: 800;
    letter-spacing: -.02em; margin-bottom: .4rem;
}
.payment-form-card > p { font-size: .9rem; color: var(--muted); margin-bottom: 1.75rem; }

/* Phone input */
.phone-input-wrap {
    display: flex; align-items: stretch;
    border: 1.5px solid var(--border); border-radius: var(--radius-sm);
    overflow: hidden; background: white;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.phone-input-wrap:focus-within {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.phone-prefix {
    display: flex; align-items: center; gap: .4rem;
    padding: 0 .9rem; background: var(--border-lt);
    border-right: 1.5px solid var(--border);
    font-size: .9rem; font-weight: 700; color: var(--text-2);
    white-space: nowrap; user-select: none;
}
.phone-prefix .flag { font-size: 1.2rem; }
.phone-input-field {
    flex: 1; padding: .85rem 1rem; border: none; outline: none;
    font-size: 1.05rem; font-family: var(--font); font-weight: 500;
    background: transparent; color: var(--text); letter-spacing: .04em;
}
.phone-input-field::placeholder { color: #CBD5E1; font-weight: 400; }
.input-hint {
    font-size: .8rem; color: var(--muted); margin-top: .4rem;
    display: flex; align-items: center; gap: .3rem;
}
.secure-badge {
    display: flex; align-items: center; gap: .5rem;
    background: #F0FDF4; border: 1px solid #BBF7D0;
    border-radius: var(--radius-sm); padding: .65rem 1rem;
    margin: 1.25rem 0; font-size: .82rem; font-weight: 600; color: #065F46;
}

/* ─── Boutons ───────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: .5rem; padding: .75rem 1.5rem; border-radius: var(--radius-sm);
    font-weight: 700; font-size: .95rem; font-family: var(--font);
    border: none; cursor: pointer; transition: all var(--transition);
    text-decoration: none; line-height: 1; letter-spacing: -.01em;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn-primary {
    background: var(--grad); color: white;
    box-shadow: 0 4px 14px rgba(37,99,235,.3);
}
.btn-primary:hover { box-shadow: 0 6px 20px rgba(37,99,235,.4); filter: brightness(1.05); color: white; }
.btn-primary:disabled { opacity: .65; cursor: not-allowed; filter: none; box-shadow: none; }
.btn-secondary { background: var(--border-lt); color: var(--text-2); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--border); color: var(--text); }
.btn-block { display: flex; width: 100%; }
.btn-lg { padding: 1rem 2rem; font-size: 1rem; border-radius: 12px; }
.btn-spinner {
    width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,.4); border-top-color: white;
    border-radius: 50%; animation: spin .7s linear infinite; display: none;
}
.btn--loading .btn-text { opacity: .7; }
.btn--loading .btn-spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Formulaires ───────────────────────────────────────── */
.form-group { margin-bottom: 1.25rem; }
.form-group label {
    display: block; font-weight: 700; font-size: .875rem;
    margin-bottom: .5rem; color: var(--text);
}
.form-control {
    width: 100%; padding: .8rem 1rem;
    border: 1.5px solid var(--border); border-radius: var(--radius-sm);
    font-size: 1rem; font-family: var(--font); color: var(--text); background: white;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus {
    outline: none; border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}

/* ─── Status Pages ──────────────────────────────────────── */
.status-page {
    display: flex; flex-direction: column; align-items: center;
    padding: 3.5rem 1rem; text-align: center;
}
.status-card {
    width: 100%; max-width: 520px;
    background: var(--card); border: 1.5px solid var(--border);
    border-radius: 20px; padding: 2.5rem 2rem; box-shadow: var(--shadow-md);
}

/* Success */
.success-icon-wrap { position: relative; width: 88px; height: 88px; margin: 0 auto 1.5rem; }
.success-icon-circle {
    width: 88px; height: 88px; border-radius: 50%;
    background: var(--grad);
    display: flex; align-items: center; justify-content: center;
    font-size: 2.2rem; box-shadow: 0 8px 24px rgba(124,58,237,.3);
    animation: successPop .5s cubic-bezier(.34,1.56,.64,1);
}
.success-ring {
    position: absolute; inset: -8px; border-radius: 50%;
    border: 3px solid transparent;
    background: linear-gradient(white, white) padding-box, var(--grad) border-box;
    animation: ringPulse 2s ease infinite;
}
@keyframes successPop {
    from { transform: scale(.4); opacity: 0; }
    to   { transform: scale(1);  opacity: 1; }
}
@keyframes ringPulse {
    0%, 100% { opacity: .3; transform: scale(1); }
    50%       { opacity: .8; transform: scale(1.06); }
}
.status-card h1 {
    font-size: 1.6rem; font-weight: 900;
    letter-spacing: -.03em; margin-bottom: .5rem;
}
.status-card > p { font-size: .95rem; color: var(--muted); margin-bottom: 1.5rem; line-height: 1.6; }
.phone-highlight {
    background: var(--grad-soft); border: 1.5px solid var(--border);
    border-radius: 12px; padding: 1rem 1.5rem;
    margin: 1.25rem 0; font-size: 1.25rem; font-weight: 800;
    letter-spacing: .04em;
    display: flex; align-items: center; justify-content: center; gap: .5rem;
}
.order-details {
    margin: 1.25rem 0; border: 1px solid var(--border-lt);
    border-radius: 10px; overflow: hidden;
}
.order-details__row {
    display: flex; justify-content: space-between; align-items: center;
    padding: .7rem 1.1rem; font-size: .9rem;
}
.order-details__row:nth-child(odd) { background: var(--border-lt); }
.order-details__row span { color: var(--muted); }
.order-details__row strong { font-weight: 700; }
.sms-info {
    background: #FFF7ED; border: 1px solid #FED7AA;
    border-radius: 10px; padding: 1rem 1.25rem;
    margin: 1rem 0; font-size: .87rem; color: #92400E;
    text-align: left; display: flex; align-items: flex-start; gap: .6rem;
}
.sms-info-icon { font-size: 1.1rem; flex-shrink: 0; }

/* Pending */
.pending-icon-wrap { margin-bottom: 1.5rem; }
.pending-spinner {
    width: 80px; height: 80px; border-radius: 50%;
    border: 5px solid var(--border);
    border-top-color: var(--blue); border-right-color: var(--violet);
    animation: spin .9s linear infinite; margin: 0 auto;
}

/* ─── Badges ────────────────────────────────────────────── */
.badge {
    display: inline-block; padding: .25rem .7rem;
    border-radius: 99px; font-size: .78rem; font-weight: 700; letter-spacing: .01em;
}
.badge--green  { background: #ECFDF5; color: #065F46; }
.badge--orange { background: #FFFBEB; color: #92400E; }
.badge--red    { background: #FEF2F2; color: #991B1B; }
.badge--grey   { background: var(--border-lt); color: var(--muted); }
.badge--out    { background: var(--border-lt); color: var(--muted); }

/* ─── Empty State ───────────────────────────────────────── */
.empty-state { text-align: center; padding: 4rem 2rem; grid-column: 1 / -1; }
.empty-state .icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-state p { color: var(--muted); font-size: 1rem; }

/* ─── Animations ────────────────────────────────────────── */
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
.fade-in-up { animation: fadeInUp .4s ease both; }
.delay-1 { animation-delay: .08s; }
.delay-2 { animation-delay: .16s; }
.delay-3 { animation-delay: .24s; }
.delay-4 { animation-delay: .32s; }

/* ─── Responsive ────────────────────────────────────────── */
@media (max-width: 640px) {
    .hero { padding: 3.5rem 1rem 3rem; }
    .hero h1 { font-size: 2rem; }
    .checkout-steps { display: none; }
    .status-card { padding: 2rem 1.25rem; }
    .phone-highlight { font-size: 1.05rem; }
}
