/* ==========================================================
   DeliverFit funnel page — CSS propre et consolidé
   ========================================================== */

body.page-id-6431 {
    padding-top: 0 !important;
}

/* 01. Page shell */
.aidf-funnel {
    --df-green: #1a9e4f;
    --df-green-dark: #0d6e32;
    --df-green-light: #e8f7ee;
    --df-ink: #111827;
    --df-muted: #6b7280;
    --df-soft: #f9fafb;
    --df-line: #e5e7eb;
    --df-bg: #f3f4f6;

    width: min(100%, 1580px);
    margin: 0 auto;
    padding: 10px;
    border-radius: 14px;
    background: var(--df-bg);
    color: var(--df-ink);
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
}

.aidf-funnel *,
.aidf-funnel *::before,
.aidf-funnel *::after {
    box-sizing: border-box;
    margin: 0;
}

.aidf-funnel button,
.aidf-funnel input {
    font: inherit;
}

/* 02. Brand header */
.aidf-funnel-brand {
    padding: 14px 22px;
    margin-bottom: 2px;
    border-bottom: 1px solid var(--df-line);
    border-radius: 10px 10px 0 0;
    background: #fff;
}

.aidf-funnel-brand a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: inherit;
    text-decoration: none;
}

.aidf-funnel-brand a>.brand-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--df-green);
}

.aidf-funnel-brand a>.brand-icon::after {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fff;
}

.aidf-funnel-brand strong {
    color: #0d1118;
    font-size: 17px;
    font-weight: 900;
    letter-spacing: 0.06em;
}

.aidf-funnel-brand strong span {
    color: var(--df-green);
}

/* 03. Quiz grid */
.aidf-funnel-quiz {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 8px;
}

.aidf-funnel-card {
    display: grid;
    align-content: start;
    min-height: 300px;
    padding: 18px 16px 20px;
    border: 1px solid var(--df-line);
    border-radius: 12px;
    background: #fff;
}

/* 04. Step indicator */
.aidf-funnel-step {
    display: grid;
    gap: 6px;
    margin-bottom: 14px;
}

.aidf-funnel-step strong {
    color: #9ca3af;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.aidf-funnel-step i {
    display: block;
    height: 4px;
    overflow: hidden;
    border-radius: 999px;
    background: #e9ecef;
}

.aidf-funnel-step em {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--df-green);
}

.aidf-funnel-card h2 {
    margin: 0 0 18px;
    color: #111827;
    text-align: center;
    font-size: 17px;
    line-height: 1.25;
    font-weight: 800;
}

.aidf-funnel-card h2 strong {
    color: var(--df-green);
}

/* 05. Sex cards */
.aidf-sex-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.aidf-sex-grid button {
    display: grid;
    overflow: hidden;
    border: 1.5px solid var(--df-line);
    border-radius: 10px;
    background: #fff;
    color: #111827;
    cursor: pointer;
    transition: border-color 0.15s;
}

.aidf-sex-grid button.is-active {
    border-color: var(--df-green);
    box-shadow: 0 0 0 1px rgba(26, 158, 79, .15);
}

.aidf-sex-grid img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1.35;
    object-fit: cover;
    object-position: center top;
}

.aidf-sex-grid span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px 0;
    color: #111827;
    font-size: 13px;
    font-weight: 700;
}

.aidf-sex-grid button.is-active span {
    color: var(--df-green-dark);
}

.aidf-sex-grid span::before {
    content: "";
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    border: 1.5px solid #d1d5db;
    border-radius: 50%;
}

.aidf-sex-grid button.is-active span::before {
    border-color: var(--df-green);
    background: var(--df-green);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='white' d='M6.5 11.5L3 8l1-1 2.5 2.5 5-5 1 1z'/%3E%3C/svg%3E");
    background-size: contain;
}

/* 06. Range controls */
.aidf-range-card {
    display: grid;
    align-content: center;
    gap: 10px;
    padding: 10px 0;
}

