/* taille du bouton */
:root {
  --color-primary: #8dc63f;	
  --btn-size: 40px;
  --svg-scale: 0.8;    /* 60% = 20% de “padding” tout autour */
}

body.has-produk3d-viewer .thegem-te-product-gallery {
    display: none !important;
}

a.button.product_type_grouped::before {
    display: none !important;
}

a.button.product_type_grouped {
    background: transparent !important;
}

/* Cache la case à cocher originale de annotation.js */
.controls > label[for="produk3d-show-dimensions"] {
    display: none !important;
}

td.woocommerce-grouped-product-list-item__label a {
    font-size: 15px;
}

/* Style pour le nouveau bouton Dimensions, inspiré de votre exemple */
#p3d-dimension-on-off {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-left: 15px; /* Espace par rapport au bouton d'animation */

    /* Fond vert et gestion de l'icône */
    background-color: rgb(141, 198, 63);
    background-position: center;
    background-repeat: no-repeat;
    background-size: 60%; /* Ajustez au besoin */
    transition: background-color 0.2s ease;
}

#p3d-dimension-on-off:hover {
    background-color: rgb(118, 168, 53); /* Vert plus foncé au survol */
}

/* Icône pour l'état "play" (inactif) */
#p3d-dimension-on-off.play {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 3L3 21'/%3E%3Cpath d='M3 12.5V21h8.5'/%3E%3Cpath d='M11.5 3H3v8.5'/%3E%3Cpath d='M12.5 21H21v-8.5'/%3E%3Cpath d='M21 11.5V3h-8.5'/%3E%3C/svg%3E");
}

/* Icône pour l'état "pause" (actif) */
#p3d-dimension-on-off.pause {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff' stroke='%23ffffff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 3L3 21'/%3E%3Cpath d='M3 12.5V21h8.5'/%3E%3Cpath d='M11.5 3H3v8.5'/%3E%3Cpath d='M12.5 21H21v-8.5'/%3E%3Cpath d='M21 11.5V3h-8.5'/%3E%3C/svg%3E");
}

#p3d-custom-play-pause {
  width: var(--btn-size);
  height: var(--btn-size);
  border-radius: 50%;
  background-color: rgb(141, 198, 63);
  background-position: center;
  background-repeat: no-repeat;
  /* on force la taille du SVG en bg */
  background-size: calc(var(--btn-size) * var(--svg-scale)) 
                   calc(var(--btn-size) * var(--svg-scale));
  /* si tu as besoin de centrer tout contenu éventuel */
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 15px;
  overflow: hidden;
}

/* Bouton */
button.p3d-toggle-options{
  margin-bottom:8px;
  padding:6px 12px;
  background:#8cc63f;
  color:#fff;
  border:0;
  border-radius:4px;
  cursor:pointer;
}

tr.woocommerce-grouped-product-list-item:hover
  td.woocommerce-grouped-product-list-item__label a {
  color: #fff !important;
}

.p3d-tabs-container {
    padding: 20px 0px;
}


.hotspot-is-group-child {
    background: transparent !important;
    border: none !important;
    padding: 2px !important;
    min-width: auto;
    width: auto;
    height: auto;
    /* On s'assure qu'il ne ressemble pas à un bouton avec un numéro */
    box-shadow: none !important; 
}

/* Classe pour forcer l'affichage quand son groupe est actif */
.hotspot-is-group-child.is-active {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}


/* Style pour le point vert lui-même */
.hotspot-dot {
    display: block;
    width: 6px;
    height: 6px;
    background-color: rgba(178, 216, 125, 0.6);
    border-radius: 50%; /* Pour en faire un cercle parfait */
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
    cursor: pointer;
}
/* effets existants, inchangés */
tr.woocommerce-grouped-product-list-item{
    cursor:pointer;
    transition:background-color .3s;
}
tr.woocommerce-grouped-product-list-item:hover{
    background:#8dc63f;
}

