/**
 * TCF Canada — Design System global (charte bleu / indigo / cyan)
 */

:root {
    /* Palette principale */
    --tcf-primary: #2563eb;
    --tcf-primary-dark: #1d4ed8;
    --tcf-indigo: #4f46e5;
    --tcf-cyan: #06b6d4;
    --tcf-cyan-dark: #0891b2;
    --tcf-blue: #2563eb;
    --tcf-blue-light: #dbeafe;
    --tcf-cyan-light: #ecfeff;

    /* Neutrals */
    --tcf-dark: #0f172a;
    --tcf-text: #1e293b;
    --tcf-text-light: #64748b;
    --tcf-bg: #ffffff;
    --tcf-bg-alt: #f8fafc;
    --tcf-bg-page: #f1f5f9;
    --tcf-border: #e2e8f0;

    /* Sémantique */
    --tcf-success: #16a34a;
    --tcf-success-bg: #dcfce7;
    --tcf-danger: #dc2626;
    --tcf-danger-bg: #fee2e2;
    --tcf-warning: #d97706;
    --tcf-warning-bg: #fef3c7;
    --tcf-secondary: #06b6d4;
    --tcf-accent: #4f46e5;

    /* Layout */
    --tcf-radius: 12px;
    --tcf-radius-lg: 16px;
    --tcf-radius-sm: 8px;
    --tcf-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
    --tcf-shadow-lg: 0 12px 40px rgba(37, 99, 235, 0.1);
    --tcf-shadow-card: 0 8px 32px rgba(37, 99, 235, 0.08);
    --tcf-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    --tcf-transition: cubic-bezier(0.16, 1, 0.3, 1);
    --tcf-gradient: linear-gradient(135deg, var(--tcf-primary) 0%, var(--tcf-cyan) 100%);
    --tcf-gradient-header: linear-gradient(135deg, #1e40af 0%, #2563eb 50%, #06b6d4 100%);
}

.tcf-app-body {
    margin: 0;
    max-width: 100%;
    overflow-x: clip;
}

.tcf-layout-with-nav {
    width: 100%;
    max-width: 100%;
}

/* Conteneur module (pages Elementor) */
.tcf-module-shell {
    font-family: var(--tcf-font);
    max-width: 960px;
    margin: 0 auto;
    padding: 1.5rem 1rem 2.5rem;
    color: var(--tcf-text);
    line-height: 1.6;
}

.tcf-module-shell--narrow {
    max-width: 480px;
}

.tcf-module-shell--wide {
    max-width: 1140px;
}

.tcf-module-shell--quiz.tcf-module-shell--wide {
    max-width: 100%;
}

.tcf-module-shell__card {
    background: var(--tcf-bg);
    border: 1px solid var(--tcf-border);
    border-radius: var(--tcf-radius-lg);
    box-shadow: var(--tcf-shadow-card);
    overflow: hidden;
}

.tcf-module-shell__card--flat {
    padding: 1.75rem;
}

.tcf-module-shell--flush {
    max-width: 1140px;
    padding-top: 0;
}

.tcf-module-shell--quiz {
    width: 100%;
    max-width: 100%;
}

.tcf-module-shell__card--flush {
    border: none;
    box-shadow: var(--tcf-shadow-card);
    border-radius: var(--tcf-radius-lg);
    overflow: hidden;
}

.tcf-module-shell__header {
    padding: 1.75rem 1.75rem 0;
}

.tcf-module-shell__header h2 {
    margin: 0 0 0.5rem;
    font-size: clamp(1.375rem, 3vw, 1.75rem);
    font-weight: 800;
    color: var(--tcf-dark);
}

.tcf-module-shell__header p {
    margin: 0 0 1.5rem;
    color: var(--tcf-text-light);
    font-size: 0.9375rem;
}

/* Boutons */
.tcf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-family: var(--tcf-font);
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.4;
    border: 2px solid transparent;
    border-radius: var(--tcf-radius-sm);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.25s var(--tcf-transition),
        border-color 0.25s var(--tcf-transition),
        transform 0.25s var(--tcf-transition),
        box-shadow 0.25s var(--tcf-transition);
}