.aidf-range-card strong {
    display: block;
    color: var(--df-green);
    text-align: center;
    font-size: clamp(52px, 5vw, 72px);
    line-height: 1;
    font-weight: 900;
}

.aidf-range-card small {
    display: block;
    margin-top: -4px;
    color: #6b7280;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
}

.aidf-range-card input[type="range"] {
    width: 100%;
    height: 4px;
    accent-color: var(--df-green);
    cursor: pointer;
}

.aidf-range-card .range-labels {
    display: flex;
    justify-content: space-between;
    margin-top: -4px;
    color: #9ca3af;
    font-size: 11px;
    font-weight: 500;
}

.aidf-range-card [data-aidf-range-current] {
    color: var(--df-green);
    font-weight: 800;
}

/* 07. Option lists */
.aidf-option-list {
    display: grid;
    gap: 8px;
}

.aidf-option-list button {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 52px;
    padding: 12px 16px;
    border: 1.5px solid var(--df-line);
    border-radius: 10px;
    background: #fff;
    color: #374151;
    text-align: left;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.aidf-option-list button:hover {
    border-color: #b0d9c0;
    background: #f9fdfb;
}

.aidf-option-list button.is-active {
    border-color: var(--df-green);
    background: #f0faf4;
    color: var(--df-green-dark);
    box-shadow: 0 0 0 1px rgba(26, 158, 79, .15);
}

.aidf-option-list button.is-active::after {
    content: "";
    position: absolute;
    right: 14px;
    top: 50%;
    width: 20px;
    height: 20px;
    transform: translateY(-50%);
    border-radius: 50%;
    background: var(--df-green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='white' d='M8 13.5L4.5 10l1-1L8 11.5l6.5-6.5 1 1z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.aidf-option-list span.icon-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #f3f4f6;
    font-size: 16px;
}

/* 08. Result section */
.aidf-funnel-result {
    display: grid;
    grid-template-columns: 200px 180px minmax(340px, 1fr) minmax(460px, 1.15fr) 250px;
    align-items: stretch;
    gap: 24px;
    min-height: 260px;
    padding: 0 0 0 26px;
    margin-bottom: 8px;
    overflow: hidden;
    border: 1px solid var(--df-line);
    border-radius: 12px;
    background: #fff;
}

.aidf-result-ring,
.aidf-result-macros,
.aidf-result-copy,
.aidf-result-features {
    align-self: center;
}

/* Donut ring */
.aidf-result-ring {
    position: relative;
    display: grid;
    place-items: center;
    width: 180px;
    height: 180px;
    text-align: center;
}

.aidf-result-ring svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.aidf-result-ring circle {
    fill: none;
    stroke-width: 14;
    stroke-linecap: round;
}

.aidf-result-ring .bg-circle {
    stroke: #f0f0f0;
}

.aidf-result-ring .is-protein {
    stroke: #22c55e;
    stroke-dasharray: 106 365;
    stroke-dashoffset: 0;
}

.aidf-result-ring .is-carbs {
    stroke: #f59e0b;
    stroke-dasharray: 230 365;
    stroke-dashoffset: -112;
}

.aidf-result-ring .is-fat {
    stroke: #8b5cf6;
    stroke-dasharray: 88 365;
    stroke-dashoffset: -346;
}

.aidf-result-ring-inner {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    gap: 2px;
}

.aidf-result-ring-inner strong {
    color: #111827;
    font-size: 32px;
    line-height: 1;
    font-weight: 900;
}

.aidf-result-ring-inner span {
    color: #374151;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.aidf-result-ring-inner small {
    color: #9ca3af;
    font-size: 10px;
    font-weight: 500;
}

/* Macros */
.aidf-result-macros {
    display: grid;
    gap: 18px;
}

.aidf-result-macros .macro-row {
    display: grid;
    grid-template-columns: 12px 1fr auto;
    align-items: center;
    gap: 10px;
}

.aidf-result-macros .macro-dot {
    flex-shrink: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.aidf-result-macros .macro-dot.is-protein {
    background: #22c55e;
}

.aidf-result-macros .macro-dot.is-carbs {
    background: #f59e0b;
}

.aidf-result-macros .macro-dot.is-fat {
    background: #8b5cf6;
}

.aidf-result-macros .macro-body {
    display: grid;
    gap: 2px;
}

.aidf-result-macros .macro-grams {
    display: flex;
    align-items: baseline;
    gap: 3px;
    color: #111827;
    font-size: 17px;
    font-weight: 800;
}

.aidf-result-macros .macro-grams span {
    color: #6b7280;
    font-size: 14px;
    font-weight: 600;
}

.aidf-result-macros .macro-name {
    color: #9ca3af;
    font-size: 12px;
    font-weight: 500;
}

.aidf-result-macros .macro-pct {
    padding: 6px 10px;
    border-radius: 999px;
    background: #f0faf4;
    color: var(--df-green-dark);
    font-size: 12px;
    font-weight: 800;
}

/* Result copy */
.aidf-result-copy {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 18px;
    padding-bottom: 22px;
}

.aidf-result-copy>.result-badge {
    display: inline-flex;
    width: fit-content;
    margin-top: 10px;
    margin-bottom: 16px;
    padding: 6px 12px;
    border: 1px solid #d1fae5;
    border-radius: 8px;
    background: #ecfdf5;
    color: var(--df-green);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.aidf-result-copy h2 {
    margin-bottom: 8px;
    color: #111827;
    font-size: 22px;
    line-height: 1.2;
    font-weight: 900;
}

.aidf-result-copy h2 strong {
    color: var(--df-green);
}

.aidf-result-copy>.result-intro {
    margin-bottom: 16px;
    color: #6b7280;
    font-size: 13px;
}

.aidf-result-detected {
    display: grid;
    gap: 14px;
    margin-top: 18px;
    margin-bottom: 14px;
    padding: 16px 18px;
    border: 1px solid var(--df-line);
    border-radius: 10px;
}

.aidf-result-detected .detected-row {
    display: grid;
    grid-template-columns: 34px 1fr;
    align-items: start;
    gap: 10px;
}

.aidf-result-detected .detected-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin-top: 2px;
    border-radius: 8px;
    background: #f0faf4;
    font-size: 14px;
}

.aidf-result-detected small {
    display: block;
    margin-bottom: 2px;
    color: var(--df-green);
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.aidf-result-detected strong {
    display: block;
    color: #111827;
    font-size: 13px;
    font-weight: 800;
}

.aidf-result-detected em {
    display: block;
    margin-top: 2px;
    color: #9ca3af;
    font-size: 12px;
    font-style: normal;
}

/* Result features */
.aidf-result-features {
    width: 100%;
}

.aidf-result-features h3 {
    margin-bottom: 14px;
    color: #111827;
    font-size: 14px;
    font-weight: 800;
}

.aidf-result-features .features-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: stretch;
    gap: 10px;
}

.aidf-result-features .feature-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    height: 128px;
    min-height: 128px;
    padding: 14px 10px;
    overflow: hidden;
    border: 1px solid var(--df-line);
    border-radius: 10px;
    background: #fff;
    text-align: center;
}

.aidf-result-features .feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    min-width: 46px;
    min-height: 46px;
}

.aidf-result-features .feature-icon img {
    display: block;
    width: 42px;
    height: 42px;
    max-width: 42px;
    max-height: 42px;
    object-fit: contain;
}

.aidf-result-features .feature-card span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    color: #111827;
    text-align: center;
    font-size: 12px;
    line-height: 1.25;
    font-weight: 700;
}

