/* ============================================================
   Tunnelora — Funnel Page Stylesheet  (modern redesign)
   ============================================================ */

:root {
    --f-primary:    #6C63FF;
    --f-primary-dk: #5A52D5;
    --f-accent:     #FF6584;
    --f-dark:       #0F0F23;
    --f-dark2:      #1E1E3A;
    --f-gray:       #6B7280;
    --f-gray-lt:    #9CA3AF;
    --f-white:      #FFFFFF;
    --f-border:     #E5E7EB;
    --f-bg:         #F8F7FF;
    --f-radius:     14px;
    --f-radius-lg:  24px;
    --f-font:       -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    --f-shadow:     0 8px 32px rgba(108,99,255,.12);
    --f-shadow-lg:  0 20px 60px rgba(0,0,0,.15);
}

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

html { scroll-behavior: smooth; }

body.tnl-funnel {
    font-family: var(--f-font);
    background: var(--f-bg);
    color: var(--f-dark);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

/* ── Wrapper ─────────────────────────────────────────────── */
.tnl-funnel-wrap {
    max-width: 820px;
    margin: 0 auto;
    padding: 0 0 48px;
}

/* Marqueur transparent utilisé par les templates riches de la bibliothèque */
/* Évite l'application de tnl-funnel-content--plain sur des contenus structurés */
.tnl-tpl { display: contents; }

/* ── Content area ─────────────────────────────────────────── */
.tnl-funnel-content {
    margin-bottom: 0;
}

/* ── HERO ────────────────────────────────────────────────── */
.tnl-hero {
    background: linear-gradient(135deg, #0F0F23 0%, #1A1040 45%, #0D1B4B 100%);
    color: #fff;
    padding: 80px 40px 72px;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 0;
}

.tnl-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 50% 0%, rgba(108,99,255,.45) 0%, transparent 70%),
        radial-gradient(ellipse 50% 40% at 80% 100%, rgba(255,101,132,.2) 0%, transparent 60%);
    pointer-events: none;
}

.tnl-hero > * { position: relative; z-index: 1; }

.tnl-hero__title {
    font-size: clamp(1.9rem, 5vw, 3.2rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.025em;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #fff 0%, #C4BFFF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tnl-hero__sub {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: rgba(255,255,255,.75);
    max-width: 580px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ── BENEFITS ─────────────────────────────────────────────── */
.tnl-benefits {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 48px 32px;
    background: #fff;
}

.tnl-benefit {
    background: var(--f-bg);
    border-radius: var(--f-radius);
    padding: 28px 22px;
    border-top: 4px solid var(--f-primary);
    text-align: center;
    transition: transform .2s, box-shadow .2s;
}

.tnl-benefit:nth-child(2) { border-top-color: #FF6584; }
.tnl-benefit:nth-child(3) { border-top-color: #10B981; }

.tnl-benefit:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(108,99,255,.12);
}

.tnl-benefit__icon {
    font-size: 2.2rem;
    display: block;
    margin-bottom: 14px;
    line-height: 1;
}

.tnl-benefit h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--f-dark);
    margin-bottom: 8px;
}

.tnl-benefit p {
    font-size: .9rem;
    color: var(--f-gray);
    line-height: 1.55;
    margin: 0;
}

/* ── PROBLEM SECTION ──────────────────────────────────────── */
.tnl-problem {
    padding: 48px 40px;
    background: #FFF7F0;
    border-left: 5px solid var(--f-accent);
}

.tnl-problem h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--f-dark);
}

.tnl-problem ul {
    list-style: none;
    padding: 0;
}

.tnl-problem ul li {
    padding: 10px 0 10px 32px;
    position: relative;
    font-size: 1rem;
    color: #374151;
    border-bottom: 1px solid rgba(0,0,0,.05);
}

.tnl-problem ul li::before {
    content: '😓';
    position: absolute;
    left: 0;
    top: 10px;
}

/* ── TESTIMONIALS ─────────────────────────────────────────── */
.tnl-testimonials {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 48px 32px;
    background: var(--f-bg);
}

.tnl-testimonial {
    background: #fff;
    border-radius: var(--f-radius);
    padding: 28px;
    box-shadow: var(--f-shadow);
    position: relative;
}

