/*BLOCS D'ONGLETS*/
/* 1. État initial : Cache tous les contenus sauf le premier */
.mon-contenu-tab {
    display: none;
}

#content-1 {
    display: block;
}

/* 2. Style de base des cartes (têtes d'onglets) */
.ma-carte-tab {
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    border: 1px solid #e2e8f0 !important; /* Gris clair par défaut */
    background-color: #ffffff !important;
    position: relative; /* Nécessaire pour positionner la flèche */
}

/* 3. Style au survol (Uniquement changement de couleur de fond) */
.ma-carte-tab:hover {
    background-color: #f0faf8 !important; /* Bleu très léger au survol */
		border-color: #00c8b4 !important; /* Bordure bleue */
}

/* 4. Style de la carte ACTIVE (cliquée) */
.ma-carte-tab.is-active {
    border-color: #00558a !important; /* Bordure bleue */
    background-color: #f0f7ff !important; /* Reste bleuté quand actif */
}

/* 5. La petite flèche sous la carte active */
.ma-carte-tab.is-active::after {
    content: "";
    position: absolute;
    bottom: -9px; /* Ajuste selon l'épaisseur de l'ombre de ton container du bas */
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 8px solid #00558a;
    z-index: 10;
}

/* 6. Optionnel : Forcer le texte en bleu pour la carte active 
.ma-carte-tab.is-active h1, 
.ma-carte-tab.is-active h2, 
.ma-carte-tab.is-active h3, 
.ma-carte-tab.is-active h4, 
.ma-carte-tab.is-active p {
    color: #00558a !important;*/
}



/* Supprime la bordure entre contenu et sidebar */
.ast-right-sidebar #primary {
    border-right: none !important;
}

.ast-right-sidebar #secondary {
    border-left: none !important;
}

.ast-left-sidebar #primary {
    border-left: none !important;
}

.ast-left-sidebar #secondary {
    border-right: none !important;
}



/**/


/* ============================================
   FILTRAGE PAR SECTEUR — via :target
   ============================================ */
