/**
 * CSS pour les détails des leçons d'expression orale TCF
 * Interface avec boutons Tâche 2 et Tâche 3 et dropdowns
 */

/* Variables CSS */
:root {
    --tcf-primary-blue: #2563eb;
    --tcf-primary-green: #10b981;
    --tcf-secondary-blue: #3b82f6;
    --tcf-text-primary: #1f2937;
    --tcf-text-secondary: #6b7280;
    --tcf-text-muted: #9ca3af;
    --tcf-bg-light: #f8fafc;
    --tcf-border-light: #e5e7eb;
    --tcf-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --tcf-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --tcf-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --tcf-radius-sm: 0.375rem;
    --tcf-radius-md: 0.5rem;
    --tcf-radius-lg: 0.75rem;
    --tcf-spacing-xs: 0.5rem;
    --tcf-spacing-sm: 0.75rem;
    --tcf-spacing-md: 1rem;
    --tcf-spacing-lg: 1.5rem;
    --tcf-spacing-xl: 2rem;
    --tcf-spacing-2xl: 3rem;
}

/* Container principal */
.tcf-speaking-lesson-details-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 20px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    /* background: #EEF2F7; */
    line-height: 1.6;
    color: var(--tcf-text-primary);
}

/* Bouton de retour */
.tcf-back-button-container {
    margin-bottom: 32px;
}

.tcf-back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #ffffff;
    color: var(--tcf-text-secondary);
    text-decoration: none;
    border-radius: var(--tcf-radius-md);
    box-shadow: var(--tcf-shadow-sm);
    transition: all 0.2s ease;
    font-weight: 500;
}

.tcf-back-button:hover {
    background: var(--tcf-bg-light);
    color: var(--tcf-text-primary);
    box-shadow: var(--tcf-shadow-md);
    transform: translateY(-1px);
}

.tcf-back-button i {
    width: 20px;
    height: 20px;
}

/* En-tête de la leçon */
.tcf-lesson-header {
    text-align: center;
    margin-bottom: 48px;
}

.tcf-lesson-title {
    font-family: 'Poppins', sans-serif;
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--tcf-text-primary);
    margin: 0 0 16px 0;
    line-height: 1.2;
}

.tcf-lesson-description {
    font-size: 1.125rem;
    color: var(--tcf-text-secondary);
    margin: 0;
    max-width: 600px;
    margin: 0 auto;
}

/* Nouveau header avec titre à gauche et boutons à droite */
.tcf-lesson-header-new {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    /* margin-bottom: 48px; */
    background: #ffffff;
    /* border-radius: var(--tcf-radius-lg); */
    padding: 32px;
    /* box-shadow: var(--tcf-shadow-md); */
}

.tcf-lesson-header-left {
    flex: 1;
    max-width: 60%;
}

.tcf-lesson-title-new {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0rem 0;
    color: #1a1a1a;
    text-transform: uppercase;
    font-family: 'Inter', sans-serif;
}

.tcf-lesson-subtitle {
    font-size: 1.09rem;
    color: var(--tcf-text-secondary);
    margin: 0;
    line-height: 1.5;
}

.tcf-lesson-header-new .tcf-tasks-navigation {
    margin: 0;
    flex-shrink: 0;
}
.tcf-transcript-content .section__title {
    /* display: none; */
    color: white !important;
    border: none !important;
}
.tcf-transcript-content .section__title img {
    display: none !important;
}

/* Navigation des tâches */
.tcf-tasks-navigation {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px;
    background: #f1f5f9;
    border-radius: 12px;
    margin-bottom: 48px;
    border: 1px solid #e2e8f0;
}

.tcf-task-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: transparent;
    border: 0;
    border-radius: 8px;
    color: #64748b;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: none;
}

.tcf-task-button svg {
    width: 18px;
    transition: color 0.3s ease;
}

.tcf-task-button:hover {
    color: #1e293b;
    background: rgba(0, 0, 0, 0.04);
}

