/**
 * TCF Canada — Sujets d'actualité Expression Orale
 */

.tcf-eo-subjects {
    max-width: none;
    margin: 0;
}

/* Hero */
.tcf-eo-subjects__hero {
    background: var(--tcf-gradient-header);
    color: #fff;
    padding: 2.5rem 1.75rem;
    border-radius: 0;
}

.tcf-eo-subjects__hero-inner {
    max-width: 720px;
}

.tcf-eo-subjects__back {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    transition: color 0.15s;
}

.tcf-eo-subjects__back:hover {
    color: #fff;
}

.tcf-eo-subjects__hero-title {
    margin: 0 0 0.5rem;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
}

.tcf-eo-subjects__hero-subtitle {
    margin: 0;
    font-size: 1rem;
    opacity: 0.9;
    line-height: 1.6;
}

/* Sticky nav parties */
.tcf-eo-subjects__sticky-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.tcf-eo-subjects__sticky-inner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    max-width: 960px;
    margin: 0 auto;
}

.tcf-eo-subjects__nav-arrow {
    width: 32px;
    height: 32px;
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    background: #fff;
    color: var(--tcf-primary);
    font-size: 1.25rem;
    cursor: pointer;
    flex-shrink: 0;
    line-height: 1;
}

.tcf-eo-subjects__parties-track-wrap {
    flex: 1;
    overflow: hidden;
}

.tcf-eo-subjects__parties-track {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding: 0.25rem 0;
}

.tcf-eo-subjects__parties-track::-webkit-scrollbar {
    display: none;
}

.tcf-eo-subjects__partie-pill {
    flex-shrink: 0;
    padding: 0.5rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #f8fafc;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    color: #475569;
    transition: all 0.15s;
}

.tcf-eo-subjects__partie-pill--active {
    background: var(--tcf-gradient);
    color: #fff;
    border-color: transparent;
    box-shadow: var(--tcf-shadow);
}

.tcf-eo-subjects__partie-pill:hover:not(.tcf-eo-subjects__partie-pill--active) {
    border-color: var(--tcf-cyan);
    color: var(--tcf-primary);
}

/* Liste accordéons */
.tcf-eo-subjects__parties {
    padding: 1.5rem 1.25rem 2rem;
    background: var(--tcf-bg-alt);
    border-radius: 0;
}

.tcf-eo-subjects__accordion {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: var(--tcf-radius);
    margin-bottom: 0.75rem;
    overflow: hidden;
    box-shadow: var(--tcf-shadow);
}

.tcf-eo-subjects__accordion-header {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 1rem 1.25rem;
    background: #fff;
    border: none;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    transition: background 0.15s;
}

.tcf-eo-subjects__accordion-header:hover {
    background: #f0f9ff;
}

.tcf-eo-subjects__accordion-header--open {
    background: #eff6ff;
    border-bottom: 1px solid #e2e8f0;
}

.tcf-eo-subjects__accordion-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--tcf-gradient);
    border-radius: 10px;
    color: #fff;
    flex-shrink: 0;
}

.tcf-eo-subjects__accordion-info {
    flex: 1;
    min-width: 0;
}

.tcf-eo-subjects__accordion-title {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
}

.tcf-eo-subjects__accordion-meta {
    font-size: 0.8125rem;
    color: #64748b;
}

.tcf-eo-subjects__accordion-chevron {
    flex-shrink: 0;
    transition: transform 0.25s ease;
    color: #94a3b8;
}

.tcf-eo-subjects__accordion-header--open .tcf-eo-subjects__accordion-chevron {
    transform: rotate(180deg);
    color: var(--tcf-primary);
}

.tcf-eo-subjects__accordion-body {
    padding: 0 1.25rem 1.25rem;
}

/* Onglets tâches */
.tcf-eo-subjects__task-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.tcf-eo-subjects__task-tab {
    flex: 1;
    min-width: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: var(--tcf-radius);
    background: #f8fafc;
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    color: #475569;
    transition: all 0.15s;
}

.tcf-eo-subjects__task-tab svg {
    flex-shrink: 0;
}

.tcf-eo-subjects__task-tab--active {
    background: var(--tcf-gradient);
    color: #fff;
    border-color: transparent;
    box-shadow: var(--tcf-shadow);
}

.tcf-eo-subjects__task-tab:hover:not(.tcf-eo-subjects__task-tab--active) {
    border-color: var(--tcf-cyan);
}

/* Carte consigne */
.tcf-eo-subjects__task-card {
    border: 1px solid #e2e8f0;
    border-radius: var(--tcf-radius);
    overflow: hidden;
}

.tcf-eo-subjects__task-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--tcf-gradient-header);
    color: #fff;
    flex-wrap: wrap;
}