/* neutralise UNIQUEMENT la petite zone quantité (+ / – / input) */
tr.woocommerce-grouped-product-list-item:hover
        td.woocommerce-grouped-product-list-item__quantity .quantity.buttons_added{
    background:#fff !important;          /* ou la couleur de ton tableau */
    padding:0 .3rem;                     /* optionnel : réduit la “largeur visuelle” */
    border-radius:4px;                   /* optionnel : rendu plus propre */
}


/* ===================================================== */
/* 1 – DESKTOP (≥1024px) : on centre la colonne entière  */
/* ===================================================== */
@media (min-width:1024px){

  /* (ton code existant reste inchangé) */
  #imagepiece .thegem-te-product-gallery{float:none !important;max-width:628px;margin-left:auto !important;margin-right:auto !important;padding-top: 40px;}
  #imagepiece .product-gallery-image img,
  #imagepiece .product-gallery-image .zoomImg{width:100%!important;height:auto!important;max-height:70vh;object-fit:contain;}
  #imagepiece .product-gallery-image{display:flex;justify-content:center;align-items:center;overflow:hidden;}
}

/* ===================================================== */
/* 2 – TABLETTE (768-1023px) : même idée + largeur ajust */ 
/* ===================================================== */
@media (min-width:768px) and (max-width:1023px){
  #imagepiece .thegem-te-product-gallery{
      float:none !important;
      display:block;
      margin-left:auto !important;
      margin-right:auto !important;
      max-width:520px;           /* un brin + large que la galerie */
  }
  #imagepiece .thegem-te-product-gallery{max-width:480px;margin:0 auto;}
}

/* ===================================================== */
/* 3 – MOBILE (≤767px) : tout centré aussi si désiré      */
/* ===================================================== */
@media (max-width:767px){
  #imagepiece .thegem-te-product-gallery{
      float:none !important;
      display:block;
      margin-left:auto !important;
      margin-right:auto !important;
      /* Pas de max-width : on occupe 100 % */
  }
}


/* =========================== */
/* 3 – MOBILE (≤ 767 px)       */
/* =========================== */
/* On garde le comportement WooCommerce/TheGem par défaut.
   Si vous souhaitez tout de même limiter la hauteur :      */
/*
@media (max-width: 767px){
  #imagepiece .product-gallery-image img{
      max-height: 60vh;
  }
}
*/


/* Style de base pour chaque bouton d'onglet */
.p3d-tab-button {
  padding: 8px 15px; /* Ajustez le padding selon vos préférences */
  cursor: pointer;
  border: 1px solid #8dc63f; /* Bordure verte pour tous */
  background-color: white; /* Fond blanc par défaut (pour l'inactif) */
  color: black; /* Texte noir par défaut (pour l'inactif) */
  margin-right: -1px; /* Fait chevaucher les bordures pour un look "collé" */
  font-size: 14px; /* Ou la taille désirée */
  font-weight: 500;
  transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
  line-height: 1.5; /* Ajustez pour l'alignement vertical du texte */
}

/* Style pour le premier bouton (Pièces) */
#p3d-show-pieces.p3d-tab-button {
  border-top-left-radius: 5px; /* Arrondi en haut à gauche */
  border-bottom-left-radius: 5px; /* Arrondi en bas à gauche */
}

/* Style pour le dernier bouton (Options) */
#p3d-show-options.p3d-tab-button {
  border-top-right-radius: 5px; /* Arrondi en haut à droite */
  border-bottom-right-radius: 5px; /* Arrondi en bas à droite */
  /* Si vous ne voulez pas de marge à droite pour le dernier bouton, vous pouvez la retirer ici,
     mais le margin-right: -1px; ci-dessus est pour le chevauchement.
     Si vous avez plus de deux onglets à l'avenir, seul le dernier aurait ces arrondis spécifiques. */
}