.tcf-task-button.active {
    background: #ffffff;
    color: #1363DF;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08); /* Premium lift effect */
}

.tcf-task-button i {
    width: 24px;
    height: 24px;
}

/* Contenu des tâches */
.tcf-tasks-content {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #E2E8F0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    padding: 40px;
}

.tcf-task-content {
    padding: 0;
}

.tcf-task-header {
    background: #F8FAFF;
    color: #082A5E;
    padding: 20px 32px;
    text-align: center;
    border-bottom: 1px solid #E2E8F0;
}

.tcf-task-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0 0 6px 0;
    font-family: 'Poppins', sans-serif;
    color: #082A5E;
    letter-spacing: -0.01em;
}

.tcf-task-description {
    font-size: 0.9rem;
    margin: 0;
    color: #475569;
}

.tcf-task-body {
    padding: 32px;
}

/* Parties de la tâche */
.tcf-task-part {
    margin-bottom: 48px;
}

.tcf-task-part:last-child {
    margin-bottom: 0;
}

.tcf-part-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--tcf-text-primary);
    margin: 0 0 24px 0;
    padding-bottom: 6px;
    border-bottom: 2px solid #1363DF;
    display: inline-block;
}

/* Container des sujets */
.tcf-subjects-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Élément sujet individuel */
.tcf-subject-item {
    background: var(--tcf-bg-light);
    border-radius: var(--tcf-radius-md);
    overflow: hidden;
    box-shadow: var(--tcf-shadow-sm);
    transition: all 0.3s ease;
}

.tcf-subject-item:hover {
    border-color: #cbd5e1;
}

.tcf-subject-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: #ffffff;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid var(--tcf-border-light);
    align-items: flex-start !important;
}

.tcf-subject-header:hover {
    background: var(--tcf-bg-light);
}

.tcf-subject-title {
    font-size: 1.02rem;
    font-weight: 500;
    color: var(--tcf-text-primary);
    margin: 0;
    line-height: 1.5;
}

.tcf-subject-toggle svg {
    width: 28px;
    height: 28px;
    color: gray;
}

.tcf-subject-toggle {
    display: flex;
    align-items: center;
    color: var(--tcf-text-muted);
    transition: transform 0.3s ease;
}

.tcf-subject-toggle i {
    width: 20px;
    height: 20px;
}

.tcf-subject-item.expanded .tcf-subject-toggle {
    transform: rotate(180deg);
}

/* Contenu du sujet */
.tcf-subject-content {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    background: #ffffff;
}

.tcf-subject-item.expanded .tcf-subject-content {
    padding: 24px;
    max-height: unset;
}

.tcf-subject-description {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--tcf-text-primary);
    margin-bottom: 24px;
}

/* Corrections */
.tcf-subject-corrections {

    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--tcf-color-gray) var(--tcf-color-light-gray);

}

/* Style de la scrollbar pour Webkit (Chrome, Safari, Edge) */
.tcf-subject-corrections::-webkit-scrollbar {
    width: 8px;
}

.tcf-subject-corrections::-webkit-scrollbar-track {
    background: var(--tcf-color-light-gray);
    border-radius: 4px;
}

.tcf-subject-corrections::-webkit-scrollbar-thumb {
    background: var(--tcf-color-gray);
    border-radius: 4px;
}

.tcf-subject-corrections::-webkit-scrollbar-thumb:hover {
    background: var(--tcf-color-dark-gray);
}

.tcf-corrections-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--tcf-text-primary);
    margin: 0 0 16px 0;
}

.tgmobile__menu .navigation li>a {
    text-transform: uppercase;
    font-size: 15px;
}

/* Corrections tâche 2 (lignes numérotées) */
.tcf-corrections-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
    /* background: var(--tcf-bg-light); */
    padding: 15px 10px;
    border-radius: 8px;
}

.tcf-correction-line {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 0px 16px;
    background: var(--tcf-bg-light);
}

.tcf-correction-number {
    font-weight: 600;
    color: var(--tcf-primary-blue);
    min-width: 24px;
}