.tcf-eo-subjects__task-card-title-wrap {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.tcf-eo-subjects__task-card-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.tcf-eo-subjects__task-card-timer {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 0.75rem;
    opacity: 0.9;
}

.tcf-eo-subjects__task-card-timer-value {
    font-size: 1.25rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.tcf-eo-subjects__task-card-body {
    padding: 1.25rem;
}

.tcf-eo-subjects__task-context {
    font-size: 0.8125rem;
    color: #64748b;
    font-style: italic;
    margin: 0 0 1rem;
    padding: 0.75rem;
    background: #f0f9ff;
    border-radius: 6px;
    border-left: 3px solid var(--tcf-cyan);
}

.tcf-eo-subjects__task-consigne {
    font-size: 1rem;
    line-height: 1.65;
    color: #1e293b;
    margin: 0 0 1.25rem;
}

.tcf-eo-subjects__task-level {
    display: inline-block;
    padding: 0.2rem 0.625rem;
    background: #dbeafe;
    color: var(--tcf-primary);
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Points clés */
.tcf-eo-subjects__key-points {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.tcf-eo-subjects__key-point {
    padding: 1rem;
    background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
    border: 1px solid #e2e8f0;
    border-radius: var(--tcf-radius);
}

.tcf-eo-subjects__key-point-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--tcf-gradient);
    color: #fff;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.tcf-eo-subjects__key-point-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.tcf-eo-subjects__key-point-detail {
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.4;
    margin: 0;
}

/* Liens utiles */
.tcf-eo-subjects__links {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.tcf-eo-subjects__link {
    font-size: 0.8125rem;
    color: var(--tcf-primary);
    text-decoration: none;
    padding: 0.375rem 0.75rem;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    transition: all 0.15s;
}

.tcf-eo-subjects__link:hover {
    background: #eff6ff;
}

/* Bouton action */
.tcf-eo-subjects__start-btn {
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: var(--tcf-gradient);
    color: #fff;
    border: none;
    border-radius: var(--tcf-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: opacity 0.15s, transform 0.1s;
    box-shadow: var(--tcf-shadow);
}

.tcf-eo-subjects__start-btn:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

/* Modale enregistreur */
.tcf-eo-subjects__modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.tcf-eo-subjects__modal:not([hidden]),
.tcf-eo-subjects__modal--open {
    display: flex;
}

.tcf-eo-subjects__modal[hidden] {
    display: none !important;
}

.tcf-eo-subjects__modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
}

.tcf-eo-subjects__modal-panel {
    position: relative;
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.tcf-eo-subjects__modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border: none;
    border-radius: 999px;
    font-size: 1.5rem;
    cursor: pointer;
    color: #475569;
    line-height: 1;
    z-index: 2;
    transition: background 0.15s, color 0.15s;
}

.tcf-eo-subjects__modal-close:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.tcf-eo-subjects__modal-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: center;
}

.tcf-eo-subjects__modal-close-btn {
    min-width: 140px;
}

.tcf-eo-subjects__modal-title {
    margin: 0 0 0.75rem;
    font-size: 1.125rem;
    color: #1e293b;
    padding-right: 2rem;
}

.tcf-eo-subjects__modal-consigne {
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.5;
    margin: 0 0 1.5rem;
}

.tcf-eo-subjects__modal-phase {
    text-align: center;
}

.tcf-eo-subjects__modal-phase-label {
    font-size: 0.8125rem;
    color: #64748b;
    margin: 0 0 0.5rem;
}

.tcf-eo-subjects__modal-timer {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--tcf-primary);
    margin-bottom: 1.25rem;
    font-variant-numeric: tabular-nums;
}

body.tcf-eo-subjects-modal-open {
    overflow: hidden;
}

body.tcf-eo-subjects-modal-open .tcf-site-nav {
    z-index: 9999;
}

.tcf-eo-subjects__mic-error {
    margin-top: 1rem;
    padding: 0.75rem;
    background: #fee2e2;
    color: #991b1b;
    border-radius: 6px;
    font-size: 0.875rem;
}

.tcf-eo-subjects__mic-error p {
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .tcf-eo-subjects__hero {
        padding: 1.75rem 1.25rem;
    }

    .tcf-eo-subjects__hero-title {
        font-size: 1.375rem;
    }

    .tcf-eo-subjects__parties {
        padding: 1.25rem 1rem 1.75rem;
    }

    .tcf-eo-subjects__key-points {
        grid-template-columns: repeat(2, 1fr);
    }

    .tcf-eo-subjects__task-tabs {
        flex-direction: column;
    }

    .tcf-eo-subjects__task-tab {
        min-width: 100%;
    }
}

@media (max-width: 480px) {
    .tcf-eo-subjects__key-points {
        grid-template-columns: 1fr;
    }

    .tcf-eo-subjects__nav-arrow {
        display: none;
    }
}