.tnl-testimonial::before {
    content: '"';
    position: absolute;
    top: 12px;
    left: 20px;
    font-size: 4rem;
    color: var(--f-primary);
    opacity: .15;
    line-height: 1;
    font-family: Georgia, serif;
}

.tnl-testimonial p {
    font-size: .95rem;
    color: #374151;
    font-style: italic;
    margin-bottom: 14px;
    line-height: 1.65;
}

.tnl-testimonial cite {
    font-size: .85rem;
    font-style: normal;
    font-weight: 600;
    color: var(--f-primary);
}

/* ── CTA SECTION ─────────────────────────────────────────── */
.tnl-cta-section {
    background: linear-gradient(135deg, #6C63FF 0%, #9C63FF 60%, #FF6584 100%);
    color: #fff;
    text-align: center;
    padding: 60px 40px;
    position: relative;
    overflow: hidden;
}

.tnl-cta-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 70% 70% at 50% 120%, rgba(255,255,255,.12) 0%, transparent 70%);
    pointer-events: none;
}

.tnl-cta-section > * { position: relative; z-index: 1; }

.tnl-cta-urgency {
    font-size: 1.05rem;
    color: rgba(255,255,255,.85);
    margin-bottom: 20px;
    font-weight: 500;
}

.tnl-price-display {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
    text-shadow: 0 4px 20px rgba(0,0,0,.2);
}

.tnl-cta-guarantee {
    font-size: .95rem;
    color: rgba(255,255,255,.8);
    margin: 0;
}

/* ── GENERIC CONTENT FALLBACK ─────────────────────────────── */
.tnl-funnel-content h1 {
    font-size: clamp(1.7rem, 4vw, 2.6rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 16px;
    color: var(--f-dark);
    padding: 32px 32px 0;
}

.tnl-funnel-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 24px 32px 12px;
    color: var(--f-dark);
}

.tnl-funnel-content h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 16px 32px 8px;
}

.tnl-funnel-content p {
    margin: 0 32px 14px;
    color: #374151;
}

.tnl-funnel-content ul {
    padding-left: 20px;
    margin: 0 32px 14px;
}

.tnl-funnel-content li { margin-bottom: 7px; }

.tnl-funnel-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 16px 0;
    display: block;
}

.tnl-funnel-content video,
.tnl-funnel-content iframe {
    max-width: 100%;
    border-radius: 10px;
    margin: 16px 0;
    display: block;
}

.tnl-funnel-content strong { font-weight: 700; color: var(--f-dark); }
.tnl-funnel-content em     { font-style: italic; }

.tnl-funnel-content a.tnl-funnel-btn {
    display: block;
    margin: 20px 32px;
    text-align: center;
    text-decoration: none;
}

/* ── PLAIN CONTENT (texte simple, sans template structuré) ── */
/*
 * Activé quand le contenu ne contient pas de sections template (.tnl-hero etc.)
 * Donne une apparence de carte élégante même pour du texte brut.
 */
.tnl-funnel-content--plain {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 4px 32px rgba(0,0,0,.07);
    border: 1px solid rgba(108,99,255,.08);
    margin: 32px auto;
    overflow: hidden;
}

/* Premier h1 dans une page plain → traitement hero léger */
.tnl-funnel-content--plain h1:first-child {
    background: linear-gradient(135deg, #0F0F23 0%, #1A1040 60%, #0D1B4B 100%);
    color: #fff;
    padding: 48px 48px 36px;
    margin: 0 0 0;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    line-height: 1.18;
    letter-spacing: -0.02em;
    background-clip: unset;
    -webkit-text-fill-color: unset;
}

/* Reste du contenu : padding uniforme, pas de marges latérales */
.tnl-funnel-content--plain h1 {
    font-size: clamp(1.5rem, 3.5vw, 2.2rem);
    font-weight: 800;
    line-height: 1.2;
    color: var(--f-dark);
    padding: 36px 48px 0;
    margin: 0;
}

.tnl-funnel-content--plain h2 {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--f-dark);
    margin: 0;
    padding: 32px 48px 0;
}

.tnl-funnel-content--plain h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--f-dark);
    margin: 0;
    padding: 24px 48px 0;
}