.tcf-correction-text {
    color: var(--tcf-text-primary);
    line-height: 1.6;
    font-weight: 500;
    font-size: 1rem;
    font-family: "Poppins", sans-serif !important;
}

/* Message d'avertissement quand pas de corrections */
.tcf-no-corrections-warning {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    background: #fef3c7;
    /* border: 1px solid #f59e0b; */
    border-radius: var(--tcf-radius-md);
    color: #92400e;
    justify-content: center;
}

.tcf-warning-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.tcf-no-corrections-warning p {
    margin: 0;
    font-weight: 500;
}

/* Corrections tâche 3 (favorable/défavorable avec arguments) */
.tcf-corrections-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Le conteneur principal de la section (englobe arguments, audio, etc.) */
.tcf-correction-section {
    padding: 24px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

/* Le titre de la section (ex: "Point de vue favorable")
   Affiché comme un badge élégant */
.tcf-correction-section-title {
    display: inline-block;
    font-size: 0.85rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin: 0 0 20px 0;
    padding: 6px 14px;
    border-radius: 8px;
    color: #15803d;
    background: #dcfce7;
    border: 1px solid #bbf7d0;
}

/* Version défavorable (si utilisée plus tard) */
.tcf-correction-section.tcf-defavorable .tcf-correction-section-title {
    color: #b45309;
    background: #fef3c7;
    border: 1px solid #fde68a;
}

/* Liste englobant les différents arguments */
.tcf-arguments-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

/* Chaque argument individuel devient une sous-carte claire */
.tcf-argument {
    padding: 18px 20px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    border-left: 4px solid var(--tcf-primary-green);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tcf-argument:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.tcf-correction-section.tcf-defavorable .tcf-argument {
    border-left-color: #f59e0b;
}

/* Le texte fort de l'argument (le point principal) */
.tcf-argument-text {
    font-weight: 600;
    color: #0f172a;
    line-height: 1.5;
    font-size: 1.05rem;
    font-family: 'Poppins', sans-serif;
    margin-bottom: 4px;
}

/* L'explication et développement de l'argument */
.tcf-argument-explication {
    color: #475569;
    font-style: normal;
    margin: 0;
    font-size: 0.98rem;
    line-height: 1.6;
}

/* Section audio */
.tcf-audio-section {
    margin-top: 20px;
    padding: 2px 8px;
    background: #1363DF;
    border-radius: 8px;
    border: none;
    display: flex;
}



.tcf-audio-section {
    display: flex;
    flex-direction: column;
    /* Pour que l'audio et les contrôles soient empilés si besoin */
    align-items: center;
    width: 100%;
}

.custom-audio-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    /* background-color: #004d99; */
    border-radius: 10px;
    padding: 10px 20px;
    width: 100%;
    box-sizing: border-box;
}

/* Boutons Lecture/Pause */
.custom-audio-controls .play-btn {
    background: none;
    border: none;
    cursor: pointer;
    width: 15px;
    /* Taille du bouton */
    height: 15px;
    /* Utilisation d'un triangle CSS pour le bouton lecture */
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-left: 15px solid white;
    /* Couleur blanche pour l'icône de lecture */
    padding: 0;
    margin-right: 5px;
}

/* Bouton Pause (sera appliqué via JS) */
.custom-audio-controls .play-btn.pause-btn {
    width: 15px;
    /* Taille légèrement différente pour l'icône pause */
    height: 15px;
    border-left: 6px solid white;
    border-right: 6px solid white;
    border-top: none;
    border-bottom: none;
}

/* Affichage du temps */
.custom-audio-controls .time {
    color: white;
    /* Couleur du texte */
    font-family: sans-serif;
    font-size: 0.9em;
    min-width: 40px;
    /* Pour éviter que le texte ne saute */
    text-align: center;
}

/* Barre de progression */
.custom-audio-controls .progress-bar {
    flex-grow: 1;
    /* Prend l'espace disponible */
    -webkit-appearance: none;
    /* Supprime l'apparence par défaut de WebKit */
    appearance: none;
    height: 8px;
    /* Hauteur de la barre */
    background: #6699cc;
    /* Couleur de fond de la barre (non remplie) */
    border-radius: 4px;
    outline: none;
    cursor: pointer;
}

/* Style du "pouce" (le point de contrôle) de la barre de progression */
.custom-audio-controls .progress-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    /* Taille du pouce */
    height: 14px;
    background: white;
    /* Couleur du pouce */
    border-radius: 50%;
    /* Rond */
    cursor: pointer;
    margin-top: -3px;
    /* Centrer le pouce verticalement */
}

