
:root {
    --lofp-red: #c51f24;
    --lofp-red-dark: #8f1519;
    --lofp-cream: #fff1c9;
    --lofp-paper: #fffaf0;
    --lofp-white: #ffffff;
    --lofp-yellow: #ffd45a;
    --lofp-brown: #3b2412;
    --lofp-brown-soft: #7a4b24;
    --lofp-green: #5f8f35;
    --lofp-border: rgba(59, 36, 18, 0.16);
    --lofp-shadow: 0 16px 34px rgba(59, 36, 18, 0.08);
}

/* Design global */
body.lofp-design-active {
    background:
        radial-gradient(circle at 10% 10%, rgba(255, 212, 90, 0.18), transparent 30%),
        radial-gradient(circle at 92% 18%, rgba(197, 31, 36, 0.10), transparent 28%),
        linear-gradient(180deg, #fffdf8, #fff6df) !important;
    color: var(--lofp-brown);
}

body.lofp-design-active .site,
body.lofp-design-active .site-main,
body.lofp-design-active main,
body.lofp-design-active .content-area,
body.lofp-design-active .entry-content {
    color: var(--lofp-brown);
}

body.lofp-design-active .entry-title,
body.lofp-design-active h1,
body.lofp-design-active h2,
body.lofp-design-active h3 {
    color: var(--lofp-brown);
}

body.lofp-design-active a {
    text-underline-offset: 3px;
}

body.lofp-design-active .wp-block-button__link,
body.lofp-design-active button,
body.lofp-design-active input[type="submit"] {
    border-radius: 999px;
}

/* Grands conteneurs de toutes les pages générées */
.lofp-hero,
.lofp-page-title,
.lofp-steps,
.lofp-shortcode,
.lofp-contact-band,
.lofp-alert,
.lofp-two-cols,
.lofp-gallery-placeholder,
.lofp-faq,
.lofp-legal,
.lofp-section,
.lofp-design-active .entry-content > section {
    margin: 30px 0;
    padding: clamp(22px, 4vw, 42px);
    border-radius: 26px;
    background: var(--lofp-paper);
    border: 1px solid var(--lofp-border);
    box-shadow: var(--lofp-shadow);
    position: relative;
    overflow: hidden;
}

/* Effet papier / ferme sur tous les blocs */
.lofp-page-title::before,
.lofp-contact-band::before,
.lofp-hero::before,
.lofp-shortcode::before,
.lofp-steps::before,
.lofp-two-cols::before,
.lofp-gallery-placeholder::before,
.lofp-faq::before,
.lofp-legal::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(255, 212, 90, 0.22), transparent 45%),
        radial-gradient(circle at 95% 12%, rgba(197, 31, 36, 0.10), transparent 25%);
    pointer-events: none;
}

.lofp-page-title > *,
.lofp-contact-band > *,
.lofp-hero > *,
.lofp-shortcode > *,
.lofp-steps > *,
.lofp-two-cols > *,
.lofp-gallery-placeholder > *,
.lofp-faq > *,
.lofp-legal > * {
    position: relative;
    z-index: 1;
}

/* Titres de toutes les pages */
.lofp-page-title {
    background:
        linear-gradient(135deg, #fff4d3, #fffaf0 55%, #ffffff);
    border: 3px solid rgba(197, 31, 36, 0.12);
}

.lofp-page-title h1,
.lofp-hero h1,
body.lofp-design-active .entry-title {
    color: var(--lofp-brown);
    font-size: clamp(2.3rem, 5.5vw, 4.8rem);
    line-height: 0.98;
    margin: 0 0 18px;
    letter-spacing: -0.04em;
    font-weight: 900;
}

.lofp-page-title p,
.lofp-hero p {
    font-size: clamp(1.05rem, 2.2vw, 1.28rem);
    max-width: 860px;
}

/* Accueil */
.lofp-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    gap: clamp(22px, 4vw, 44px);
    align-items: center;
    background:
        linear-gradient(135deg, #fff4d3, #fffaf0 55%, #ffffff);
    border: 3px solid rgba(197, 31, 36, 0.12);
}

.lofp-kicker {
    display: inline-block;
    color: #fff;
    background: var(--lofp-red);
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: 999px;
    padding: 8px 14px;
    margin-bottom: 14px;
    box-shadow: 0 8px 18px rgba(197, 31, 36, 0.22);
}

.lofp-flyer-card {
    background: #fff;
    border: 4px solid var(--lofp-red);
    border-radius: 28px;
    padding: 18px;
    display: grid;
    gap: 12px;
    transform: rotate(1deg);
    box-shadow: 0 22px 45px rgba(59, 36, 18, 0.17);
}

.lofp-flyer-visual {
    min-height: 330px;
    border-radius: 20px;
    background-image: var(--lofp-flyer-url);
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #fff6df;
    border: 1px solid rgba(59, 36, 18, 0.12);
}

.lofp-hero-card strong {
    color: var(--lofp-red);
    font-size: clamp(1.7rem, 3vw, 2.7rem);
    text-transform: uppercase;
    line-height: 1;
}

.lofp-hero-card span {
    color: var(--lofp-brown);
    font-weight: 800;
    border-left: 4px solid var(--lofp-yellow);
    padding-left: 10px;
}

/* Boutons */
.lofp-actions,
.lofp-order-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.lofp-btn,
body.lofp-design-active .wp-block-button__link,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce .button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 13px 22px !important;
    border-radius: 999px !important;
    background: var(--lofp-red) !important;
    color: #fff !important;
    text-decoration: none !important;
    font-weight: 900 !important;
    border: none !important;
    box-shadow: 0 10px 20px rgba(197, 31, 36, 0.24);
    transition: transform .15s ease, box-shadow .15s ease;
}

