/**
 * Energy Concept — surcharges front globales (header, footer, boutons, badges).
 * Les couleurs passent par les tokens (ec-tokens.css) — pas de valeur en dur ici.
 */

/* H1 SEO injecté (accueil + archives catalogue) : accessible aux lecteurs d'écran,
   visuellement discret pour ne pas dupliquer le titre Woodmart (cf. inc/ec-seo.php). */
.ec-seo-h1 {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Liens dans le texte courant : orange foncé pour le contraste AA (cf. ec-tokens.css) */
.wd-entry-content a:not(.btn),
.woocommerce-product-details__short-description a {
    color: var(--ec-primary-dark);
}

/* ============================================================
   Slider d'accueil (megamarket-slider) — images plein cadre sur mobile
   Chaque slide a une règle générée pour le DESKTOP qui force l'image
   en object-fit:contain + object-position:420px (calée à droite, texte
   sur le dégradé à gauche) → sur mobile l'image partait en bandeau de
   travers. On rétablit le plein cadre (cover/centre) comme les
   bannières, avec un voile sombre pour la lisibilité du texte blanc.
   Sélecteurs par-ID (+ !important) pour battre la règle desktop.
   ============================================================ */
@media (max-width: 767px) {
    /* Image en plein cadre (annule le contain + décalage desktop) */
    .home #slide-1177 .wd-slide-bg img,
    .home #slide-1181 .wd-slide-bg img,
    .home #slide-1182 .wd-slide-bg img {
        object-fit: cover !important;
        object-position: center !important;
    }
    /* Voile sombre dégradé (plus dense côté texte) pour la lisibilité */
    .home .wd-slide .wd-slide-bg::after {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(90deg, rgba(20, 20, 20, 0.6) 0%, rgba(20, 20, 20, 0.32) 55%, rgba(20, 20, 20, 0.12) 100%);
        pointer-events: none;
    }
    /* Texte 100 % blanc (corrige aussi le sous-titre au span orange) */
    .home .wd-slide .wd-text-block,
    .home .wd-slide .wd-text-block * {
        color: #ffffff !important;
    }
    /* Bouton orange plein : ressort sur la photo (cf. bannières) */
    .home .wd-slide .btn {
        background-color: var(--ec-primary) !important;
        border-color: var(--ec-primary) !important;
        color: #ffffff !important;
    }
}

/* ============================================================
   Page d'accueil
   ============================================================ */

/* Hero : gradient de charte, texte blanc, contenu centré */
.ec-hero {
    background: var(--ec-gradient);
    color: #ffffff;
    text-align: center;
}

/* Forcer le blanc sur titres/sous-titres/texte (woodmart_title ignore parfois custom_color) */
.ec-hero .title,
.ec-hero .liner-title,
.ec-hero .title-subtitle,
.ec-hero h1,
.ec-hero h2,
.ec-hero p {
    color: #ffffff !important;
}

.ec-hero .wd-button,
.ec-hero .btn {
    margin: 8px 6px 0;
}

/* Bandeau CTA professionnels : fond foncé, texte clair centré */
.ec-cta-pro {
    background-color: #212121;
    text-align: center;
}

.ec-cta-pro .title,
.ec-cta-pro .title-subtitle,
.ec-cta-pro h2,
.ec-cta-pro p {
    color: #ffffff !important;
}

/* Réassurance : grille 3 colonnes, icônes SVG inline (zéro dépendance) */
.ec-reass-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    text-align: center;
}

.ec-reass-ico {
    color: var(--ec-primary);
    margin-bottom: 10px;
}

.ec-reass-item h4 {
    font-size: 17px;
    font-weight: 600;
    margin: 0 0 6px;
}

.ec-reass-item p {
    color: #767676;
    margin: 0;
}

.ec-reass-item a {
    color: var(--ec-primary-dark);
    word-break: break-word;
}

@media (max-width: 767px) {
    .ec-reass-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

/* Pages éditoriales : chapô + marques + services */
.ec-lead {
    font-size: 18px;
    line-height: 1.6;
    max-width: 820px;
    margin: 0 auto 10px;
    text-align: center;
}

.ec-brand,
.ec-services .vc_column_text {
    height: 100%;
}

.ec-brand {
    border: 1px solid #e3e3e3;
    border-radius: 8px;
    padding: 24px;
}

.ec-brand h3,
.ec-services h3 {
    margin-top: 0;
}

.ec-brand-status {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: 2px 10px;
    border-radius: 3px;
    background: #ececec;
    color: #767676;
    margin-bottom: 10px;
}

.ec-brand-status--on {
    background: var(--ec-gradient);
    color: #fff;
}

/* Contact : formulaire 2 colonnes + encart coordonnées */
.ec-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 20px;
}