.custom-audio-controls .progress-bar::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
}

/* Bouton Mute/Unmute (Icône de volume) */
.custom-audio-controls .volume-btn {
    background: none;
    border: none;
    cursor: pointer;
    width: 15px;
    height: 15px;
    position: relative;
    margin-left: 5px;
}

.custom-audio-controls .volume-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 8px solid white;
    /* Forme de l'icône de volume */
}

.custom-audio-controls .volume-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: calc(50% + 4px);
    /* Positionner la "vague" */
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-radius: 50%;
    border: 2px solid white;
    /* Vagues du volume */
    border-left: none;
    border-right: none;
    opacity: 1;
    transition: opacity 0.2s ease-in-out;
}

/* Icône de volume coupé */
.custom-audio-controls .volume-btn.muted::after {
    opacity: 0;
    /* Masquer les vagues */
}

.custom-audio-controls .volume-btn.muted::before {
    /* Ajouter une barre diagonale pour le muet */
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    width: 2px;
    height: 20px;
    background: white;
    border-radius: 2px;
}


/* Barre de volume */
.custom-audio-controls .volume-bar {
    width: 60px;
    /* Largeur de la barre de volume */
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    background: #6699cc;
    border-radius: 4px;
    outline: none;
    cursor: pointer;
    margin-left: 5px;
}

.custom-audio-controls .volume-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    margin-top: -4px;
}

.custom-audio-controls .volume-bar::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
}


.tcf-audio-section audio {
    width: 100%;
    border-radius: var(--tcf-radius-sm);
}

/* Amélioration du style du lecteur audio */
.tcf-audio-section audio::-webkit-media-controls-panel {
    background-color: white;
}

.tcf-audio-section audio::-webkit-media-controls-play-button {
    background-color: var(--tcf-primary-blue);
    color: white;
    /* background: linear-gradient(135deg, #1363DF 0%, #1e40af 100%); */
    border-radius: 50%;
}

/* Forcer la couleur blanche de l'icône play */
.tcf-audio-section audio::-webkit-media-controls-play-button {
    filter: brightness(0) invert(1) !important;
}

/* Alternative avec des filtres plus spécifiques */
.tcf-audio-section audio::-webkit-media-controls-play-button svg {
    filter: brightness(0) invert(1) !important;
}

.tcf-audio-section audio::-webkit-media-controls-play-button::before {
    filter: brightness(0) invert(1) !important;
}

.tcf-audio-section audio::-webkit-media-controls-play-button:hover {
    background-color: #1363DF;
}

/* Masquer les 3 points (menu contextuel) */
.tcf-audio-section audio::-webkit-media-controls-more-button {
    display: none !important;
}

/* Masquer le bouton de téléchargement */
.tcf-audio-section audio::-webkit-media-controls-download-button {
    display: none !important;
}

/* Masquer le bouton de plein écran */
.tcf-audio-section audio::-webkit-media-controls-fullscreen-button {
    display: none !important;
}

/* Conteneur de la transcription */
.tcf-transcript-container {
    width: 100%;
    /* margin-top: 24px; */
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

/* Bouton toggle (Header de la transcription) */
.tcf-transcript-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 16px 24px;
    background: #F8FAFC; /* Fond distinct pour le bouton */
    text-decoration: none;
    transition: all 0.25s ease;
    cursor: pointer;
    box-sizing: border-box;
    /* Bordure colorée pour mettre en valeur la bascule */
    border: 1px solid rgba(19, 99, 223, 0.4); 
    border-radius: 10px; /* Pour arrondir individuellement si le parent déborde */
}