.catalogue-guide:has(#sec-automotive:target) .produit-carte:not(.ind-automotive),
.catalogue-guide:has(#sec-aerospace:target) .produit-carte:not(.ind-aerospace),
.catalogue-guide:has(#sec-material_manufacturer:target) .produit-carte:not(.ind-material_manufacturer),
.catalogue-guide:has(#sec-university:target) .produit-carte:not(.ind-university),
.catalogue-guide:has(#sec-laboratory:target) .produit-carte:not(.ind-laboratory),
.catalogue-guide:has(#sec-building:target) .produit-carte:not(.ind-building) {
  display: none;
}

/* ============================================
   FILTRAGE PAR TYPE — via data-type posé par le script
   ============================================ */
.catalogue-guide[data-type="instruments"] .produit-carte:not(.type-instruments),
.catalogue-guide[data-type="software"] .produit-carte:not(.type-software),
.catalogue-guide[data-type="services"] .produit-carte:not(.type-services) {
  display: none;
}

/* ============================================
   MISE EN PAGE — colonne secteurs + types alignée
   ============================================ */
div.secteur-liste,
div.type-liste {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
}

div.type-liste { margin-top: 24px !important; }

div.secteur-liste > *,
div.type-liste > * {
  width: 100% !important;
  flex-shrink: 0 !important;
}

/* ============================================
   STICKY BAR PRODUITS
   ============================================ */
.sticky-column {
  position: sticky !important;
  top: 150px !important;
  align-self: start !important;
}

.sticky-column,
.sticky-column ul,
.sticky-column li {
  padding-left: 0 !important;
  margin-left: 0 !important;
  list-style: none !important;
}

/* ============================================
   COULEUR DU TEXTE — secteur sélectionné (jaune, reste jaune)
   ============================================ */
.filtre-secteur a,
.filtre-secteur a:visited {
  color: #1a2b4a !important;
}

.filtre-secteur:target a,
.filtre-secteur:target a:visited {
  color: #e6a817 !important;
}

/* ============================================
   SECTEUR — "All industries" jaune par défaut (aucun secteur ciblé)
   ============================================ */
.catalogue-guide:not(:has(#sec-automotive:target)):not(:has(#sec-aerospace:target)):not(:has(#sec-material_manufacturer:target)):not(:has(#sec-university:target)):not(:has(#sec-laboratory:target)):not(:has(#sec-building:target)) #sec-all a {
  color: #e6a817 !important;
}

/* ============================================
   COULEUR DU TEXTE — type sélectionné (jaune, reste jaune)
   ============================================ */
.filtre-type a,
.filtre-type a:visited {
  color: #1a2b4a !important;
}

.filtre-type.is-active a,
.filtre-type.is-active a:visited {
  color: #e6a817 !important;
}

/* ============================================
   COULEUR DU TEXTE — hover jaune pour tous les liens
   ============================================ */
.filtre-secteur a:hover,
.filtre-type a:hover,
.filtre-subtype a:hover {
  color: #e6a817 !important;
}

/* ============================================
   RESPONSIVE MOBILE — filtres et sticky
   ============================================ */
@media (max-width: 900px) {

  .catalogue-guide {
    display: block !important;
  }

  .sticky-column {
    position: static !important;
    top: auto !important;
    width: 100% !important;
  }

  div.secteur-liste,
  div.type-liste {
    flex-direction: row !important;
    flex-wrap: wrap !important;
    width: 100% !important;
    gap: 8px !important;
  }

  div.type-liste {
    margin-top: 16px !important;
  }

  div.secteur-liste > *,
  div.type-liste > * {
    width: auto !important;
    flex: 0 0 auto !important;
  }

  .catalogue-grille {
    margin-top: 24px !important;
  }
}

/* ============================================
   ÉTAT NATIF DES ONGLETS PRODUIT — navy, texte blanc
   ============================================ */
#nav-description,
#nav-techspecs,
#nav-software,
#nav-documentation,
#nav-applications,
#nav-accessories {
  background: #10253F !important;
  border: 1px solid #10253F !important;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

#nav-description .tab-lien,
#nav-techspecs .tab-lien,
#nav-software .tab-lien,
#nav-documentation .tab-lien,
#nav-applications .tab-lien,
#nav-accessories .tab-lien {
  color: #ffffff !important;
}

/* ============================================
   ÉTAT ACTIF DES ONGLETS PRODUIT — fond blanc, bordure et texte jaune
   ============================================ */
.produit-tabs-guide:has(#tab-description:target) #nav-description,
.produit-tabs-guide:has(#tab-techspecs:target) #nav-techspecs,
.produit-tabs-guide:has(#tab-software:target) #nav-software,
.produit-tabs-guide:has(#tab-documentation:target) #nav-documentation,
.produit-tabs-guide:has(#tab-applications:target) #nav-applications,
.produit-tabs-guide:has(#tab-accessories:target) #nav-accessories {
  background: #ffffff !important;
  border: 1px solid #DBA507 !important;
}

.produit-tabs-guide:has(#tab-description:target) #nav-description .tab-lien,
.produit-tabs-guide:has(#tab-techspecs:target) #nav-techspecs .tab-lien,
.produit-tabs-guide:has(#tab-software:target) #nav-software .tab-lien,
.produit-tabs-guide:has(#tab-documentation:target) #nav-documentation .tab-lien,
.produit-tabs-guide:has(#tab-applications:target) #nav-applications .tab-lien,
.produit-tabs-guide:has(#tab-accessories:target) #nav-accessories .tab-lien {
  color: #DBA507 !important;
}

/* Par défaut (aucun target actif), "Description" est actif */
.produit-tabs-guide:not(:has(.tab-panel:target)) #nav-description {
  background: #ffffff !important;
  border: 1px solid #DBA507 !important;
}

.produit-tabs-guide:not(:has(.tab-panel:target)) #nav-description .tab-lien {
  color: #DBA507 !important;
}

/* ============================================
   SOUS-FILTRE
   ============================================ */
.catalogue-guide[data-type="instruments"][data-subtype="absorption"] .produit-carte:not(.sub-absorption),
.catalogue-guide[data-type="instruments"][data-subtype="jcal_biot"] .produit-carte:not(.sub-jcal_biot),
.catalogue-guide[data-type="instruments"][data-subtype="damping"] .produit-carte:not(.sub-damping) {
  display: none;
}

.subtype-liste {
  margin-left: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filtre-subtype a,
.filtre-subtype a:visited {
  color: #1a2b4a !important;
}

.catalogue-guide[data-type="instruments"] .filtre-subtype.is-active a,
.catalogue-guide[data-type="instruments"] .filtre-subtype.is-active a:visited {
  color: #e6a817 !important;
}

/* ============================================
   FILTRES REPLIABLES — mobile uniquement
   ============================================ */

.filtre-toggle-label {
  display: none;
}

.toggle-filtres-mobile {
  display: none;
}

@media (max-width: 900px) {

  .filtre-toggle-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-weight: 700;
    color: #1a2b4a;
    cursor: pointer;
    margin-bottom: 12px;
  }

  .sticky-column {
    max-height: 0 !important;
    overflow: hidden !important;
    transition: max-height 0.3s ease;
  }

  .toggle-filtres-mobile:checked + .filtre-toggle-label + .sticky-column {
    max-height: 2000px !important;
  }

  .toggle-filtres-mobile:checked + .filtre-toggle-label::after {
    content: "▴";
  }

  .filtre-toggle-label::after {
    content: "▾";
  }
}

/* ============================================
   BADGES CLIQUABLES DANS CATALOGUE PRODUITS
   ============================================ */
.catalogue-guide .badge-filtre {
  cursor: pointer;
}

.bloc-cliquable .badge-filtre {
  position: relative !important;
  z-index: 20 !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.bloc-cliquable .badge-filtre:hover {
  transform: scale(1.08);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}