.dc26-examen-listing {
    padding: 2rem 0;
}

.dc26-examen-listing__preview {
    border: 2px dashed var(--wp--preset--color--gray-light, #f4f4f4);
    padding: 1.5rem;
    background: var(--wp--preset--color--white, #fff);
}

.dc26-examen-listing__empty {
    color: var(--wp--preset--color--gray-text, #808080);
    font-style: italic;
}

/* ══════════════════════════════════════════════
   SEARCH
   ══════════════════════════════════════════════ */

.dc26-examen-listing__search-wrap {
    position: relative;
    max-width: 320px;
    width: 100%;
    margin-bottom: 1.5rem;
    margin-left: auto;
    display: flex;
    align-items: center;
    padding: 8px 16px 10px 16px;
    background: var(--wp--preset--color--white, #ffffff);
    border-radius: 9999px;
    box-sizing: border-box;
}

.dc26-examen-listing__search-icon {
    position: absolute;
    right: 12px;
    top: 0;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    pointer-events: none;
    color: transparent;
    /* Icône SVG mask identique à FacetWP */
    background-color: var(--wp--preset--color--primary, #007582);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='16.65' y1='16.65' x2='21' y2='21'/%3E%3C/svg%3E") no-repeat center / 18px 18px;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='16.65' y1='16.65' x2='21' y2='21'/%3E%3C/svg%3E") no-repeat center / 18px 18px;
    transform: scaleX(-1);
}

.dc26-examen-listing__search {
    flex: 1;
    padding: 0;
    padding-right: 2.5rem;
    border: 0;
    border-radius: 9999px;
    background: transparent;
    color: var(--wp--preset--color--primary, #007582);
    font-weight: 400;
    font-family: var(--wp--preset--font-family--body, system-ui, sans-serif);
    font-size: var(--facet-font-size, 14px);
    box-shadow: none;
    outline: none;
}

.dc26-examen-listing__search::placeholder {
    color: var(--wp--preset--color--primary, #007582);
    opacity: 0.8;
}

/* ══════════════════════════════════════════════
   ACCORDION (details/summary)
   ══════════════════════════════════════════════ */

.dc26-examen-listing__year {
    border-bottom: 1px solid rgba(0, 0, 0, 1);
}

.dc26-examen-listing__year-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 0;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.dc26-examen-listing__year-header::-webkit-details-marker {
    display: none;
}

.dc26-examen-listing__year-header::marker {
    content: '';
}

.dc26-examen-listing__year-title {
    margin: 0;
    font-size: var(--wp--preset--font-size--large);
    color: var(--wp--preset--color--primary, #007582);
    transition: color 0.15s ease;
}

.dc26-examen-listing__year-header:hover .dc26-examen-listing__year-title {
    color: var(--wp--preset--color--primary-hover, #045660);
}

/* ── Year-level progress ── */

.dc26-examen-year__progress {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
    margin-right: 0.5rem;
}

.dc26-examen-year__progress-bar {
    width: 100px;
    height: 5px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 3px;
    overflow: hidden;
}

.dc26-examen-year__progress-fill {
    display: block;
    height: 100%;
    background: var(--wp--preset--color--primary, #007582);
    border-radius: 3px;
    transition: width 0.25s ease;
}

.dc26-examen-year__progress-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--wp--preset--color--gray-text, #808080);
    white-space: nowrap;
}

/* Icône +/× identique au style accordion Gutenberg */
.dc26-examen-listing__chevron {
    position: relative;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    display: block;
}

.dc26-examen-listing__chevron::before,
.dc26-examen-listing__chevron::after {
    content: '';
    position: absolute;
    background: currentColor;
    transition: transform 0.2s ease;
}

.dc26-examen-listing__chevron::before {
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    transform: translateY(-50%);
}

.dc26-examen-listing__chevron::after {
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    transform: translateX(-50%);
}

.dc26-examen-listing__year[open] > .dc26-examen-listing__year-header .dc26-examen-listing__chevron::before {
    transform: translateY(-50%) rotate(45deg);
}

.dc26-examen-listing__year[open] > .dc26-examen-listing__year-header .dc26-examen-listing__chevron::after {
    transform: translateX(-50%) rotate(45deg);
}

/* ══════════════════════════════════════════════
   SESSIONS GRID
   ══════════════════════════════════════════════ */

.dc26-examen-listing__sessions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0;
    background: var(--wp--preset--color--white, #ffffff);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.dc26-examen-session {
    padding: 0 1rem;
    border-left: 1px solid var(--wp--preset--color--gray-medium-light, #e0e0e0);
}

.dc26-examen-session:first-child {
    border-left: none;
    padding-left: 0;
}

.dc26-examen-session:last-child {
    padding-right: 0;
}

.dc26-examen-session__header {
    margin-bottom: 0.75rem;
}

.dc26-examen-session__title {
    margin: 0 0 0.25rem;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.3;
}

.dc26-examen-session__date {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8rem;
    color: var(--wp--preset--color--gray-text, #808080);
}

.dc26-examen-session__date svg {
    flex-shrink: 0;
    color: var(--wp--preset--color--gray-medium, #8e8e8e);
}

/* ══════════════════════════════════════════════
   PROGRESS BAR
   ══════════════════════════════════════════════ */

.dc26-examen-session__progress {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.dc26-examen-session__progress-bar {
    flex: 1;
    height: 6px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 3px;
    overflow: hidden;
    min-width: 60px;
    max-width: 120px;
}

.dc26-examen-session__progress-fill {
    display: block;
    height: 100%;
    background: var(--wp--preset--color--primary, #007582);
    border-radius: 3px;
    transition: width 0.25s ease;
}

.dc26-examen-session__progress-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--wp--preset--color--gray-text, #808080);
    white-space: nowrap;
}

/* ══════════════════════════════════════════════
   DOCUMENTS
   ══════════════════════════════════════════════ */

.dc26-examen-session__documents {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.dc26-examen-session__documents li {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

/* ── Checkbox button ── */

.dc26-examen-check {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    padding: 0;
    border: 1.5px solid var(--wp--preset--color--gray-medium, #b0b0b0);
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    color: transparent;
    transition: all 0.15s ease;
}

.dc26-examen-check:hover {
    border-color: var(--wp--preset--color--primary, #007582);
}

.dc26-examen-check svg {
    width: 8px;
    height: 8px;
}

li.is-done .dc26-examen-check {
    background: var(--wp--preset--color--primary, #007582);
    border-color: var(--wp--preset--color--primary, #007582);
    color: #fff;
}

li.is-done .dc26-examen-doc {
    opacity: 0.5;
    text-decoration: line-through;
}

/* ── Document link ── */

.dc26-examen-doc {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--wp--preset--color--primary, #007582);
    text-decoration: none;
    padding: 0.2rem 0;
    transition: opacity 0.15s ease;
}

.dc26-examen-doc:hover {
    text-decoration: underline;
}

.dc26-examen-doc svg {
    flex-shrink: 0;
}

/* ══════════════════════════════════════════════
   SEARCH STATE
   ══════════════════════════════════════════════ */

.dc26-examen-listing__year.is-hidden,
.dc26-examen-session.is-hidden {
    display: none;
}

/* ══════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════ */

@media (max-width: 600px) {
    .dc26-examen-listing__sessions {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .dc26-examen-session {
        border-left: none;
        padding: 0;
        border-bottom: 1px solid var(--wp--preset--color--gray-medium-light, #e0e0e0);
        padding-bottom: 1.25rem;
    }

    .dc26-examen-session:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    .dc26-examen-listing__search-wrap {
        max-width: 100%;
    }
}