.tcf-transcript-toggle:hover {
    background: #F1F5F9;
}

.tcf-transcript-toggle-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* L'icône document */
.tcf-transcript-icon {
    width: 20px;
    height: 20px;
    color: #1363DF;
    flex-shrink: 0;
}

.tcf-transcript-label {
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: #1E293B;
    transition: color 0.2s ease;
    margin: 0;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
}

.tcf-transcript-toggle:hover .tcf-transcript-label {
    color: #1363DF;
}

.tcf-transcript-chevron {
    width: 20px;
    height: 20px;
    color: #64748B;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.tcf-transcript-toggle:hover .tcf-transcript-chevron {
    color: #1363DF;
}

.tcf-transcript-container.open .tcf-transcript-chevron {
    transform: rotate(180deg);
}

.tcf-transcript-container.open .tcf-transcript-toggle {
    border-bottom-color: #E2E8F0;
    background: #ffffff;
}

/* Contenu de la transcription - Zone de lecture */
.tcf-transcript-content, .tcf-transcript-content  p {
    padding: 32px 40px;
    background: #ffffff;
    font-family: 'Poppins', sans-serif;
    color: #1E293B; /* Gris ultra profond pour un meilleur contraste */
    font-size: 1.05rem; /* Lecture ultra confortable */
    -webkit-font-smoothing: antialiased; /* Rendu des polices plus net sur Mac/Windows */
    -moz-osx-font-smoothing: grayscale;
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.9;
}

.tcf-transcript-content  p {
    padding: 0;
}

.tcf-transcript-content > * {
    max-width: none;
}

.tcf-transcript-content > *:first-child {
    margin-top: 0;
}

.tcf-transcript-content > *:last-child {
    margin-bottom: 0;
}

/* Amélioration des paragraphes internes */
.tcf-transcript-content p {
    /* margin: 0 0 24px 0; */
    line-height: 1.85; /* Ligne fluide sans être trop espacée */
    color: #334155;
    letter-spacing: -0.01em; /* Raffine légèrement le texte (rendu 'Apple') */
    font-weight: 400;
}

/* Amélioration des sous-titres (ex: INTRODUCTION, CORPS DU DEVOIR) 
   Même s'ils n'ont pas de classe spécifique, on style les éléments en gras au début */
.tcf-transcript-content strong,
.tcf-transcript-content b {
    color: #0F172A;
    font-weight: 700;
}

/* ----- REDESIGN DES TITRES EN "BADGES" (INTRODUCTION, CORPS DU DEVOIR) ----- */
/* 1. On cache l'horrible ligne grise pleine largeur (<hr>) */
.tcf-transcript-content hr {
    display: none !important;
}

/* 2. On cible les paragraphes qui contiennent les icônes FontAwesome (ex: ✓) ou des SVGs
      (ce qui correspond aux titres de sections) pour les transformer en jolis badges grisés */
.tcf-transcript-content p:has(i[class*="fa-"]),
.tcf-transcript-content p:has(svg),
.tcf-transcript-content h1, .tcf-transcript-content h2,
.tcf-transcript-content h3, .tcf-transcript-content h4,
.tcf-transcript-content h5, .tcf-transcript-content h6 {
    display: inline-flex;
    align-items: center;
    background: #F8FAFC !important;      /* Fond très doux */
    border: 1px solid #E2E8F0 !important;
    border-radius: 8px !important;
    padding: 8px 16px !important;
    margin-top: 24px !important;
    margin-bottom: 20px !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02) !important;
}