.lofp-btn:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce .button:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 26px rgba(197, 31, 36, 0.30);
    background: var(--lofp-red-dark) !important;
}

.lofp-btn-secondary {
    background: var(--lofp-brown) !important;
    box-shadow: 0 10px 20px rgba(59, 36, 18, 0.20);
}

/* Engagements / cartes / étapes */
.lofp-icons,
.lofp-step-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin: 30px 0;
}

.lofp-icons article,
.lofp-step-grid article,
.lof-product-card,
.lof-collection-card,
.lof-payment-card,
.lof-farm-card,
.lof-pickup-card,
.lofp-faq p,
.lofp-legal p {
    background: #fff;
    border-radius: 22px;
    padding: 22px;
    border: 1px solid var(--lofp-border);
    box-shadow: 0 12px 26px rgba(59, 36, 18, 0.07);
}

.lofp-icons article::before {
    content: "●";
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--lofp-yellow);
    color: var(--lofp-red);
    margin-bottom: 12px;
}

.lofp-icons strong,
.lofp-step-grid strong,
.lofp-shortcode h2,
.lofp-steps h2,
.lofp-contact-band h2 {
    color: var(--lofp-brown);
    font-weight: 900;
}

.lofp-step-grid span {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: var(--lofp-red);
    color: #fff;
    font-weight: 900;
    margin-bottom: 14px;
    box-shadow: 0 8px 18px rgba(197, 31, 36, 0.22);
}

/* Produits, points collecte, paiement */
.lofp-shortcode .lof-product-grid,
.lofp-shortcode .lof-collection-grid,
.lof-product-grid,
.lof-collection-grid {
    margin-top: 20px;
}

.lof-product-card h3,
.lof-collection-card h3 {
    color: var(--lofp-red);
    font-weight: 900;
}

.lof-product-card,
.lof-collection-card {
    position: relative;
}

.lof-product-card::after,
.lof-collection-card::after {
    content: "";
    position: absolute;
    right: 18px;
    top: 18px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--lofp-yellow), #fff3bd);
    opacity: .9;
}

/* Contact */
.lofp-phone {
    color: var(--lofp-red);
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 900;
    letter-spacing: -0.03em;
}

.lofp-contact-band {
    background:
        linear-gradient(135deg, rgba(197, 31, 36, 0.08), rgba(255, 212, 90, 0.22)),
        var(--lofp-paper);
}