/* Style pour le bouton d'onglet ACTIF */
.p3d-tab-button.active {
  background-color: #8dc63f; /* Fond vert pour l'onglet actif */
  color: white; /* Texte blanc pour l'onglet actif */
  /* La bordure est déjà verte, donc pas besoin de la redéfinir ici
     sauf si vous voulez un style de bordure différent pour l'actif. */
  position: relative; /* Nécessaire si vous voulez utiliser z-index pour le chevauchement */
  z-index: 1; /* S'assure que la bordure de l'onglet actif est au-dessus de celle de son voisin */
}

/* Optionnel: Effet au survol pour les onglets INACTIFS */
.p3d-tab-button:not(.active):hover {
  background-color: #f0f0f0; /* Un gris très clair au survol pour les inactifs */
  /* color: #8dc63f; */ /* Optionnel: texte vert au survol */
}
/* Lignes “option” masquées par défaut (le JS force display lors du toggle) */
tr.p3d-option,
tr.p3d-options-header{display:none!important;}

.viewer-toggle {
  position: absolute;
  margin-top: -6px !important;
  top: 6px;    /* ou transform: translateY(-4px) si vous préférez */
  right: 22px;
  z-index: 30;

  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 60px;
  height: 25px;
  padding: 3px;
  /* background: #ccc;  */
  border-radius: 16px;
  cursor: pointer;
  user-select: none;
}

.viewer-toggle .label-3d,
.viewer-toggle .label-img {
  flex: 1;
  text-align: center;
  font-size: 11px;
  color: #666;
  z-index: 2;
  pointer-events: none;
}

/* Le petit rond qui glisse */
.viewer-toggle .switch-knob {
  position: absolute;
  top: 0px;
  left: 1px;
  width: 31px;
  height: 23px;
  border-radius: 50%;
  background: #70b62d;
  transition: left 0.25s ease, background-color 0.25s ease;
  z-index: 1;
}

/* État “3D” actif */
.viewer-toggle.mode-3d .switch-knob {
  left: 0px;
  background: #70b62d;
  color: #fff;	
}
.viewer-toggle.mode-3d .label-3d {
  color: #fff;
}
.viewer-toggle.mode-3d .label-img {
  color: #999;
}

/* État “IMG” actif */
.viewer-toggle.mode-img .switch-knob {
  left: calc(100% - 30px); /* 80px − 26px − 3px */
  background: #70b62d;
  color: #fff;	
}
.viewer-toggle.mode-img .label-img {
  color: #fff;
}
.viewer-toggle.mode-img .label-3d {
  color: #999;
}