/* Result image */
.aidf-result-image {
    display: block;
    align-self: stretch;
    width: 100%;
    height: 100%;
    min-height: 260px;
    max-height: none;
    border-radius: 0 12px 12px 0;
    object-fit: cover;
    object-position: 34% center;
}


/* 09. Pricing section */
.aidf-funnel-pricing {
    padding: 28px 26px 24px;
    border: 1px solid var(--df-line);
    border-radius: 12px;
    background: #fff;
}

.aidf-pricing-head {
    margin-bottom: 24px;
    text-align: center;
}

.aidf-pricing-head h2 {
    margin-bottom: 6px;
    color: #111827;
    font-size: 22px;
    line-height: 1.3;
    font-weight: 800;
}

.aidf-pricing-head p {
    color: #9ca3af;
    font-size: 13px;
}

.aidf-pricing-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.aidf-price-card {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    align-content: space-between;
    gap: 20px;
    min-height: 215px;
    padding: 50px 24px 22px;
    border: 1.5px solid var(--df-line);
    border-radius: 12px;
    background: #fff;
}

.aidf-price-card.is-featured {
    border-color: var(--df-green);
    box-shadow: 0 0 0 1px rgba(26, 158, 79, .08);
}

.aidf-price-card>b {
    position: absolute;
    top: -1px;
    left: 50%;
    min-width: 150px;
    padding: 8px 22px;
    transform: translateX(-50%);
    border-radius: 0 0 8px 8px;
    background: #16a34a;
    color: #fff;
    text-align: center;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
    white-space: nowrap;
}

