/* ==========================================================================
   Hygilinge - correctifs de lisibilité (ARPASYS, 24/11/2026)
   Fichier : themes/pixeltheme/assets/css/lisibilite.css
   Chargé en DERNIER (après hd.css) par templates/_partials/stylesheets.tpl.
   Testé sur PrestaShop 1.7.8.5 (production) et 8.2.9 (recette M).
   Règle : on ne touche ni au logo, ni aux polices, ni aux couleurs de marque ;
   on corrige uniquement chevauchements, débordements, textes coupés,
   tailles trop petites et contrastes sous 4,5:1 (WCAG AA).
   Retirer ce fichier (ou la ligne <link> qui le charge) annule tout.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Débordements : conteneurs figés à 1240 px sur petits écrans
   (pied de page, page contact, inscription 8.x) -> contenu coupé à droite
   -------------------------------------------------------------------------- */
@media (max-width: 1279px) {
  #wrapper #cnt.container,
  #footer .footer-container .container {
    width: 100%;
    max-width: 100%;
  }
}
@media (max-width: 1279px) {
  /* Panier : zone de contenu figée à 1180 px minimum */
  #cart #wrapper #content-wrapper {
    width: 100%;
    min-width: 0;
  }
}
@media (max-width: 765px) {
  /* Page contact : colonne d'infos + formulaire empilés sur téléphone */
  #contact #wrapper .hygi_content {
    flex-wrap: wrap;
  }
  #contact #wrapper #left-column,
  #contact #wrapper #content-wrapper {
    width: 100%;
    max-width: 100%;
    flex: 0 0 100%;
  }
  /* Champs du formulaire : 59 px de retrait + 75 % de largeur = champs de 165 px */
  #contact #wrapper .contact-form {
    padding-left: 0;
  }
  #contact #wrapper .contact-form .form-group .col-md-6,
  #contact #wrapper .contact-form .form-group .col-md-9 {
    width: 100%;
    margin-left: 0;
  }
}

/* Fiche produit : l'onglet Description débordait (élément flex sans min-width) */
#product .product-container > .tabs,
#product .product-container > [class*="col-"] {
  min-width: 0;
  max-width: 100%;
}
#product .product-description,
#product [id^="product-description-short"] {
  overflow-wrap: break-word;
}
#product .product-description img {
  max-width: 100%;
  height: auto;
}
/* Tableau de caractéristiques saisi dans la description (largeur 519 px figée) */
#product .product-description table {
  width: 100% !important;
  max-width: 100%;
  height: auto !important;
  table-layout: auto;
}
#product .product-description table th,
#product .product-description table td {
  white-space: normal;
  overflow-wrap: anywhere;
  height: auto !important;
}

/* Bloc « Panier » de la colonne : nom de produit sur une seule ligne (nowrap) */
.product_line .product_description {
  min-width: 0;
}
.product_line .product-name {
  white-space: normal;
  overflow-wrap: anywhere;
}

/* Boutons dont le texte sortait de leur fond coloré (texte blanc sur blanc) :
   « Valider votre commande » (panier, bloc Panier), « Ajouter » (cartes étroites),
   liste de tri « Pertinence » */
.cart-summary .cart-detailed-actions .btn,
a.btn-checkout.btn {
  white-space: normal;
}
.productListAddToCart .add-to-cart {
  padding-left: 6px;
  padding-right: 6px;
  min-width: 0;
}
#js-product-list-top .products-sort-order .select-title {
  padding-left: 6px;
  padding-right: 6px;
}

/* Accueil : carte des départements (8 icônes sur une ligne à 768 px) */
#implantations_geographique > ul {
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   2. Chevauchements : interlignes inférieurs à la taille du texte
   -------------------------------------------------------------------------- */
/* Titres sans interligne propre : ils héritaient de 22,5 px (titre de 32 px) */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  line-height: 1.2;
}
/* Titre de catégorie : interligne 1 (36 px pour 36 px) ; sur téléphone,
   la grille de produits recouvrait le bas des lettres (g, p) */
#js-product-list-header .block-category h1 {
  line-height: 1.25;
}
/* « Hygilinge en quelques chiffres » : 0,8 em */
#statistiques_entreprise .st_title {
  line-height: 1.1;
}
/* Libellés des chiffres clés : interligne de 41 px, la 2e ligne sortait du bandeau */
#statistiques_entreprise .st_elmnt .st_elmnt_title {
  line-height: 1.3;
}
/* « 175000 litre » : le nombre recouvrait l'unité entre 1080 et 1440 px */
#statistiques_entreprise .st_elmnt .st_elmnt_number {
  line-height: 1.1;
}
@media (min-width: 766px) {
  #statistiques_entreprise .st_elmnt .st_elmnt_number {
    font-size: min(3em, 2.6vw);
  }
}
#statistiques_entreprise .st_elmnt_nb_wrp {
  flex-wrap: wrap;
  align-items: baseline;
}
/* Pastilles « Des franges et des lavettes… » : 13 px pour un texte de 14 px */
.metho_cart_part p {
  line-height: 1.3;
}
/* Titre « Résultats de la recherche » sur téléphone : 1,8 rem pour 2 rem */
#search .hygi_content h1.h2 {
  line-height: 1.2;
}
/* Titres des cartes produits : 10 px ou 15 px imposés (!important) */
html body .product-miniature .product-description .product-title,
html body .product-miniature .product-description .product-title a {
  line-height: 1.2 !important;
}
/* Le lien devient un bloc : sur téléphone, le titre (h2) a une police de 31 px
   qui imposait sa propre hauteur de ligne au texte de 14 px */