/*
@media only screen and (max-width: 1024px) {
  .product-gallery,
  .thegem-te-product-gallery,
  .woocommerce-product-gallery {
    display: none;
  }
}
*/
@media only screen and (max-width: 1024px) {
.viewer-toggle .mode-img {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/*
@media only screen and (max-width: 1024px) {
  .product-gallery.single,
  .thegem-te-product-gallery,
  .woocommerce-product-gallery,
  .product-gallery--native,
  .woocommerce-product-gallery--with-images,
  .woocommerce-product-gallery--columns-4,
  .images,
  .image-produit {
    display: none !important;
  }
}
*/
.sku-custom {
    font-size: 10px;
}
.child-sku {
    font-size: 10px;
}
.child-sku.sku-custom {
    font-size: 12px!important;
}	
.woocommerce-grouped-product-list-item__label a:hover {
	color:white;
}

.product-number {
    width: 30px; /* Ajustez la largeur selon vos besoins */
    display: flex;
    align-items: center;    /* Centre verticalement */
    justify-content: center; /* Centre horizontalement */
    font-weight: bold;
}


.woocommerce-grouped-product-list-item__label a {
    font-size: 12px;
    line-height: 14px;
}

.woocommerce-product-attributes-item--attribute_pa_equipements-compatibles,
.woocommerce-product-attributes-item--attribute_pa_produits-lies,
.woocommerce-product-attributes-item--attribute_pa_queue-telescopique
{
    display: none;
}


/* Sélection du conteneur qui accueille l'image
.product-gallery-image .image-inner {
  position: relative;
  aspect-ratio: 1; 
  background: url("https://durabac.info/wp-content/uploads/woocommerce-placeholder.png") 
              no-repeat center center / contain;
}
*/
	
/* L’image réelle est au-dessus du background */
.product-gallery-image .image-inner img {
  position: relative;
  z-index: 1; /* Se place devant le background */
  display: block;
  max-width: 100%;
  height: auto;
}

/*
.block-content {
    padding-top: 0px;
}

*/
/* FICHIER: woocustom.css */
/* Desktop: la TR n'est plus "cliquable" (on veut forcer l'usage du bouton) */
@media (hover: hover) and (pointer: fine) and (min-width:1025px){
  tr.product_type_grouped {
    cursor: default;
  }
  tr.product_type_grouped:hover {
    background-color: transparent; /* on coupe l'illusion d'interactivité */
  }
}

/* Mobile/tablette: on conserve le comportement "ligne cliquable" */
@media (max-width:1024px), (hover: none) {
  tr.product_type_grouped {
    cursor: pointer;
  }
}
	
.conteneur-pieces-options .p3d-tabs-container {
  position: relative;
  z-index: 5;
}


.thegem-te-product-add-to-cart form.grouped_form table.woocommerce-grouped-product-list tr:first-of-type {
    border-top: none;
}

@media (max-width: 767px) {

	/* Style pour le point vert lui-même */
	.hotspot-dot {
		width: 3px;
		height: 3px;
	}	
  .thegem-te-product-add-to-cart form.cart .quantity button, 
  .thegem-te-product-add-to-cart form.cart .quantity input {
    height: 30px;
    font-size: 17px;
    line-height: 18px;
  }    
  .conteneur-pieces-options table.woocommerce-grouped-product-list {
    display: block;
    max-height: 400px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;

  }
  .conteneur-pieces-options > div > form > table.woocommerce-grouped-product-list {
    position: relative;
    border: 1px solid #E0E0E0;
    border-top: none;
    border-radius: 0 0 8px 8px;
    padding: 0 10px;
    margin-top: -10px;
    box-shadow: inset 0px 2px 4px rgba(0, 0, 0, 0.06);
    background-color: white;
  }

  .conteneur-pieces-options table.woocommerce-grouped-product-list::before,
  .conteneur-pieces-options table.woocommerce-grouped-product-list::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 25px;
    z-index: 2;
    pointer-events: none;
  }

  .conteneur-pieces-options > div > form > table.woocommerce-grouped-product-list::before {
    top: 0;
    background: linear-gradient(to bottom, white, rgba(255, 255, 255, 0));
  }

  .conteneur-pieces-options > div > form > table.woocommerce-grouped-product-list::after {
    bottom: 0;
    background: linear-gradient(to top, white, rgba(255, 255, 255, 0));
  }
  
  .conteneur-pieces-options table.woocommerce-grouped-product-list > tbody > tr.woocommerce-grouped-product-list-item {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    width: 100%;
    padding: 8px 0;
    margin: 0;
    border-bottom: 1px solid #f0f0f0;
  }

  .conteneur-pieces-options table.woocommerce-grouped-product-list > tbody > tr.woocommerce-grouped-product-list-item:last-child {
    border-bottom: none;
  }

  .conteneur-pieces-options tr.woocommerce-grouped-product-list-item > td {
    padding: 0 !important;
    border: none;
  }
  
  .conteneur-pieces-options tr.woocommerce-grouped-product-list-item > td.product-number {
    flex: 0 0 15px;
    order: 1;
    text-align: center;
    font-weight: bold;
  }

  .conteneur-pieces-options tr.woocommerce-grouped-product-list-item > td.woocommerce-grouped-product-list-item__image {
    flex: 0 0 50px;
    order: 2;
    margin: 0 15px;
  }

  .conteneur-pieces-options tr.woocommerce-grouped-product-list-item > td.woocommerce-grouped-product-list-item__label {
    flex: 1 1 auto;
    order: 3;
    min-width: 0;
  }

  .conteneur-pieces-options tr.woocommerce-grouped-product-list-item > td.woocommerce-grouped-product-list-item__label a {
    display: block;
    white-space: normal;
    line-height: 1em;
  }
  
  .conteneur-pieces-options tr.woocommerce-grouped-product-list-item > td.woocommerce-grouped-product-list-item__quantity {
    flex: 0 0 45px;
    order: 4;
    margin-left: auto;
    padding-left: 10px;
  }

  .conteneur-pieces-options tr.woocommerce-grouped-product-list-item > td.woocommerce-grouped-product-list-item__price {
    display: none;
  }

  .conteneur-pieces-options .quantity.buttons_added {
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    width: 40px;
    background-color: #fafafa;
  }

  .conteneur-pieces-options .quantity .input-text.qty {
    width: 100%;
    height:35px;
    text-align: center;
    border: none;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
    padding: 0;
    font-weight: bold;
    color: #333;
    background-color: transparent;
    order: 2;
  }

  .conteneur-pieces-options .quantity .plus {
    order: 1;
  }
  
  .conteneur-pieces-options .quantity .minus {
    order: 3;
  }

  .conteneur-pieces-options .quantity .plus,
  .conteneur-pieces-options .quantity .minus {
    width: 100%;
    height: 25px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 18px;
    color: #8dc63f;
    padding: 0;
  }

  .conteneur-pieces-options .quantity .plus:hover,
  .conteneur-pieces-options .quantity .minus:hover {
    background-color: #f0f0f0;
  }
}

@media (min-width: 768px) and (max-width: 991px){
  #mobile-cart-slot.only-mobile{display:block!important;}
}

@media (max-width: 991px){
  #mobile-cart-slot .gem-attribute-options{
    justify-content:center;  /* centre les LI dans la liste flex */
  }
}