.tcf-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.tcf-btn--primary {
    background: var(--tcf-gradient);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.tcf-btn--primary:hover:not(:disabled) {
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.tcf-btn--secondary {
    background: transparent;
    color: var(--tcf-primary);
    border-color: var(--tcf-primary);
}

.tcf-btn--secondary:hover:not(:disabled) {
    background: var(--tcf-blue-light);
}

/* Notices */
.tcf-notice {
    padding: 1rem 1.25rem;
    border-radius: var(--tcf-radius-sm);
    font-family: var(--tcf-font);
    font-size: 0.9375rem;
    line-height: 1.5;
}

.tcf-notice--warning {
    background: var(--tcf-warning-bg);
    border-left: 4px solid var(--tcf-warning);
    color: var(--tcf-text);
}

.tcf-notice--success {
    background: var(--tcf-success-bg);
    border-left: 4px solid var(--tcf-success);
    color: var(--tcf-text);
}

/* Badges */
.tcf-badge {
    display: inline-block;
    padding: 0.35rem 0.875rem;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.tcf-badge--gratuit { background: #f1f5f9; color: var(--tcf-text-light); }
.tcf-badge--bronze  { background: #fef3c7; color: #b45309; }
.tcf-badge--silver  { background: #e2e8f0; color: #475569; }
.tcf-badge--gold    { background: linear-gradient(135deg, #fef9c3, #fde68a); color: #92400e; }

/* Tableaux */
.tcf-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--tcf-font);
    font-size: 0.875rem;
    border-radius: var(--tcf-radius-sm);
    overflow: hidden;
}

.tcf-table th,
.tcf-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--tcf-border);
}

.tcf-table th {
    background: var(--tcf-bg-alt);
    font-weight: 600;
    color: var(--tcf-dark);
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.tcf-table tbody tr:last-child td {
    border-bottom: none;
}

.tcf-table__row--active {
    background: var(--tcf-cyan-light);
    font-weight: 600;
    color: var(--tcf-primary-dark);
}

/* Contenu verrouillé / premium gate */
.tcf-locked-content {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--tcf-bg);
    border-radius: var(--tcf-radius-lg);
    border: 1px solid var(--tcf-border);
    box-shadow: var(--tcf-shadow);
    font-family: var(--tcf-font);
    max-width: 520px;
    margin: 2rem auto;
}

.tcf-premium-gate {
    position: relative;
    overflow: hidden;
    text-align: center;
    padding: clamp(2rem, 5vw, 3.5rem) clamp(1.5rem, 4vw, 2.5rem);
    border-radius: var(--tcf-radius-lg);
    background: linear-gradient(145deg, #0f172a 0%, #1e3a5f 45%, #0e7490 100%);
    color: #fff;
    font-family: var(--tcf-font);
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.25);
}

.tcf-premium-gate__glow {
    position: absolute;
    inset: -40% auto auto 50%;
    width: 420px;
    height: 420px;
    transform: translateX(-50%);
    background: radial-gradient(circle, rgba(6, 182, 212, 0.35) 0%, transparent 70%);
    pointer-events: none;
}

.tcf-premium-gate__icon {
    position: relative;
    margin: 0 auto 1.25rem;
    line-height: 0;
}

.tcf-premium-gate__badge {
    display: inline-block;
    padding: 0.35rem 0.875rem;
    margin-bottom: 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #cffafe;
    background: rgba(6, 182, 212, 0.2);
    border: 1px solid rgba(6, 182, 212, 0.45);
    border-radius: 999px;
}

.tcf-premium-gate__title {
    position: relative;
    margin: 0 0 0.875rem;
    font-size: clamp(1.375rem, 3vw, 1.75rem);
    font-weight: 800;
    line-height: 1.25;
}

.tcf-premium-gate__lead {
    position: relative;
    margin: 0 auto 1.5rem;
    max-width: 520px;
    font-size: 0.9375rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.82);
}

.tcf-premium-gate__features {
    position: relative;
    list-style: none;
    margin: 0 auto 2rem;
    padding: 0;
    max-width: 400px;
    text-align: left;
}

.tcf-premium-gate__features li {
    position: relative;
    padding: 0.5rem 0 0.5rem 1.75rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
}

.tcf-premium-gate__features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #22d3ee;
    font-weight: 700;
}

.tcf-premium-gate__actions {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.tcf-premium-gate__cta {
    min-width: min(100%, 280px);
}

.tcf-premium-gate__back {
    margin-top: 0.5rem;
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
}

.tcf-premium-gate__back:hover {
    color: #fff;
    text-decoration: underline;
}

.tcf-locked-content__icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.tcf-locked-content h3 {
    margin: 0 0 0.75rem;
    color: var(--tcf-dark);
    font-size: 1.25rem;
}

.tcf-locked-content p {
    color: var(--tcf-text-light);
    margin: 0;
    font-size: 0.9375rem;
}

.tcf-locked-content__actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

/* Liste de séries */
.tcf-series-list {
    font-family: var(--tcf-font);
    padding: 1.75rem;
}

.tcf-series-list__title {
    margin: 0 0 0.375rem;
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    font-weight: 800;
    color: var(--tcf-dark);
}

.tcf-series-list__subtitle {
    margin: 0 0 1.75rem;
    color: var(--tcf-text-light);
    font-size: 0.9375rem;
}

.tcf-series-list__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
    gap: 1rem;
}

.tcf-series-card {
    padding: 1.5rem;
    background: var(--tcf-bg-alt);
    border: 1px solid var(--tcf-border);
    border-radius: var(--tcf-radius);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 0;
    overflow: hidden;
    transition: box-shadow 0.3s var(--tcf-transition), border-color 0.3s;
}

.tcf-series-card:hover:not(.tcf-series-card--locked) {
    box-shadow: var(--tcf-shadow-lg);
    border-color: rgba(37, 99, 235, 0.25);
}

.tcf-series-card--locked {
    opacity: 0.8;
    background: var(--tcf-bg-alt);
}

.tcf-series-card__number {
    font-weight: 800;
    font-size: 1rem;
    color: var(--tcf-primary);
}

.tcf-series-card__label {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--tcf-dark);
    line-height: 1.4;
}

.tcf-series-card__level {
    font-size: 0.75rem;
    color: var(--tcf-text-light);
}

.tcf-series-card__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.625rem;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
    font-size: 0.6875rem;
    font-weight: 700;
    border-radius: 999px;
    align-self: flex-start;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.tcf-series-card__lock-msg {
    font-size: 0.8125rem;
    color: var(--tcf-text-light);
    margin: 0;
}

.tcf-series-card .tcf-btn {
    margin-top: 0.5rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    align-self: stretch;
}

/* Tableau de bord */
.tcf-dashboard {
    font-family: var(--tcf-font);
    padding: 0;
}

.tcf-dashboard__banner {
    padding: 2rem 1.75rem;
    background: var(--tcf-gradient-header);
    color: #fff;
}

.tcf-dashboard__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.tcf-dashboard__header h2 {
    margin: 0;
    font-size: clamp(1.375rem, 3vw, 1.75rem);
    font-weight: 800;
}

.tcf-dashboard__body {
    padding: 1.75rem;
}

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

.tcf-dashboard__card {
    padding: 1.5rem;
    background: var(--tcf-bg-alt);
    border: 1px solid var(--tcf-border);
    border-radius: var(--tcf-radius);
    transition: transform 0.3s var(--tcf-transition), box-shadow 0.3s var(--tcf-transition);
}

.tcf-dashboard__card:hover {
    transform: translateY(-3px);
    box-shadow: var(--tcf-shadow);
}

.tcf-dashboard__card h3 {
    margin: 0 0 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--tcf-text-light);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.tcf-dashboard__score {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 800;
    background: var(--tcf-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
    line-height: 1.1;
}

.tcf-dashboard__meta {
    font-size: 0.8125rem;
    color: var(--tcf-text-light);
    margin: 0.375rem 0 0;
}

/* Liste des mois EO */
.tcf-months-list {
    font-family: var(--tcf-font);
    padding: 1.75rem;
}

.tcf-months-list__title {
    margin: 0 0 0.375rem;
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    font-weight: 800;
    color: var(--tcf-dark);
}

.tcf-months-list__subtitle {
    margin: 0 0 1.75rem;
    color: var(--tcf-text-light);
    font-size: 0.9375rem;
}

.tcf-months-list__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
    gap: 1rem;
}

.tcf-months-card {
    padding: 1.5rem;
    background: var(--tcf-bg-alt);
    border: 1px solid var(--tcf-border);
    border-radius: var(--tcf-radius);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
    transition: transform 0.3s var(--tcf-transition), box-shadow 0.3s var(--tcf-transition);
}

.tcf-months-card:hover:not(.tcf-months-card--locked) {
    transform: translateY(-4px);
    box-shadow: var(--tcf-shadow-lg);
    border-color: rgba(6, 182, 212, 0.35);
}

.tcf-months-card--locked {
    opacity: 0.8;
}

.tcf-months-card__title {
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--tcf-primary-dark);
}