/* Alertes */
.lofp-alert {
    border-left: 8px solid var(--lofp-red);
    background: linear-gradient(90deg, rgba(255, 212, 90, 0.30), #fffaf0);
    font-size: 1.08rem;
}

/* Colonnes et galerie */
.lofp-two-cols {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.lofp-two-cols > div {
    background: #fff;
    border-radius: 22px;
    padding: 24px;
    border: 1px solid var(--lofp-border);
}

.lofp-gallery-placeholder {
    background:
        linear-gradient(135deg, rgba(95, 143, 53, 0.10), transparent),
        var(--lofp-paper);
    border-style: dashed;
}

/* FAQ et légal */
.lofp-faq h2,
.lofp-legal h2 {
    margin-top: 28px;
    color: var(--lofp-brown);
    padding-bottom: 8px;
    border-bottom: 3px solid rgba(255, 212, 90, 0.65);
    font-weight: 900;
}

.lofp-faq p,
.lofp-legal p {
    margin-top: 12px;
}

/* WooCommerce global */
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
    background: #fff;
    border-radius: 22px;
    padding: 18px !important;
    box-shadow: 0 12px 26px rgba(59, 36, 18, 0.07);
    border: 1px solid var(--lofp-border);
}

.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce div.product .product_title {
    color: var(--lofp-brown);
    font-weight: 900;
}

.woocommerce div.product,
.woocommerce-cart-form,
.woocommerce-checkout,
.woocommerce-order,
.woocommerce .cart_totals,
.woocommerce form.checkout_coupon,
.woocommerce form.login,
.woocommerce form.register {
    background: var(--lofp-paper);
    border-radius: 24px;
    padding: 22px;
    border: 1px solid var(--lofp-border);
    box-shadow: var(--lofp-shadow);
}

.woocommerce-info,
.woocommerce-message,
.woocommerce-error {
    border-radius: 16px;
    background: #fffaf0;
}

/* Responsive */
@media (max-width: 960px) {
    .lofp-hero,
    .lofp-two-cols {
        grid-template-columns: 1fr;
    }

    .lofp-icons,
    .lofp-step-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .lofp-flyer-visual {
        min-height: 260px;
    }
}

@media (max-width: 560px) {
    .lofp-icons,
    .lofp-step-grid {
        grid-template-columns: 1fr;
    }

    .lofp-hero,
    .lofp-page-title,
    .lofp-steps,
    .lofp-shortcode,
    .lofp-contact-band,
    .lofp-alert,
    .lofp-two-cols,
    .lofp-gallery-placeholder,
    .lofp-faq,
    .lofp-legal {
        padding: 20px;
        border-radius: 20px;
    }

    .lofp-flyer-card {
        transform: none;
    }
}


/* =========================================================
   v1.3.0 - DESIGN FORCÉ SUR TOUTES LES PAGES DU PARCOURS
   ========================================================= */

body.lofp-design-active.lofp-managed-page,
body.lofp-design-active.lofp-woocommerce-cart,
body.lofp-design-active.lofp-woocommerce-checkout,
body.lofp-design-active.lofp-woocommerce-product,
body.lofp-design-active.lofp-woocommerce-shop {
    background:
        radial-gradient(circle at 8% 8%, rgba(255, 212, 90, 0.24), transparent 28%),
        radial-gradient(circle at 92% 16%, rgba(197, 31, 36, 0.14), transparent 26%),
        linear-gradient(180deg, #fffdf8 0%, #fff4d3 100%) !important;
    color: var(--lofp-brown) !important;
}

/* Conteneurs principaux : thèmes classiques, Hello Elementor, Gutenberg, WooCommerce */
body.lofp-design-active.lofp-managed-page .site-main,
body.lofp-design-active.lofp-managed-page main,
body.lofp-design-active.lofp-managed-page .content-area,
body.lofp-design-active.lofp-managed-page .entry-content,
body.lofp-design-active.lofp-managed-page .wp-site-blocks,
body.lofp-design-active.lofp-managed-page .page-content,
body.lofp-design-active.lofp-managed-page .elementor,
body.lofp-design-active.lofp-managed-page .elementor-section,
body.lofp-design-active.lofp-managed-page .elementor-widget-container,
body.lofp-design-active.lofp-woocommerce-cart .site-main,
body.lofp-design-active.lofp-woocommerce-checkout .site-main,
body.lofp-design-active.lofp-woocommerce-product .site-main,
body.lofp-design-active.lofp-woocommerce-shop .site-main {
    color: var(--lofp-brown) !important;
}

/* Donne un vrai habillage aux pages, même si les blocs ne sont pas ceux générés */
body.lofp-design-active.lofp-managed-page .entry-content > *:not(style):not(script):not(.alignfull),
body.lofp-design-active.lofp-managed-page .page-content > *:not(style):not(script):not(.alignfull),
body.lofp-design-active.lofp-managed-page article.page,
body.lofp-design-active.lofp-managed-page .hentry,
body.lofp-design-active.lofp-woocommerce-cart .woocommerce,
body.lofp-design-active.lofp-woocommerce-checkout .woocommerce,
body.lofp-design-active.lofp-woocommerce-product div.product,
body.lofp-design-active.lofp-woocommerce-shop .woocommerce {
    background: var(--lofp-paper) !important;
    border: 1px solid var(--lofp-border) !important;
    border-radius: 26px !important;
    box-shadow: var(--lofp-shadow) !important;
    padding: clamp(20px, 3vw, 36px) !important;
    margin-top: 24px !important;
    margin-bottom: 24px !important;
}

/* Évite de mettre une carte dans une carte sur les blocs déjà stylés */
body.lofp-design-active.lofp-managed-page .entry-content > .lofp-hero,
body.lofp-design-active.lofp-managed-page .entry-content > .lofp-page-title,
body.lofp-design-active.lofp-managed-page .entry-content > .lofp-shortcode,
body.lofp-design-active.lofp-managed-page .entry-content > .lofp-alert,
body.lofp-design-active.lofp-managed-page .entry-content > .lofp-contact-band,
body.lofp-design-active.lofp-managed-page .entry-content > .lofp-faq,
body.lofp-design-active.lofp-managed-page .entry-content > .lofp-legal,
body.lofp-design-active.lofp-managed-page .entry-content > .lofp-two-cols,
body.lofp-design-active.lofp-managed-page .entry-content > .lofp-gallery-placeholder {
    background: var(--lofp-paper) !important;
}

/* Titres globaux */
body.lofp-design-active.lofp-managed-page h1,
body.lofp-design-active.lofp-managed-page .entry-title,
body.lofp-design-active.lofp-woocommerce-cart h1,
body.lofp-design-active.lofp-woocommerce-checkout h1,
body.lofp-design-active.lofp-woocommerce-product h1,
body.lofp-design-active.lofp-woocommerce-shop h1 {
    color: var(--lofp-brown) !important;
    font-weight: 900 !important;
    letter-spacing: -0.04em !important;
    line-height: 1 !important;
}

body.lofp-design-active.lofp-managed-page h2,
body.lofp-design-active.lofp-managed-page h3,
body.lofp-design-active.lofp-woocommerce-cart h2,
body.lofp-design-active.lofp-woocommerce-checkout h2,
body.lofp-design-active.lofp-woocommerce-product h2,
body.lofp-design-active.lofp-woocommerce-shop h2 {
    color: var(--lofp-brown) !important;
    font-weight: 900 !important;
}

/* Bandeau de titre automatique pour les pages sans hero */
body.lofp-design-active.lofp-page-contact .entry-title,
body.lofp-design-active.lofp-page-faq .entry-title,
body.lofp-design-active.lofp-page-mentions-legales .entry-title,
body.lofp-design-active.lofp-page-politique-de-confidentialite .entry-title,
body.lofp-design-active.lofp-page-nos-oeufs .entry-title,
body.lofp-design-active.lofp-page-notre-elevage .entry-title,
body.lofp-design-active.lofp-page-points-de-collecte .entry-title,
body.lofp-design-active.lofp-woocommerce-cart .entry-title,
body.lofp-design-active.lofp-woocommerce-checkout .entry-title {
    display: block !important;
    background:
        linear-gradient(135deg, #fff4d3, #fffaf0 55%, #ffffff) !important;
    border: 3px solid rgba(197, 31, 36, 0.12) !important;
    border-radius: 26px !important;
    padding: clamp(24px, 4vw, 42px) !important;
    box-shadow: var(--lofp-shadow) !important;
}

/* Contact */
body.lofp-design-active.lofp-page-contact .entry-content p,
body.lofp-design-active.lofp-page-contact .entry-content li {
    font-size: 1.06rem !important;
}

body.lofp-design-active.lofp-page-contact a[href^="tel"],
body.lofp-design-active.lofp-page-contact .lofp-phone {
    color: var(--lofp-red) !important;
    font-weight: 900 !important;
}

/* FAQ et mentions : chaque réponse en carte */
body.lofp-design-active.lofp-page-faq .entry-content h2,
body.lofp-design-active.lofp-page-mentions-legales .entry-content h2,
body.lofp-design-active.lofp-page-politique-de-confidentialite .entry-content h2 {
    border-bottom: 3px solid rgba(255, 212, 90, 0.75) !important;
    padding-bottom: 8px !important;
    margin-top: 30px !important;
}

body.lofp-design-active.lofp-page-faq .entry-content p,
body.lofp-design-active.lofp-page-mentions-legales .entry-content p,
body.lofp-design-active.lofp-page-politique-de-confidentialite .entry-content p {
    background: #fff !important;
    border: 1px solid var(--lofp-border) !important;
    border-radius: 18px !important;
    padding: 18px !important;
    box-shadow: 0 8px 18px rgba(59, 36, 18, 0.05) !important;
}

/* Nos œufs / Notre élevage / Points de collecte */
body.lofp-design-active.lofp-page-nos-oeufs .lof-product-card,
body.lofp-design-active.lofp-page-points-de-collecte .lof-collection-card,
body.lofp-design-active.lofp-page-notre-elevage .lofp-two-cols > div,
body.lofp-design-active .lof-product-card,
body.lofp-design-active .lof-collection-card {
    background: #fff !important;
    border: 1px solid var(--lofp-border) !important;
    border-radius: 22px !important;
    box-shadow: 0 12px 26px rgba(59, 36, 18, 0.08) !important;
    padding: 22px !important;
}

body.lofp-design-active .lof-product-card h3,
body.lofp-design-active .lof-collection-card h3 {
    color: var(--lofp-red) !important;
    font-weight: 900 !important;
}

/* Panier et validation de commande */
body.lofp-design-active.lofp-woocommerce-cart table.shop_table,
body.lofp-design-active.lofp-woocommerce-checkout table.shop_table,
body.lofp-design-active.lofp-woocommerce-checkout form.checkout,
body.lofp-design-active.lofp-woocommerce-cart .cart_totals,
body.lofp-design-active.lofp-woocommerce-checkout #order_review,
body.lofp-design-active.lofp-woocommerce-checkout #payment,
body.lofp-design-active.lofp-woocommerce-checkout .woocommerce-billing-fields,
body.lofp-design-active.lofp-woocommerce-checkout .woocommerce-additional-fields,
body.lofp-design-active.lofp-woocommerce-checkout .woocommerce-checkout-review-order,
body.lofp-design-active.lofp-woocommerce-checkout .woocommerce-order,
body.lofp-design-active.lofp-woocommerce-checkout .woocommerce-customer-details,
body.lofp-design-active.lofp-woocommerce-checkout .woocommerce-order-details {
    background: #fff !important;
    border: 1px solid var(--lofp-border) !important;
    border-radius: 22px !important;
    box-shadow: 0 12px 26px rgba(59, 36, 18, 0.07) !important;
    padding: 22px !important;
    overflow: hidden !important;
}

body.lofp-design-active.lofp-woocommerce-cart table.shop_table th,
body.lofp-design-active.lofp-woocommerce-checkout table.shop_table th {
    color: var(--lofp-brown) !important;
    font-weight: 900 !important;
    background: rgba(255, 212, 90, 0.22) !important;
}

body.lofp-design-active.lofp-woocommerce-cart input,
body.lofp-design-active.lofp-woocommerce-checkout input,
body.lofp-design-active.lofp-woocommerce-checkout textarea,
body.lofp-design-active.lofp-woocommerce-checkout select {
    border-radius: 14px !important;
    border: 1px solid rgba(59, 36, 18, 0.20) !important;
    padding: 12px !important;
}

/* Messages WooCommerce */
body.lofp-design-active .woocommerce-info,
body.lofp-design-active .woocommerce-message,
body.lofp-design-active .woocommerce-error {
    border-radius: 18px !important;
    background: #fffaf0 !important;
    border-top: none !important;
    border-left: 6px solid var(--lofp-red) !important;
    box-shadow: 0 8px 18px rgba(59, 36, 18, 0.06) !important;
}

/* Navigation des produits et prix */
body.lofp-design-active .woocommerce-Price-amount,
body.lofp-design-active .price {
    color: var(--lofp-red) !important;
    font-weight: 900 !important;
}

/* Largeur et respiration */
body.lofp-design-active.lofp-managed-page .site-main,
body.lofp-design-active.lofp-woocommerce-cart .site-main,
body.lofp-design-active.lofp-woocommerce-checkout .site-main {
    max-width: 1180px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 18px !important;
    padding-right: 18px !important;
}

/* Si Elementor prend la main */
body.lofp-design-active .elementor-widget-heading h1,
body.lofp-design-active .elementor-widget-heading h2,
body.lofp-design-active .elementor-heading-title {
    color: var(--lofp-brown) !important;
    font-weight: 900 !important;
}

body.lofp-design-active .elementor-button {
    border-radius: 999px !important;
    background: var(--lofp-red) !important;
    color: #fff !important;
    font-weight: 900 !important;
}

/* Mobile */
@media (max-width: 768px) {
    body.lofp-design-active.lofp-managed-page .entry-content > *:not(style):not(script):not(.alignfull),
    body.lofp-design-active.lofp-woocommerce-cart .woocommerce,
    body.lofp-design-active.lofp-woocommerce-checkout .woocommerce,
    body.lofp-design-active.lofp-woocommerce-product div.product {
        padding: 18px !important;
        border-radius: 20px !important;
    }

    body.lofp-design-active.lofp-woocommerce-cart table.shop_table,
    body.lofp-design-active.lofp-woocommerce-checkout table.shop_table {
        font-size: 0.95rem !important;
    }
}
