/*
 * Central editorial scale. It normalizes dimensions and French casing while
 * preserving each Elementor section's original colors, backgrounds and layout.
 */
:root {
    --pco-title-primary: clamp(2.625rem, 4.8vw, 4rem);
    --pco-title-section: clamp(1.75rem, 3vw, 2.25rem);
    --pco-title-subsection: clamp(1.25rem, 2vw, 1.625rem);
    --pco-brand-navy: #082b4c;
    --pco-brand-accent: #f36f21;
    --pco-brand-paper: #f4f7fb;
}

/* One central scale for editorial pages; product layouts keep their denser scale. */
body:not(.single-product) main h1,
body:not(.single-product) .elementor-location-archive h1.elementor-heading-title {
    font-size: var(--pco-title-primary) !important;
    line-height: 1.07 !important;
    letter-spacing: -.03em;
    text-transform: none !important;
    overflow-wrap: anywhere;
}

body:not(.single-product) main h2 {
    font-size: var(--pco-title-section) !important;
    line-height: 1.16 !important;
    letter-spacing: -.015em;
    overflow-wrap: anywhere;
}

body:not(.single-product) main h3 {
    font-size: var(--pco-title-subsection) !important;
    line-height: 1.22 !important;
    overflow-wrap: anywhere;
}

body:not(.single-product) main .pwi-category-hub__body h2,
body:not(.single-product) main .pco-blog-card h2 {
    font-size: clamp(1.25rem, 2vw, 1.75rem) !important;
    line-height: 1.18 !important;
}

.pco-blog-index h1,
.pco-professions-hub h1,
.pco-bulk-page h1,
.pco-legal-page h1,
.pco-commerce-page-title {
    font-size: var(--pco-title-primary);
    line-height: 1.08;
    letter-spacing: -.025em;
    overflow-wrap: anywhere;
}

.pco-blog-index h2,
.pco-blog-article h2,
.pco-professions-hub h2,
.pco-bulk-page h2,
.pco-legal-page h2 {
    font-size: var(--pco-title-section);
    line-height: 1.16;
    letter-spacing: -.015em;
    overflow-wrap: anywhere;
}

.pco-blog-article h3,
.pco-bulk-page h3,
.pco-legal-page h3 {
    font-size: var(--pco-title-subsection);
    line-height: 1.22;
    overflow-wrap: anywhere;
}

body.woocommerce-account main h1.pco-commerce-page-title {
    font-size: clamp(2.25rem, 4vw, 3rem) !important;
    max-width: 1180px;
    margin: 28px auto;
    padding: 0 20px;
    color: #082b4c;
}

