@charset "UTF-8";
/* responsive_legacy.css
   Harmonise les pages legacy osCommerce (Verdana 10-12px) avec le design refondu
   (Poppins, palette bleu/rouge) + responsive mobile/tablette.

   Sections :
   1) Harmonisation typo/couleurs globales sur les classes legacy
   2) Styles tables/boxes osCommerce (infoBox, infoBoxContents, etc.)
   3) Styles forms (inputs, selects, boutons)
   4) Media query mobile : stack 3 colonnes, cache sidebars
*/

/* ========== 1) Harmonisation typo/couleurs ========== */

/* Force Poppins partout y compris les éléments legacy en Verdana.
   Le stylesheet.css legacy redéfinit `TD {font-family: Verdana}` avec la même
   spécificité, donc on utilise !important pour gagner sans pousser à 0,0,2. */
body, td, p, span, div, li, a, input, select, textarea, button, h1, h2, h3, h4, h5, h6 {
    font-family: Poppins, "Helvetica Neue", Arial, sans-serif !important;
}

/* Tailles par défaut minimales (override le TD { font-size: 10px } legacy) */
body {
    font-size: 14px !important;
    color: #222;
}
td {
    font-size: inherit !important;
    color: inherit;
}
/* Mais les éléments avec une classe legacy gardent leur taille définie plus bas */

/* Classes legacy osCommerce avec font-size trop petits → remonter */
.main,
td.main,
p.main {
    font-size: 14px !important;
    line-height: 1.5;
    color: #222;
}

.infoBoxContents,
td.infoBoxContents,
table.infoBoxContents,
.infoBoxContents td {
    font-size: 14px !important;
    line-height: 1.5;
    color: #222;
}