@media (max-width: 991px){
  #mobile-cart-slot{
    display:flex;
    flex-direction:column;
    align-items:center;  /* centre tout horizontalement */
    text-align:center;
  }
}

/* 1) Centrer le texte et les listes dans la zone mobile */
@media (max-width: 991px){

  /* centre l'ensemble du champ variation */
  #mobile-cart-slot .gem-attribute-selector{
    text-align:center;
  }
  
  #mobile-cart-slot .thegem-te-product-add-to-cart table.variations td.label, 
  .thegem-te-product-add-to-cart table.variations th.label {
    min-width: auto;
    padding-right: 10px;
    font-weight: normal;
    text-align: center;
  }
  
  /* centre la liste des puces/labels */
  #mobile-cart-slot .gem-attribute-options{
    display:flex;           /* déjà flex dans TheGem, on garde */
    flex-wrap:wrap;         /* retour à la ligne si besoin */
    justify-content:center; /* ⬅️ centre horizontalement */
    gap:6px;                /* petit espacement optionnel */
  }

  /* optionnel : centre aussi le  natif si visible */
  #mobile-cart-slot .field-input select{
    margin-left:auto;
    margin-right:auto;
  }

  /* aligne les textes à l’intérieur de chaque  */
  #mobile-cart-slot .gem-attribute-options li{
    text-align:center;
  }
}


/* Fichier : woocustom.css */

/* ----------------------------------------------------------------- */
/* STYLES POUR L'ACCORDÉON DES PRODUITS GROUPÉS                      */
/* ----------------------------------------------------------------- */

/* Masque le bouton "voir produits" car la ligne entière est cliquable */
tr.product_type_grouped .woocommerce-grouped-product-list-item__quantity a.button {
    display: none !important;
}

/* Change le curseur pour indiquer que la ligne est interactive */
tr.product_type_grouped {
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
}

/* Ajoute un léger effet de survol pour une meilleure expérience utilisateur */
tr.product_type_grouped:hover {
    background-color: #f5f5f5; /* Ou une autre couleur de votre choix */
}