/* 3. On écrase TRES agressivement les couleurs grises souvent générées en "inline-style" par l'éditeur */
.tcf-transcript-content p:has(i[class*="fa-"]) span,
.tcf-transcript-content p:has(i[class*="fa-"]) strong,
.tcf-transcript-content p:has(i[class*="fa-"]) b,
.tcf-transcript-content h3 span,
.tcf-transcript-content h4 span {
    color: #0F172A !important;           /* Police très foncée et premium */
    font-size: 0.85rem !important;       /* Taille harmonieuse */
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
}

/* 4. On sublime l'icône de validation (✓) pour qu'elle respire dans son badge */
.tcf-transcript-content p:has(i[class*="fa-"]) i,
.tcf-transcript-content p:has(svg) svg,
.tcf-transcript-content h3 i {
    color: #10B981 !important;           /* Vert pétant magnifique */
    margin-right: 12px !important;
    font-size: 1.1rem !important;
}
/* ----- FIN DU REDESIGN DES TITRES ----- */

/* ----- BOUTON TTS (Text-to-Speech) PREMIUM ----- */
.tcf-tts-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    margin: 12px 0 4px 40px;
    border: none;
    background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
    color: #1D4ED8;
    border-radius: 100px;
    cursor: pointer;
    font-size: 13.5px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-weight: 600;
    line-height: 1;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.05), inset 0 0 0 1px rgba(59, 130, 246, 0.2);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-font-smoothing: antialiased;
}

.tcf-tts-btn:hover {
    background: linear-gradient(135deg, #DBEAFE 0%, #BFDBFE 100%);
    color: #1E40AF;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.1), inset 0 0 0 1px rgba(59, 130, 246, 0.3);
}

.tcf-tts-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.05), inset 0 0 0 1px rgba(59, 130, 246, 0.4);
}

.tcf-tts-btn.is-playing {
    background: linear-gradient(135deg, #FEF2F2 0%, #FEE2E2 100%);
    color: #B91C1C;
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.05), inset 0 0 0 1px rgba(239, 68, 68, 0.2);
    animation: tcf-tts-pulse 2s infinite;
}

.tcf-tts-btn.is-playing:hover {
    background: linear-gradient(135deg, #FEE2E2 0%, #FECACA 100%);
    color: #991B1B;
}

@keyframes tcf-tts-pulse {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4), inset 0 0 0 1px rgba(239, 68, 68, 0.2); }
    70% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0), inset 0 0 0 1px rgba(239, 68, 68, 0.2); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0), inset 0 0 0 1px rgba(239, 68, 68, 0.2); }
}

.tcf-tts-btn svg {
    flex-shrink: 0;
}

/* ----- TOOLTIP ONBOARDING TTS ----- */
.tcf-tts-tooltip {
    position: absolute;
    left: 0;
    top: calc(100% + 12px);
    z-index: 100;
    background: #0F172A;
    color: #F8FAFC;
    border-radius: 12px;
    padding: 14px 18px;
    width: 280px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 13px;
    line-height: 1.55;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2), 0 2px 8px rgba(0,0,0,0.1);
    animation: tcfTooltipFadeIn 0.4s ease-out;
    pointer-events: auto;
}

/* Flèche du tooltip pointant vers le haut (vers le bouton) */
.tcf-tts-tooltip::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 24px;
    border: 7px solid transparent;
    border-bottom-color: #0F172A;
}

.tcf-tts-tooltip-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.tcf-tts-tooltip-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #3B82F6;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 3px 8px;
    border-radius: 4px;
    animation: tcfBadgePulse 2s ease-in-out infinite;
}

.tcf-tts-tooltip-title {
    font-weight: 700;
    font-size: 14px;
    color: #fff;
}

.tcf-tts-tooltip-body {
    color: #CBD5E1;
    margin-bottom: 10px;
}

.tcf-tts-warning-inline {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background: rgba(251, 191, 36, 0.12);
    border: 1px solid rgba(251, 191, 36, 0.25);
    border-radius: 8px;
    padding: 10px 14px;
    margin: 8px 40px 16px; /* indenté pour s'aligner avec les autres éléments */
    font-size: 13px;
    line-height: 1.5;
    color: #b48600;
}

