/**
 * TCF Canada — Sujets d'actualité Expression Écrite
 */

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

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

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

.tcf-ee-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-ee-subjects__back:hover {
    color: #fff;
}

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

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

.tcf-ee-subjects__panel {
    padding: 2rem 1.75rem;
    background: #fff;
}

.tcf-ee-subjects__panel--tips {
    background: var(--tcf-bg-alt);
    border-top: 1px solid #e2e8f0;
}

.tcf-ee-subjects__section-title {
    margin: 0 0 1.25rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: #1e293b;
}

.tcf-ee-subjects__years {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tcf-ee-subjects__year-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 5rem;
    padding: 0.75rem 1.5rem;
    border: 2px solid #e2e8f0;
    border-radius: var(--tcf-radius);
    background: #fff;
    color: #334155;
    font-size: 1.125rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.15s;
}

.tcf-ee-subjects__year-btn:hover {
    border-color: var(--tcf-cyan);
    color: var(--tcf-primary);
}

.tcf-ee-subjects__year-btn.is-active {
    background: var(--tcf-gradient);
    color: #fff;
    border-color: transparent;
    box-shadow: var(--tcf-shadow);
}

.tcf-ee-subjects__months-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.tcf-ee-subjects__month-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.25rem;
    border: 1px solid #e2e8f0;
    border-radius: var(--tcf-radius);
    background: #fff;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--tcf-shadow);
    transition: transform 0.15s, border-color 0.15s;
}

.tcf-ee-subjects__month-card:hover {
    transform: translateY(-2px);
    border-color: var(--tcf-cyan);
}

.tcf-ee-subjects__month-card--locked,
.tcf-ee-subjects__month-card--soon {
    opacity: 0.85;
    cursor: default;
}

.tcf-ee-subjects__month-card--soon {
    background: #f8fafc;
}

.tcf-ee-subjects__month-badge {
    align-self: flex-start;
    padding: 0.25rem 0.625rem;
    border-radius: 999px;
    background: #dcfce7;
    color: #166534;
    font-size: 0.75rem;
    font-weight: 600;
}

.tcf-ee-subjects__month-badge--light {
    background: #fef3c7;
    color: #92400e;
}

.tcf-ee-subjects__month-badge--new {
    background: #dbeafe;
    color: #1d4ed8;
}

.tcf-ee-subjects__month-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
}

.tcf-ee-subjects__month-meta {
    font-size: 0.875rem;
    color: #64748b;
}

.tcf-ee-subjects__tips {
    margin: 0;
    padding-left: 1.25rem;
    line-height: 1.8;
    color: #475569;
}

.tcf-ee-subjects__hub-link {
    margin: 1.25rem 0 0;
}

.tcf-ee-subjects__hub-link a {
    color: var(--tcf-primary);
    font-weight: 600;
}

.tcf-ee-subjects__combo-nav-wrap {
    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-ee-subjects__combo-nav {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.75rem 1.25rem;
    scrollbar-width: none;
}

.tcf-ee-subjects__combo-nav::-webkit-scrollbar {
    display: none;
}

.tcf-ee-subjects__combo-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-ee-subjects__combo-pill--active {
    background: var(--tcf-gradient);
    color: #fff;
    border-color: transparent;
    box-shadow: var(--tcf-shadow);
}

.tcf-ee-subjects__combinations {
    padding: 1.5rem 1.25rem 2rem;
    background: var(--tcf-bg-alt);
}

.tcf-ee-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-ee-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;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

.tcf-ee-subjects__task-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0.65rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.tcf-ee-subjects__sim-btn {
    flex: 1 1 10rem;
    min-height: 2.75rem;
    font-size: 0.9rem;
    padding: 0.75rem 1rem;
    text-decoration: none;
    text-align: center;
    box-sizing: border-box;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
    border: none;
}

.tcf-ee-subjects__correction-toggle {
    flex: 1 1 10rem;
    min-height: 2.75rem;
}

.tcf-ee-subjects__correction {
    flex: 1 1 100%;
    width: 100%;
    margin-top: 0.35rem;
}

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

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

.tcf-ee-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;
    font-weight: 700;
    font-size: 0.875rem;
}

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

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

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

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

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

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