.ec-form-quiz label {
    font-weight: 600;
}

.ec-contact-info {
    background: #f7f7f7;
    border-radius: 8px;
    padding: 24px;
}

.ec-contact-info h3 {
    margin-top: 0;
}

@media (max-width: 767px) {
    .ec-form-grid {
        grid-template-columns: 1fr;
    }
}

/* Badge PRO du plugin B2B (classe émise par bf-woo-b2b-discount) */
.bf-b2b-badge {
    background: var(--ec-gradient);
}

/* Encart tarif professionnel sur fiche produit */
.bf-b2b-notice {
    border-left-color: var(--ec-primary);
}

/* ============================================================
   Footer Energy Concept (cms_block « Footer Energy Concept »)
   HTML plein (pas de shortcode WPBakery) + grille CSS.
   Fond foncé #212121 : liens en clair pour le contraste AA.
   ============================================================ */
.ec-footer {
    background-color: #212121;
    color: rgba(255, 255, 255, 0.75);
    padding: 50px 0 30px;
    /* Full-bleed : le bloc footer est dans un .container, on étire le fond sur toute la largeur */
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding-left: calc(50vw - 50%);
    padding-right: calc(50vw - 50%);
}

.ec-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
}

.ec-footer-brand img {
    margin-bottom: 18px;
    height: auto;
}

.ec-footer-contact {
    line-height: 1.7;
}

.ec-footer-title {
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 14px;
}

.ec-footer a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
}

.ec-footer a:hover {
    color: var(--ec-primary-light);
}

.ec-footer-prolink {
    font-weight: 600;
    color: var(--ec-primary-light) !important;
}

.ec-footer-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ec-footer-menu li {
    margin-bottom: 8px;
}

/* Tablette : 2 colonnes, marque pleine largeur */
@media (max-width: 1024px) {
    .ec-footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    .ec-footer-brand {
        grid-column: 1 / -1;
    }
}

/* Mobile : empilement */
@media (max-width: 767px) {
    .ec-footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }
}

/* ============================================================
   RETOURS V1 — double prix HT / TTC (boutique B2B, edc + eem)
   Prix HT en avant (taille du prix + « HT »), TTC en dessous, petit et gris.
   Rendu natif WooCommerce : prix (excl) + suffixe {price_including_tax}.
   ============================================================ */
.woocommerce-price-suffix {
    font-size: 1em;          /* « HT » à la taille du prix (pas en petit) */
    color: inherit;
    margin-left: 3px;
}
.ec-price-ttc {
    display: block;
    margin-top: 2px;
    font-size: 0.72em;
    font-weight: 400;
    color: #777;
}
.ec-price-ttc .woocommerce-Price-amount {
    color: inherit;
    font-weight: 400;
}
/* En promo : prix régulier TTC barré + soldé (miroir de la ligne HT) */
.ec-price-ttc del {
    opacity: 0.7;
    margin-right: 4px;
}
.ec-price-ttc ins {
    text-decoration: none;
    background: transparent;
}
/* Volet flottant : sous-total HT (1re ligne) + TTC (2e ligne), alignés à droite.
   Deux spans frères, enfants directs du flex parent (.woocommerce-mini-cart__total,
   display:flex; flex-wrap:wrap) :
   - .ec-cart-ht grandit pour remplir la 1re ligne après « Sous-total : » → HT à droite ;
   - .ec-cart-ttc force un retour à la ligne (flex-basis:100%) → TTC pleine largeur à droite. */
.woocommerce-mini-cart__total .ec-cart-ht {
    flex: 1 1 auto;
    text-align: right;
}
.woocommerce-mini-cart__total .ec-cart-ttc {
    flex: 0 0 100%;
    text-align: right;
    margin-top: 2px;
    font-size: 0.72em;
    font-weight: 400;
    color: #777;
}
.woocommerce-mini-cart__total .ec-cart-ttc .woocommerce-Price-amount {
    color: inherit;
    font-weight: 400;
}

/* ============================================================
   RETOURS V1 — masquer les notes/étoiles en boucle produits (edn)
   Les avis sont désactivés (woocommerce_enable_reviews=no) ; cette règle
   couvre le rendu en dur du rating dans le template de boucle Woodmart.
   ============================================================ */
.products .product-grid-item .wd-product-rating,
.products .product-grid-item .star-rating,
.wd-products .product-rating,
ul.products li.product .star-rating {
    display: none !important;
}