.tcf-tts-warning-inline svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: #f59e0b;
}

.tcf-tts-warning-inline strong {
    color: #b48600;
    font-weight: 600;
}

/* Ajout d'une marge haut pour la transcription puisque le titre a été retiré du DOM */
.tcf-transcript-content {
    padding-top: 10px;
}

.tcf-tts-tooltip-dismiss {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: #94A3B8;
    font-size: 12px;
    font-family: inherit;
    padding: 4px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tcf-tts-tooltip-dismiss:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border-color: rgba(255,255,255,0.3);
}

@keyframes tcfTooltipFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes tcfBadgePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(59,130,246,0.5); }
    50%      { box-shadow: 0 0 0 6px rgba(59,130,246,0); }
}

/* Wrapper pour positionner le tooltip relativement au bouton */
.tcf-tts-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}
/* ----- FIN BOUTON TTS ----- */

.tcf-transcript-content a {
    color: #1363DF;
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.tcf-transcript-content a:hover {
    color: #0d4bb8;
    text-decoration-thickness: 2px;
}

.tcf-transcript-content p:last-child {
    margin-bottom: 0;
}

.tcf-transcript-content strong {
    color: #0F172A;
    font-weight: 600;
}

.tcf-transcript-content ul,
.tcf-transcript-content ol {
    margin: 0 0 12px 0;
    padding-left: 1.25rem;
}

.tcf-transcript-content li {
    margin: 6px 0;
}

.tcf-transcript-content blockquote {
    margin: 14px 0;
    padding: 12px 14px;
    border-left: 3px solid #1363DF;
    background: #EEF2FF;
    border-radius: 10px;
    color: #1f2937;
}

.tcf-transcript-content h1,
.tcf-transcript-content h2,
.tcf-transcript-content h3 {
    font-family: 'Poppins', sans-serif;
    color: #082A5E;
    letter-spacing: -0.01em;
    margin: 18px 0 10px;
    line-height: 1.25;
}

.tcf-transcript-content h1 { font-size: 1.1rem; font-weight: 700; }
.tcf-transcript-content h2 { font-size: 1.05rem; font-weight: 700; }
.tcf-transcript-content h3 { font-size: 1rem; font-weight: 600; }

.tcf-transcript-content hr {
    border: none;
    border-top: 1px solid #E2E8F0;
    margin: 16px 0;
}

.tcf-transcript-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
    font-size: 0.92rem;
}

.tcf-transcript-content th,
.tcf-transcript-content td {
    border: 1px solid #E2E8F0;
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
}

.tcf-transcript-content th {
    background: #F8F9FA;
    font-weight: 600;
    color: #0F172A;
}

.tcf-transcript-content pre {
    background: #0b1220;
    color: #e5e7eb;
    padding: 12px 14px;
    border-radius: 10px;
    overflow: auto;
    font-size: 0.85rem;
    line-height: 1.6;
}

.tcf-transcript-content code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.88em;
}

.tcf-transcript-content :not(pre) > code {
    background: #F1F5F9;
    border: 1px solid #E2E8F0;
    padding: 2px 6px;
    border-radius: 6px;
    color: #0F172A;
}

.tcf-transcript-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    border: 1px solid #E2E8F0;
}

.tcf-transcript-content .section__title {
    max-width: none;
    font-size: 0 !important; /* Masque le texte d'origine */
    color: transparent !important;
    line-height: 0;
    height: 10px;
    margin: 0;
    padding: 0;
    display: block;
    user-select: none;
}

/* On s'assure que le ::after n'affiche rien non plus mais qu'on pourrait le customiser plus tard */
.tcf-transcript-content .section__title::after {
    content: "" !important;
    display: block;
    font-size: 14px; /* Permet d'injecter du texte visible plus tard si on met un vrai content */
}

.tcf-transcript-content p.exemple::after {
    content: "Exemple";
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #94A3B8;
    padding-bottom: 8px;
    border-bottom: 1px solid #E2E8F0
}

