/* ============================================================
   GEOFIXE — Tunnel d'abonnement (refonte V2, thème clair)
   ============================================================ */

.checkout-page { background: var(--bg); }

/* En-tête minimal de checkout (anti-fuite) */
.checkout-header {
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}
.checkout-header__inner {
    height: 64px; display: flex; align-items: center; justify-content: space-between;
}
.checkout-header .secure-badge { margin: 0; }

.checkout-main { padding-block: clamp(1.5rem, 5vw, 3rem) 4rem; }
.checkout-shell { max-width: 720px; margin-inline: auto; }
.checkout-shell--wide { max-width: 1080px; }

/* ===== Barre de progression ===== */
.progress-steps {
    display: flex; align-items: center; gap: .5rem;
    margin-bottom: 2rem;
}
.pstep { display: flex; align-items: center; gap: .55rem; flex: 0 0 auto; }
.pstep__num {
    width: 30px; height: 30px; border-radius: 50%;
    display: grid; place-items: center;
    background: var(--surface); border: 1.5px solid var(--border-strong);
    color: var(--muted); font-weight: 700; font-size: .9rem;
    transition: all var(--t);
}
.pstep__label { font-size: .85rem; font-weight: 600; color: var(--muted); display: none; }
.pstep.is-active .pstep__num { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: var(--shadow-brand); }
.pstep.is-active .pstep__label { color: var(--ink); }
.pstep.is-done .pstep__num { background: var(--trust-bright); border-color: var(--trust-bright); color: #fff; }
.pstep__line { flex: 1 1 auto; height: 2px; background: var(--border-strong); border-radius: 2px; min-width: 12px; }
.pstep__line.is-done { background: var(--trust-bright); }
@media (min-width: 620px) { .pstep__label { display: inline; } }

/* ===== Étapes ===== */
.cstep { display: none; }
.cstep.is-active { display: block; animation: fadeUp .35s var(--ease); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.cstep__head { margin-bottom: 1.6rem; text-align: center; }
.cstep__head h1 { font-size: clamp(1.5rem, 4vw, 2rem); }
.cstep__head p { color: var(--muted); margin-top: .4rem; }

/* ===== Sélection de formule ===== */
.plan-choices { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 800px) { .plan-choices { grid-template-columns: repeat(3, 1fr); align-items: start; } }

.plan-choice {
    position: relative;
    text-align: left;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--r-lg);
    padding: 1.4rem;
    cursor: pointer;
    transition: border-color var(--t), box-shadow var(--t), transform var(--t);
    display: flex; flex-direction: column; gap: .25rem;
}
.plan-choice:hover { border-color: var(--brand); box-shadow: var(--shadow-md); }
.plan-choice.is-selected { border-color: var(--brand); box-shadow: 0 0 0 4px var(--ring); }
.plan-choice__badge {
    position: absolute; top: -11px; left: 1.4rem;
    background: var(--brand); color: #fff;
    font-size: .72rem; font-weight: 600; padding: .25rem .7rem; border-radius: var(--r-full);
}
.plan-choice__name { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; }
.plan-choice__price { margin: .3rem 0; }
.plan-choice__price .amount { font-family: var(--font-display); font-weight: 800; font-size: 1.9rem; }
.plan-choice__price .per { color: var(--muted); font-weight: 600; font-size: .9rem; }
.plan-choice__tagline { color: var(--muted); font-size: .9rem; }
.plan-choice__features { margin-top: .9rem; display: grid; gap: .45rem; }
.plan-choice__features li { position: relative; padding-left: 1.5rem; font-size: .9rem; color: var(--ink-soft); }
.plan-choice__features li::before {
    content: "✓"; position: absolute; left: 0; color: var(--brand-600); font-weight: 700;
}
.plan-choice__radio {
    position: absolute; top: 1.4rem; right: 1.4rem;
    width: 22px; height: 22px; border-radius: 50%;
    border: 2px solid var(--border-strong); transition: all var(--t);
}
.plan-choice.is-selected .plan-choice__radio { border-color: var(--brand); background: var(--brand); box-shadow: inset 0 0 0 4px #fff; }

/* ===== Formulaires ===== */
.sub-form { display: grid; gap: 1.1rem; }
.form-row { display: grid; gap: 1.1rem; grid-template-columns: 1fr; }
@media (min-width: 520px) { .form-row { grid-template-columns: 1fr 1fr; } }
.form-group { display: flex; flex-direction: column; }
.form-label { font-size: .85rem; font-weight: 600; color: var(--ink-soft); margin-bottom: .45rem; }
.form-input {
    width: 100%; background: var(--surface);
    border: 1.5px solid var(--border-strong); border-radius: var(--r-md);
    padding: .8rem 1rem; font: inherit; font-size: 1rem; color: var(--ink);
    outline: none; transition: border-color var(--t-fast), box-shadow var(--t-fast);
    -webkit-appearance: none;
}
.form-input::placeholder { color: var(--faint); }
.form-input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--ring); }
.input-feedback { font-size: .82rem; color: #c0334a; margin-top: .35rem; min-height: 0; }
.password-requirements { font-size: .82rem; color: var(--muted); margin-top: .5rem; line-height: 1.6; }
.password-input-container { position: relative; }
.password-toggle { position: absolute; right: .7rem; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; font-size: 1.1rem; }

.notice {
    background: var(--brand-50); border: 1px solid var(--brand-100);
    border-radius: var(--r-md); padding: .9rem 1rem;
    font-size: .9rem; line-height: 1.55; color: var(--ink-soft); margin-bottom: .9rem;
}
.notice strong { color: var(--brand-700); }
.notice a { color: var(--brand-600); font-weight: 600; text-decoration: underline; }

/* ===== Numéros ===== */
.numbers-grid { display: grid; gap: .8rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 860px) { .numbers-grid { grid-template-columns: repeat(3, 1fr); } }
.number-card {
    background: var(--surface); border: 2px solid var(--border-strong);
    border-radius: var(--r-md); padding: 1.1rem .8rem; cursor: pointer; text-align: center;
    box-shadow: var(--shadow-sm);
    transition: border-color var(--t), box-shadow var(--t), transform var(--t), background var(--t);
}
.number-card:hover { border-color: var(--brand); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.number-card.is-selected {
    border-color: var(--brand);
    background: var(--brand-50);
    box-shadow: 0 0 0 3px var(--ring), var(--shadow-md);
}
.number-card__num {
    font-size: clamp(1rem, 3.5vw, 1.2rem); font-weight: 700;
    letter-spacing: .02em; color: var(--ink);
}
.number-card.is-selected .number-card__num { color: var(--brand-700); }
.number-card__region { font-size: .82rem; color: var(--muted); margin-top: .3rem; }
.loading-numbers { grid-column: 1/-1; text-align: center; padding: 2.5rem 0; color: var(--muted); }
.loading-numbers .spinner { width: 28px; height: 28px; border: 3px solid var(--surface-2); border-top-color: var(--brand); border-radius: 50%; animation: spin .7s linear infinite; margin: 0 auto 1rem; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Récapitulatif & paiement ===== */
.order-summary { display: grid; gap: 1rem; margin-bottom: 1.5rem; }
.summary-section { background: var(--surface); border: var(--card-border); border-radius: var(--r-lg); padding: 1.2rem 1.4rem; }
.summary-title { font-size: .95rem; margin-bottom: .8rem; }
.summary-content { font-size: .95rem; color: var(--ink-soft); line-height: 1.7; }
.pricing-detail { display: flex; justify-content: space-between; padding: .35rem 0; color: var(--ink-soft); }
.pricing-detail .price.free { color: var(--trust); font-weight: 600; }
.pricing-total { display: flex; justify-content: space-between; padding-top: .7rem; margin-top: .5rem; border-top: 1px dashed var(--border-strong); font-weight: 700; color: var(--ink); font-size: 1.05rem; }

.payment-section { background: var(--surface); border: var(--card-border); border-radius: var(--r-lg); padding: 1.4rem; margin-bottom: 1.25rem; }
.stripe-card-element { background: var(--bg); border: 1.5px solid var(--border-strong); border-radius: var(--r-md); padding: .9rem 1rem; }
.stripe-error-message { color: #c0334a; font-size: .85rem; margin-top: .5rem; }
.security-notice { display: flex; align-items: center; gap: .5rem; font-size: .88rem; color: var(--muted); margin-top: .9rem; }
.secure-badge { display: inline-flex; align-items: center; gap: .35rem; background: var(--trust-100); color: var(--trust); border-radius: var(--r-full); padding: .25rem .7rem; font-size: .74rem; font-weight: 600; }

.terms-checkbox { margin-bottom: 1.5rem; }
.checkbox-container { display: flex; align-items: flex-start; gap: .65rem; cursor: pointer; font-size: .9rem; color: var(--ink-soft); }
.checkbox-container input { width: 20px; height: 20px; accent-color: var(--brand); flex: none; margin-top: .1rem; }
.checkbox-container a { color: var(--brand-600); font-weight: 600; text-decoration: underline; }

/* ===== Actions ===== */
.step-actions { display: flex; gap: .8rem; justify-content: space-between; margin-top: 1.75rem; }
.step-actions .btn { flex: 1; min-width: 0; white-space: normal; text-align: center; padding-inline: 1rem; }
.btn.disabled, .btn:disabled { opacity: .5; pointer-events: none; }

/* ===== Overlay traitement ===== */
.processing-overlay {
    position: fixed; inset: 0; z-index: 300;
    background: rgba(27,24,48,.55); backdrop-filter: blur(4px);
    display: none; align-items: center; justify-content: center; padding: 1.5rem;
}
.processing-overlay.is-open { display: flex; }
.processing-modal { background: var(--surface); border-radius: var(--r-xl); padding: 2rem; max-width: 440px; width: 100%; text-align: center; box-shadow: var(--shadow-lg); }
.processing-modal .spinner { width: 40px; height: 40px; border: 3px solid var(--surface-2); border-top-color: var(--brand); border-radius: 50%; animation: spin .7s linear infinite; margin: 0 auto 1.25rem; }
.proc-steps { display: grid; gap: .6rem; text-align: left; margin-top: .5rem; }
.proc-step { display: flex; align-items: center; gap: .75rem; color: var(--muted); font-size: .95rem; transition: color var(--t); }
.proc-step .step-icon {
    width: 28px; height: 28px; flex: none; border-radius: 50%;
    display: grid; place-items: center; font-size: .85rem; font-weight: 700;
    background: var(--surface-2); color: var(--muted); border: 1.5px solid var(--border-strong);
    transition: all var(--t);
}
.proc-step.active { color: var(--ink); }
.proc-step.active .step-icon { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: var(--shadow-brand); }
.proc-step.completed { color: var(--trust); }
.proc-step.completed .step-icon { background: var(--trust-bright); border-color: var(--trust-bright); color: #fff; }