html body .product-miniature .product-description .product-title a {
  display: block;
}
/* Client connecté : le titre (3 lignes possibles) touchait le prix -> titre remonté */
.productWithaPrice .product-miniature .product-description .h3.product-title {
  top: 6px;
}

/* --------------------------------------------------------------------------
   3. Tailles de police trop petites sur téléphone (< 12 px)
   -------------------------------------------------------------------------- */
@media (max-width: 765px) {
  /* « Les BONS produits… » : 9 px */
  .metho_ico_wrp .metho_ico_title,
  .metho_icone .metho_ico_wrp:last-child .metho_ico_title {
    font-size: 12px;
    line-height: 1.25;
  }
}
/* Mentions sous les cases à cocher (inscription) : 10,6 px */
.custom-checkbox label em,
.custom-checkbox em {
  font-size: 12px !important; /* hd.css vise ce texte par nth-child */
  line-height: 1.4;
}

/* --------------------------------------------------------------------------
   4. Contrastes (WCAG AA : 4,5:1 ; 3:1 pour les grands textes)
   Gris #7a7a7a / #969696 / #adaeaf / #a0a0a0 -> #666666 (5,7:1 sur blanc)
   Cyan des liens #24b9d7 (2,3:1) -> #0c7088, même teinte plus foncée (5,7:1)
   -------------------------------------------------------------------------- */
a {
  color: #0c7088;
}
html body .product-miniature .product-title a,
#contact_footer .column a,
#footer .links a,
#footer [id^="link-"],
#js-product-list .pagination > div,
#js-product-list-top .sort-by,
#wrapper .breadcrumb li span,
#wrapper .breadcrumb li a span,
.total-products p,
#doseur .doseur_card .card_title,
#doseur .doseur_card .card_title span,
.doseur_card .card_title,
.doseur_card .card_title span,
/* Pages client : panier, fiche produit, commande, compte */
.cart-summary-line .label,
#cart-subtotal-products .label,
.product-line-info a.label,
.product-add-to-cart .control-label,
.product-prices .tax-shipping-delivery-label,
.checkout-step .step-title .step-edit,
body#checkout #footer > div,
#cart .cart-summary-line .label,
#cart .product-line-info .label,
#cart .product-line-info a.label,
#product .product-add-to-cart span.control-label,
#product .social-sharing span:first-child,
.address .address-footer a,
.address .address-footer a span,
#history #content h6 {
  color: #666666;
}
#js-product-list-top .products-sort-order button.btn-unstyle.select-title,
#js-product-list-top .products-sort-order button.btn-unstyle.select-title i {
  color: #555555;
}
/* Texte des fiches produit forcé en #a0a0a0 !important par hd.css */
html body#product p span {
  color: #666666 !important;
}
/* Bouton « Voir » (mot de passe) et « Retour en haut » */
html body .input-group .input-group-btn > .btn[data-action="show-password"] {
  background-color: #666666;
}
#js-product-list .up .btn-secondary {
  color: #555555;
}
/* Bouton « Choisir un fichier » (contact) : blanc sur cyan 2,3:1 */
.bootstrap-filestyle .btn-default,
.bootstrap-filestyle label.btn {
  background-color: #0c7088;
  border-color: #0c7088;
}
/* « EN SAVOIR PLUS » sur bleu foncé : cyan 3,3:1 -> cyan clair 5,4:1 */
#partenaires .description_wrp .link a {
  color: #8fe3f5;
}
/* Boutons + / - de quantité (cartes produits, client connecté) : blanc sur gris clair */
.product-miniature .quantity-nav .quantity-button {
  color: #3a3a3a;
}
/* Étape de commande en cours : chiffre blanc sur vert #00c062 (2,4:1) */
body#checkout section.checkout-step.-reachable.-current .step-title .step-number {
  background-color: #1e7e34;
}
/* Étapes pas encore accessibles : opacité 0,5 (3,2:1) -> 0,75 (repère conservé) */
body#checkout section.checkout-step.-unreachable .step-title,
body#checkout section.checkout-step .not-allowed {
  opacity: 0.75;
}
/* Bouton « Commander » désactivé : #ddd sur #f6f6f6 (1,3:1), presque invisible */
body#checkout #payment-confirmation .btn.disabled,
body#checkout #payment-confirmation .btn:disabled {
  color: #666666;
  background-color: #e9ecef;
  border: 1px solid #c7ccd1;
}
/* Lien « Éditer » des étapes : .text-muted #7a7a7a imposé en !important */
body#checkout section.checkout-step .step-title .step-edit.text-muted {
  color: #666666 !important;
}
/* Signes « + » blancs sur pastille grise (3,4:1) ; le « = » bleu (8e) reste bleu */
.methodologie_part .metho_icone ul li.metho_op:not(:nth-child(8)) {
  background-color: #666666;
}
/* Chiffres clés en blanc sur photo d'eau claire (2,5:1) : voile bleu de marque,
   photo étirée sur toute la hauteur du bandeau, bouton « Boutique » plein */
#statistiques_entreprise {
  background-size: cover;
  background-position: center;
  box-shadow: inset 0 0 0 100vmax rgba(18, 87, 128, 0.6);
}
#statistiques_entreprise .st_wrp a.btn_hover {
  background-color: #125780;
}