.infoBoxHeading,
td.infoBoxHeading {
    font-size: 16px !important;
    font-weight: 600;
    color: #fff;
    background: #1e3a8a;
    padding: 8px 12px !important;
    border-radius: 4px 4px 0 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.boxText,
td.boxText {
    font-size: 14px !important;
    line-height: 1.5;
    color: #222;
    padding: 6px 0;
}

.smallText,
td.smallText {
    font-size: 13px !important;
    color: #555;
}

/* .smallText.connexion : encart rouge "Si vous avez deja un compte..." sur
   create_account.php. Texte blanc sur fond rouge defini par .connexion dans
   stylesheet_new.css → restaurer la couleur. */
.smallText.connexion,
td.smallText.connexion {
    color: #fff !important;
}

.inputRequirement,
td.inputRequirement {
    font-size: 12px !important;
    color: #d33;
    font-style: italic;
}

.errorText,
span.errorText {
    font-size: 13px !important;
    color: #d33;
    font-weight: 600;
}

/* Sidebar links osCommerce (.menu, .menu3, .ligneLien) — visibles uniquement
   sur les pages avec layout legacy (sidebar non cachée). */
.menu,
a.menu,
.ligneLien a,
.ligneLien {
    font-size: 14px !important;
    color: #1e3a8a;
    text-decoration: none;
}
.menu:hover,
a.menu:hover,
.ligneLien a:hover {
    color: #d33;
    text-decoration: underline;
}

.menu3,
a.menu3 {
    font-size: 13px !important;
    color: #1e3a8a;
    text-decoration: none;
}
.menu3:hover { color: #d33; text-decoration: underline; }

/* Titre de page osCommerce — devient un vrai titre */
.pageHeading,
td.pageHeading {
    font-size: 28px !important;
    line-height: 1.2 !important;
    font-weight: 700;
    color: #1e3a8a;
    padding: 18px 0 12px !important;
    margin: 0;
    letter-spacing: -0.3px;
    text-align: left;
}

/* Spans titres récurrents */
span.titre {
    font-size: 14px !important;
    font-weight: 600;
    color: #1e3a8a;
}

/* Classe .texte (info_paiement, etc.) — police trop petite à l'origine */
.texte,
span.texte,
.texte p,
.texte li,
.texte td,
.texte div {
    font-family: Poppins, "Helvetica Neue", Arial, sans-serif !important;
    font-size: 14px !important;
    line-height: 1.55;
    color: #222;
}
.texte ul, .texte ol {
    padding-left: 22px;
    margin: 8px 0 12px;
}
.texte li {
    margin: 4px 0;
}

/* Classes .guide (guide technique) */
.guide,
td.guide,
.container2 {
    font-size: 14px !important;
    line-height: 1.5;
    color: #222;
}

/* Liens génériques */
a {
    color: #1e3a8a;
    text-decoration: none;
}
a:hover { text-decoration: underline; }

/* ========== 2) Styles tables osCommerce ========== */

table.infoBox {
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    margin: 12px 0;
}

table.infoBox table.infoBoxContents {
    background: #fff;
    padding: 8px;
}

table.borderTable {
    border-collapse: collapse;
    border: 1px solid #e5e7eb;
}
table.borderTable td {
    border: 1px solid #e5e7eb;
    padding: 6px 10px;
}

/* productListing rows (listings produits) — on respecte la palette d'origine
   stylesheet_new.css (.productListing-heading { background:#C6C6C6; color:#000 })
   et on force le texte / liens de tri en noir pour rester lisible. */
.productListing-heading {
    font-size: 14px !important;
    font-weight: 600;
}
.productListing-heading,
table.productListing td.productListing-heading,
.productListing-heading a,
.productListing-heading a:link,
.productListing-heading a:visited,
.productListing-heading a:hover {
    color: #000 !important;
}
/* Derniere colonne (Acheter) : entete masquee dans le design d'origine
   (font-size:0 + bg blanc sur stylesheet_new.css ligne 1327/1404). */
table.productListing td.productListing-heading:last-child {
    font-size: 0 !important;
    background-color: #fff !important;
    padding: 0 !important;
}
.productListing-odd { background: #fff; }
.productListing-even { background: #f8f9fa; }
.productListing-data {
    font-size: 14px !important;
    padding: 4px 6px;
    color: #222;
}
table.productListing > tbody > tr > td {
    padding: 4px 6px !important;
}

/* Tables avec attributs cellpadding 0/1/2 (legacy) - donne du souffle.
   Exclut .tab_labelling (mini table icones essence/pluie/bruit) qui doit
   rester compact avec son padding d'origine. */
table[cellpadding="1"]:not(.tab_labelling) td,
table[cellpadding="2"]:not(.tab_labelling) td {
    padding: 6px;
}

/* .tab_labelling : mini-table dans la colonne "Profil Labelling" — 3 icones +
   3 valeurs (conso/freinage/decibel). Garde le format compact d'origine. */
table.tab_labelling td {
    padding: 1px !important;
    font-size: 11px !important;
    line-height: 1.2 !important;
}
table.tab_labelling img {
    padding: 2px !important;
    max-width: 32px;
}

/* Supprime le padding-top au dessus de .productListing (stylesheet_new.css
   ligne 3915 `padding-top:65px` et ligne 4958 `padding:20px 0`). */
table.productListing,
.productListing {
    padding-top: 0 !important;
}

/* ========== index_combinee.php : badges Avant / Arriere ==========
   Met en evidence les libelles Avant/Arriere dans les cases Type et Prix
   (dimensions arriere differentes). */
.av-ar {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
    padding: 2px 8px;
    border-radius: 3px;
    margin: 4px 6px 4px 0;
    line-height: 1.4;
    vertical-align: middle;
}
.av-ar.av-front { background: #1e3a8a; }   /* bleu marine = Avant */
.av-ar.av-back  { background: #d33; }       /* rouge = Arriere */

/* Separateur horizontal entre le bloc Avant et le bloc Arriere */
hr.av-sep {
    border: 0;
    border-top: 1px solid #c9c9c9;
    margin: 10px 0 6px;
    width: 100%;
    height: 0;
    clear: both;
}

/* Logo de marque (colonne Marque) : sur index_combinee.php la colonne Marque
   est la 1re, donc la regle stylesheet_new.css `td:first-child img{width:40px}`
   (prevue pour les vignettes profil) ecrase le logo a 40px -> minuscule.
   On lui redonne une taille lisible. */
table.productListing td[data-label="Marque"] img {
    width: auto !important;
    max-width: 130px !important;
    height: auto !important;
}

/* Espace entre le bandeau .delivery_color et le footer : reduit le padding
   bas du bandeau + neutralise le <p align="center">&nbsp;</p> vide en fin de
   #cadre (.style_cadre_rma) juste avant le footer. */
.delivery_color {
    padding-bottom: 20px !important;
}
#cadre > p[align="center"]:last-child,
.style_cadre_rma > p[align="center"]:last-child {
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
    line-height: 0 !important;
    font-size: 0 !important;
    overflow: hidden;
}

/* ========== Page index_jantes.php : liste marque/modeles ========== */

/* ========== Page index_jantes.php : liste marque/modeles ========== */

/* La table HTML force 3 colonnes 33% chacune → les liens longs ("Jantes Audi
   A3 Sportback") wrappent sur 2 lignes. Override : laisse la table flow
   naturellement (largeur auto par TD), et nowrap sur les liens pour qu'ils
   prennent leur largeur naturelle. */
.liste_marque > table {
    table-layout: auto;
    width: 100%;
}
.liste_marque > table > tbody > tr > td {
    width: auto !important;
    vertical-align: top;
    padding: 0 8px;
}
.liste_marque > table ul {
    padding-left: 0 !important;
    margin: 0;
    list-style: none;
}
.liste_marque > table li {
    padding: 4px 0 !important;
    white-space: nowrap;
    text-align: left;
}

/* En dessous de 768px, stack les colonnes (chaque TD prend 100%) */
@media (max-width: 768px) {
    .liste_marque > table,
    .liste_marque > table > tbody,
    .liste_marque > table > tbody > tr,
    .liste_marque > table > tbody > tr > td {
        display: block !important;
        width: 100% !important;
    }
    .liste_marque > table li {
        white-space: normal;
    }
}

/* ========== create_account.php : bandeau titre + asterisques requis ==========
   .contain-txt .pageHeading fait 300px de haut + 75px de padding (vs 200px
   pour .entete.lite des autres pages). On aligne sur le standard. */
.contain-txt .pageHeading {
    height: 200px !important;
    padding: 30px 24px !important;
    font-size: 30px !important;
    line-height: 1.2 !important;
}

/* create_account.php (.contain-txt) + account_edit.php (.account_tab) :
   l'asterisque requis <span class="inputRequirement"> est genere dans la
   cellule de l'INPUT, APRES lui. Le user veut l'asterisque rouge AU NIVEAU
   DU LABEL. Plutot qu'un refactor PHP par champ (~19, fragile), on detecte
   en CSS les lignes requises via :has(span.inputRequirement) et on pose un
   asterisque rouge en ::after sur la cellule LABEL, puis on masque le span
   d'origine cote input. :has() est deja utilise dans ce fichier.
   Garde-fou tables imbriquees : on ne vise que la 1re cellule SANS enfant
   element (:not(:has(*)) = label texte pur), et le span doit etre dans un
   td DIRECT de la ligne (> td ...) -> pas de faux positif sur un <tr>
   parent qui engloberait une sous-table. */
.contain-txt tr:has(> td.main span.inputRequirement) > td.main:first-child:not(:has(*))::after,
.account_tab tr:has(> td.main span.inputRequirement) > td.main:first-child:not(:has(*))::after {
    content: " *";
    color: #d33;
    font-weight: 700;
    margin-left: 3px;
}
.contain-txt td.main span.inputRequirement,
.account_tab td.main span.inputRequirement {
    display: none !important;
}

/* ========== Page Roue galette (roues-galette.php) ==========
   Portee depuis la prod (ancien stylesheet.css). Migree sur le stack
   jantes. Mais les classes a suffixe _jantes / bg_noire_jante /
   row_form_roue / galette_content ... ne sont PAS stylees par
   stylesheet_jantes.css (lui ne connait que .form_marque). De plus
   stylesheet_jantes.css `.recommandations { color:#fff; width:947px }`
   rendait le texte des particularites BLANC SUR BLANC (invisible) =
   page "moche". On recree ici un rendu charte fidele au design jantes,
   scope .roue_galette. */
.roue_galette { background: #f4f6fb; }
.roue_galette #cadre_jantes,
.roue_galette #contenu.contenu { width: 100% !important; max-width: 100% !important; }

/* ===== HERO recherche (calque sur .form_marque des jantes) ===== */
.roue_galette .form_marque_jantes {
    position: relative;
    padding: 70px 20px;
    background-image: url(./images/heading3.jpg);
    background-size: cover;
    background-position: center bottom;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-bottom: 3px solid #1e3a8a;
    text-align: center;
}
.roue_galette .form_marque_jantes::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(10, 16, 32, .45);
    z-index: 0;
}
.roue_galette .form_marque_jantes > * { position: relative; z-index: 1; }
.roue_galette .form_marque_jantes h2 {
    font-family: Poppins, "Helvetica Neue", Arial, sans-serif;
    font-size: 32px;
    color: #fff;
    font-weight: 700;
    text-align: center;
    margin: 0 0 26px;
    line-height: 1.2;
    text-shadow: 0 1px 4px rgba(0, 0, 0, .35);
}
.roue_galette .recherche_block_jantes {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
}
.roue_galette .l_b_j {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}
.roue_galette .l_b_j label {
    font-family: Poppins, sans-serif;
    font-size: 18px;
    color: #fff;
    margin-bottom: 10px;
    font-weight: 500;
}
.roue_galette .l_b_j select,
.roue_galette .form_group select,
.roue_galette select {
    height: 46px;
    min-width: 260px;
    border: 0;
    border-radius: 6px;
    padding: 0 14px;
    font-size: 14px;
    font-family: Poppins, sans-serif;
    background: #fff;
    color: #222;
    cursor: pointer;
}
.roue_galette .r_b_j { padding: 0; display: flex; align-items: flex-end; }
.roue_galette .submit_recherche,
.roue_galette button.submit_recherche {
    background-color: #d33;
    border: 0;
    color: #fff;
    height: 46px;
    padding: 0 26px;
    border-radius: 6px;
    font-family: Poppins, sans-serif;
    font-size: 15px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: background .2s ease;
    white-space: nowrap;
}
.roue_galette .submit_recherche:hover { background-color: #b71c1c; }
.roue_galette .submit_recherche br { display: none; }

/* Cross-lien jantes acier <-> roue galette : lien blanc souligne dans
   le hero (fond image sombre) des deux pages. */
.roue_galette .switch_type,
.form_marque .switch_type,
.form_marque_jantes .switch_type {
    display: inline-block;
    margin-top: 20px;
    color: #fff;
    text-decoration: underline;
    font-size: 14px;
    font-family: Poppins, "Helvetica Neue", Arial, sans-serif;
    position: relative;
    z-index: 1;
}
.roue_galette .switch_type:hover,
.form_marque .switch_type:hover,
.form_marque_jantes .switch_type:hover { color: #ffd400; }

/* ===== "Affinez votre recherche" (bg_noire_jante / modele_jante) ===== */
.roue_galette .bg_noire_jante {
    background: #1e3a8a;
    padding: 26px 16px;
}
.roue_galette .modele_jante {
    max-width: 1170px;
    margin: 0 auto;
}
.roue_galette .modele_jante .legend,
.roue_galette p.legend { margin: 0 0 16px; text-align: center; }
.roue_galette .modele_jante .legend span,
.roue_galette p.legend span {
    display: inline-block;
    color: #fff;
    font-family: Poppins, sans-serif;
    font-size: 20px;
    font-weight: 700;
    border-bottom: 2px solid rgba(255, 255, 255, .35);
    padding-bottom: 6px;
}
.roue_galette .row_form_roue {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
    justify-content: center;
}
.roue_galette .form_group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 240px;
}
.roue_galette .form_group label,
.roue_galette .form_group .title_field {
    color: #fff;
    font-family: Poppins, sans-serif;
    font-size: 14px;
    font-weight: 500;
}

/* ===== Contenu / resultats ===== */
.roue_galette .galette_content {
    max-width: 1170px;
    margin: 0 auto;
    padding: 32px 16px;
    box-sizing: border-box;
}
.roue_galette .left-galette { text-align: center; }
.roue_galette .left-galette h3 {
    font-family: Poppins, sans-serif;
    font-size: 24px;
    color: #1e3a8a;
    font-weight: 700;
    margin: 0 0 18px;
    text-align: center;
}
.roue_galette .left-galette .img_right img,
.roue_galette .left-galette img { max-width: 100%; height: auto; border-radius: 8px; }
.roue_galette .galette_liste {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
    justify-content: center;
    align-items: stretch;
}
.roue_galette .right_galette {
    flex: 1 1 300px;
    max-width: 340px;
    display: flex;
}
.roue_galette .right_galette .cadre {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .07);
    padding: 20px;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    transition: box-shadow .2s ease, transform .2s ease;
}
.roue_galette .right_galette .cadre:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, .12);
    transform: translateY(-2px);
}
.roue_galette .right_galette .img img {
    max-width: 190px;
    height: auto;
    margin: 0 auto 6px;
}
.roue_galette .right_galette .img em {
    display: block;
    font-size: 11px;
    color: #999;
    font-style: italic;
    margin-bottom: 12px;
}
.roue_galette .desc_produit { flex: 1 1 auto; }
.roue_galette .desc_produit h4 {
    font-family: Poppins, sans-serif;
    font-size: 18px;
    color: #1e3a8a;
    font-weight: 700;
    margin: 6px 0;
}
.roue_galette .desc_produit .dim,
.roue_galette .desc_produit p {
    font-size: 13px;
    color: #555;
    margin: 3px 0;
}
.roue_galette .prix_galette {
    font-family: Poppins, sans-serif;
    font-size: 26px;
    font-weight: 800;
    color: #d33;
    margin: 14px 0;
}
.roue_galette .btn_add { margin: 8px 0 0; }
.roue_galette .btn_add a,
.roue_galette a.btn_add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #d33;
    color: #fff;
    font-family: Poppins, sans-serif;
    font-weight: 700;
    font-size: 15px;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    transition: background .2s ease;
}
.roue_galette .btn_add a:hover,
.roue_galette a.btn_add:hover { background: #b71c1c; }
.roue_galette .btn_add a em,
.roue_galette .btn_add .fa { font-style: normal; }
.roue_galette .indispo {
    display: inline-block;
    color: #b71c1c;
    background: #fde8e8;
    border-radius: 6px;
    padding: 10px 14px;
    font-weight: 600;
    font-size: 13px;
}

/* ===== Bloc PARTICULARITES / Recommandations =====
   FIX MAJEUR : stylesheet_jantes.css `.recommandations{color:#fff}`
   rendait ce texte invisible (blanc sur blanc). On surclasse en carte
   blanche, texte sombre lisible, titres charte. */
.roue_galette #recommandations.recommandations,
.roue_galette .recommandations {
    width: auto !important;
    max-width: 1170px !important;
    margin: 28px auto !important;
    background: #fff !important;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .06);
    padding: 28px 32px !important;
    box-sizing: border-box;
    font-family: Poppins, "Helvetica Neue", Arial, sans-serif !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    color: #333 !important;
    line-height: 1.65 !important;
    text-align: left !important;
}
.roue_galette .recommandations p { color: #333 !important; margin: 8px 0; }
.roue_galette .recommandations .legend { text-align: center; margin: 0 0 20px; }
.roue_galette .recommandations .legend span {
    display: inline-block;
    color: #1e3a8a !important;
    font-size: 22px;
    font-weight: 700;
    border-bottom: 3px solid #d33;
    padding-bottom: 8px;
}
.roue_galette .recommandations .sub_title {
    color: #1e3a8a !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    margin: 20px 0 6px !important;
    text-align: left !important;
    border-left: 4px solid #d33;
    padding-left: 10px;
}
.roue_galette .recommandations .orange_txt { color: #e67e22 !important; font-weight: 700; }
.roue_galette .recommandations strong { color: #1e3a8a; }
.roue_galette .recommandations .button_white,
.roue_galette .recommandations a.button_white {
    display: inline-block;
    margin-top: 10px;
    background: #1e3a8a;
    color: #fff !important;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    transition: background .2s ease;
}
.roue_galette .recommandations .button_white:hover { background: #d33; }

/* tables legacy de mise en page : neutralisees pour le flux responsive */
.roue_galette table[width="850"],
.roue_galette table[width="1000"] {
    width: 100% !important;
    max-width: 1170px !important;
    margin: 0 auto !important;
}

@media (max-width: 768px) {
    .roue_galette .form_marque_jantes { padding: 40px 12px; }
    .roue_galette .form_marque_jantes h2 { font-size: 22px; }
    .roue_galette .recherche_block_jantes { flex-direction: column; align-items: stretch; width: 100%; }
    .roue_galette .l_b_j { align-items: stretch; }
    .roue_galette .l_b_j select,
    .roue_galette .form_group select,
    .roue_galette select { min-width: 0; width: 100%; }
    .roue_galette .r_b_j { width: 100%; }
    .roue_galette .submit_recherche { width: 100%; justify-content: center; }
    .roue_galette .row_form_roue { flex-direction: column; align-items: stretch; }
    .roue_galette .form_group { min-width: 0; width: 100%; }
    .roue_galette .galette_liste { gap: 16px; }
    .roue_galette .right_galette { flex: 1 1 100%; max-width: 100%; }
    .roue_galette #recommandations.recommandations,
    .roue_galette .recommandations { padding: 20px 16px !important; }
}

/* ========== Page CGV (conditions_all.php) ==========
   En migrant cette page vers stylesheet_new.css, l'ancien stylesheet.css
   (qui portait .nav-tabs / .tab-content > .tab-pane{display:none} /
   .active{display:block}) a ete retire -> les 4 onglets s'empilaient
   (mur ~21000px) et le CDN Bootstrap (maxcdn, defunct) ne stylait/switchait
   plus rien. On recree ici le style + le masquage des panneaux, charte
   nouveau design. Scope = classe .cgv_page posee sur <BODY> (pas sur
   #contenu : le HTML legacy mal forme de top.php fait refermer #contenu
   trop tot par le parseur, qui re-parente .nav-tabs/.tab-content HORS de
   #contenu -> un scope sur #contenu ne s'appliquait pas. <body> est
   toujours ancetre, aucun re-parentage possible hors de lui). Switch
   d'onglet par petit JS vanille injecte dans la page (CDN Bootstrap mort). */
.cgv_page table[width="850"] {
    width: auto !important;
    max-width: 1100px !important;
    margin: 24px auto 44px !important;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, .06);
    padding: 8px 28px 32px !important;
    box-sizing: border-box;
}
/* Le titre est desormais dans le bandeau hero standard
   (table.contain-100.entete.lite injecte apres top.php) -> style gere
   par .entete.lite de stylesheet_new.css (fond image, h2 blanc). Plus
   de td.pageHeading dans la carte. */

/* Barre d'onglets : pills charte, wrap, actif = navy plein */
.cgv_page ul.nav-tabs {
    list-style: none !important;
    display: flex !important;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    padding: 0 !important;
    margin: 18px 0 24px !important;
    border-bottom: 2px solid #e5e7eb !important;
}
.cgv_page ul.nav-tabs > li { float: none !important; margin: 0 !important; }
.cgv_page ul.nav-tabs > li > a {
    display: block;
    font-family: Poppins, "Helvetica Neue", Arial, sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #1e3a8a;
    background: #f4f6fb;
    border: 1px solid #d6dbe8 !important;
    border-radius: 6px 6px 0 0;
    padding: 10px 16px !important;
    text-decoration: none;
    transition: background .15s, color .15s;
}
.cgv_page ul.nav-tabs > li > a:hover {
    background: #e6ebf7;
    color: #1e3a8a;
}
.cgv_page ul.nav-tabs > li.active > a,
.cgv_page ul.nav-tabs > li.active > a:hover,
.cgv_page ul.nav-tabs > li.active > a:focus {
    color: #fff !important;
    background: #1e3a8a !important;
    border-color: #1e3a8a !important;
    cursor: default;
}

/* Panneaux : seul l'actif visible (remplace le CSS Bootstrap disparu) */
.cgv_page .tab-content > .tab-pane { display: none !important; }
.cgv_page .tab-content > .tab-pane.active { display: block !important; }

/* Typographie contenu : lisible, charte */
.cgv_page .tab-content {
    font-family: Poppins, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.65;
    color: #2b2b2b;
    text-align: left;
}
.cgv_page .tab-content h3 {
    font-size: 20px !important;
    font-weight: 700;
    color: #1e3a8a !important;
    text-align: center !important;
    margin: 6px 0 22px;
}
.cgv_page .tab-content b,
.cgv_page .tab-content strong {
    color: #1e3a8a;
    font-size: 15px;
    display: inline-block;
    margin-top: 4px;
}
.cgv_page .tab-content a { color: #d33; }
.cgv_page .tab-content .GreenText { color: #1e3a8a; font-weight: 600; }
.cgv_page .tab-content ul { margin: 8px 0 8px 22px; }
.cgv_page .tab-content li { margin: 4px 0; }

@media (max-width: 768px) {
    .cgv_page table[width="850"] {
        margin: 14px 8px 28px !important;
        padding: 6px 12px 22px !important;
        max-width: none !important;
    }
    .cgv_page ul.nav-tabs { gap: 6px; }
    .cgv_page ul.nav-tabs > li { flex: 1 1 100%; }
    .cgv_page ul.nav-tabs > li > a {
        text-align: center;
        border-radius: 6px;
        font-size: 12px;
        padding: 10px 8px !important;
    }
    .cgv_page .tab-content { font-size: 13px; }
}

/* ========== Page panier (shopping_cart.php) ========== */

/* Padding cellules : trop d'espace dans le tableau articles. Reduit. */
body.panier_page .productListing > tbody > tr > td,
body.panier_page .productListing-data,
body.panier_page table.productListing td {
    padding: 4px 6px !important;
    vertical-align: middle;
}

/* ===== RESTAURATION TABLEAU DESKTOP =====
   stylesheet_new.css (l.~3853-4785) contient un essai ABANDONNE de panier
   "en cartes" : il force display:inline-flex/flex sur les td + des largeurs
   !important minuscules (nth-child(1) 40px, (3) 80px...) + height:60px.
   Resultat : sur desktop le tableau "ne se comporte plus en tableau"
   (cellules inline-flex, colonnes ecrasees). responsive_legacy.css charge
   en dernier : on RESTAURE un vrai rendu table sur desktop. Le mode carte
   mobile reste gere par le @media (max-width:768px) plus bas (qui gagne en
   <=768px grace a la classe .productListing-data + l'ordre source). */
body.panier_page .list_panier table.productListing {
    display: table !important;
    width: 100% !important;
}
body.panier_page .list_panier .productListing > tbody {
    display: table-row-group !important;
}
body.panier_page .list_panier .productListing > tbody > tr {
    display: table-row !important;
}
body.panier_page .list_panier .productListing > tbody > tr > td {
    display: table-cell !important;
    height: auto !important;
    vertical-align: middle !important;
}
/* Largeurs colonnes apres reordre PHP : 1=Produit(s) 2=Qte. 3=Total HT
   4=Supprimer. !important pour battre les largeurs !important de
   stylesheet_new.css. "Produit" prend l'espace restant. */
body.panier_page .list_panier .productListing > tbody > tr > td:nth-child(1) {
    width: auto !important;
    text-align: left !important;
}
body.panier_page .list_panier .productListing > tbody > tr > td:nth-child(2) {
    width: 120px !important;
    text-align: center !important;
}
body.panier_page .list_panier .productListing > tbody > tr > td:nth-child(3) {
    width: 140px !important;
    text-align: right !important;
}
body.panier_page .list_panier .productListing > tbody > tr > td:nth-child(4) {
    width: 70px !important;
    text-align: center !important;
}

/* Ligne d'entete (1re tr) mise en evidence : fond navy charte + texte
   blanc gras majuscule, plus d'air. Scope panier uniquement (les entetes
   index/promo gardent leur style gris dedie). Cachee en mobile (cartes). */
body.panier_page .list_panier .productListing > tbody > tr:first-child > td,
body.panier_page .list_panier .productListing > tbody > tr:first-child > td.productListing-heading {
    background-color: #1e3a8a !important;
    color: #fff !important;
    font-family: Poppins, "Helvetica Neue", Arial, sans-serif !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: .04em !important;
    padding: 12px 10px !important;
    border: 0 !important;
    border-right: 1px solid rgba(255, 255, 255, .15) !important;
    vertical-align: middle !important;
}
body.panier_page .list_panier .productListing > tbody > tr:first-child > td:last-child {
    border-right: 0 !important;
}
body.panier_page .list_panier .productListing > tbody > tr:first-child > td a,
body.panier_page .list_panier .productListing > tbody > tr:first-child > td a:link,
body.panier_page .list_panier .productListing > tbody > tr:first-child > td a:visited,
body.panier_page .list_panier .productListing > tbody > tr:first-child > td a:hover {
    color: #fff !important;
    text-decoration: none !important;
}

/* Cellule "Sous-total HT" (TR.contain-subtotal) : le fond #d6061721 (rouge
   tres pale) etait masque par les surcouches. On force un fond colore plein
   et un texte blanc pour mettre en valeur le total. */
body.panier_page tr.contain-subtotal,
body.panier_page tr.contain-subtotal td.subtotal,
body.panier_page .contain-subtotal {
    background-color: #1e3a8a !important;
    color: #fff !important;
}
body.panier_page tr.contain-subtotal td.subtotal,
body.panier_page tr.contain-subtotal td.subtotal b {
    color: #fff !important;
    padding: 12px 14px !important;
    font-size: 15px !important;
}

/* CGV checkbox : le texte "J'ai lu les Conditions Generales..." faisait 3
   lignes parce que .check-panier prenait 50% (~585px). On reduit
   .check-panier-left a une largeur fixe (260px = bouton Continuer) pour que
   le bloc CGV ait toute la largeur restante (~900px). */
body.panier_page .center_tab td.main.check-panier-left {
    width: 260px !important;
    flex: 0 0 260px;
}
body.panier_page .center_tab td.main.check-panier {
    width: auto !important;
    flex: 1 1 auto;
}
body.panier_page .validation_cdv {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    align-items: flex-start;
    flex-wrap: nowrap !important;
    gap: 10px;
    width: 100%;
}
body.panier_page .validation_cdv b {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    flex: 1 1 auto;
}
body.panier_page .validation_cdv input[type="checkbox"] {
    flex: 0 0 18px;
    margin-top: 2px; /* aligne visuellement avec la 1re ligne de texte */
}

/* ========== Page checkout_payment.php ========== */

/* Padding excessif sur les blocs mode de paiement / choix adresse
   (.moduleRow / .moduleRowOver / .moduleRowSelected). L'osCommerce swap les
   classes via JS au hover/select, donc on doit appliquer le meme padding
   reduit a TOUS les etats sinon ca cree un layout-shift sur hover. */
.moduleRow,
.moduleRowOver,
.moduleRowSelected,
tr.moduleRow,
tr.moduleRowOver,
tr.moduleRowSelected,
table.checkselect tr.moduleRow,
table.checkselect tr.moduleRow.check,
table.checkselect tr.moduleRowOver,
table.checkselect tr.moduleRowSelected {
    padding: 6px 12px !important;
}
table.checkselect tr.moduleRow td,
table.checkselect tr.moduleRowOver td,
table.checkselect tr.moduleRowSelected td,
.center_tab .checkselect tr td.main {
    padding: 6px 10px !important;
}

/* Radio buttons mode paiement : forcer une taille raisonnable */
table.checkselect tr td input[type="radio"],
.moduleRow td input[type="radio"] {
    width: 18px !important;
    height: 18px !important;
    margin: 0;
    accent-color: #1e3a8a;
}

/* Texte du mode de paiement ecrase : stylesheet_new.css force
   `tr.moduleRow.check td { width:50%!important }` -> le nom du module
   (td.main colspan=3) est coince a 50% et le texte se tasse. On donne
   au nom toute la largeur dispo et a la colonne radio une largeur fixe. */
table.checkselect tr.moduleRow.check td.main:not(.right),
table.checkselect tr.moduleRowOver td.main:not(.right),
table.checkselect tr.moduleRowSelected td.main:not(.right),
.center_tab .checkselect tr td.main:not(.right) {
    width: auto !important;
    flex: 1 1 auto !important;
    justify-content: flex-start !important;
}
table.checkselect tr.moduleRow.check td.main.right,
table.checkselect tr.moduleRowOver td.main.right,
table.checkselect tr.moduleRowSelected td.main.right,
.center_tab .checkselect tr td.main.right,
table.checkselect tr.moduleRow.check td:last-child,
table.checkselect tr.moduleRowSelected td:last-child {
    width: 54px !important;
    flex: 0 0 54px !important;
    min-width: 54px !important;
    justify-content: flex-end !important;
}
table.checkselect tr.moduleRow.check td.main b,
table.checkselect tr.moduleRowSelected td.main b {
    white-space: normal;
    word-break: normal;
}

/* Checkboxes generiques : taille controlee partout. stylesheet_new.css ligne
   3763 a une regle `.infoBox td input { width:100%; height:40px }` qui
   gonfle TOUS les inputs y compris les checkboxes (notamment le checkbox
   "Avoir" sur checkout_payment.php). On force !important. */
input[type="checkbox"],
.infoBox td input[type="checkbox"],
.infoBox input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;
    padding: 0 !important;
    margin: 0 4px 0 0 !important;
    accent-color: #1e3a8a;
    cursor: pointer;
    flex: 0 0 auto;
    vertical-align: middle;
    display: inline-block;
}

/* Bloc Avoir / Gift Voucher (ot_gv.credit_selection) : refonte cosmetique du
   formulaire de saisie code avoir. Hide pixel_trans separators, style l'input
   et le bouton image. */
td:has(> img[src*="pixel_trans"][width="10"]) {
    display: none !important;
}
input[name="gv_redeem_code"] {
    padding: 8px 10px !important;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 14px;
    min-width: 200px;
    margin-left: 8px;
}
input[type="image"][src*="button_redeem"] {
    /* Garde le natif compact (l'image originale est 60x20) */
    max-width: 90px;
    height: auto;
    cursor: pointer;
}

/* .mw1170 (account.php) : wrapper du bouton "Rechercher des produits" — la
   classe n'a pas de CSS dans stylesheet_new.css donc le wrapper .contain-100
   prend 100% du viewport (1440) et le bouton se cale tout a gauche. On
   contraint a 1170 centre, le bouton reste a gauche dans ce bloc. */
.contain-100.mw1170,
.mw1170 {
    max-width: 1170px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box;
}

/* .button_account : largeur fixe 242px dans stylesheet_new.css → on laisse
   prendre la largeur du contenu naturel. */
.button_account {
    width: auto !important;
}

/* .eye_button : toggle "vue client final" affiche au-dessus de .productListing.
   Le CSS d'origine utilise justify-content:flex-end + right:0 sans max-width
   → collait au bord droit du viewport. On le cale en haut-gauche du tableau
   productListing (max-width:1170 centre + flex-start). */
.eye_button {
    max-width: 1170px;
    margin-left: auto !important;
    margin-right: auto !important;
    justify-content: flex-start !important;
}

/* .button_express : indicateur "Express" (livraison rapide). Originellement un
   pill avec icone + texte "Express" mais reste trop large dans la cellule
   bouton (~170px) face au .button_panier (42x42). Refonte en badge icone-seule
   carre 28x28 aligne avec le bouton panier. Le label "Express" est masque via
   font-size:0 mais reste accessible via tooltip (attribut title HTML non
   present mais on garde le texte dans le DOM pour les lecteurs d'ecran). */
.button_express {
    width: 42px !important;
    height: 42px !important;
    padding: 0 !important;
    font-size: 0 !important;
    gap: 0 !important;
    border-radius: 4px;
    align-self: center;
    margin: 0 0 6px !important;
}
.button_express i {
    font-size: 16px !important;
}
/* .button_express et .button_panier doivent etre alignes (meme colonne,
   centres). stylesheet_new.css force le panier en height:100% (tres haut) et
   sans align -> desaligne de l'express. On normalise : 42x42 centres. */
.flex_promo {
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 6px;
}
.productListing-odd td:last-child div > a.button_panier,
.productListing-even td:last-child div > a.button_panier,
.productListing-on td:last-child div > a.button_panier,
.flex_promo .button_panier {
    width: 42px !important;
    height: 42px !important;
    align-self: center !important;
    border-radius: 4px;
    flex: 0 0 42px;
}
.flex_promo .button_panier i {
    font-size: 16px !important;
}

/* index_q.php (quantitatif) : .flex_promo_qty contient un select quantite +
   le .button_panier moderne. Stack vertical : select au-dessus du bouton,
   centres et meme largeur (42px). */
.flex_promo_qty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.flex_promo_qty select.qty {
    width: 42px;
    padding: 4px 2px !important;
    font-size: 12px !important;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: #fff;
    text-align: center;
    text-align-last: center;
    -webkit-appearance: menulist-button;
    appearance: menulist-button;
    box-sizing: border-box;
    color: #222;
}

/* ========== index_combinee.php : bloc dimensions Avant/Arriere ==========
   ========== Bloc .express (form index/recherche) ==========
   stylesheet_new.css met .express p { line-height:12px } (les 2 lignes de
   "Commande avant 12h00 (sans supplement tarifaire)" se chevauchent) +
   .express { align-items:flex-end; gap:0 } sans marge -> chevauche la
   ligne IC/IV au-dessus. On remet un layout lisible (colonne, line-height
   normal, marge haute). Scope = meme selecteur que stylesheet_new.css,
   responsive_legacy charge apres -> gagne. */
.recherche_complet .col-recherche div.express {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    align-items: flex-start !important;
    width: auto !important;
    gap: 4px !important;
    margin-top: 16px;
}
.recherche_complet .col-recherche div.express span {
    display: flex !important;
    align-items: center;
    gap: 8px;
    line-height: 1.4 !important;
    font-size: 14px;
}
.recherche_complet .col-recherche div.express p {
    margin: 0 !important;
    line-height: 1.4 !important;
    font-size: 12px;
}

/* ========== Form combinee : .container50 (Avant | Arriere) ==========
   Le formulaire combinee a deux .container50 (Avant | Arriere) chacun avec un
   <h5> + 3 selects (Largeur/Hauteur/Diametre). stylesheet_new.css met
   .container50 { display:flex } sans wrap/direction → le <h5> "Avant"/"Arriere"
   se retrouve en ligne avec les selects et les chevauche. On corrige le layout
   desktop : h5 pleine largeur en titre, puis les 3 selects en ligne dessous. */
.recherche_complet form .recherche_bloc > div .dimension .container50 {
    flex-wrap: wrap !important;
    flex-direction: row !important;
    align-content: flex-start;
    gap: 8px 12px;
}
.recherche_complet .col-recherche .container50 h5 {
    width: 100% !important;
    margin: 0 0 4px !important;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.recherche_complet .col-recherche .container50 > div {
    width: calc(33.33% - 8px) !important;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.recherche_complet .col-recherche .container50 .title_field {
    color: #fff;
    font-size: 12px;
}

/* ========== 3) Forms (inputs, selects, boutons) ========== */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
input[type="search"],
select,
textarea {
    font-family: inherit;
    font-size: 14px;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: #fff;
    color: #222;
    line-height: 1.4;
    transition: border-color 0.15s;
    box-sizing: border-box;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #1e3a8a;
    box-shadow: 0 0 0 2px rgba(30,58,138,0.15);
}

input[type="submit"],
input[type="button"],
button {
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    padding: 9px 18px;
    background: #1e3a8a;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s;
}
input[type="submit"]:hover,
input[type="button"]:hover,
button:not(.btn-menu):not(.navbar-toggle):hover {
    background: #d33;
}

/* Bouton hamburger menu mobile : doit rester transparent (icone seule) */
button.btn-menu,
button.btn-menu:hover,
button.btn-menu:focus,
button.btn-menu:active,
.navbar-toggle,
.navbar-toggle:hover,
.navbar-toggle:focus,
.navbar-toggle:active {
    background: transparent !important;
    background-color: transparent !important;
    color: inherit !important;
    box-shadow: none !important;
    outline: none !important;
}

/* ===== Remplace les boutons image GIF osCommerce par des boutons CSS modernes =====
   Le HTML legacy utilise <a><img src=".../button_XXX.gif"></a>. On cache l'img et
   on style le <a> parent via :has(). Le texte du bouton vient via ::after. */

a:has(> img[src*="button_"]) {
    display: inline-block;
    background: #1e3a8a;
    color: #fff !important;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none !important;
    font-size: 13px !important;
    font-weight: 600;
    white-space: nowrap;
    line-height: 1;
    transition: background 0.15s;
    border: none;
    cursor: pointer;
    vertical-align: middle;
}
a:has(> img[src*="button_"]):hover {
    background: #d33;
    color: #fff !important;
}
a:has(> img[src*="button_"]) > img {
    display: none !important;
}

/* Texte des boutons via ::after */
a:has(> img[src*="button_in_cart"])::after { content: "Ajouter au panier"; }
a:has(> img[src*="button_continue_shopping"])::after { content: "Continuer mes achats"; }
a:has(> img[src*="button_continue"])::after { content: "Continuer"; }
a:has(> img[src*="button_reviews"])::after { content: "Avis"; }
a:has(> img[src*="button_write_review"])::after { content: "Écrire un avis"; }
a:has(> img[src*="button_buy_now"])::after { content: "Acheter"; }
a:has(> img[src*="button_login"])::after { content: "Connexion"; }
a:has(> img[src*="button_search"])::after { content: "Rechercher"; }
a:has(> img[src*="button_quick_find"])::after { content: "Recherche"; }
a:has(> img[src*="button_send"])::after { content: "Envoyer"; }
a:has(> img[src*="button_back"])::after { content: "← Retour"; }
a:has(> img[src*="button_confirm_order"])::after { content: "Confirmer la commande"; }
a:has(> img[src*="button_confirm"])::after { content: "Confirmer"; }
a:has(> img[src*="button_checkout"])::after { content: "Commander"; }
a:has(> img[src*="button_create_account"])::after { content: "Créer un compte"; }
a:has(> img[src*="button_delete"])::after { content: "Supprimer"; }
a:has(> img[src*="button_update_cart"])::after { content: "Mettre à jour le panier"; }
a:has(> img[src*="button_update"])::after { content: "Mettre à jour"; }
a:has(> img[src*="button_change_address"])::after { content: "Changer l'adresse"; }
a:has(> img[src*="button_choose_address"])::after { content: "Choisir l'adresse"; }
a:has(> img[src*="button_deliver_here"])::after { content: "Livrer ici"; }
a:has(> img[src*="button_add_address"])::after { content: "Ajouter une adresse"; }
a:has(> img[src*="button_address_book"])::after { content: "Carnet d'adresses"; }
a:has(> img[src*="button_edit_account"])::after { content: "Modifier le compte"; }
a:has(> img[src*="button_history"])::after { content: "Historique"; }
a:has(> img[src*="button_notifications"])::after { content: "Notifications"; }
a:has(> img[src*="button_remove_notifications"])::after { content: "Retirer notifications"; }
a:has(> img[src*="button_redeem"])::after { content: "Utiliser"; }
a:has(> img[src*="button_shipping_options"])::after { content: "Options de livraison"; }
a:has(> img[src*="button_tell_a_friend"])::after { content: "Partager"; }

/* input type="image" : si encore présent dans le HTML (sources non refactorisées).
   Réduit l'impact visuel — restent fonctionnels. */
input[type="image"][src*="button_"] {
    border: 0;
    cursor: pointer;
}

/* Boutons legacy convertis via tep_image_submit() en <button class="btn-legacy"> */
button.btn-legacy {
    display: inline-block;
    font-family: Poppins, "Helvetica Neue", Arial, sans-serif !important;
    background: #1e3a8a;
    color: #fff !important;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none !important;
    font-size: 13px !important;
    font-weight: 600;
    white-space: nowrap;
    line-height: 1;
    transition: background 0.15s;
    border: none;
    cursor: pointer;
    vertical-align: middle;
}
button.btn-legacy:hover {
    background: #d33;
}
/* Variante d'accent pour "ajouter au panier" et confirmations : rouge */
button.btn-legacy.btn-incart,
button.btn-legacy.btn-buynow,
button.btn-legacy.btn-confirm,
button.btn-legacy.btn-confirmorder,
button.btn-legacy.btn-checkout {
    background: #d33;
}
button.btn-legacy.btn-incart:hover,
button.btn-legacy.btn-buynow:hover,
button.btn-legacy.btn-confirm:hover,
button.btn-legacy.btn-confirmorder:hover,
button.btn-legacy.btn-checkout:hover {
    background: #b22;
}

label {
    font-size: 14px;
    color: inherit;
}

/* ========== 4) Layout principal pages legacy : centre et limite ========== */

/* Centre le contenu principal sur les pages avec layout 3 colonnes osCommerce. */
body > table:first-of-type {
    margin: 0 auto;
}

/* Padding global sur le contenu central */
body > table:first-of-type > tbody > tr > td[width="100%"] {
    padding: 16px 24px;
}

/* Cache les sidebars osCommerce (gauche/droite) sur DESKTOP aussi :
   leur contenu (Pneustore, liens Store répétés, image pneu décorative) est
   redondant avec le header refondu (menu + icônes panier/compte). */
body > table:first-of-type > tbody > tr > td[width="150"],
body > table:first-of-type > tbody > tr > td[width="180"] {
    display: none !important;
}

/* Tables sidebar remontées au body level (parseur HTML, voir audit) */
body > table[width="150"],
body > table[width="180"],
body > table[width="140"] {
    display: none !important;
}

/* Le contenu central peut maintenant prendre la largeur disponible, mais
   on limite avec un max-width pour la lecture confortable. */
body > table:first-of-type > tbody > tr > td[width="100%"] {
    max-width: 1170px;
    margin: 0 auto;
    display: block;
}

/* Wrapper du contenu central : centre toutes les tables/forms principaux
   au niveau body (pour les pages osCommerce legacy).

   Le parseur HTML d'osCommerce remonte plusieurs éléments au niveau body :
   - <table width="100%"> : header recherche, contenu principal
   - <form> : sur les pages produit (mal fermé)
   - <table width="150"/"140"/"180"> : sidebars (cachées via règles plus haut)

   On centre tout sauf les <div class="colonne"> qui composent le footer
   (qui doit prendre 100% pour le fond noir étendu). */
body > table[width="100%"],
body > form,
body > center {
    max-width: 1170px !important;
    margin: 0 auto !important;
    padding: 0 16px;
    box-sizing: border-box;
    float: none;
}

body > form { display: block; }

/* Exception home : le <table width="100%"> qui contient les bandeaux pleine largeur
   (pro_ligne, camping_ligne, picto_ligne) est promu au niveau body par le parseur
   HTML (sortie de .contain-pp). Il doit rester pleine largeur — chaque ligne a son
   propre fond coloré qui s'étend bord à bord. */
body > table[width="100%"]:has(> tbody > tr.pro_ligne),
body > table[width="100%"]:has(> tbody > tr.camping_ligne),
body > table[width="100%"]:has(> tbody > tr.picto_ligne) {
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* ========== Centrage blocs listing produits (index.php?accueil_rech=1, index_q.php,
              index_camping.php?recherche=1, etc.) ========== */

/* div#InfosPrix et .pagination ont max-width:1170 mais pas de margin auto dans
   stylesheet_new.css → les centrer comme TABLE.productListing. */
div#InfosPrix,
table.pagination,
.pagination {
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Les tables de pagination-summary osCommerce (« Afficher X à Y sur Z produits »)
   encadrent .productListing et s'étendent à 100% du parent. On les contraint
   à la même largeur que productListing. */
table.productListing + table[width="100%"],
table[width="100%"]:has(+ table.productListing),
table[width="100%"]:has(+ br + table.productListing),
table[width="100%"]:has(+ .pagination),
table[width="100%"]:has(td.smallText) {
    max-width: 1170px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    width: 100%;
}

/* ========== Fix bouton .submit_recherche (index_jantes.php) ==========
   Le bouton est 80x80 (intent cercle/carré icône), mais ma règle générique
   `button { padding: 9px 18px; font-size: 14px }` faisait déborder "Recherche".
   On stack icône + label en flex column avec texte plus petit. */
button.submit_recherche {
    padding: 0 !important;
    font-size: 11px !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    line-height: 1.1;
}
button.submit_recherche i {
    font-size: 22px;
}

/* ========== Mobile <= 768px : stack 3 colonnes, cache sidebars ========== */
@media (max-width: 768px) {

    html, body { overflow-x: hidden; }
    img { max-width: 100%; height: auto; }

    /* Layout principal osCommerce : table racine en bloc */
    body > table:first-of-type {
        display: block;
        width: 100% !important;
        border-collapse: collapse;
    }
    body > table:first-of-type > tbody { display: block; width: 100%; }
    body > table:first-of-type > tbody > tr { display: block; width: 100%; }
    body > table:first-of-type > tbody > tr > td {
        display: block;
        width: 100% !important;
        box-sizing: border-box;
        padding: 8px 12px;
    }

    /* Cache les sidebars étroites osCommerce */
    body > table:first-of-type > tbody > tr > td[width="150"],
    body > table:first-of-type > tbody > tr > td[width="180"] {
        display: none !important;
    }

    /* Tables sidebar remontées au body level (parseur HTML osCommerce) */
    body > table[width="150"],
    body > table[width="180"],
    body > table[width="140"] {
        display: none !important;
    }

    /* Tables internes prennent toute la largeur */
    table.infoBox,
    table.infoBoxContents,
    table.borderTable {
        width: 100% !important;
        max-width: 100%;
        box-sizing: border-box;
    }

    body > table:first-of-type img { max-width: 100%; height: auto; }

    img[src*="pixel_trans.gif"][width] {
        width: auto !important;
        max-width: 100%;
    }

    body { padding: 0; margin: 0; }

    /* Bump font-size sur mobile pour lisibilité */
    body > table:first-of-type p,
    body > table:first-of-type td,
    body > table:first-of-type span,
    body > table:first-of-type li,
    body > table:first-of-type div {
        font-size: 14px;
        line-height: 1.5;
    }

    body > table:first-of-type a { font-size: inherit; }

    /* Titres mobile */
    body > table:first-of-type .pageHeading,
    body > table:first-of-type td.pageHeading,
    .pageHeading,
    td.pageHeading {
        font-size: 22px !important;
        line-height: 1.2 !important;
        padding: 12px 6px !important;
    }

    /* CGV / pages de contenu refondues (.contain-txt-2) */
    .contain-txt-2,
    .contain-txt-2 p,
    .contain-txt-2 li,
    .contain-txt-2 span,
    .contain-txt-2 td,
    .contain-txt-2 div {
        font-size: 15px !important;
        line-height: 1.5 !important;
    }
    .contain-txt-2 h1,
    .contain-txt-2 h2,
    .contain-txt-2 h3 {
        font-size: 19px !important;
        line-height: 1.3 !important;
        margin-top: 16px;
    }

    /* ===== Slider home : les boutons sont position:absolute bottom:-18px →
       clippes par overflow:hidden d'Owl Carousel. On les replace dans le flux,
       on autorise le debordement du .txt-contain, et on reduit les tailles
       de texte pour laisser de la place. */
    .owl-slider-home .item {
        height: auto !important;
        min-height: 280px;
        overflow: visible !important;
    }
    .owl-slider-home .item .txt-contain {
        overflow: visible !important;
        padding: 16px !important;
        gap: 8px !important;
    }
    .owl-slider-home .item .txt-contain > img:first-child,
    .owl-slider-home .item .txt-contain.x3 > img:first-child {
        width: 140px !important;
        max-width: 50%;
    }
    .owl-slider-home .item .txt-contain.x3 > img {
        width: 60px !important;
    }
    .owl-slider-home .item .txt-contain > h3,
    .owl-slider-home .item .txt-contain.x3 > h3 {
        font-size: 18px !important;
        line-height: 1.2 !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    .owl-slider-home .item .txt-contain > p {
        font-size: 13px !important;
        padding: 0 !important;
    }
    .owl-slider-home .item .txt-contain a {
        position: relative !important;
        bottom: auto !important;
        align-self: center;
        margin-top: 8px;
        z-index: 5;
        padding: 8px 16px !important;
        font-size: 13px !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.3);
        border: 2px solid #fff;
    }

    /* ===== Bloc "Trouvez vos references" + boutons type pneumatique ===== */
    .td_recherche {
        padding: 6px 8px 12px !important;
    }
    #title {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }
    #title h3 {
        font-size: 18px !important;
        margin: 4px 0 !important;
        line-height: 1.3 !important;
    }
    /* Boutons type pneumatique (Tourisme / SUV / Utilitaires...) */
    .block_input {
        height: auto !important;
        margin-right: 4px !important;
        padding-left: 2px !important;
        padding-right: 2px !important;
    }
    .block_input [type="radio"]:not(:checked) + label,
    .block_input [type="radio"]:checked + label {
        padding: 8px 4px !important;
        font-size: 12px !important;
        min-height: 50px;
    }
    .block_input label span {
        font-size: 13px !important;
        line-height: 1.2;
    }
    .top_form {
        margin-top: 6px !important;
        gap: 4px;
    }
    .recherche_complet {
        padding-bottom: 30px !important;
    }
    .recherche_complet .col-recherche div,
    .recherche_complet form .recherche_bloc > div {
        gap: 6px !important;
    }

    /* ===== Tableau produits sans thead visible en mobile : afficher le
       data-label devant chaque valeur. On force display:block sur les TD pour
       que chaque cellule occupe une ligne. */
    table.productListing > tbody > tr:not(.productListing-odd):not(.productListing-even):not(.productListing-on):first-child {
        display: none; /* cache l'en-tete original */
    }
    table.productListing,
    table.productListing > tbody,
    table.productListing > tbody > tr {
        display: block !important;
        width: 100% !important;
    }
    table.productListing > tbody > tr {
        margin-bottom: 10px;
        border: 1px solid #ddd;
        border-radius: 6px;
        padding: 2px !important;
        background: #fff;
    }
    table.productListing > tbody > tr.productListing-on {
        display: none !important; /* cache header row (productListing-on) */
    }
    table.productListing > tbody > tr > td[data-label] {
        display: flex !important;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        gap: 4px 8px;
        padding: 3px 4px !important;
        width: 100% !important;
        border-bottom: 1px solid #f0f0f0;
        text-align: right;
    }
    table.productListing > tbody > tr > td[data-label]:last-child {
        border-bottom: 0;
    }
    table.productListing > tbody > tr > td[data-label]::before {
        content: attr(data-label) " :";
        font-weight: 600;
        color: #1e3a8a;
        font-size: 12px;
        text-align: left;
        flex: 0 0 auto;
        white-space: nowrap;
    }

    /* Annule la hauteur fixe 90px qui clippait le contenu (notamment le
       tab_labelling qui passe a la ligne). */
    table.productListing td.productListing-data,
    table.productListing .productListing-odd > td,
    table.productListing .productListing-even > td,
    table.productListing .productListing-on > td {
        height: auto !important;
        min-height: 0 !important;
    }

    /* Neutralise le bloc mobile CSS-grid concurrent de stylesheet_new.css
       (~l.4250-4940 : .productListing > tbody > tr > td.prix { grid-area;
       height:100% !important } et TD.productListing-data > a { height:100% }).
       Ces selecteurs ont une specificite superieure au reset ci-dessus, donc
       le reset perdait. Sans ca, quand le productListing est dans un wrapper
       .contain-100 (promo.php) qui fournit une hauteur d'ancetre definie,
       height:100% se resout a la hauteur TOTALE du tableau (~7500px) et fait
       exploser les cellules image/prix -> toute la liste cassee en responsive.
       On surclasse avec une specificite plus forte (table.productListing
       > tbody > tr > td.x). grid-area est inerte ici (tr = display:block). */
    table.productListing > tbody > tr > td.prix,
    table.productListing > tbody > tr > td.marge,
    table.productListing > tbody > tr > td.prixrvht,
    table.productListing > tbody > tr > td.prixrvttc,
    table.productListing > tbody > tr > td.buynow,
    table.productListing > tbody > tr > td.productListing-data {
        height: auto !important;
        min-height: 0 !important;
    }
    table.productListing > tbody > tr > td.productListing-data > a {
        height: auto !important;
        width: auto !important;
    }

    /* Dans la case "Type / Labelling" : le tab_labelling (mini-table essence/
       pluie/bruit) doit passer a la ligne sous le nom du produit, pas a cote. */
    table.productListing > tbody > tr > td[data-label="Type / Labelling"] {
        flex-wrap: wrap;
        align-items: flex-start;
    }

    /* Cases Type et Prix (dimensions Avant/Arriere) : passage en display:block
       pour un empilement propre — le faux label (::before) seul sur la 1re
       ligne en haut, puis nom / AVANT / dims / labelling / separateur /
       ARRIERE en flux naturel sans chevauchement. */
    table.productListing > tbody > tr > td[data-label="Type / Labelling"],
    table.productListing > tbody > tr > td[data-label="Prix d'achat HT"] {
        display: block !important;
        text-align: left !important;
        padding: 6px 8px !important;
    }
    table.productListing > tbody > tr > td[data-label="Type / Labelling"]::before,
    table.productListing > tbody > tr > td[data-label="Prix d'achat HT"]::before {
        display: block !important;
        position: static !important;       /* annule le position:absolute du triangle marque */
        width: 100% !important;
        height: auto !important;
        text-align: left;
        padding-bottom: 4px;
        margin-bottom: 6px;
        /* neutralise le triangle d'angle (border-width:15px / couleur marque)
           de stylesheet_new.css ligne 1234 qui formait une barre coloree */
        border-width: 0 0 1px 0 !important;
        border-style: solid !important;
        border-color: #e5e5e5 !important;
        white-space: normal !important;
    }
    table.productListing > tbody > tr > td[data-label="Type / Labelling"] table.tab_labelling,
    table.productListing > tbody > tr > td[data-label="Prix d'achat HT"] table.tab_labelling {
        margin: 4px 0 !important;
    }
    table.productListing > tbody > tr > td[data-label="Type / Labelling"] > b {
        flex: 1 1 auto;
    }
    table.productListing > tbody > tr > td[data-label="Type / Labelling"] table.tab_labelling {
        flex: 1 1 100% !important;
        width: 100% !important;
        max-width: none !important;
        margin: 4px 0 0 !important;
        display: table !important;
    }
    table.productListing > tbody > tr > td[data-label="Type / Labelling"] table.tab_labelling tbody,
    table.productListing > tbody > tr > td[data-label="Type / Labelling"] table.tab_labelling tr {
        display: table-row-group !important;
    }
    table.productListing > tbody > tr > td[data-label="Type / Labelling"] table.tab_labelling tr {
        display: table-row !important;
    }
    table.productListing > tbody > tr > td[data-label="Type / Labelling"] table.tab_labelling td {
        display: table-cell !important;
        width: 33.33%;
        text-align: center;
        padding: 2px !important;
    }

    /* ===== Boutons Express + Panier (utilisateur connecte) dans la case
       "Acheter". Sur mobile le .button_panier s'ecrasait (183px large x 18px
       haut). On force des boutons carres 42x42 coherents, alignes a droite. */
    table.productListing td[data-label] .flex_promo {
        display: flex !important;
        flex-direction: row !important;
        justify-content: flex-end !important;
        align-items: center !important;
        gap: 8px !important;
        width: auto !important;
        flex: 0 0 auto;
    }
    table.productListing td[data-label] .flex_promo .button_panier,
    table.productListing td[data-label] .flex_promo .button_express,
    table.productListing td[data-label] .flex_promo .button_plus {
        width: 42px !important;
        height: 42px !important;
        min-width: 42px !important;
        padding: 0 !important;
        margin: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 6px;
        flex: 0 0 42px !important;
    }
    table.productListing td[data-label] .flex_promo .button_panier {
        background-color: var(--second-color, #e0081e);
        color: #fff !important;
    }
    table.productListing td[data-label] .flex_promo .button_panier i,
    table.productListing td[data-label] .flex_promo .button_express i {
        font-size: 18px !important;
        color: #fff;
    }
    /* Le label texte "Express" reste masque (badge icone-seule) */
    table.productListing td[data-label] .flex_promo .button_express {
        font-size: 0 !important;
    }

    /* FIX : sur mobile le lien d'ajout au panier paraissait non cliquable.
       Cause : le faux-label ::before (et l'icone FA) interceptaient le tap
       au-dessus du <a>. On neutralise pointer-events sur les pseudo/icones
       et on remonte le bouton (position+z-index) pour garantir la zone
       cliquable. */
    table.productListing > tbody > tr > td[data-label]::before {
        pointer-events: none !important;
    }
    table.productListing td[data-label] .flex_promo {
        position: relative;
        z-index: 2;
    }
    table.productListing td[data-label] .flex_promo a.button_panier {
        position: relative;
        z-index: 3;
        pointer-events: auto !important;
        -webkit-tap-highlight-color: rgba(0, 0, 0, .1);
        touch-action: manipulation;
    }
    table.productListing td[data-label] .flex_promo a.button_panier i,
    table.productListing td[data-label] .flex_promo .button_express,
    table.productListing td[data-label] .flex_promo .button_express i {
        pointer-events: none !important;
    }

    /* ===== .delivery_color : trop de padding lateral sur mobile, + tables
       imbriquees avec cellpadding accumulent du padding qui resserre le texte. */
    .delivery_color {
        padding: 16px 4px !important;
    }
    .delivery_color table,
    .delivery_color table tbody,
    .delivery_color table tr,
    .delivery_color table td {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    .delivery_color > tbody > tr > td > table td {
        padding: 2px 4px !important;
    }
    .delivery_color h4 {
        padding-left: 4px;
    }

    /* ===== Formulaire recherche complet (index.php, index_camping.php) :
       chaque "row" est un div contenant un span.title_field + un select.
       Met label gauche / select droite, compacter l'espace. */
    .recherche_complet .col-recherche > div:not(.dimension):not(.it),
    .recherche_complet .col-recherche .container1 > div,
    .recherche_complet .col-recherche .container100 > div,
    .recherche_complet .col-recherche .container50 > div,
    .recherche_complet form .recherche_bloc .col-recherche > div:not(.container1):not(.container2):not(.container100):not(.container50):not(.dimension):not(.it):not(.express),
    .recherche form > div {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 8px !important;
        margin-bottom: 4px !important;
        width: 100% !important;
        box-sizing: border-box;
    }
    .recherche_complet span.title_field,
    .recherche_complet label,
    .recherche span.title_field,
    .recherche label {
        flex: 0 0 auto;
        text-align: left !important;
        font-size: 14px !important;
        min-width: 100px;
    }
    .recherche_complet select,
    .recherche_complet input:not([type="radio"]):not([type="checkbox"]),
    .recherche select,
    .recherche input:not([type="radio"]):not([type="checkbox"]),
    .recherche div select,
    .recherche_complet div select {
        flex: 1 1 auto;
        max-width: calc(100% - 110px) !important;
        min-width: 0 !important;
        width: auto !important;
        margin: 0 !important;
        box-sizing: border-box;
    }

    /* H4 "Profil du véhicule" / "Dimensions" / "Indices techniques" pleine
       largeur au-dessus du groupe de champs */
    .recherche_complet h4 {
        width: 100% !important;
        margin: 12px 0 6px !important;
        font-size: 15px !important;
    }

    /* recherche_bloc en colonne (col-recherche stack) */
    .recherche_complet .recherche_bloc,
    .recherche_complet form {
        display: flex !important;
        flex-direction: column !important;
        gap: 0 !important;
    }
    .recherche_complet .col-recherche {
        width: 100% !important;
        flex: 0 0 100% !important;
    }

    /* index_combinee.php : empile Avant / Arriere en pleine largeur (au lieu
       de 2 colonnes de 160px trop etroites). h5 pleine largeur, puis chaque
       dimension en ligne label gauche / select droite. */
    .recherche_complet .dimension {
        flex-direction: column !important;
    }
    .recherche_complet .container50 {
        width: 100% !important;
        flex-direction: column !important;
        margin-bottom: 8px;
    }
    .recherche_complet .container50 > div {
        width: 100% !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
    }
    .recherche_complet .container50 h5 {
        width: 100% !important;
        color: #fff;
        font-size: 14px;
        margin: 8px 0 4px !important;
    }

    /* ===== Reduire les padding/marges du bloc gris .contain-pp sur mobile :
       padding-left/right 20px sur .contain-pp + 70px vertical sur tbody = trop
       d'espace gaché. */
    .contain-pp {
        padding-left: 6px !important;
        padding-right: 6px !important;
    }
    .contain-pp tbody {
        padding: 20px 0 !important;
    }
    /* recherche_bloc avait padding 20px 20px 45px → reduit */
    .recherche_complet .recherche_bloc {
        padding: 8px !important;
    }

    /* Bouton "Recherche" : position:absolute bottom:-19px par defaut → recouvre
       le bloc .express au-dessus sur mobile. On le remet en flux. */
    .recherche_complet form .recherche_bloc > div.recherche_button,
    .recherche_complet .recherche_button {
        position: relative !important;
        bottom: auto !important;
        width: 100% !important;
        margin-top: 12px;
        display: flex;
        justify-content: center;
    }
    .recherche_complet .recherche_button button {
        padding: 10px 24px !important;
    }

    /* ===== index_camping.php : formulaire de recherche (#formspe) =====
       Desktop : .option a padding 40-59px + chevrons :after (look horizontal
       en escalier). Sur mobile empile -> espace enorme entre champs + zigzag
       inutile. On compacte : padding reduit, chevrons masques, label aligne
       a gauche et select pleine largeur dessous. */
    #formspe .option,
    #formspe .option:nth-child(1) {
        padding: 8px 14px !important;
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        justify-content: flex-start !important;
        filter: none !important;
        box-sizing: border-box;
        /* annule le margin-top:-30px du media 980px qui faisait chevaucher
           les champs empiles */
        margin: 0 0 6px !important;
        position: relative;
    }
    #formspe .option::after,
    #formspe .option:nth-of-type(1)::after,
    #formspe .option:nth-child(5)::after {
        display: none !important;
        content: none !important;
    }
    #formspe .option label {
        display: block !important;
        width: 100% !important;
        text-align: left !important;
        font-size: 14px !important;
        font-weight: 600;
        color: #fff;
        margin: 0 0 4px !important;
        padding: 0 !important;
    }
    #formspe .option select {
        width: 100% !important;
        max-width: 100% !important;
        font-size: 14px !important;
        margin: 0 !important;
        box-sizing: border-box;
    }
    .groupoption {
        padding: 10px 6px !important;
    }
    #formspe input[type="submit"] {
        margin-top: 12px !important;
    }

    /* ===== index_camping.php : les 3 blocs .atout (Qualite/Flexibilite/
       Facilite) sont en flex row (width:270px fixe) -> debordent hors ecran
       sur mobile. On les empile en pleine largeur, hauteur auto. */
    table.contain-atout,
    table.contain-atout tbody,
    table.contain-atout tbody tr,
    table.contain-atout tbody td,
    .contain-100.contain-atout tbody td {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    .contain-atout .atout,
    .atout.sec {
        display: block !important;
        width: auto !important;
        max-width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        margin: 0 0 14px !important;
        box-sizing: border-box;
        padding-right: 80px !important; /* place pour l'icone rentree */
    }
    /* L'icone .fa a right:-40px (deborde de 40px hors du bloc -> coupee au
       bord de l'ecran sur mobile). On la rentre dans le bloc. */
    .contain-atout .atout .fa,
    .atout.sec .fa {
        right: 10px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
    }

    /* ===== index_jantes.php : "Affinez votre recherche" — les liens rapides
       (.liste_liens_jantes) sont en table 3 colonnes / TR 48% -> cramped et
       moche sur mobile. On empile chaque lien en pleine largeur. */
    .modele_jante .liste_liens_jantes,
    .modele_jante .liste_liens_jantes tbody,
    .modele_jante .liste_liens_jantes tr,
    .modele_jante .liste_liens_jantes td {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        box-sizing: border-box;
    }
    .modele_jante .liste_liens_jantes td {
        padding: 2px 0 !important;
        text-align: left !important;
    }
    .modele_jante .liste_liens_jantes td a {
        display: block !important;
        width: 100% !important;
        padding: 10px 12px !important;
        background: #f4f6fa;
        border: 1px solid #e0e4ec;
        border-radius: 4px;
        color: #1e3a8a !important;
        font-size: 14px !important;
        text-decoration: none !important;
    }
    .modele_jante .liste_liens_jantes td a:active {
        background: #e8ecf5;
    }

    /* ===== Panier etape 0 (shopping_cart.php) : liste produits en cartes
       pleine largeur + faux entetes de colonne par cellule. Apres reordre PHP
       les 4 colonnes sont : Produit(s) / Qte. / Total HT / Supprimer.
       IMPORTANT : on cible uniquement les cellules DIRECTES de la ligne
       (> tbody > tr > td) — la cellule "Produit" contient une <table>
       imbriquee avec des <td class="productListing-data"> qui, sans ce
       scope strict, recevaient aussi le traitement carte (labels dupliques,
       chevauchement) = l'aspect "tout casse". */
    body.panier_page .list_panier .productListing,
    body.panier_page .list_panier .productListing > tbody,
    body.panier_page .list_panier .productListing > tbody > tr {
        display: block !important;
        width: 100% !important;
    }
    /* cache la ligne d'entete d'origine (1re tr = productListing-heading) */
    body.panier_page .list_panier .productListing > tbody > tr:first-child {
        display: none !important;
    }
    body.panier_page .list_panier .productListing > tbody > tr.productListing-odd,
    body.panier_page .list_panier .productListing > tbody > tr.productListing-even {
        display: block !important;
        border: 1px solid #ddd;
        border-radius: 6px;
        margin: 0 0 12px;
        padding: 4px;
        background: #fff;
    }
    body.panier_page .list_panier .productListing > tbody > tr > td.productListing-data {
        display: flex !important;
        width: 100% !important;
        box-sizing: border-box;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        padding: 8px 10px !important;
        border-bottom: 1px solid #f0f0f0;
        text-align: right !important;
        height: auto !important;
        min-height: 0 !important;
    }
    /* la <table> imbriquee dans la cellule Produit : rendu neutre (pas carte) */
    body.panier_page .list_panier .productListing > tbody > tr > td.productListing-data table,
    body.panier_page .list_panier .productListing > tbody > tr > td.productListing-data table td {
        display: revert !important;
        width: auto !important;
        border: 0 !important;
        padding: 0 !important;
        text-align: left !important;
    }
    body.panier_page .list_panier .productListing > tbody > tr > td.productListing-data table td::before {
        content: none !important;
    }
    body.panier_page .list_panier .productListing > tbody > tr > td.productListing-data:last-child {
        border-bottom: 0;
    }
    body.panier_page .list_panier .productListing > tbody > tr > td.productListing-data::before {
        flex: 0 0 auto;
        font-weight: 600;
        color: #1e3a8a;
        font-size: 12px;
        text-align: left;
        white-space: nowrap;
        /* neutralise le triangle d'angle (border-width:15px couleur marque)
           de stylesheet_new.css qui apparaissait comme un carre noir */
        position: static !important;
        border: 0 !important;
        width: auto !important;
        height: auto !important;
        background: none !important;
    }
    body.panier_page .list_panier .productListing > tbody > tr > td.productListing-data:nth-child(1)::before { content: "Produit :"; }
    body.panier_page .list_panier .productListing > tbody > tr > td.productListing-data:nth-child(2)::before { content: "Qté. :"; }
    body.panier_page .list_panier .productListing > tbody > tr > td.productListing-data:nth-child(3)::before { content: "Total HT :"; }
    body.panier_page .list_panier .productListing > tbody > tr > td.productListing-data:nth-child(4)::before { content: "Supprimer :"; }

    /* Bloc bouton bas : .check-panier-left etait flex column justify-end ->
       grand vide au-dessus de "Continuer mes achats" sur mobile. On stack
       proprement les 2 colonnes sans hauteur imposee. */
    body.panier_page table.button_contain,
    body.panier_page table.button_contain > tbody,
    body.panier_page table.button_contain > tbody > tr {
        display: block !important;
        width: 100% !important;
    }
    body.panier_page .center_tab td.main.check-panier-left,
    body.panier_page .center_tab td.main.check-panier {
        display: block !important;
        width: 100% !important;
        flex: none !important;
        height: auto !important;
        min-height: 0 !important;
        padding: 6px 0 !important;
    }
    body.panier_page .center_tab td.main.check-panier-left {
        margin-bottom: 10px;
    }

    /* ===== Page mes marges (account_margin.php) : le tableau .marge_contain
       a une ligne d'entete (.title_marge) SEPAREE de la ligne de champs.
       Empilees sur mobile -> tous les labels puis tous les selects. On masque
       la ligne d'entete et on remet le label devant chaque champ via ::before
       (colonnes: Marge / Categorie / Utilisation / Marque / action). */
    .marge_contain .marge_bloc.title_marge {
        display: none !important;
    }
    .marge_contain .marge_bloc {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 6px !important;
        border: 1px solid #e0e0e0;
        border-radius: 6px;
        margin: 0 0 12px;
        padding: 10px !important;
    }
    .marge_contain .marge_bloc td {
        width: 100% !important;
        display: flex !important;
        align-items: center;
        gap: 8px;
        box-sizing: border-box;
        padding: 4px 0 !important;
    }
    .marge_contain .marge_bloc td:first-child { width: 100% !important; }
    .marge_contain .marge_bloc td::before {
        flex: 0 0 110px;
        font-weight: 600;
        color: #1e3a8a;
        font-size: 13px;
    }
    .marge_contain .marge_bloc td:nth-child(1)::before { content: "Marge :"; }
    .marge_contain .marge_bloc td:nth-child(2)::before { content: "Catégorie :"; }
    .marge_contain .marge_bloc td:nth-child(3)::before { content: "Utilisation :"; }
    .marge_contain .marge_bloc td:nth-child(4)::before { content: "Marque :"; }
    .marge_contain .marge_bloc td:nth-child(5)::before { content: ""; }
    .marge_contain .marge_bloc td select,
    .marge_contain .marge_bloc td input[name="marge"] {
        flex: 1 1 auto;
        width: auto !important;
        min-width: 0;
    }
    .marge_contain .marge_bloc td:last-child,
    .marge_contain .marge_bloc td.arrow-right,
    .marge_contain .marge_bloc td.button-contain {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}

/* ========== Tablette : cache la sidebar droite ========== */
@media (max-width: 1024px) and (min-width: 769px) {
    body > table:first-of-type > tbody > tr > td[width="150"]:last-child,
    body > table:first-of-type > tbody > tr > td[width="180"]:last-child {
        display: none;
    }
}