.tnl-funnel-content--plain p {
    color: #374151;
    font-size: 1.05rem;
    line-height: 1.75;
    margin: 0;
    padding: 16px 48px 0;
}

.tnl-funnel-content--plain h2 + p,
.tnl-funnel-content--plain h3 + p {
    padding-top: 10px;
}

.tnl-funnel-content--plain ul,
.tnl-funnel-content--plain ol {
    margin: 0;
    padding: 16px 48px 0 72px;
    color: #374151;
    font-size: 1.02rem;
    line-height: 1.7;
}

.tnl-funnel-content--plain li {
    margin-bottom: 8px;
    padding-left: 4px;
}

.tnl-funnel-content--plain li::marker {
    color: var(--f-primary);
    font-weight: 700;
}

/* Separateur visuel entre sections de texte */
.tnl-funnel-content--plain h2::before {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, var(--f-primary), var(--f-accent));
    border-radius: 2px;
    margin-bottom: 12px;
}

/* Espace final en bas */
.tnl-funnel-content--plain > *:last-child {
    padding-bottom: 48px;
}

.tnl-funnel-content--plain strong {
    font-weight: 700;
    color: var(--f-dark);
}

.tnl-funnel-content--plain em {
    font-style: italic;
    color: #4B5563;
}

.tnl-funnel-content--plain a:not(.tnl-funnel-btn) {
    color: var(--f-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.tnl-funnel-content--plain img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 24px auto;
    display: block;
    box-shadow: 0 4px 20px rgba(0,0,0,.1);
}

.tnl-funnel-content--plain video,
.tnl-funnel-content--plain iframe {
    max-width: 100%;
    border-radius: 12px;
    margin: 24px 48px;
    display: block;
}

.tnl-funnel-content--plain .tnl-funnel-btn {
    margin: 24px 48px 0;
    display: inline-block;
    width: auto;
}

@media (max-width: 640px) {
    .tnl-funnel-content--plain { margin: 16px; border-radius: 16px; }
    .tnl-funnel-content--plain h1:first-child { padding: 36px 28px 28px; }
    .tnl-funnel-content--plain h1,
    .tnl-funnel-content--plain h2,
    .tnl-funnel-content--plain h3  { padding-left: 28px; padding-right: 28px; }
    .tnl-funnel-content--plain p   { padding-left: 28px; padding-right: 28px; }
    .tnl-funnel-content--plain ul,
    .tnl-funnel-content--plain ol  { padding-left: 48px; padding-right: 28px; }
    .tnl-funnel-content--plain > *:last-child { padding-bottom: 32px; }
    .tnl-funnel-content--plain .tnl-funnel-btn { margin: 20px 28px 0; }
}

/* ── MAIN CTA WRAP (auto-injected next-step button) ──────── */
.tnl-funnel-cta-wrap {
    text-align: center;
    padding: 40px 32px 48px;
    background: #fff;
}

.tnl-funnel-btn--cta {
    display: inline-block;
    padding: 20px 48px;
    background: linear-gradient(135deg, #6C63FF 0%, #9C63FF 100%);
    color: #fff !important;
    border: none;
    border-radius: 50px;
    font-size: 1.15rem;
    font-family: var(--f-font);
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition: transform .15s, box-shadow .15s, filter .15s;
    box-shadow: 0 8px 32px rgba(108,99,255,.4);
    letter-spacing: 0.01em;
    width: auto;
}

.tnl-funnel-btn--cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 40px rgba(108,99,255,.5);
    filter: brightness(1.06);
    color: #fff !important;
}

.tnl-cta-sub {
    margin: 14px 0 0;
    font-size: .875rem;
    color: var(--f-gray);
}

/* ── CAPTURE & PAYMENT FORMS ──────────────────────────────── */
.tnl-capture-form-wrap,
.tnl-payment-wrap {
    background: var(--f-white);
    border-radius: var(--f-radius-lg);
    padding: 40px;
    box-shadow: var(--f-shadow-lg);
    margin: 32px;
    border: 1px solid rgba(108,99,255,.1);
}

.tnl-funnel-form { }

.tnl-funnel-input {
    width: 100%;
    padding: 15px 18px;
    border: 2px solid var(--f-border);
    border-radius: var(--f-radius);
    font-size: 1rem;
    font-family: var(--f-font);
    margin-bottom: 14px;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    background: #fafafa;
    color: var(--f-dark);
}

.tnl-funnel-input:focus {
    border-color: var(--f-primary);
    box-shadow: 0 0 0 4px rgba(108,99,255,.1);
    background: #fff;
}

.tnl-funnel-input::placeholder { color: var(--f-gray-lt); }

.tnl-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.tnl-funnel-btn {
    display: block;
    width: 100%;
    padding: 18px 24px;
    background: linear-gradient(135deg, var(--f-primary) 0%, #9C63FF 100%);
    color: var(--f-white);
    border: none;
    border-radius: var(--f-radius);
    font-size: 1.1rem;
    font-family: var(--f-font);
    font-weight: 700;
    cursor: pointer;
    transition: transform .15s, box-shadow .15s, filter .15s;
    margin-top: 8px;
    letter-spacing: 0.01em;
    box-shadow: 0 6px 24px rgba(108,99,255,.35);
}

.tnl-funnel-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 32px rgba(108,99,255,.45);
    filter: brightness(1.05);
}

.tnl-funnel-btn:active { transform: translateY(0); }

.tnl-funnel-btn--pay {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    box-shadow: 0 6px 24px rgba(16,185,129,.35);
}

.tnl-funnel-btn--pay:hover { box-shadow: 0 10px 32px rgba(16,185,129,.45); }

.tnl-funnel-btn:disabled { opacity: .55; cursor: not-allowed; transform: none !important; box-shadow: none; }

/* ── ORDER SUMMARY ────────────────────────────────────────── */
.tnl-order-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #F5F3FF, #EDE9FE);
    border: 1px solid #DDD6FE;
    padding: 16px 20px;
    border-radius: var(--f-radius);
    margin-bottom: 28px;
    gap: 12px;
}

