/* =========================================================
   PIKSTOR — Glossaire
   CSS commun aux pages glossaire :
   - pages collection avec sidebar
   - pages terme standard sans sidebar
   - composants réutilisables : breadcrumb, cartes, FAQ, tableaux, analyse ABC
   ========================================================= */

.term-page,
.term-page h1,
.term-page h2,
.term-page h3,
.term-page p,
.term-page div,
.term-page a,
.term-page li,
.term-page button,
.term-page table,
.term-page th,
.term-page td,
.term-page span {
  font-weight: 400 !important;
}

.term-page {
  color: #6b7280;
}

.term-page h1,
.term-page h2 {
  color: #3B83F7;
}

.term-page h3 {
  color: #6b7280;
}

.term-page h1 {
  font-size: clamp(2rem, 3vw, 2.65rem);
  line-height: 1.15;
}

.term-page h2 {
  font-size: clamp(1.35rem, 2vw, 1.7rem);
  line-height: 1.25;
}

.term-page h3 {
  font-size: 1.15rem;
  line-height: 1.35;
}

.term-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid #dbeafe;
  background: #eff6ff;
  color: #2563eb;
  padding: .25rem .75rem;
  font-size: .8rem;
}

.term-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

  .term-hero-sticky {
    position: sticky;
    top: -3.4rem;
    z-index: 40;
  }

  .term-hero-collections {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
  }

  .term-hero-nav {
    border-top: 1px solid #e5e7eb;
    padding-top: 0.85rem;
  }

  .term-hero-nav .term-anchor-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .term-hero-nav .term-anchor-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  @media (max-width: 640px) {
    .term-hero-sticky {
      top: 4.25rem;
    }
  }
  
.term-summary {
  font-size: 1.08rem;
  line-height: 1.75;
}

.term-definition-box {
  border-left: 4px solid #3b82f6;
  border-right: 4px solid #3b82f6;
  background: #eff6ff;
}

.term-link {
  color: #4B5461;
  text-decoration: none;
}

.term-link:hover {
  text-decoration: underline;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  padding: 0;
  margin: 0;
  list-style: none;
  font-size: .9rem;
}

.breadcrumb li + li::before {
  content: "›";
  margin-right: .5rem;
  color: #9ca3af;
}

/* =========================================================
   Navigation sticky automatique des pages terme
   ========================================================= */

.term-anchor-nav {
  position: sticky;
  top: 4.7rem;
  z-index: 30;
  margin-top: 1.5rem;
}

.term-page section[id] {
  scroll-margin-top: 11rem;
}

#termContent {
  padding-bottom: 8rem;
}

.term-anchor-container {
  display: flex;
  justify-content: center;
  gap: .5rem;
  overflow-x: auto;
  white-space: nowrap;
  background: white;

}

.term-anchor-link {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  padding: .55rem .9rem;
  border-radius: .75rem;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #3B83F7;
  text-decoration: none;
  font-size: 1.125rem;
  line-height: 1.75rem;
  transition: background .15s ease, border-color .15s ease;
}

.term-anchor-link:hover {
  background: #eff6ff;
  border-color: #dbeafe;
  text-decoration: none;
}

.term-anchor-container::-webkit-scrollbar {
  height: 6px;
}

.term-anchor-container::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 999px;
}

@media (max-width: 768px) {
  .term-anchor-nav {
    position: sticky;
    top: 4.2rem;
    z-index: 50;
  }

  .term-anchor-container {
    justify-content: flex-start;
    flex-wrap: wrap;
    overflow-x: visible;
    white-space: normal;
  }

  .term-anchor-link {
    flex: 0 1 auto;
  }
}

/* Sidebar des pages collection */
.term-sidebar-card {
  position: relative;
}

/* FAQ glossaire */
#faq summary::-webkit-details-marker {
  display: none;
}

#faq summary::marker {
  content: "";
}

#faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: .5rem;
  color: #4B5461 !important;
}

#faq .faq-toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  color: #3b82f6;
  font-size: 1.45rem;
  line-height: 1;
  transform: rotate(0deg);
  transition: transform .15s ease;
  flex-shrink: 0;
}

#faq details[open] .faq-toggle-icon {
  transform: rotate(90deg);
}

/* Tableaux glossaire */
.abc-table-wrap,
.term-table-wrap {
  overflow-x: auto;
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  background: #fff;
}

.abc-table,
.term-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  background: #fff;
}

.abc-table th,
.abc-table td,
.term-table th,
.term-table td {
  padding: 1rem 1.25rem;
  text-align: center;
  border-bottom: 1px solid #e5e7eb;
  vertical-align: middle;
  line-height: 1.6;
}

.abc-table th,
.term-table th {
  background: #f9fafb;
  color: #4b5563;
  font-size: .9rem;
}

.abc-table tr:last-child td,
.term-table tr:last-child td {
  border-bottom: 0;
}

.abc-table tbody td:first-child {
  color: #2563eb;
  font-size: 1.15rem;
}

.abc-percent {
  display: inline-flex;
  padding: .5rem .9rem;
  border-radius: 999px;
  background: #eff6ff;
  color: #2563eb;
}

.abc-class {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: .75rem;
  color: #1f2937;
}

.abc-class-a {
  background: #bfdbfe;
}

.abc-class-b {
  background: #fed7aa;
}

.abc-class-c {
  background: #fbcfe8;
}

/* Graphique ABC */
.abc-letter {
  width: 3rem;
  height: 3rem;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2563eb;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  font-size: 1.4rem;
}

.abc-chart {
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  background: #fff;
  padding: 1rem 1rem 1.25rem;
}

.abc-chart-y-title,
.abc-chart-x-title {
  color: #6b7280;
  font-size: .85rem;
}

