/* ═══ TAL COMPUTER — Liste Scolaire Public CSS ═══ */
:root {
  --tc-green:      #0F6E56;
  --tc-green-dk:   #085041;
  --tc-green-lt:   #E1F5EE;
  --tc-amber:      #EF9F27;
  --tc-amber-lt:   #FAEEDA;
  --tc-border:     #e5e5e5;
  --tc-bg:         #f8f9fa;
  --tc-radius:     12px;
  --tc-shadow:     0 2px 12px rgba(15,110,86,.08);
}

/* ── Sélecteur ── */
.tc-selector-wrap {
  background: var(--tc-green-lt);
  border: 1px solid #5DCAA5;
  border-radius: var(--tc-radius);
  padding: 18px 20px;
  margin-bottom: 20px;
}
.tc-selector-inner {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.tc-selector-icon { font-size: 28px; flex-shrink: 0; }
.tc-selector-text { flex: 1; min-width: 180px; }
.tc-selector-text h3 { font-size: 15px; font-weight: 600; color: var(--tc-green-dk); margin: 0 0 3px; }
.tc-selector-text p  { font-size: 13px; color: var(--tc-green); margin: 0; }
.tc-selector-controls { display: flex; gap: 10px; flex-wrap: wrap; }
.tc-class-select {
  padding: 9px 12px; border-radius: 8px;
  border: 1px solid #5DCAA5; font-size: 13px;
  color: var(--tc-green-dk); background: #fff; min-width: 180px;
}
.tc-btn-voir {
  background: var(--tc-green); color: #fff;
  border: none; padding: 9px 20px; border-radius: 20px;
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: background .2s; white-space: nowrap;
}
.tc-btn-voir:hover { background: var(--tc-green-dk); }

/* ── Conteneur principal de la liste ── */
.tc-liste-display { min-height: 0; }
.tc-liste-loading {
  text-align: center; padding: 40px;
  color: var(--tc-green); font-size: 14px;
}
.tc-liste-loading::before {
  content: ''; display: block; width: 32px; height: 32px;
  border: 3px solid var(--tc-green-lt); border-top-color: var(--tc-green);
  border-radius: 50%; animation: tc-spin .7s linear infinite; margin: 0 auto 12px;
}
@keyframes tc-spin { to { transform: rotate(360deg); } }

/* ── En-tête de la liste ── */
.tc-liste-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  flex-wrap: wrap; gap: 12px; margin-bottom: 16px;
  padding-bottom: 14px; border-bottom: 2px solid var(--tc-green);
}
.tc-liste-header h2 {
  font-size: 20px; font-weight: 700; color: var(--tc-green-dk); margin: 0;
}
.tc-liste-header .tc-meta { font-size: 12px; color: #888; margin-top: 4px; }
.tc-liste-header-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.tc-btn-action {
  padding: 7px 14px; border-radius: 16px; font-size: 12px;
  font-weight: 600; cursor: pointer; border: none; transition: opacity .2s;
}
.tc-btn-action:hover { opacity: .85; }
.tc-btn-print { background: var(--tc-green); color: #fff; }
.tc-btn-wa    { background: #25D366; color: #fff; }
.tc-btn-cart  { background: var(--tc-amber); color: #412402; }

/* ── Barre de progression globale ── */
.tc-global-prog {
  background: var(--tc-bg); border-radius: 8px; padding: 10px 14px;
  margin-bottom: 16px; display: flex; align-items: center; gap: 12px;
}
.tc-prog-label { font-size: 12px; color: #666; white-space: nowrap; }
.tc-prog-track { flex: 1; height: 6px; background: var(--tc-border); border-radius: 3px; overflow: hidden; }
.tc-prog-fill  { height: 100%; background: var(--tc-green); border-radius: 3px; transition: width .4s; }
.tc-prog-pct   { font-size: 12px; font-weight: 600; color: var(--tc-green); white-space: nowrap; }

/* ── Catégories ── */
.tc-category-block { margin-bottom: 20px; }
.tc-category-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; color: var(--tc-green-dk);
  text-transform: uppercase; letter-spacing: .5px;
  margin-bottom: 8px; padding-bottom: 6px;
  border-bottom: 1px solid var(--tc-green-lt);
}
.tc-category-count {
  background: var(--tc-green); color: #fff;
  border-radius: 10px; padding: 1px 7px; font-size: 11px; font-weight: 700;
}

/* ── Ligne d'article ── */
.tc-item-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 10px 12px; border-radius: 8px;
  border: 1px solid var(--tc-border); background: #fff;
  margin-bottom: 6px; transition: box-shadow .2s, border-color .2s;
  cursor: pointer;
}
.tc-item-row:hover { box-shadow: var(--tc-shadow); border-color: #5DCAA5; }
.tc-item-row.checked { background: var(--tc-green-lt); border-color: #5DCAA5; }
.tc-item-row.checked .tc-item-name { text-decoration: line-through; color: #999; }

/* Checkbox custom */
.tc-check {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--tc-border); flex-shrink: 0;
  margin-top: 2px; cursor: pointer; transition: all .2s;
  display: flex; align-items: center; justify-content: center;
  background: #fff;
}
.tc-item-row.checked .tc-check {
  background: var(--tc-green); border-color: var(--tc-green); color: #fff;
  font-size: 11px; font-weight: 700;
}
.tc-item-row.checked .tc-check::after { content: '✓'; }

/* Corps de l'item */
.tc-item-body  { flex: 1; min-width: 0; }
.tc-item-name  { font-size: 14px; font-weight: 500; color: #1a1a1a; margin-bottom: 2px; }
.tc-item-meta  { font-size: 12px; color: #888; margin-bottom: 4px; }
.tc-item-note  { font-size: 11px; color: #999; font-style: italic; }
.tc-item-opt   { font-size: 10px; background: var(--tc-amber-lt); color: #633806; border-radius: 8px; padding: 1px 6px; margin-left: 6px; }

/* Produit WooCommerce lié */
.tc-item-product {
  margin-top: 6px; padding: 6px 10px; background: var(--tc-bg);
  border-radius: 6px; border: 1px solid var(--tc-border);
  display: flex; align-items: center; gap: 10px;
}
.tc-item-product img { width: 32px; height: 32px; object-fit: cover; border-radius: 4px; }
.tc-item-product-name { font-size: 12px; font-weight: 500; color: #333; flex: 1; }
.tc-item-product-price { font-size: 12px; color: var(--tc-green); font-weight: 600; }
.tc-btn-add-cart {
  background: var(--tc-green); color: #fff; border: none;
  padding: 4px 10px; border-radius: 12px; font-size: 11px; font-weight: 600; cursor: pointer;
}

/* Côté droit : badge quantité */
.tc-item-qty {
  background: var(--tc-green-lt); color: var(--tc-green-dk);
  border-radius: 6px; padding: 4px 8px; font-size: 12px;
  font-weight: 600; white-space: nowrap; flex-shrink: 0; text-align: center;
  min-width: 40px; align-self: center;
}

/* ── Panier récap ── */
.tc-cart-recap {
  background: #fff; border: 1px solid var(--tc-border); border-radius: var(--tc-radius);
  padding: 16px; margin-top: 20px; display: none;
}
.tc-cart-recap h3 { font-size: 14px; font-weight: 700; color: var(--tc-green-dk); margin-bottom: 10px; }
.tc-cart-recap-list { font-size: 13px; color: #444; margin-bottom: 12px; line-height: 1.7; }
.tc-cart-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── Empty / Error ── */
.tc-empty-state {
  text-align: center; padding: 40px 20px; color: #888;
}
.tc-empty-state .tc-ico { font-size: 40px; margin-bottom: 10px; }
.tc-empty-state p { font-size: 14px; }

/* ── Responsive ── */
@media (max-width: 600px) {
  .tc-selector-inner { flex-direction: column; gap: 10px; }
  .tc-selector-controls { width: 100%; }
  .tc-class-select { width: 100%; }
  .tc-btn-voir { width: 100%; }
  .tc-liste-header { flex-direction: column; }
  .tc-item-row { padding: 8px 10px; }
  .tc-item-name { font-size: 13px; }
  .tc-btn-action { font-size: 11px; padding: 6px 10px; }
}
