/* ==========================================================================
   Page Accessoires - PrintMyTransfert
   Style "Carré B2B" moderne pour les tableaux de compatibilité et d'accessoires
   Architecture : forte spécificité (1 ID + classes) pour protéger contre L640 (tr flex)
   ========================================================================== */

@import "../tokens/variables.css";

/* Conteneur principal et protection d'architecture */
#contenu_scroller.accessoires_contenu {
  width: 100%;
  max-width: var(--pmt-container-max-width, 1200px);
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
  box-sizing: border-box;
  font-family: var(--pmt-font-family, "Poppins", sans-serif);
  color: var(--pmt-color-gray-850, #333333);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 24px;
}

/* Titres de section B2B purs et structurés */
#contenu_scroller.accessoires_contenu .titre3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--pmt-color-dark, #000000);
  margin-top: 28px;
  margin-bottom: 16px;
  padding-left: 12px;
  border-left: 4px solid var(--pmt-color-brand-green, #95bc0d);
  line-height: 1.3;
}

#contenu_scroller.accessoires_contenu .access_titre_espace {
  margin-top: 44px;
}

/* ==========================================================================
   1. Protection contre les conflits globaux (ex: src/css/base/style.css L640)
   ========================================================================== */
#contenu_scroller.accessoires_contenu table.access,
#contenu_scroller.accessoires_contenu table.access2 {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 4px;
  overflow: hidden;
  background-color: var(--pmt-color-white, #ffffff);
  border: 1px solid var(--pmt-color-gray-350, #e5e5e5);
  margin-bottom: 32px;
  table-layout: auto;
}

/* Arrondi des cellules d'angle pour compatibilité totale */
#contenu_scroller.accessoires_contenu table.access tr:first-child th:first-child,
#contenu_scroller.accessoires_contenu table.access2 tr:first-child td:first-child {
  border-top-left-radius: 4px;
}

#contenu_scroller.accessoires_contenu table.access tr:first-child th:last-child,
#contenu_scroller.accessoires_contenu table.access2 tr:first-child td:last-child {
  border-top-right-radius: 4px;
}

#contenu_scroller.accessoires_contenu table.access tr:last-child td:first-child,
#contenu_scroller.accessoires_contenu table.access2 tr:last-child td:first-child {
  border-bottom-left-radius: 4px;
}

#contenu_scroller.accessoires_contenu table.access tr:last-child td:last-child,
#contenu_scroller.accessoires_contenu table.access2 tr:last-child td:last-child {
  border-bottom-right-radius: 4px;
}

#contenu_scroller.accessoires_contenu table.access tr,
#contenu_scroller.accessoires_contenu table.access2 tr {
  display: table-row;
  width: auto;
}

#contenu_scroller.accessoires_contenu table.access th,
#contenu_scroller.accessoires_contenu table.access td,
#contenu_scroller.accessoires_contenu table.access2 th,
#contenu_scroller.accessoires_contenu table.access2 td {
  display: table-cell;
  box-sizing: border-box;
  border-top: 0;
  border-left: 0;
  border-right: 1px solid var(--pmt-color-gray-300, #eaeced);
  border-bottom: 1px solid var(--pmt-color-gray-300, #eaeced);
}

/* Masquer les labels responsives sur vue tableau B2B */
#contenu_scroller.accessoires_contenu .label-resp {
  display: none;
}

/* ==========================================================================
   2. En-têtes de Colonnes (Table 1 - Compatibilité Presses)
   ========================================================================== */
#contenu_scroller.accessoires_contenu table.access th.access_th_coin,
#contenu_scroller.accessoires_contenu table.access th.access_th_vide {
  background-color: var(--pmt-color-gray-200);
  border-right: 1px solid var(--pmt-color-gray-b2b-border);
}

#contenu_scroller.accessoires_contenu table.access th.access_titre {
  background-color: var(--pmt-color-gray-200);
  color: var(--pmt-color-gray-800);
  padding: 16px 12px 14px 12px;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  vertical-align: top;
  line-height: 1.4;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-right: 1px solid var(--pmt-color-gray-b2b-border);
}

#contenu_scroller.accessoires_contenu table.access th.access_titre img {
  display: block;
  max-height: 85px;
  width: auto;
  margin: 0 auto 12px auto;
  object-fit: contain;
  background-color: var(--pmt-color-white, #ffffff);
  padding: 4px;
  border: 1px solid var(--pmt-color-gray-b2b-border);
  border-radius: 4px;
}

/* ==========================================================================
   3. Séparateurs de Catégories (tr.access_color)
   ========================================================================== */
#contenu_scroller.accessoires_contenu table.access tr.access_color td {
  background-color: var(--pmt-color-gray-850);
  color: var(--pmt-color-white, #ffffff);
  padding: 12px 16px;
  font-weight: 700;
  border-right: 1px solid var(--pmt-color-slate-600);
  border-bottom: 1px solid var(--pmt-color-slate-600);
  border-left: 4px solid var(--pmt-color-brand-green, #95bc0d);
}

#contenu_scroller.accessoires_contenu tr.access_color .access_cat {
  color: var(--pmt-color-white, #ffffff);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: block;
}

/* ==========================================================================
   4. Lignes et Cellules de Données (Carré B2B)
   ========================================================================== */
#contenu_scroller.accessoires_contenu table.access td,
#contenu_scroller.accessoires_contenu table.access2 td {
  padding: 14px 16px;
  vertical-align: middle;
  font-size: 14px;
  color: var(--pmt-color-gray-800);
  background-color: var(--pmt-color-white, #ffffff);
}

/* Supprimer les bordures de droite sur la dernière colonne */
#contenu_scroller.accessoires_contenu table.access th:last-child,
#contenu_scroller.accessoires_contenu table.access td:last-child,
#contenu_scroller.accessoires_contenu table.access2 td:last-child {
  border-right: 0;
}