tr.p3d-grouped-expansion > td {
  padding: 0 !important;
  background: transparent;
}
	
.p3d-grouped-expansion .grouped_form {
  padding: 20px 15px;
  background-color: #f9f9f9;
  /* border-top: 2px solid var(--color-primary);*/
  margin: 0 10px;
}

	
/* Style pour la rangée parente (produit groupé) */
tr.woocommerce-grouped-product-list-item.product-type-grouped > td {
    padding-top: 8px !important;
    padding-bottom: 8px !important;
    vertical-align: middle;
}

/* Augmente la taille du titre du produit groupé */
tr.woocommerce-grouped-product-list-item.product-type-grouped .woocommerce-grouped-product-list-item__label a {
    font-size: 16px;
    font-weight: bold;
    color: #333; /* Assurez-vous que la couleur est bien visible */
}

/* Style et animation de la nouvelle icône "dérouler" */
/* Icône triangle isocèle (pointant droite), noir, fond transparent */
.p3d-expand-icon {
    display: inline-block;
    position: relative;
    width: 1em;              /* ajuste la taille via font-size du parent */
    height: 1em;
    line-height: 1;
    color: #000;             /* NOIR — change ici si besoin */
    vertical-align: middle;
}

/* Dessin via mask + currentColor (fiable et piloté par le CSS) */
.p3d-expand-icon::after {
    content: "";
    display: block;
    width: 100%;
    height: 100%;
    background-color: currentColor; /* couleur du triangle */
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpolygon points='30,25 75,50 30,75' fill='%23000'/%3E%3C/svg%3E") no-repeat center / contain;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpolygon points='30,25 75,50 30,75' fill='%23000'/%3E%3C/svg%3E") no-repeat center / contain;
    transition: transform 0.2s ease-in-out;
    transform-origin: 50% 50%;
}

/* Ouverture: rotation 90° */
.p3d-expand-icon.open::after {
    transform: rotate(90deg);
}


.p3d-grouped-expansion .group_table {
    width: 100%;
}
	
.thegem-te-product-add-to-cart form.grouped_form table.woocommerce-grouped-product-list td {
    padding: 2px 8px;
    vertical-align: middle;
}
	
.thegem-te-product-add-to-cart form.grouped_form table.woocommerce-grouped-product-list td.woocommerce-grouped-product-list-item__price {
    display:none;
}

p.stock.in-stock {
    display:none !important;
}

/* Applique le flexbox UNIQUEMENT aux lignes de produits désirées */
.thegem-te-product-add-to-cart form.grouped_form table.woocommerce-grouped-product-list > tbody > tr.woocommerce-grouped-product-list-item {
    display: flex;
    align-items: center; /* Centre les éléments verticalement pour un meilleur rendu */
    width: 100%;
}

/* Force la colonne du libellé (titre/SKU) à prendre tout l'espace disponible */
.thegem-te-product-add-to-cart form.grouped_form table.woocommerce-grouped-product-list tr.woocommerce-grouped-product-list-item .woocommerce-grouped-product-list-item__label {
    flex-grow: 1!important; /* C'est la clé : cette colonne pousse les autres */
}
	
tr.p3d-grouped-expansion {
    display: table-row; /* Annule le flexbox pour cette ligne spécifique */
}
	
/* Image à gauche */
.woocommerce-grouped-product-list-item__image {
    order: 1;
    margin-right: 20px;
}

/* Le texte (URL du produit) au milieu et qui prend toute la place disponible */
.woocommerce-grouped-product-list-item__label {
    order: 2;
    flex: 1; 
}


/* La quantité (+/-) à droite sous le texte */
.woocommerce-grouped-product-list-item__quantity {
    order: 3;
    margin-left: 20px; 
    /* margin-top: 10px;  Ajustez pour positionner sous le texte */
    align-self: flex-start;
}

/* Le prix à la fin, s'il y en a besoin */
.woocommerce-grouped-product-list-item__price {
    order: 4;
}