/* Keep the configurable primary navigation on one line at desktop widths. */
@media (min-width: 1025px) {
    header .elementor-nav-menu--main > .elementor-nav-menu > li > .elementor-item {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
}

/* Elementor search overlay, kept responsive and readable on every viewport. */
.elementor-search-form--skin-full_screen .elementor-search-form__container {
    background: rgb(3 31 65 / 96%) !important;
    flex-direction: column;
    gap: 18px;
    padding: 24px !important;
}

.elementor-search-form--skin-full_screen .pco-search-heading {
    color: #fff;
    font-size: clamp(1.35rem, 3vw, 2rem);
    font-weight: 850;
    text-align: center;
}

.elementor-search-form--skin-full_screen .elementor-search-form__input {
    background: #fff !important;
    border: 1px solid #d6e0eb !important;
    border-bottom: 4px solid var(--pco-brand-accent) !important;
    border-radius: 12px !important;
    color: var(--pco-brand-navy) !important;
    flex: 0 0 auto !important;
    font-size: clamp(1.2rem, 4vw, 2rem) !important;
    height: auto !important;
    line-height: 1.25 !important;
    max-width: 720px;
    padding: 17px 20px !important;
    width: min(720px, calc(100vw - 48px)) !important;
}

.elementor-search-form--skin-full_screen .elementor-search-form__input::placeholder { color: #60748a; opacity: 1; }
.elementor-search-form--skin-full_screen .dialog-lightbox-close-button {
    align-items: center;
    background: rgb(255 255 255 / 10%);
    border: 1px solid rgb(255 255 255 / 35%);
    border-radius: 50%;
    color: #fff !important;
    display: flex !important;
    height: 44px !important;
    inset: 20px 20px auto auto !important;
    justify-content: center;
    position: fixed !important;
    width: 44px !important;
}

.elementor-search-form--skin-full_screen .dialog-lightbox-close-button svg { height: 20px; width: 20px; }

/* Elementor mini-cart and native empty cart. */
.elementor-menu-cart__main {
    background: var(--pco-brand-paper) !important;
    border-left: 4px solid var(--pco-brand-accent) !important;
    padding: 32px 28px !important;
}

.pco-mini-cart-heading {
    border-bottom: 2px solid #dbe4ef;
    color: var(--pco-brand-navy);
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 850;
    margin: 18px 0 26px;
    padding-bottom: 18px;
}

.elementor-menu-cart__main .woocommerce-mini-cart__empty-message { color: #53657a; line-height: 1.65; margin: 0 0 22px; }
.pco-mini-cart-shop,
.woocommerce-cart .wc-backward {
    background: var(--pco-brand-accent) !important;
    border: 2px solid var(--pco-brand-accent) !important;
    border-radius: 8px !important;
    color: #fff !important;
    display: inline-flex !important;
    font-weight: 800 !important;
    justify-content: center;
    min-height: 46px;
    padding: 11px 18px !important;
    text-decoration: none !important;
}

.pco-mini-cart-shop:hover,
.woocommerce-cart .wc-backward:hover { background: var(--pco-brand-navy) !important; border-color: var(--pco-brand-navy) !important; }
.woocommerce-cart .wc-empty-cart-message { background: #fff; border-left: 4px solid var(--pco-brand-accent); border-top: 0; box-shadow: 0 10px 28px rgb(8 43 76 / 8%); color: var(--pco-brand-navy); padding: 20px; }

.woocommerce-cart .pco-empty-cart {
    align-items: center;
    background: linear-gradient(145deg, #fff, var(--pco-brand-paper));
    border: 1px solid #dbe4ef;
    border-radius: 16px;
    box-shadow: 0 18px 45px rgb(8 43 76 / 10%);
    display: flex;
    flex-direction: column;
    padding: clamp(28px, 5vw, 52px) !important;
    text-align: center;
}

.woocommerce-cart .pco-empty-cart::before {
    align-items: center;
    background: var(--pco-brand-navy);
    border: 4px solid #ffe0cf;
    border-radius: 50%;
    color: var(--pco-brand-accent);
    content: "\f07a";
    display: flex;
    font-family: "Font Awesome 6 Free";
    font-size: 1.7rem;
    font-weight: 900;
    height: 72px;
    justify-content: center;
    margin-bottom: 22px;
    width: 72px;
}

.woocommerce-cart .pco-empty-cart .wc-empty-cart-message { background: transparent; border: 0; box-shadow: none; margin: 0; padding: 0; }
.woocommerce-cart .pco-empty-cart .cart-empty { background: transparent; border: 0; color: var(--pco-brand-navy); font-size: 1.12rem; font-weight: 800; margin: 0 0 22px; padding: 0; }
.woocommerce-cart .pco-empty-cart .cart-empty::before { display: none; }

/* French mixed search results: products first-class, editorial content still useful. */
.pco-search-results { background: var(--pco-brand-paper); color: #24384d; min-height: 60vh; }
.pco-search-results__hero { background: linear-gradient(135deg, #031f41, var(--pco-brand-navy)); color: #fff; padding: clamp(60px, 8vw, 105px) 20px; }
.pco-search-results__hero > div,
.pco-search-results__body { margin: auto; max-width: 1240px; }
.pco-search-results__eyebrow { color: var(--pco-brand-accent); font-size: .82rem; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.pco-search-results__hero h1 { color: #fff !important; margin: 10px 0 16px; max-width: 950px; }
.pco-search-results__hero > div > p:not(.pco-search-results__eyebrow) { color: #d8e4ef; font-size: 1.08rem; }
.pco-search-results__hero form { margin-top: 30px; max-width: 760px; }
.pco-search-results__hero form label { display: block; font-weight: 750; margin-bottom: 8px; }
.pco-search-results__hero form div { display: flex; gap: 10px; }
.pco-search-results__hero form input { background: #fff; border: 0; border-bottom: 4px solid var(--pco-brand-accent); border-radius: 8px; color: var(--pco-brand-navy); flex: 1; min-width: 0; padding: 13px 16px; }
.pco-search-results__hero form button { background: var(--pco-brand-accent); border: 0; border-radius: 8px; color: #fff; cursor: pointer; font-weight: 850; padding: 13px 22px; }
.pco-search-results__body { padding: clamp(48px, 7vw, 90px) 20px; }
.pco-search-results__grid { display: grid; gap: 22px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pco-search-result-card { background: #fff; border: 1px solid #dbe4ef; border-radius: 14px; box-shadow: 0 12px 32px rgb(8 43 76 / 7%); display: flex; flex-direction: column; overflow: hidden; }
.pco-search-result-card__image { aspect-ratio: 16 / 9; background: #eef2f6; display: block; overflow: hidden; }
.pco-search-result-card__image img { height: 100%; object-fit: cover; width: 100%; }
.pco-search-result-card__content { display: flex; flex: 1; flex-direction: column; padding: 24px; }
.pco-search-result-card__type { color: #cf5513; font-size: .75rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.pco-search-result-card h2 { font-size: clamp(1.2rem, 2vw, 1.55rem) !important; margin: 10px 0 !important; }
.pco-search-result-card h2 a { color: var(--pco-brand-navy); text-decoration: none; }
.pco-search-result-card time { color: #6b7c8e; font-size: .86rem; }
.pco-search-result-card p { color: #53657a; line-height: 1.65; }
.pco-search-result-card__price { color: var(--pco-brand-navy); font-size: 1.15rem; font-weight: 850; margin-top: auto; }
.pco-search-result-card__action { color: #cf5513; font-weight: 850; margin-top: auto; padding-top: 12px; text-decoration: none; }
.pco-search-results .navigation.pagination { margin-top: 38px; }
.pco-search-results__empty { background: #fff; border-left: 5px solid var(--pco-brand-accent); border-radius: 12px; padding: clamp(28px, 5vw, 48px); }
.pco-search-results__empty a { color: #cf5513; font-weight: 850; }

@media (max-width: 900px) { .pco-search-results__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) {
    .pco-search-results__hero form div { flex-direction: column; }
    .pco-search-results__hero form button { width: 100%; }
    .pco-search-results__grid { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
    body:not(.single-product) main h1,
    body:not(.single-product) .elementor-location-archive h1.elementor-heading-title { font-size: clamp(2.25rem, 10vw, 2.75rem) !important; }
    body:not(.single-product) main h2 { font-size: clamp(1.65rem, 7vw, 2rem) !important; }
    body:not(.single-product) main h3 { font-size: clamp(1.25rem, 5.5vw, 1.5rem) !important; }
}

/*
 * Menu de catégories des résultats de recherche.
 *
 * WooCommerce range une recherche de produits avec la boutique : le
 * connecteur y pose son menu de catégories. Faute d'ancrage dans ce
 * gabarit, il se retrouvait rejeté sous le pied de page. Il est
 * désormais accueilli dans la page, en colonne de gauche — la même
 * largeur que sur la boutique, pour que le client retrouve ses repères.
 *
 * Sous 1024 px la colonne passe au-dessus des résultats plutôt que de
 * les serrer : à cette largeur, deux colonnes ne laissent plus de place
 * lisible aux cartes.
 */
.pco-search-results__categories { min-width: 0; }

@media (min-width: 1025px) {
    .pco-search-results__body:has(.pco-search-results__categories) {
        display: grid;
        align-items: start;
        gap: 34px;
        grid-template-columns: 320px minmax(0, 1fr);
    }
}

.pco-search-results__categories .pwi-category-source,
.pco-search-results__categories .pwi-category-nav { width: 100%; }

.pco-search-results__categories .pwi-category-nav h2 {
    margin: 0 0 14px;
    color: #051f38;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

/*
 * Paragraphe d'ancrage local des pages métier.
 * La couleur porte « !important » à dessein : ce bloc s'insère sous le titre du
 * héros Elementor. Chaque page métier porte une règle en ligne du type
 * « .btp-content-side p { color:#fff !important } », de spécificité (0,1,1).
 * La classe est donc doublée pour atteindre (0,2,1) et l'emporter, sans quoi le
 * paragraphe s'affiche en blanc sur son propre fond blanc — illisible.
 */
p.pco-local-intro.pco-local-intro,
p.pco-local-intro.pco-local-intro * {
    color: #051f38 !important;
}
.pco-local-intro {
    max-width: 62rem;
    margin: 0 auto 28px;
    padding: 18px 22px;
    border-left: 4px solid #FB5E04;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(5, 31, 56, .18);
    border-radius: 4px;
    font-size: 1.02rem;
    line-height: 1.65;
    text-shadow: none;
}
@media (max-width: 767px) {
    .pco-local-intro {
        margin-bottom: 20px;
        padding: 14px 16px;
        font-size: .98rem;
    }
}

/* Mention de régime fiscal, sous le prix et sous le total. */
.pco-mention-tva {
    margin: 6px 0 14px;
    color: #4a5b6b;
    font-size: .86rem;
    line-height: 1.5;
}
.pco-mention-tva-ligne td {
    padding-top: 10px;
    color: #4a5b6b;
    font-size: .82rem;
    line-height: 1.5;
    border-top: 1px solid #e3e9ef;
}

/* Paiement en ligne pas encore ouvert : sortie utile plutôt qu'impasse. */
.pco-paiement-ferme {
    display: block;
    margin-bottom: 12px;
    line-height: 1.6;
}
.pco-paiement-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}
.pco-paiement-actions .pco-paiement-lien {
    color: #051f38;
    font-weight: 600;
    text-decoration: underline;
}

/* Grille des produits cités, bas de page métier. */
.pco-metier-grille { margin: 48px auto 8px; max-width: 1328px; padding: 0 16px; }
.pco-metier-grille-titre { margin: 0 0 20px; font-size: 26px; line-height: 1.25; color: #031F41; }

/* Sortie de devis sur une fiche en rupture. Espacement seulement :
   le bouton herite du style « button » du theme. */
.pco-devis-rupture { margin: 20px 0 8px; }
.pco-devis-rupture p { margin: 0 0 12px; }

/* Liens du contenu editorial : reperables sans changer la palette.
 *
 * Mesure du 11 septembre 2026 sur un article du blog : le lien est en
 * #031F41, le texte qui l'entoure en #293D51. Le contraste entre les
 * deux vaut 1,47:1, tres en dessous des 3:1 exiges lorsque la couleur
 * seule signale un lien. Sans soulignement et a graisse egale, un lien
 * y est donc indiscernable du texte courant.
 *
 * Aucune couleur de la palette ne resout le probleme a elle seule :
 *   #031F41  16,46:1 sur blanc  ·  1,47:1 face au texte
 *   #FB5E04   3,13:1 sur blanc  ·  3,57:1 face au texte
 *   #c44a00   4,85:1 sur blanc  ·  2,30:1 face au texte
 *   #a83b00   6,38:1 sur blanc  ·  1,75:1 face au texte
 * Passer a l'orange echangerait un defaut contre un autre. Le
 * soulignement, lui, leve l'exigence de contraste de couleur sans
 * toucher a la palette : le lien reste a 16,46:1 sur son fond.
 *
 * Portee volontairement etroite : uniquement les liens DANS l'article
 * editorial. Releve sur la page : 4 liens touches, 153 intacts. Le fil
 * d'Ariane, le retour « Tous les conseils », les menus, les cartes et
 * les boutons ne sont pas concernes.
 */
.pco-editorial-single article a {
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}

.pco-editorial-single article a:hover,
.pco-editorial-single article a:focus-visible {
    text-decoration-thickness: 2px;
}

/* Bouton de devis d'une fiche en rupture.
 *
 * Sans regle, WooCommerce lui donne son style par defaut : fond
 * rgb(233,230,237) et texte rgb(81,81,81). Un appel a l'action gris au
 * milieu d'une page PROTEXIA ne se voit pas.
 *
 * Il reprend donc exactement le bouton du formulaire de devis
 * (.pco-bulk-form button) : meme variable d'accent, meme rayon, meme
 * graisse, meme survol. Les deux appartiennent au meme parcours et
 * doivent se ressembler.
 *
 * Specificite : WooCommerce style `.woocommerce a.button`, plus fort
 * qu'un simple `.classe .classe`. Le selecteur porte donc aussi
 * `a.button`, sans quoi la regle est chargee mais jamais appliquee —
 * constate a l'ecran le 11 septembre.
 *
 * Reserve consignee, non corrigee ici : le texte blanc sur l'accent
 * #f36f21 donne 2,95:1, sous les 4,50:1 attendus pour du texte normal.
 * Le defaut est celui de la palette et vaut deja pour le bouton du
 * formulaire de devis ; le corriger sur ce seul bouton le rendrait
 * different de son jumeau. A traiter comme une decision de palette.
 */
.pco-devis-rupture a.button.pco-devis-bouton {
    background: var(--pco-brand-accent);
    border: 0;
    border-radius: 8px;
    color: #fff;
    display: inline-block;
    font-weight: 800;
    letter-spacing: .04em;
    padding: 14px 24px;
    text-decoration: none;
}

.pco-devis-rupture a.button.pco-devis-bouton:hover,
.pco-devis-rupture a.button.pco-devis-bouton:focus-visible {
    background: #d85a0d;
    color: #fff;
}