.aidf-price-content {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    align-items: center;
    gap: 28px;
}

.aidf-price-left {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    align-items: center;
    gap: 18px;
}

.aidf-price-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #f0faf4;
}

.aidf-price-icon img {
    display: block;
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.aidf-price-main>span {
    display: block;
    margin-bottom: 6px;
    color: #374151;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.aidf-price-main h3 {
    margin-bottom: 6px;
    color: #111827;
    font-size: 42px;
    line-height: .95;
    font-weight: 800;
    letter-spacing: -.04em;
}

.aidf-price-main h3.aidf-price-value {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin: 0 0 6px;
    color: #111827;
    line-height: 1;
    letter-spacing: normal;
}

.aidf-price-main h3.aidf-price-value>span {
    display: inline-block;
    margin: 0;
    color: #111827;
    font-size: 52px;
    line-height: .9;
    font-weight: 700;
    letter-spacing: -.04em;
    text-transform: none;
}

.aidf-price-main h3.aidf-price-value small {
    color: #374151;
    font-size: 14px;
    line-height: 1;
    font-weight: 500;
    letter-spacing: normal;
    white-space: nowrap;
}

.aidf-price-main p {
    color: #374151;
    font-size: 13px;
    line-height: 1.35;
    font-weight: 400;
}

.aidf-price-main p strong {
    font-weight: 700;
}

.aidf-price-features {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 28px;
    margin: 0;
    padding: 0;
}

.aidf-price-features li {
    position: relative;
    list-style: none;
    padding-left: 24px;
    color: #374151;
    font-size: 12.5px;
    line-height: 1.35;
    font-weight: 500;
}

.aidf-price-features li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 2px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #16a34a url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath fill='white' d='M5.4 9.6L2.5 6.7l1-1 1.9 1.9 5.1-5.1 1 1z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.aidf-price-card.is-featured .aidf-price-features {
    align-content: center;
}

/* Évolutif : seulement 2 puces comme la maquette */
.aidf-price-card.is-featured .aidf-price-features-evolutive {
    grid-template-columns: 1fr !important;
    max-width: 360px;
    gap: 16px !important;
}

.aidf-price-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    min-height: 42px;
    border-radius: 7px;
    background: linear-gradient(180deg, #16a34a, #00843d);
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .01em;
    transition: opacity 0.15s;
}

.aidf-price-cta::after {
    content: "→";
    font-size: 18px;
    font-weight: 500;
}

.aidf-price-cta:hover {
    opacity: .92;
}

