/* ==========================================================================
   Mon Examen Civique — vue d'ensemble des entraînements (refonte v2)
   Dépend de tokens.css et home-v2.css (chrome de page, boutons .v2-btn).
   ========================================================================== */

.qov2-shell {
    max-width: var(--v2-container);
    margin-inline: auto;
    padding: var(--v2-gap-lg) var(--v2-pad-x) 4rem;
}

.qov2-head {
    margin-bottom: 1.5rem;
}

.qov2-head h1 {
    font-size: var(--v2-text-2xl);
    margin-bottom: 0.5rem;
}

.qov2-head p {
    color: var(--v2-ink-2);
    font-size: var(--v2-text-base);
    margin: 0;
    max-width: 40rem;
}

/* --- Sélecteur de titre (segmented control) -------------------------------- */

.qov2-tabs {
    display: inline-flex;
    gap: 0.25rem;
    padding: 0.25rem;
    background: var(--v2-sand);
    border-radius: var(--v2-radius);
    margin-bottom: 1.75rem;
    overflow-x: auto;
    max-width: 100%;
}

.qov2-tab {
    flex: none;
    padding: 0.625rem 1.125rem;
    border: none;
    border-radius: calc(var(--v2-radius) - 0.25rem);
    background: transparent;
    color: var(--v2-ink-2);
    font: inherit;
    font-size: var(--v2-text-sm);
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color var(--v2-duration-base) var(--v2-ease-out),
                color var(--v2-duration-base) var(--v2-ease-out);
}

.qov2-tab.active {
    background: var(--v2-white);
    color: var(--v2-blue);
    box-shadow: var(--v2-shadow);
}

/* --- Bandeau premium (teaser) ----------------------------------------------- */

.qov2-teaser {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: var(--v2-radius);
    border: 1.5px solid rgba(163, 42, 46, 0.2);
    background: var(--v2-red-tint);
    text-decoration: none;
    color: inherit;
    margin-bottom: 1.75rem;
    cursor: pointer;
}

.qov2-teaser__icon {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--v2-white);
    color: var(--v2-red);
}

.qov2-teaser__text {
    flex: 1;
    min-width: 0;
}

.qov2-teaser__text h4 {
    font-size: var(--v2-text-sm);
    font-weight: 700;
    color: var(--v2-ink);
    margin-bottom: 0.125rem;
}

.qov2-teaser__text p {
    font-size: var(--v2-text-xs);
    color: var(--v2-ink-2);
    margin: 0;
}

.qov2-teaser__arrow {
    flex: none;
    color: var(--v2-red);
}

/* --- Contenu par type d'examen ---------------------------------------------- */

.qov2-exam-content {
    display: none;
}

.qov2-exam-content.active {
    display: block;
}

.qov2-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.qov2-module {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: var(--v2-white);
    border: 1px solid var(--v2-border);
    border-radius: var(--v2-radius);
    padding: 1.375rem;
    text-decoration: none;
    color: inherit;
    transition: transform var(--v2-duration-base) var(--v2-ease-out),
                box-shadow var(--v2-duration-base) var(--v2-ease-out);
}

.qov2-module:hover {
    transform: translateY(-3px);
    box-shadow: var(--v2-shadow-lift);
}

.qov2-module:active {
    transform: translateY(-1px);
}

.qov2-module.is-locked {
    opacity: 0.85;
}

.qov2-module__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
}

.qov2-module__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 0.75rem;
    background: var(--v2-blue-tint-2);
    color: var(--v2-blue);
}

.qov2-module__icon svg {
    width: 19px;
    height: 19px;
}

.qov2-module__icon.is-premium {
    background: var(--v2-red-tint);
    color: var(--v2-red);
}

.qov2-premium-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.1875rem 0.5625rem;
    border-radius: var(--v2-radius-pill);
    background: var(--v2-red-tint);
    color: var(--v2-red);
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
}

.qov2-progress-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.1875rem 0.5625rem;
    border-radius: var(--v2-radius-pill);
    background: var(--v2-sand);
    color: var(--v2-ink-3);
    font-size: 0.6875rem;
    font-weight: 700;
}

.qov2-progress-tag.started {
    background: var(--v2-blue-tint-2);
    color: var(--v2-blue);
}

.qov2-module__title {
    font-family: var(--v2-font-title);
    font-size: var(--v2-text-lg);
    font-weight: 700;
    color: var(--v2-ink);
}

.qov2-module__meta {
    display: flex;
    align-items: center;
    gap: 0.4375rem;
    font-size: var(--v2-text-xs);
    font-weight: 600;
    color: var(--v2-ink-3);
}

.qov2-module__meta .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--v2-ink-3);
}

.qov2-module__meta.is-critique { color: var(--v2-red); }
.qov2-module__meta.is-critique .dot { background: var(--v2-red); }
.qov2-module__meta.is-high { color: var(--v2-blue); }
.qov2-module__meta.is-high .dot { background: var(--v2-blue); }

.qov2-module__desc {
    font-size: var(--v2-text-sm);
    color: var(--v2-ink-2);
    line-height: 1.5;
    margin: 0;
    flex: 1;
}

.qov2-module__desc strong {
    color: var(--v2-ink);
}

.qov2-module__action {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: var(--v2-text-xs);
    font-weight: 700;
    color: var(--v2-blue);
}

.qov2-module.is-locked .qov2-module__action {
    color: var(--v2-red);
}

/* --- Carte examen blanc ------------------------------------------------------ */

.qov2-exam-blanc {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding: 1.75rem 2rem;
    border-radius: var(--v2-radius-lg);
    border: 1.5px solid var(--v2-blue-tint-2);
    background: var(--v2-blue-tint);
}

.qov2-exam-blanc.is-locked {
    border-color: rgba(163, 42, 46, 0.2);
    background: var(--v2-red-tint);
}

.qov2-exam-blanc__left {
    flex: 1 1 20rem;
}

.qov2-exam-blanc__tag {
    display: inline-flex;
    padding: 0.1875rem 0.625rem;
    border-radius: var(--v2-radius-pill);
    background: var(--v2-white);
    color: var(--v2-blue);
    font-size: var(--v2-text-xs);
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.qov2-exam-blanc.is-locked .qov2-exam-blanc__tag {
    color: var(--v2-red);
}

.qov2-exam-blanc__left h3 {
    font-size: var(--v2-text-xl);
    margin-bottom: 0.625rem;
}

.qov2-exam-blanc__left p {
    color: var(--v2-ink-2);
    font-size: var(--v2-text-sm);
    line-height: 1.6;
    margin: 0;
}

.qov2-exam-blanc__right {
    flex: none;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    max-width: 18rem;
}

.qov2-exam-blanc__right svg {
    color: var(--v2-blue);
}

.qov2-exam-blanc.is-locked .qov2-exam-blanc__right svg {
    color: var(--v2-red);
}

.qov2-exam-blanc__info {
    font-size: var(--v2-text-xs);
    color: var(--v2-ink-2);
}

.qov2-empty {
    color: var(--v2-ink-3);
    padding: 2rem 0;
}

@media (max-width: 960px) {
    .qov2-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .qov2-grid { grid-template-columns: 1fr; }
    .qov2-exam-blanc { flex-direction: column; align-items: flex-start; }
}