.tnl-order-summary__name {
    font-weight: 700;
    font-size: .97rem;
    color: #0F172A;
}

.tnl-order-summary__sub {
    font-size: .75rem;
    color: #7C3AED;
    margin-top: 3px;
}

.tnl-order-price {
    font-weight: 800;
    font-size: 1.35rem;
    color: var(--f-primary);
    white-space: nowrap;
    flex-shrink: 0;
}

/* ── FORM SECTIONS ────────────────────────────────────────── */
.tnl-form-section {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #F1F5F9;
}

.tnl-form-section__label {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: #94A3B8;
    margin-bottom: 12px;
}

/* last input in a section has no bottom margin */
.tnl-funnel-input--last { margin-bottom: 0; }

/* ── PAYMENT METHODS ─────────────────────────────────────── */
.tnl-payment-methods { margin-bottom: 0; }

.tnl-method-choice {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 16px;
    border: 2px solid var(--f-border);
    border-radius: var(--f-radius);
    cursor: pointer;
    margin-bottom: 8px;
    transition: border-color .2s, background .2s;
    font-size: .93rem;
    user-select: none;
}

.tnl-method-choice:last-child { margin-bottom: 0; }

.tnl-method-choice input[type="radio"] { accent-color: var(--f-primary); }

.tnl-method-choice:has(input:checked) {
    border-color: var(--f-primary);
    background: rgba(108,99,255,.04);
}

.tnl-card-element {
    padding: 15px 18px;
    border: 2px solid var(--f-border);
    border-radius: var(--f-radius);
    background: #fafafa;
}

/* ── COUPON SECTION ───────────────────────────────────────── */
.tnl-coupon-section { margin-bottom: 20px; }

.tnl-coupon-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    padding: 0;
    font-size: .84rem;
    font-family: var(--f-font);
    color: var(--f-primary);
    cursor: pointer;
    opacity: .85;
}

.tnl-coupon-toggle:hover { opacity: 1; }

.tnl-coupon-toggle__arrow { transition: transform .2s; }

.tnl-coupon-toggle.is-open .tnl-coupon-toggle__arrow { transform: rotate(180deg); }

.tnl-coupon-row {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    align-items: stretch;
}

