/* =======================================================
   ANALYSE DES CLASSES – LÉONARD v3.4
   Thème-agnostique (piloté par theme.css)
======================================================= */

/* ===== CONTAINER ===== */
.analysis-classes {
  margin-top: 28px;
  color: var(--text);
}

.classes-summary {
  margin-bottom: 16px;
  font-size: 15px;
  opacity: .9;
}

/* ===== TABLEAU RÉCAP ===== */
.classes-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: 14px;
}

.classes-table th,
.classes-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--analysis-border);
}

.classes-table thead th {
  text-align: left;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  opacity: .75;
}

.classes-table td.num {
  text-align: right;
}

.zone-col {
  text-align: center;
  font-weight: 600;
}

/* Couleurs lettres zones (table) */
.zone-A { color: var(--zone-A-bg); }
.zone-B { color: var(--zone-B-bg); }
.zone-C { color: var(--zone-C-bg); }
.zone-D { color: var(--zone-D-bg); }

/* =======================================================
   CARTES PAR CLASSE
======================================================= */
#classesCards {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  margin-top: 24px;
}

.class-card {
  background: var(--analysis-card-bg);
  border: 1px solid var(--analysis-border);
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Header */
.class-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.class-card-header h3 {
  font-size: 17px;
  margin: 0;
  font-weight: 600;
}

.class-card-sub {
  font-size: 13px;
  color: var(--text-muted);
}

/* Pilule zone */
.class-zone-pill {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.class-zone-pill .zone-letter {
  font-weight: 700;
}

/* Couleurs pilules */
.class-zone-pill.zone-A {
  background: color-mix(in srgb, var(--zone-A-bg) 18%, transparent);
  color: var(--zone-A-bg);
}
.class-zone-pill.zone-B {
  background: color-mix(in srgb, var(--zone-B-bg) 18%, transparent);
  color: var(--zone-B-bg);
}
.class-zone-pill.zone-C {
  background: color-mix(in srgb, var(--zone-C-bg) 22%, transparent);
  color: var(--zone-C-bg);
}
.class-zone-pill.zone-D {
  background: color-mix(in srgb, var(--zone-D-bg) 18%, transparent);
  color: var(--zone-D-bg);
}

/* =======================================================
   BARRE ABCD
======================================================= */
.class-abcd-bar {
  position: relative;
  display: flex;
  height: 26px;
  border-radius: 6px;
  background: var(--analysis-abcd-bg);
  overflow: visible;
  margin-top: 8px;
}

/* Segments */
.abcd-segment {
  flex: 1;
  height: 100%;
  background: var(--analysis-abcd-segment);
  opacity: .35;
  transition: opacity .25s, background .25s;
}

.abcd-segment.seg-active {
  opacity: 1;
}

.abcd-segment.seg-A.seg-active { background: var(--zone-A-bg); }
.abcd-segment.seg-B.seg-active { background: var(--zone-B-bg); }
.abcd-segment.seg-C.seg-active { background: var(--zone-C-bg); }
.abcd-segment.seg-D.seg-active { background: var(--zone-D-bg); }

/* Curseur */
.abcd-indicator {
  position: absolute;
  bottom: -4px;
  width: 2px;
  height: 40px;
  background: var(--analysis-indicator-bg);
  border-radius: 2px;
  transform: translateX(-50%);
  box-shadow: 0 0 6px var(--analysis-indicator-glow);
  z-index: 10;
}

/* Labels A B C D */
.class-abcd-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  margin-top: 4px;
  opacity: .7;
}

/* =======================================================
   ZONES ABCD GLOBALES
======================================================= */
#zonesABCD {
  margin-top: 32px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.zone-panel {
  border: 1px solid var(--analysis-border);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--analysis-zone-bg);
}

.zone-panel-header {
  background: var(--analysis-zone-header-bg);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  padding: 10px 12px;
}

.zone-header-left {
  display: flex;
  gap: 8px;
  align-items: center;
}

.zone-pill {
  display: inline-flex;
  width: 24px;
  height: 24px;
  justify-content: center;
  align-items: center;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
}

.zone-pill-A { background: var(--zone-A-bg); color: var(--zone-A-text); }
.zone-pill-B { background: var(--zone-B-bg); color: var(--zone-B-text); }
.zone-pill-C { background: var(--zone-C-bg); color: var(--zone-C-text); }
.zone-pill-D { background: var(--zone-D-bg); color: var(--zone-D-text); }

.zone-title {
  font-size: 14px;
  font-weight: 600;
}

.zone-sub {
  font-size: 12px;
  opacity: .75;
}

.zone-panel-body {
  padding: 10px 12px;
  border-top: 1px solid var(--analysis-border-soft);
}

.zone-list li {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 13px;
  border-bottom: 1px dashed var(--analysis-border-soft);
}

.zone-empty {
  opacity: .5;
  font-style: italic;
  font-size: 13px;
}