/* ============================================================
   HERPSA — BLOCS PÉDAGOGIQUES v2.0.0
   Référentiel pédagogique universel Lycée & BTS 2025-2026
   ============================================================ */
:root {
  --ref-purple-head:#AFA9EC;--ref-purple-body:#EEEDFE;--ref-purple-text:#26215C;--ref-purple-acc:#3C3489;
  --ref-blue-head:#85B7EB;--ref-blue-body:#E6F1FB;--ref-blue-text:#042C53;--ref-blue-acc:#185FA5;
  --ref-green-head:#97C459;--ref-green-body:#EAF3DE;--ref-green-text:#1A3D06;--ref-green-acc:#3B6D11;
  --ref-teal-head:#5DCAA5;--ref-teal-body:#E1F5EE;--ref-teal-text:#04342C;--ref-teal-acc:#0F6E56;
  --ref-amber-head:#EF9F27;--ref-amber-body:#FAEEDA;--ref-amber-text:#3A2000;--ref-amber-acc:#633806;
  --ref-coral-head:#F0997B;--ref-coral-body:#FAECE7;--ref-coral-text:#3A1008;--ref-coral-acc:#712B13;
  --ref-pink-head:#ED93B1;--ref-pink-body:#FBEAF0;--ref-pink-text:#3A0F20;
  --ref-red-head:#F09595;--ref-red-body:#FEF5F5;--ref-red-text:#501313;
}
.hb-block{margin:1rem 0;border-radius:0 8px 8px 0;overflow:hidden;page-break-inside:avoid}
.hb-header{padding:7px 14px;font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.08em;display:flex;align-items:center;justify-content:space-between;gap:8px}
.hb-content{padding:10px 14px;font-size:14px;line-height:1.65;color:#1e293b}
.hb-content p{color:#475569;margin-bottom:.6rem;font-size:14px}
.hb-content p:last-child{margin-bottom:0}
.hb-content ul,.hb-content ol{padding-left:1.25rem;margin-bottom:.6rem}
.hb-content li{font-size:14px;color:#475569;margin-bottom:.2rem}
.hb-content strong{color:#1e293b}

/* ── Blocs colorés ── */
.hb-situation{background:var(--ref-green-body);border-left:4px solid var(--ref-green-head)}
.hb-situation .hb-header{background:var(--ref-green-head);color:var(--ref-green-text)}

.hb-notion{background:var(--ref-purple-body);border-left:4px solid var(--ref-purple-head)}
.hb-notion .hb-header{background:var(--ref-purple-head);color:var(--ref-purple-text)}
.hb-notion .hb-content{color:var(--ref-purple-text);font-weight:500}

.hb-rappel{background:var(--ref-amber-body);border-left:4px solid var(--ref-amber-head)}
.hb-rappel .hb-header{background:var(--ref-amber-head);color:var(--ref-amber-text)}

.hb-lexique{background:var(--ref-pink-body);border-left:4px solid var(--ref-pink-head)}
.hb-lexique .hb-header{background:var(--ref-pink-head);color:var(--ref-pink-text)}

.hb-a-retenir{background:var(--ref-teal-body);border-left:4px solid var(--ref-teal-head)}
.hb-a-retenir .hb-header{background:var(--ref-teal-head);color:var(--ref-teal-text)}

.hb-a-vous-dabord{background:var(--ref-amber-body);border-left:4px solid var(--ref-amber-head)}
.hb-a-vous-dabord .hb-header{background:var(--ref-amber-head);color:var(--ref-amber-text)}

.hb-document{background:var(--ref-blue-body);border-left:4px solid var(--ref-blue-head)}
.hb-document .hb-header{background:var(--ref-blue-head);color:var(--ref-blue-text);flex-wrap:wrap}
.hb-source{font-size:10px;font-weight:400;font-style:italic;color:#888780;margin-left:auto}

.hb-video{background:var(--ref-coral-body);border-left:4px solid var(--ref-coral-head);border-radius:0 8px 8px 0;overflow:hidden;margin:1rem 0}
.hb-video .hb-header{background:var(--ref-coral-head);color:var(--ref-coral-text)}
.hb-video-frame{position:relative;aspect-ratio:16/9;border-radius:6px;overflow:hidden;background:#0f172a;margin:10px 14px 14px}
.hb-video-frame iframe{width:100%;height:100%;display:block;border:none}
.hb-video-link{display:inline-flex;align-items:center;gap:8px;padding:8px 14px 14px;color:var(--ref-coral-acc);font-size:13px;font-weight:600;text-decoration:none}

.hb-astuce{background:var(--ref-amber-body);border-left:4px solid var(--ref-amber-head)}
.hb-astuce .hb-header{background:var(--ref-amber-head);color:var(--ref-amber-text)}

.hb-attention{background:var(--ref-red-body);border-left:4px solid var(--ref-red-head)}
.hb-attention .hb-header{background:var(--ref-red-head);color:var(--ref-red-text)}

.hb-synthese{background:var(--ref-blue-body);border-left:4px solid var(--ref-blue-head)}
.hb-synthese .hb-header{background:var(--ref-blue-head);color:var(--ref-blue-text)}

/* ── QCM ── */
.hb-qcm{background:var(--ref-purple-body);border-left:4px solid var(--ref-purple-head)}
.hb-qcm .hb-header{background:var(--ref-purple-head);color:var(--ref-purple-text)}
.hb-qcm-question{font-weight:600;color:#1e293b;margin-bottom:.75rem!important}
.hb-qcm-opts{display:flex;flex-direction:column;gap:6px}
.hb-qcm-opt{display:flex;align-items:center;gap:10px;padding:6px 10px;background:rgba(255,255,255,.6);border:1px solid #e2e8f0;border-radius:6px;font-size:13px;color:#475569}
.hb-opt-bullet{width:22px;height:22px;border-radius:50%;border:1.5px solid #cbd5e1;display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:700;color:#64748b;flex-shrink:0}

/* ── Vrai/Faux ── */
.hb-vrai-faux{background:var(--ref-coral-body);border-left:4px solid var(--ref-coral-head)}
.hb-vrai-faux .hb-header{background:var(--ref-coral-head);color:var(--ref-coral-text)}
.hb-vf-table{width:100%;border-collapse:collapse;font-size:13px}
.hb-vf-table thead tr{background:rgba(240,153,123,.2)}
.hb-vf-table th{padding:6px 12px;text-align:left;border-bottom:1px solid rgba(240,153,123,.4);font-weight:600;color:var(--ref-coral-text);font-size:12px}
.hb-vf-table td{padding:7px 12px;border-bottom:1px solid rgba(240,153,123,.2);color:#475569}
.hb-vf-check{text-align:center;color:#94a3b8;font-size:12px;white-space:nowrap}

/* ── Calcul guidé ── */
.hb-calcul-guide{background:var(--ref-blue-body);border-left:4px solid var(--ref-blue-head)}
.hb-calcul-guide .hb-header{background:var(--ref-blue-head);color:var(--ref-blue-text)}
.hb-formule{background:rgba(255,255,255,.7);border:1px solid var(--ref-purple-head);border-radius:6px;padding:8px 12px;font-weight:700;color:var(--ref-purple-acc);font-size:13px;margin-bottom:12px}
.hb-etape-guidee{display:flex;gap:10px;align-items:flex-start;margin-bottom:10px}
.hb-etape-guidee .hb-etape-num{width:24px;height:24px;background:var(--ref-blue-head);border-radius:50%;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:11px;color:var(--ref-blue-text);flex-shrink:0;margin-top:2px}
.hb-etape-guidee .hb-etape-label{font-size:13px;color:#1e293b;font-weight:600;margin-bottom:4px}
.hb-etape-guidee .hb-etape-ligne{border-bottom:1px solid #cbd5e1;min-height:24px}

/* ── Étapes ── */
.hb-etapes{background:var(--ref-purple-body);border-left:4px solid var(--ref-purple-head)}
.hb-etapes .hb-header{background:var(--ref-purple-head);color:var(--ref-purple-text)}
.hb-etapes .hb-content{display:flex;flex-direction:column;gap:8px}
.hb-etape{display:flex;gap:10px;align-items:flex-start}
.hb-etape .hb-etape-num{width:24px;height:24px;background:var(--ref-purple-head);border-radius:50%;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:11px;color:var(--ref-purple-text);flex-shrink:0;margin-top:1px}
.hb-etape .hb-etape-body{font-size:13px;color:#1e293b;flex:1}

/* ── Checklist ── */
.hb-checklist{background:var(--ref-green-body);border-left:4px solid var(--ref-green-head)}
.hb-checklist .hb-header{background:var(--ref-green-head);color:var(--ref-green-text)}
.hb-checklist-items{list-style:none;padding:10px 14px;margin:0;display:flex;flex-direction:column;gap:6px}
.hb-checklist-items li{display:flex;align-items:center;gap:8px;font-size:13px;color:#1e293b}
.hb-check-box{color:var(--ref-green-acc);font-weight:700;font-size:16px;flex-shrink:0}

/* ── Différenciation ── */
.hb-differenciation{border-left:4px solid var(--ref-amber-head);overflow:hidden;border-radius:0 8px 8px 0;margin:1rem 0}
.hb-differenciation .hb-header{background:var(--ref-amber-head);color:var(--ref-amber-text)}
.hb-diff-grid{display:grid;grid-template-columns:1fr 1fr}
@media(max-width:640px){.hb-diff-grid{grid-template-columns:1fr}}
.hb-diff-col{background:#FEF8EE;padding:10px 14px}
.hb-diff-col:first-child{border-right:1px solid var(--ref-amber-head)}
.hb-diff-col-label{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.08em;color:var(--ref-amber-acc);margin-bottom:6px}
.hb-diff-aide,.hb-diff-appro{font-size:13px;color:#475569;line-height:1.6}

/* ── Exercice ── */
.hb-exercice{border:1px solid #e2e8f0;border-radius:8px;overflow:hidden;margin:1rem 0}
.hb-exercice-header{display:flex;align-items:center;justify-content:space-between;padding:8px 14px;background:#1e3a5f;gap:8px}
.hb-exercice-badge{font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.08em;color:#fff}
.hb-exercice-points{font-size:11px;font-weight:700;background:#d4a843;color:#1e3a5f;padding:2px 8px;border-radius:9999px}
.hb-exercice-consigne{background:#f8fafc;border-bottom:1px solid #e2e8f0;padding:10px 14px;font-size:13px;font-weight:600;color:#1e293b;font-style:italic}
.hb-exercice-content{padding:12px 14px;font-size:13px;color:#475569;line-height:1.65}

/* ── Étude de cas ── */
.hb-etude{border:1px solid #e2e8f0;border-left:4px solid #d4a843;border-radius:0 8px 8px 0;overflow:hidden;margin:1rem 0}
.hb-etude-header{display:flex;align-items:center;gap:10px;padding:8px 14px;border-bottom:1px solid #f1f5f9}
.hb-etude-badge{font-size:10px;font-weight:800;text-transform:uppercase;color:#b45309;background:#fffbeb;border:1px solid #fde68a;border-radius:5px;padding:2px 8px}
.hb-etude-entreprise{font-size:12px;font-weight:600;color:#475569}
.hb-etude-content{padding:12px 14px;font-size:13px;color:#475569;line-height:1.65}
.hb-etude-source{padding:7px 14px;font-size:11px;color:#94a3b8;border-top:1px solid #f1f5f9;font-style:italic}

/* ── Lien utile ── */
.hb-lien{display:flex;align-items:center;gap:12px;background:#fff;border:1px solid #e2e8f0;border-radius:10px;padding:11px 13px;margin:.5rem 0;text-decoration:none;color:inherit;transition:border-color .2s,box-shadow .2s}
.hb-lien:hover{border-color:#1e3a5f;box-shadow:0 4px 16px rgba(0,0,0,.06)}
.hb-lien-icon{width:34px;height:34px;border-radius:8px;background:#f1f5f9;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.hb-lien-body{flex:1;min-width:0}
.hb-lien-name{font-size:13px;font-weight:700;color:#1e293b;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;transition:color .2s}
.hb-lien:hover .hb-lien-name{color:#1e3a5f}
.hb-lien-desc{font-size:11px;color:#64748b;margin:1px 0}
.hb-lien-domain{font-size:11px;color:#94a3b8}

/* ── Indicateurs de difficulté ── */
.hb-diff::before{font-size:10px;font-weight:700}
.hb-diff-fondamentaux::before{content:'●●○ Fondamentaux';color:#3B6D11}
.hb-diff-intermediaire::before{content:'●●● Intermédiaire';color:#BA7517}
.hb-diff-avance::before{content:'●●● Avancé';color:#A32D2D}

/* ── Impression N&B ── */
@media print{
  .hb-block,.hb-exercice,.hb-etude,.hb-differenciation{page-break-inside:avoid}
  .hb-header{-webkit-print-color-adjust:exact;print-color-adjust:exact}
  .hb-video-frame{display:none}
}