.tnl-coupon-apply-btn {
    flex-shrink: 0;
    padding: 0 20px;
    background: var(--f-primary);
    color: #fff;
    border: none;
    border-radius: var(--f-radius);
    font-size: .87rem;
    font-family: var(--f-font);
    font-weight: 700;
    cursor: pointer;
    transition: background .15s;
    white-space: nowrap;
}

.tnl-coupon-apply-btn:hover { background: #5046e5; }
.tnl-coupon-apply-btn:disabled { opacity: .55; cursor: not-allowed; }

.tnl-coupon-result {
    font-size: .83rem;
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    line-height: 1.4;
}

/* ── TRUST BADGE ──────────────────────────────────────────── */
.tnl-pay-trust {
    text-align: center;
    font-size: .75rem;
    color: #94A3B8;
    margin-top: 10px;
    margin-bottom: 0;
}

/* ── FORM ERROR ────────────────────────────────────────────── */
.tnl-form-error {
    color: #DC2626;
    background: #FEE2E2;
    border: 1px solid #FECACA;
    padding: 12px 16px;
    border-radius: var(--f-radius);
    font-size: .9rem;
    margin-top: 10px;
}

/* ── CONFIRMATION ─────────────────────────────────────────── */
.tnl-confirmation {
    text-align: center;
    padding: 60px 32px;
}

.tnl-confirmation__default {
    background: var(--f-white);
    border-radius: var(--f-radius-lg);
    padding: 60px 40px;
    box-shadow: var(--f-shadow-lg);
    max-width: 520px;
    margin: 0 auto;
}

.tnl-confirmation__icon { font-size: 4.5rem; display: block; margin-bottom: 24px; }

.tnl-confirmation h2 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--f-dark);
    margin-bottom: 14px;
}

.tnl-confirmation p { color: var(--f-gray); font-size: 1.05rem; }

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 640px) {
    .tnl-hero { padding: 56px 24px 48px; }

    .tnl-benefits {
        grid-template-columns: 1fr;
        padding: 32px 20px;
        gap: 14px;
    }

    .tnl-testimonials {
        grid-template-columns: 1fr;
        padding: 32px 20px;
    }

    .tnl-cta-section { padding: 48px 24px; }

    .tnl-problem { padding: 32px 24px; }

    .tnl-capture-form-wrap,
    .tnl-payment-wrap { margin: 16px 12px; padding: 24px 18px; }

    .tnl-form__row { grid-template-columns: 1fr; gap: 0; }

    .tnl-coupon-row { flex-direction: column; align-items: stretch; }
    .tnl-coupon-apply-btn { padding: 15px 20px; }

    .tnl-funnel-content h1,
    .tnl-funnel-content h2,
    .tnl-funnel-content h3,
    .tnl-funnel-content p,
    .tnl-funnel-content ul { margin-left: 20px; margin-right: 20px; }

    .tnl-confirmation__default { padding: 40px 24px; }
}

/* ──────────────────────────────────────────────────────
   Upsell / Downsell page
   ────────────────────────────────────────────────────── */
.tnl-upsell-wrap {
    max-width: 600px;
    margin: 32px auto;
    padding: 0 20px;
    text-align: center;
}

.tnl-upsell-cta { margin-bottom: 16px; }

.tnl-funnel-btn--upsell {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    font-size: 1.1rem;
    padding: 18px 36px;
    border-radius: 50px;
    box-shadow: 0 8px 24px rgba(34,197,94,.3);
    animation: tnl-pulse 2s ease-in-out infinite;
}
.tnl-funnel-btn--upsell:hover {
    background: linear-gradient(135deg, #16a34a, #15803d);
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(34,197,94,.4);
    animation: none;
}

@keyframes tnl-pulse {
    0%, 100% { box-shadow: 0 8px 24px rgba(34,197,94,.3); }
    50%       { box-shadow: 0 8px 36px rgba(34,197,94,.5); }
}

.tnl-upsell-skip {
    background: none;
    border: none;
    color: var(--f-gray);
    font-size: .85rem;
    cursor: pointer;
    text-decoration: underline;
    padding: 8px;
    transition: color .15s;
}
.tnl-upsell-skip:hover { color: var(--f-dark); }