/* 10. Payment row */
.aidf-payment-row {
    display: grid;
    grid-template-columns: 1.3fr repeat(3, minmax(100px, .65fr)) 1.3fr;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.aidf-payment-row .pay-trust {
    display: grid;
    gap: 4px;
    padding: 14px 16px;
    border: 1px solid var(--df-line);
    border-radius: 10px;
    background: #fff;
}

.aidf-payment-row .pay-trust .trust-top {
    display: flex;
    align-items: center;
    gap: 8px;
}

.aidf-payment-row .pay-trust .trust-icon {
    color: var(--df-green);
    font-size: 18px;
}

.aidf-payment-row .pay-trust strong {
    color: #111827;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.aidf-payment-row .pay-trust small {
    color: #9ca3af;
    font-size: 11.5px;
    line-height: 1.4;
    font-weight: 500;
}

.aidf-payment-row .pay-method {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 14px;
    border: 1px solid var(--df-line);
    border-radius: 10px;
    background: #fff;
    color: #374151;
    font-size: 14px;
    font-weight: 700;
}

.aidf-payment-row .pay-method-logo {
    min-height: 64px;
    padding: 12px 18px;
}

.aidf-payment-row .pay-method-logo img {
    display: block;
    width: auto;
    max-width: 110px;
    height: 53px;
    object-fit: contain;
}

.aidf-payment-row .pay-method-card {
    gap: 8px;
}

.aidf-payment-row .pay-method-card img {
    display: block;
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.aidf-payment-row .pay-method-card span {
    color: #374151;
    font-size: 14px;
    font-weight: 700;
}

/* 11. Responsive */
@media (max-width: 1320px) {
    .aidf-funnel-quiz {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .aidf-funnel-result {
        grid-template-columns: 190px 165px 1fr;
        min-height: auto;
        padding: 28px 26px;
        overflow: visible;
    }

    .aidf-result-features,
    .aidf-result-image {
        grid-column: span 3;
    }

    .aidf-result-image {
        height: 260px;
        min-height: 260px;
        border-radius: 12px;
    }

    .aidf-result-features .features-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .aidf-result-features .feature-card {
        height: 120px;
        min-height: 120px;
    }
}

@media (max-width: 1180px) {
    .aidf-price-content {
        grid-template-columns: 220px minmax(0, 1fr);
        gap: 22px;
    }

    .aidf-price-main h3 {
        font-size: 36px;
    }

    .aidf-price-main h3.aidf-price-value>span {
        font-size: 46px;
    }

    .aidf-price-features {
        gap: 9px 18px;
    }
}

@media (max-width: 980px) {

    .aidf-funnel-quiz,
    .aidf-pricing-grid,
    .aidf-payment-row {
        grid-template-columns: 1fr;
    }

    .aidf-funnel-result {
        grid-template-columns: 1fr;
        padding: 22px;
    }

    .aidf-result-features,
    .aidf-result-image {
        grid-column: auto;
    }

    .aidf-result-features .features-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .aidf-result-image {
        height: 280px;
        min-height: 280px;
        border-radius: 12px;
    }

    .aidf-price-content {
        grid-template-columns: 1fr;
    }

    .aidf-price-left {
        grid-template-columns: 70px minmax(0, 1fr);
    }

    .aidf-price-features {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .aidf-funnel {
        padding: 6px;
    }

    .aidf-funnel-card,
    .aidf-funnel-result,
    .aidf-funnel-pricing,
    .aidf-price-card {
        padding: 16px;
    }

    .aidf-sex-grid {
        grid-template-columns: 1fr;
    }

    .aidf-result-features .features-grid {
        grid-template-columns: 1fr;
    }

    .aidf-result-features .feature-card {
        height: 112px;
        min-height: 112px;
    }

    .aidf-result-image {
        height: 240px;
        min-height: 240px;
    }

    .aidf-funnel-pricing {
        padding: 20px 16px;
    }

    .aidf-price-card {
        padding: 24px 18px 18px;
    }

    .aidf-price-main h3 {
        font-size: 34px;
    }

    .aidf-price-main h3.aidf-price-value>span {
        font-size: 42px;
    }
}