.tcf-ee-subjects__task-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.tcf-ee-subjects__task-tab {
    flex: 1;
    min-width: 120px;
    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-ee-subjects__task-tab--active {
    background: var(--tcf-gradient);
    color: #fff;
    border-color: transparent;
    box-shadow: var(--tcf-shadow);
}

.tcf-ee-subjects__task-card {
    border: 1px solid #e2e8f0;
    border-radius: var(--tcf-radius);
    overflow: hidden;
}

.tcf-ee-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-ee-subjects__task-card-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.tcf-ee-subjects__task-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.tcf-ee-subjects__task-badge {
    padding: 0.25rem 0.625rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    font-size: 0.75rem;
    font-weight: 600;
}

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

.tcf-ee-subjects__consigne-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
}

.tcf-ee-subjects__consigne {
    margin: 0 0 1.25rem;
    font-size: 1rem;
    line-height: 1.7;
    color: #1e293b;
}

.tcf-ee-subjects__topic {
    margin: 0 0 1rem;
    padding: 0.75rem 1rem;
    background: #f0f9ff;
    border-left: 4px solid var(--tcf-primary);
    border-radius: 0 var(--tcf-radius) var(--tcf-radius) 0;
    font-weight: 600;
    color: #1e40af;
}

.tcf-ee-subjects__documents {
    margin-bottom: 1.25rem;
}

.tcf-ee-subjects__document {
    padding: 1rem;
    margin-bottom: 0.75rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--tcf-radius);
    font-size: 0.9375rem;
    line-height: 1.7;
    color: #334155;
}

.tcf-ee-subjects__document:last-child {
    margin-bottom: 0;
}

.tcf-ee-subjects__correction-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.65rem 1rem;
    border: 1px solid var(--tcf-primary);
    border-radius: var(--tcf-radius);
    background: #fff;
    color: var(--tcf-primary);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    box-sizing: border-box;
    touch-action: manipulation;
}

.tcf-ee-subjects__correction-toggle:hover {
    background: #eff6ff;
}

.tcf-ee-subjects__correction {
    margin-top: 0.85rem;
    padding: 1rem 1.25rem;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: var(--tcf-radius);
    font-size: 0.9375rem;
    line-height: 1.75;
    color: #14532d;
}

.tcf-ee-subjects__correction-title {
    margin: 0 0 0.75rem;
    font-weight: 700;
    font-size: 1rem;
    color: #166534;
    text-align: left;
}

.tcf-ee-subjects__correction-greeting {
    margin: 0 0 0.75rem;
    font-weight: 600;
    text-align: left;
}

.tcf-ee-subjects__correction-para {
    margin: 0 0 0.9rem;
    text-align: justify;
    hyphens: auto;
}

.tcf-ee-subjects__correction-para:last-of-type {
    margin-bottom: 0;
}

.tcf-ee-subjects__correction-signature {
    margin: 1rem 0 0;
    padding-top: 0.75rem;
    border-top: 1px solid #bbf7d0;
    font-weight: 600;
    text-align: right;
    line-height: 1.5;
}

.tcf-ee-subjects__sim-link {
    padding: 1.5rem 1.25rem 2rem;
    text-align: center;
    background: #fff;
    border-top: 1px solid #e2e8f0;
}

.tcf-ee-subjects__loading {
    padding: 3rem 1.25rem;
    text-align: center;
    color: #64748b;
}

.tcf-ee-subjects__loading .tcf-quiz__spinner {
    margin: 0 auto 1rem;
}

@media (max-width: 640px) {
    .tcf-ee-subjects__accordion-header {
        padding: 0.9rem 1rem;
    }

    .tcf-ee-subjects__task-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .tcf-ee-subjects__sim-btn,
    .tcf-ee-subjects__correction-toggle {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
}
