/* ── HGAPContent — Front-end ── */

.hgap-page {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 0 2rem;
}

/* ── EN-TÊTE ── */
.hgap-header {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}
.hgap-header-left { flex: 1; min-width: 260px; }
.hgap-titre-page {
    font-size: 2rem;
    font-weight: 800;
    color: #1a2a4a;
    margin: 0 0 0.4rem;
    text-transform: uppercase;
    letter-spacing: -0.5px;
}
.hgap-sous-titre { color: #555; margin: 0; font-size: 1rem; }

/* Barre de progression */
.hgap-progression-box {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 1.25rem 1.5rem;
    min-width: 240px;
    max-width: 300px;
    flex-shrink: 0;
}
.hgap-prog-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #888;
    margin-bottom: 0.4rem;
}
.hgap-prog-pct {
    font-size: 2.2rem;
    font-weight: 800;
    color: #27ae60;
    line-height: 1;
}
.hgap-prog-detail { font-size: 0.85rem; color: #444; margin: 0.2rem 0 0.7rem; }
.hgap-prog-bar-wrap {
    height: 8px;
    background: #e5e7eb;
    border-radius: 99px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}
.hgap-prog-bar {
    height: 100%;
    background: linear-gradient(90deg, #27ae60, #2ecc71);
    border-radius: 99px;
    transition: width 0.6s ease;
}
.hgap-prog-message { font-size: 0.82rem; color: #555; font-style: italic; }

/* ── SECTION MATIÈRE ── */
.hgap-matiere {
    display: flex;
    align-items: stretch;
    gap: 0;
    margin-bottom: 1.75rem;
    border-radius: 14px;
    border-left: 5px solid #ccc;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

/* Colonne latérale */
.hgap-matiere-sidebar {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 1.5rem 1.25rem;
    min-width: 170px;
    max-width: 170px;
    flex-shrink: 0;
}
.hgap-matiere-icone {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    flex-shrink: 0;
}
.hgap-matiere-nom {
    font-size: 1.15rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.2;
}
.hgap-matiere-desc { font-size: 0.8rem; color: #555; line-height: 1.45; }
.hgap-btn-voir {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.4rem 0.85rem;
    border-radius: 20px;
    color: #fff !important;
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none !important;
    white-space: nowrap;
}
.hgap-btn-voir:hover { opacity: 0.88; }

/* Défilement horizontal des cartes */
.hgap-chapitres-scroll {
    overflow-x: auto;
    flex: 1;
    padding: 1.25rem 1rem;
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
}
.hgap-chapitres-scroll::-webkit-scrollbar { height: 4px; }
.hgap-chapitres-scroll::-webkit-scrollbar-thumb { background: #ddd; border-radius: 2px; }
.hgap-chapitres-inner {
    display: flex;
    gap: 0.85rem;
    width: max-content;
}

/* ── CARTE CHAPITRE ── */
.hgap-carte {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    width: 148px;
    flex-shrink: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 0.85rem 0.75rem;
    text-decoration: none !important;
    color: inherit !important;
    transition: box-shadow 0.18s, transform 0.18s;
    cursor: pointer;
}
.hgap-carte:hover {
    box-shadow: 0 4px 18px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}
.hgap-carte-code {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.01em;
}
.hgap-carte-titre {
    font-size: 0.78rem;
    font-weight: 600;
    color: #1a2a4a;
    line-height: 1.35;
    min-height: 2.7em;
}
.hgap-carte-img-wrap {
    width: 100%;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
    margin: 0.2rem 0;
}
.hgap-carte-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.hgap-carte-footer {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-top: auto;
}
.hgap-seances { font-size: 0.72rem; color: #888; }

/* ── BADGES STATUT ── */
.hgap-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 20px;
    width: fit-content;
}
.hgap-badge-termine  { background: #d4f7e3; color: #1a7a45; }
.hgap-badge-encours  { background: #fff3cd; color: #8a5d00; }
.hgap-badge-avenir   { background: #f0f0f0; color: #666;    }

/* ── RESPONSIVE ── */
@media (max-width: 700px) {
    .hgap-matiere { flex-direction: column; border-left-width: 5px; }
    .hgap-matiere-sidebar { max-width: 100%; min-width: 0; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 1rem; }
    .hgap-matiere-desc { display: none; }
    .hgap-titre-page { font-size: 1.4rem; }
    .hgap-progression-box { max-width: 100%; min-width: 0; width: 100%; }
}