@media (max-width: 768px) {
    .tcf-transcript-toggle {
        padding: 12px 14px;
    }

    .tcf-transcript-content {
        padding: 16px 14px;
        font-size: 0.95rem;
    }

    /* Rendre le tooltip responsif pour ne pas déborder à droite */
    .tcf-tts-tooltip {
        width: calc(100vw - 40px);
        max-width: 280px;
        left: 0;
    }

    .tcf-tts-tooltip::after {
        left: 24px; /* Ajuster la flèche pour qu'elle pointe correctement vers le bouton */
    }

    .tcf-tts-warning-inline {
        margin: 8px 10px 16px;
    }
}

.tcf-transcript-content .section__title {
    font-family: 'Poppins', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #94A3B8;
    /* margin: 20px 0 10px; */
    padding-bottom: 8px;
    border-bottom: 1px solid #E2E8F0;
}

/* .tcf-transcript-content .section__title:first-child {
    margin-top: 0;
} */

/* Responsive */
@media (max-width: 768px) {
    .tcf-speaking-lesson-details-container {
        padding: 0;

    }

    .tcf-correction-text {
        margin-bottom: 8px;
    }

    .tcf-correction-section {
        padding: 0px;
    }

    .custom-audio-controls .volume-bar {
        width: 40px;
    }

    .tcf-corrections-container {
        gap: 50px;
    }

    .tcf-argument-explication {
        margin-bottom: 15px;
    }

    .tcf-tasks-content,
    .tcf-subject-header,
    .tcf-subject-content {
        padding: 0;
    }

    .tcf-lesson-title {
        font-size: 2rem;
    }

    /* Responsive pour le nouveau header */
    .tcf-lesson-header-new {
        flex-direction: column;
        align-items: stretch;
        padding: 24px 20px;
        gap: 24px;
    }

    .tcf-lesson-header-left {
        max-width: 100%;
        text-align: center;
    }

    .tcf-lesson-title-new {
        font-size: 1.5rem;
    }

    .tcf-task-button {
        padding: 10px 16px;
    }

    .tcf-correction-line {
        gap: 0;
    }

    .tcf-lesson-header-new .tcf-tasks-navigation {
        flex-direction: column;
        align-items: center;
    }

    .tcf-tasks-navigation {
        flex-direction: column;
        align-items: center;
        width: 100% !important;
    }

    .tcf-task-button {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }

    .tcf-task-header {
        padding: 24px 10px;
    }

    .tcf-task-body {
        padding: 20px;

    }

    .tcf-argument {
        padding: 0;
    }

    .tcf-subject-header {
        padding: 16px !important;
    }

    .tcf-subject-item.expanded .tcf-subject-content {
        padding: 20px 0 !important;
    }
}

/* Animation pour les dropdowns */
@keyframes slideDown {
    from {
        max-height: 0;
        opacity: 0;
    }

    to {
        max-height: 1000px;
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        max-height: 1000px;
        opacity: 1;
    }

    to {
        max-height: 0;
        opacity: 0;
    }
}

.tcf-subject-content {
    animation: slideUp 0.3s ease;
}

.tcf-subject-item.expanded .tcf-subject-content {
    animation: slideDown 0.3s ease;
}

/* --- Hard override: ensure volume button shows ONLY the SVG, no pseudo-elements --- */
.custom-audio-controls button.volume-btn {
    background: none !important;
    border: 0 !important;
    padding: 0 !important;
    width: 18px !important;
    height: 18px !important;
    position: relative;
}

.custom-audio-controls button.volume-btn::before,
.custom-audio-controls button.volume-btn::after {
    content: none !important;
    display: none !important;
    border: 0 !important;
    width: 0 !important;
    height: 0 !important;
}

.custom-audio-controls button.volume-btn .icon-volume {
    width: 20px;
    height: 20px;
    display: block;
    fill: currentColor;
}

.custom-audio-controls button.volume-btn.muted .icon-volume path:nth-of-type(2) {
    opacity: 0;
}