.abc-chart-y-title {
  margin-left: 3.5rem;
  margin-bottom: .5rem;
}

.abc-chart-area {
  position: relative;
  height: 280px;
  margin-left: 3.5rem;
  margin-right: 2rem;
  border-left: 3px solid #4b5563;
  border-bottom: 3px solid #4b5563;
  background: #fff !important;
  overflow: visible;
}

.abc-zone {
  position: absolute;
  bottom: 0;
  opacity: 1;
}

.abc-zone-a {
  left: 0;
  width: 20%;
  height: 80%;
  background: #bfdbfe;
}

.abc-zone-b {
  left: 20%;
  width: 30%;
  height: 15%;
  bottom: 80%;
  background: #fed7aa;
}

.abc-zone-c {
  left: 50%;
  width: 50%;
  height: 5%;
  bottom: 95%;
  background: #fbcfe8;
}

.abc-zone-label {
  position: absolute;
  font-size: 1.4rem;
  color: #374151;
  transform: translateX(-50%);
  z-index: 4;
  pointer-events: none;
}

.abc-label-a {
  left: 10%;
  top: 1.7rem;
}

.abc-label-b {
  left: 35%;
  top: -0.8rem;
}

.abc-label-c {
  left: 75%;
  top: -1.7rem;
}

.abc-curve {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  z-index: 3;
}

.abc-curve path {
  fill: none;
  stroke: #1f2937;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.abc-y {
  position: absolute;
  left: -3.2rem;
  transform: translateY(50%);
  color: #6b7280;
  font-size: .8rem;
  white-space: nowrap;
}

.abc-y-100 {
  bottom: 100%;
}

.abc-y-95 {
  bottom: 95%;
}

.abc-y-80 {
  bottom: 80%;
}

.abc-x {
  position: absolute;
  bottom: -1.75rem;
  transform: translateX(-50%);
  color: #6b7280;
  font-size: .8rem;
  white-space: nowrap;
  display: inline-block;
}

.abc-x-20 {
  left: 20%;
}

.abc-x-50 {
  left: 50%;
}

.abc-x-100 {
  left: auto;
  right: 0;
  transform: none;
  min-width: 3rem;
  text-align: right;
}

.abc-chart-x-title {
  text-align: center;
  margin-top: 3rem;
}

.abc-chart-legend {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: .75rem 1.25rem;
  margin-top: 2.2rem;
  font-size: .9rem;
  color: #6b7280;
}

.abc-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}

.abc-dot {
  width: .75rem;
  height: .75rem;
  border-radius: .2rem;
  display: inline-block;
}

.abc-dot-a {
  background: #bfdbfe;
}

.abc-dot-b {
  background: #fed7aa;
}

.abc-dot-c {
  background: #fbcfe8;
}

/* Accessibilité */
.term-page :focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* Responsive */
@media (max-width: 768px) {
  .term-page {
    padding-top: 1.5rem;
  }

  .abc-bar-row {
    grid-template-columns: 4rem 1fr;
  }

  .abc-bar-row .abc-mini-label:last-child {
    grid-column: 2;
  }

  .abc-chart-area {
    height: 240px;
    margin-left: 3rem;
    margin-right: 1rem;
  }

  .abc-y {
    left: -2.8rem;
  }
}
.abc-split-chart {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 90px 1fr;
  gap: 1.5rem;
  align-items: end;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  padding: 2rem;
  background: #f9fafb;
  border-radius: 1rem;
}

.abc-split-col h3 {
  text-align: center;
  text-transform: uppercase;
  color: #264653;
  font-size: 1.35rem;
  line-height: 1.35;
  margin-bottom: 1.5rem;
}

.abc-stack {
  height: 360px;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.abc-block {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 1.25rem;
  color: #264653;
  font-size: 1.15rem;
  font-weight: 700 !important;
}

.abc-a {
  background: #DCEEFF;
}

.abc-b {
  background: #BFDFFF;
}

.abc-c {
  background: #93C5FD;
}

.abc-split-middle {
  position: relative;
  height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  padding-top: 2.5rem;
}

.abc-circle {
  width: 3.75rem;
  height: 3.75rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #264653;
  font-size: 1.5rem;
  font-weight: 700 !important;
  z-index: 2;
}

@media (max-width: 768px) {
  .abc-split-chart {
    grid-template-columns: 1fr;
  }


}

.abc-example-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.abc-example-card {
  border: 1px solid #f9fafb;
  border-radius: 1rem;
  padding: 1.25rem;
  background: #f9fafb;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.abc-example-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15,23,42,.08);
}
.abc-example-card {
  transition: all .2s ease;
}
.abc-example-card h3 {
  color: #3B83F7;
  font-size: 1.2rem;
  line-height: 1.35;
  margin-top: .75rem;
}

.abc-example-card p {
  margin-top: .75rem;
  line-height: 1.6;
  font-size: .95rem;
  color: #4B5461;
}

.abc-example-card .abc-circle {
  width: 2.8rem;
  height: 2.8rem;
  font-size: 1.25rem;
  margin-bottom: .75rem;
}

.abc-example-a {
  background: #f9fafb;
}

.abc-example-b {
  background: #f9fafb;
}

.abc-example-c {
  background: #f9fafb;
}

.abc-example-image-wrap {
  position: relative;
  height: 160px;
  border-radius: .9rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  overflow: hidden;
  margin-bottom: 1rem;
}

.abc-example-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: .75rem;
}

.abc-example-image-wrap .abc-circle {
  position: absolute;
  top: .75rem;
  left: .75rem;
  width: 2.6rem;
  height: 2.6rem;
  font-size: 1.15rem;
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .abc-example-grid {
    grid-template-columns: 1fr;
  }
}