.tcf-months-card__badge {
    font-size: 0.75rem;
    font-weight: 700;
    color: #92400e;
    background: #fef3c7;
    padding: 0.25rem 0.625rem;
    border-radius: 999px;
}

.tcf-months-card .tcf-btn {
    width: 100%;
}

/* Page tarifs (classes dédiées) */
.tcf-home__pricing {
    padding: 1.75rem;
}

.tcf-pricing-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.tcf-pricing-card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.5rem;
    background: var(--tcf-bg-alt);
    border: 1px solid var(--tcf-border);
    border-radius: var(--tcf-radius-lg);
}

.tcf-pricing-card--featured {
    border-color: rgba(37, 99, 235, 0.35);
    box-shadow: 0 8px 28px rgba(37, 99, 235, 0.1);
}

.tcf-pricing-card h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--tcf-dark);
}

.tcf-pricing-card__price {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--tcf-primary);
}

.tcf-pricing-card ul {
    margin: 0;
    padding-left: 1.125rem;
    flex: 1;
    color: var(--tcf-text-light);
    font-size: 0.9375rem;
    line-height: 1.6;
}

.tcf-pricing-card .tcf-btn {
    width: 100%;
    margin-top: 0.5rem;
}

/* Responsive global modules */
@media (max-width: 960px) {
    .tcf-module-shell {
        padding: 0 0 1.5rem;
        max-width: 100%;
    }

    .tcf-module-shell--quiz {
        padding: 0;
    }

    .tcf-module-shell--quiz .tcf-module-shell__card {
        border: none;
        border-radius: 0;
        box-shadow: none;
    }

    .tcf-layout-with-nav .tcf-breadcrumb {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .tcf-module-shell__card {
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .tcf-module-shell__card--flat {
        padding: 1.25rem;
    }

    .tcf-dashboard__banner {
        padding: 1.5rem 1.25rem;
    }

    .tcf-dashboard__body {
        padding: 1.25rem;
    }

    .tcf-series-list,
    .tcf-months-list {
        padding: 1.25rem;
    }

    .tcf-pricing-grid {
        grid-template-columns: 1fr;
    }

    .tcf-home__pricing {
        padding: 1.25rem;
    }

    .tcf-btn {
        font-size: 0.875rem;
        padding: 0.5625rem 1rem;
    }
}

@media (max-width: 480px) {
    .tcf-locked-content {
        padding: 2rem 1.25rem;
        margin: 1rem auto;
    }

    .tcf-locked-content__actions {
        flex-direction: column;
    }

    .tcf-locked-content__actions .tcf-btn {
        width: 100%;
    }
}

/* Modules imbriqués dans une carte shell */
.tcf-module-shell__card > .tcf-quiz,
.tcf-module-shell__card > .tcf-simulator,
.tcf-module-shell__card > .tcf-eo-subjects {
    border: none;
    box-shadow: none;
    border-radius: 0;
    max-width: none;
    margin: 0;
}