/* Supprimer les bordures de bas sur la dernière ligne */
#contenu_scroller.accessoires_contenu table.access tr:last-child td,
#contenu_scroller.accessoires_contenu table.access2 tr:last-child td {
  border-bottom: 0;
}

/* Alternance des lignes discrète et professionnelle */
#contenu_scroller.accessoires_contenu table.access tbody tr:nth-child(even):not(.access_color) td,
#contenu_scroller.accessoires_contenu table.access2 tbody tr:nth-child(even) td {
  background-color: var(--pmt-color-gray-50);
}

/* Survol fonctionnel léger */
#contenu_scroller.accessoires_contenu table.access tbody tr:not(.access_color):hover td,
#contenu_scroller.accessoires_contenu table.access2 tbody tr:hover td {
  background-color: var(--pmt-color-gray-200);
}

/* Alignement des colonnes de compatibilité */
#contenu_scroller.accessoires_contenu table.access td:nth-child(n + 4) {
  text-align: center;
}

/* Typographie technique pour les libellés d'accessoires */
#contenu_scroller.accessoires_contenu .access_cat {
  font-weight: 700;
  color: var(--pmt-color-gray-900);
  font-size: 14px;
  display: block;
  margin-bottom: 4px;
}

/* Visuels produits nets et carrés */
#contenu_scroller.accessoires_contenu table.access td img,
#contenu_scroller.accessoires_contenu table.access2 td img {
  max-width: 90px;
  max-height: 90px;
  width: auto;
  height: auto;
  object-fit: contain;
  background-color: var(--pmt-color-white, #ffffff);
  padding: 4px;
  border: 1px solid var(--pmt-color-gray-350);
  display: block;
  margin: 0 auto;
  border-radius: 4px;
}

/* ==========================================================================
   5. Prix B2B (Sans pilules ni styles superflus)
   ========================================================================== */
#contenu_scroller.accessoires_contenu .access_prix {
  font-weight: 700;
  font-size: 15px;
  color: var(--pmt-color-success-text);
  text-align: center;
  white-space: nowrap;
  background: none;
  border: none;
  padding: 0;
  box-shadow: none;
  display: inline;
}

/* ==========================================================================
   6. Puces de Compatibilité (FontAwesome nettes et carrées B2B)
   ========================================================================== */
#contenu_scroller.accessoires_contenu p.access_puce,
#contenu_scroller.accessoires_contenu p.access_puce_rouge {
  margin: 0;
  padding: 2px 0;
  text-align: center;
  line-height: 1;
}

#contenu_scroller.accessoires_contenu p.access_puce::before {
  content: var(--icon-check, "\f00c");
  font-family: "FontAwesome", sans-serif;
  font-size: 20px;
  color: var(--pmt-color-brand-green, #95bc0d);
  display: inline-block;
}

#contenu_scroller.accessoires_contenu p.access_puce_rouge::before {
  content: var(--icon-cross, "\f00d");
  font-family: "FontAwesome", sans-serif;
  font-size: 20px;
  color: var(--pmt-color-error);
  display: inline-block;
}

/* Mentions complémentaires sous icône (ex: + QR1) */
#contenu_scroller.accessoires_contenu p.access_puce strong,
#contenu_scroller.accessoires_contenu p.access_puce_rouge strong {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--pmt-color-slate-600);
  background: none;
  border: none;
  padding: 0;
}

/* ==========================================================================
   7. Encart Technique QR1 (rowspan)
   ========================================================================== */
#contenu_scroller.accessoires_contenu table.access td.access_qr {
  background-color: var(--pmt-color-gray-50);
  border: 1px solid var(--pmt-color-gray-b2b-border);
  padding: 16px 14px;
  text-align: center;
  vertical-align: middle;
}

#contenu_scroller.accessoires_contenu td.access_qr p.access_puce {
  font-size: 13px;
  line-height: 1.5;
  color: var(--pmt-color-slate-800);
}

#contenu_scroller.accessoires_contenu td.access_qr p.access_puce::before {
  display: none;
}

#contenu_scroller.accessoires_contenu td.access_qr strong {
  font-size: 14px;
  color: var(--pmt-color-gray-900);
  display: block;
  margin-bottom: 6px;
}

#contenu_scroller.accessoires_contenu td.access_qr .access_prix {
  display: block;
  margin-top: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--pmt-color-slate-800);
}

/* ==========================================================================
   7.1 Séparation verticale de la dernière colonne (QR1)
   ========================================================================== */
#contenu_scroller.accessoires_contenu table.access th.access_titre_droite,
#contenu_scroller.accessoires_contenu table.access td.access_sep_droite {
  border-right: 3px solid var(--pmt-color-slate-600);
}

/* ==========================================================================
   8. Table 2 : Accessoires Complémentaires (Structure B2B carrée)
   ========================================================================== */
#contenu_scroller.accessoires_contenu table.access2 td:first-child {
  width: 140px;
  text-align: center;
}

#contenu_scroller.accessoires_contenu table.access2 td:last-child {
  width: 140px;
  text-align: center;
}

#contenu_scroller.accessoires_contenu table.access2 td img {
  max-width: 100px;
  max-height: 100px;
}

/* ==========================================================================
   9. Bouton d'action / Devis
   ========================================================================== */
#contenu_scroller.accessoires_contenu .btn-commande {
  margin-top: 32px;
  margin-bottom: 24px;
  text-align: center;
}
