/* v5.css — couche de finition du 25/11/2026, chargée en dernier dans l'en-tête.
   Lisibilité sur l'orange de marque, corrections téléphone, cohérence des états. */

/* ---------- Lisibilité : contextes sombres ---------- */
footer, .footer, .top-bar, .trust-bar, .highlights, .highlights-grid, .features-bar, .newsletter-section, .newsletter,
.hero, .hero-section, .cta-section, .partner-dark, .cookie-banner { --primary-text: #ff9a52; }

/* ---------- Notification « ajouté au panier » (mise en page cassée : colonne vide à gauche) ---------- */
.cart-notification { display: block !important; width: 340px; max-width: calc(100vw - 24px); padding: 0 !important; border-radius: 8px; }
.cart-notification.visible { right: 12px; }
.cart-notification-product p { font-size: 14px; line-height: 1.35; }
.cart-notification-btn { padding: 10px 12px; font-weight: 600; }
.cart-notification-btn.checkout { background-color: var(--primary) !important; color: var(--on-primary, #1f1300) !important; }
.cart-notification-btn.checkout:hover { background-color: #e55c00; }

/* ---------- Fiche produit : le prix ne se coupe plus (« 55 » / « € ») ---------- */
.product-price-block .price, .product-price-block .current-price, .product-price-block > span:first-child,
.product-price, .price-value, .cart-total, .cart-price, .checkout-product-price { white-space: nowrap; }

/* ---------- Tunnel de commande sur téléphone ---------- */
@media (max-width: 992px) {
    .checkout-container { grid-template-columns: minmax(0, 1fr) !important; }
    .checkout-container > * { min-width: 0; max-width: 100%; }
    .checkout-summary, .checkout-form, .checkout-section { box-sizing: border-box; width: 100%; }
}
/* Barre « Total + Passer la commande » fixe : les boutons flottants ne la recouvrent plus */
@media (max-width: 768px) {
    body:has(.mobile-submit-container) .whatsapp-button { bottom: 118px; }
    body:has(.mobile-submit-container) #back-to-top { bottom: 176px; }
    body:has(.mobile-submit-container) .support-badge { display: none; }
}

/* ---------- Boutons secondaires : jamais le même orange plein que l'action principale ---------- */
.btn.btn-secondary, button.btn-secondary, a.btn-secondary {
    background: #fff; color: #333; border: 1px solid #c9c9c9;
}
.btn.btn-secondary:hover, button.btn-secondary:hover, a.btn-secondary:hover { background: #f1f1f1; color: #111; }

/* ---------- États : focus clavier visible partout ---------- */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible,
[tabindex]:focus-visible, summary:focus-visible { outline: 3px solid #1d4ed8; outline-offset: 2px; border-radius: 3px; }
.quantity-btn { user-select: none; }

/* ---------- Mention « photo non contractuelle » ---------- */
.photo-note { display: block; margin: 8px 0 0; font-size: 12.5px; color: #666; text-align: center; font-style: italic; }

/* ---------- Message de retour de paiement (remplace la boîte d'alerte du navigateur) ---------- */
.checkout-return-note { margin: 0 0 18px; padding: 14px 16px; border-radius: 8px; background: #fff7ed; border: 1px solid #fdba74; color: #7c2d12; font-size: 15px; line-height: 1.45; }
.checkout-return-note strong { display: block; margin-bottom: 2px; }

/* ---------- Images : les attributs width/height (taille réelle) ne servent qu'à réserver la place ---------- */
img.nat-dims { width: auto; height: auto; }
.thumbnail-img { width: auto; height: auto; }

/* ---------- Liste des produits ---------- */
.product-image-container { background: #fff; }
.product-badge { display: inline-block; width: auto; max-width: calc(100% - 20px); right: auto; white-space: nowrap; }
/* Dernière carte seule sur sa ligne : centrée (3 colonnes sur grand écran) */
@media (min-width: 993px) {
    /* v6 : limité à la liste (3 colonnes) — sur l'accueil (4 colonnes) la règle renvoyait la 4e carte seule à la ligne */
    .products-grid-container .products-grid > .product-card:last-child:nth-child(3n + 1) { grid-column: 2; }
}
@media (max-width: 576px) {
    /* Cartes en 2 colonnes : le nom du produit était coupé au bout de deux mots (88 px utiles) */
    .products-grid .product-card-link { padding: 10px 10px 4px; }
    .products-grid .product-image-container { height: 128px; padding: 4px; }
    .products-grid .product-info { padding: 10px 4px 6px; }
    .products-grid .product-title {
        font-size: 13.5px; line-height: 1.35; height: auto; max-height: none; min-height: calc(1.35em * 3);
        display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;
    }
    .products-grid .product-meta { padding-top: 8px; }
    .products-grid .product-card-actions { padding: 8px 10px 12px; gap: 6px; }
    .products-grid .product-badge { font-size: 10.5px; padding: 3px 9px; top: 8px; left: 8px; }
    .products-grid .product-quick-actions { display: none; }
    /* Nombre impair de produits : la dernière carte est centrée au lieu de rester seule à gauche */
    .products-grid > .product-card:last-child:nth-child(odd) { grid-column: 1 / -1; width: calc(50% - 8px); justify-self: center; }
}

/* ---------- Fiche produit : le titre principal reprenait la taille des titres de carte (16 px) ---------- */
h1.product-title { font-size: clamp(22px, 1.2vw + 16px, 30px); font-weight: 700; line-height: 1.25; margin-bottom: 14px; }
/* Pastilles des cartes « produits similaires » : compactes, plus de bandeau sur toute la largeur */
.related-products .product-badge, .product-gallery .product-badge, .product-main-image .product-badge { display: inline-block; width: auto; right: auto; }

/* ---------- Formulaires : cases à cocher alignées avec leur libellé ---------- */
.form-group input[type="checkbox"], .form-group input[type="radio"] { width: auto; flex: 0 0 auto; margin: 0 8px 0 0; vertical-align: middle; }
.form-group input[type="checkbox"] + label, .form-group label > input[type="checkbox"] { display: inline; }

/* ---------- Blog : champ de recherche et bloc de catégories vide ---------- */
.search-form .input-group { position: relative; }
.search-form .form-control { width: 100%; box-sizing: border-box; border: 1px solid #cfcfcf; padding: 0 54px 0 14px; font-size: 15px; background: #fff; }
.search-form .btn { border: 0; background: var(--primary); color: var(--on-primary, #1f1300); cursor: pointer; }
.categories-widget:not(:has(li)) { display: none; }

/* ---------- Bloc d'appel sur fond orange (À propos, accueil) ---------- */
section[style*="background-color: var(--primary)"] h2, section[style*="background-color: var(--primary)"] p { text-align: center; color: var(--on-primary, #1f1300); }
section[style*="background-color: var(--primary)"] .btn-outline { color: var(--on-primary, #1f1300) !important; border-color: var(--on-primary, #1f1300) !important; }
section[style*="background-color: var(--primary)"] .btn-outline:hover { background: rgba(0, 0, 0, 0.08) !important; }

/* ---------- Liens de texte restés en bleu par défaut du navigateur ---------- */
.partner-section-lite-more, .main-content p a:not([class]):not([style]), .main-content li a:not([class]):not([style]) { color: var(--primary-text, #c2410c); text-underline-offset: 2px; }
footer p a:not([class]), footer li a:not([class]) { color: inherit; }

/* ---------- Bouton vert « ajouter » du partenaire : texte blanc lisible (4,9:1 au lieu de 2,1:1) ---------- */
.btn.btn-add-cart.partner-add-cart[style*="2ecc71"], .partner-add-cart.btn-green, .btn-add-cart.partner-add-cart:not(.btn-sm) { background-color: #177a40 !important; border-color: #177a40 !important; color: #fff !important; }
.btn-add-cart.partner-add-cart:not(.btn-sm):hover { background-color: #126233 !important; }

/* ---------- Configurateur : respiration entre l'introduction et les étapes ---------- */
.configurator-steps, .config-steps, .steps-indicator { margin-top: 18px; }

/* ---------- Questions fréquentes : un seul signe d'ouverture (le « + » se superposait à la flèche) ---------- */
.faq-question:has(> span)::after { content: none !important; }

/* ---------- Téléphone : aucun grand titre ne dépasse de l'écran ---------- */
@media (max-width: 576px) {
    .main-content h1, main h1 { font-size: clamp(25px, 7.4vw, 32px) !important; line-height: 1.22; overflow-wrap: anywhere; }
    .main-content h2, main h2 { overflow-wrap: anywhere; }
}

/* ---------- Bandeau d'appel de l'accueil (fond orange) : texte foncé, lisible ---------- */
.cta-banner .cta-title, .cta-banner .cta-text { color: var(--on-primary, #1f1300) !important; }
.cta-banner .cta-text { opacity: 1; }
.section-featured-products > p, .section-featured-products .section-subtitle { text-align: center; }

/* Titre de fiche : jamais tronqué (il héritait de la coupe à 2 lignes des titres de carte) */
h1.product-title { display: block; -webkit-line-clamp: unset; line-clamp: unset; overflow: visible; height: auto; max-height: none; min-height: 0; white-space: normal; text-overflow: clip; }
/* Case à cocher et libellé sur une même ligne (connexion, inscription) */
.form-group:has(> input[type="checkbox"]) { display: flex !important; flex-direction: row !important; flex-wrap: nowrap; align-items: flex-start; justify-content: flex-start; text-align: left; gap: 8px; }
.form-group:has(> input[type="checkbox"]) > label { width: auto; margin: 0; flex: 1 1 auto; }
.form-group:has(> input[type="checkbox"]) > input[type="checkbox"] { margin-top: 4px; }

/* ---------- cables-solaires : menu sur fond orange, texte foncé ---------- */
.menu-toggle, .main-menu li a { color: var(--on-primary, #1f1300); font-weight: 500; }
.main-menu li a:hover, .main-menu li a[aria-current="page"] { background-color: rgba(0, 0, 0, 0.12); }
@media (max-width: 991px) { .menu-toggle::after { color: var(--on-primary, #1f1300); } }
#back-to-top { color: var(--on-primary, #1f1300) !important; }

/* ---------- Page disponible en français seulement (pages légales, FAQ, livraison) ---------- */
.fr-only-note { background: #eef4ff; border-bottom: 1px solid #c7d7f5; color: #1e3a8a; font-size: 14.5px; padding: 10px 0; }

/* ---------- v6 : tunnel sur téléphone — le formulaire d'abord, puis l'encart compte, puis le résumé ---------- */
@media (max-width: 992px) {
    body .checkout-container > .checkout-form { order: 1; display: flex; flex-direction: column; }
    body .checkout-container > .checkout-summary { order: 2; margin-top: 24px; margin-bottom: 0; }
    body .checkout-container > .checkout-form > .account-benefits { order: 50; margin-top: 24px; }
}

/* ---------- v6 : passe visuelle des gabarits ---------- */
/* En-tête d'article : la règle générique « header { fond sombre } » noircissait le <header> de l'article (titre noir sur noir) */
.blog-post-header { background: transparent !important; box-shadow: none !important; position: static; z-index: auto; }
.blog-post-content .article-intro { padding-right: 16px !important; box-sizing: border-box; max-width: 100%; }
/* Aide : le « + » ne recouvre plus la fin de la question */
.faq-item > .faq-question, .faq-category .faq-question { padding-right: 48px; }
/* Fiche : onglets défilables sur téléphone au lieu d'être coupés */
@media (max-width: 600px) {
    .product-tabs .tabs-nav { overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 0 4px; }
    .product-tabs .tab-btn { white-space: nowrap; flex: 0 0 auto; padding: 13px 12px; margin: 0 2px; font-size: 14.5px; }
}
/* Encart Pylon-Monitor V3 : le bouton passe sous le texte quand la place manque, au lieu de se replier sur trois lignes */
.pm-v3-item { flex-wrap: wrap; }
.pm-v3-item .btn { white-space: nowrap; }
/* Panier vide : bloc centré */
.empty-cart { text-align: center; background: #fff; border-radius: 10px; padding: 40px 20px; margin: 10px 0 30px; box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.empty-cart .empty-cart-icon { font-size: 44px; color: #c9ced6; margin-bottom: 14px; }
.empty-cart h2 { margin: 0 0 8px; }
.empty-cart p { margin: 0 0 20px; color: #555; }

/* À propos : les trois chiffres en colonne régulière sur téléphone (plus de tuile orpheline ni de largeurs inégales) */
@media (max-width: 600px) {
    .about-hero .stat-box { flex: 0 0 100%; max-width: 260px; box-sizing: border-box; }
    .about-hero .stat-box:nth-child(n) { margin: 0 auto; }
}
