/* Thème edl : page du cours et leçons (maquette validée par Fred, leçon v2 du 24/10/2026).
   Tout ce qui habille LearnDash est ici, pour pouvoir s'en passer un jour. */

/* ---------- Page du cours ---------- */
.edl-cours__tete { background: #fff; border-bottom: 1px solid var(--edl-trait); }
.edl-cours__tete-rangee { display: flex; gap: 64px; align-items: flex-start; padding: 56px 0 48px; }
.edl-cours__presentation { flex: 1; min-width: 0; }
.edl-fond .edl-cours__titre { margin: 8px 0 20px; font-size: 44px; line-height: 1.1; font-weight: 700; letter-spacing: -.025em; }
.edl-cours__intro p { max-width: 640px; margin: 0 0 12px; font-size: 17px; line-height: 1.65; color: var(--edl-texte); }
.edl-progression { width: 380px; flex-shrink: 0; padding: 28px; box-shadow: var(--edl-ombre-haute); border: 1px solid var(--edl-trait-doux); border-radius: 14px; }
.edl-progression p { margin: 0; }
.edl-progression__label { font-size: 14px; font-weight: 600; color: var(--edl-discret); }
.edl-progression__chiffre { display: flex; align-items: baseline; gap: 10px; margin: 6px 0 14px !important; color: var(--edl-texte); font-size: 15px; }
.edl-progression__chiffre strong { font-size: 44px; line-height: 1; font-weight: 700; letter-spacing: -.02em; color: var(--edl-marine); }
.edl-progression__date { margin-top: 10px !important; font-size: 13px; color: var(--edl-discret); }
.edl-progression .edl-bouton { width: 100%; margin-top: 22px; }
.edl-progression__suite { margin-top: 10px !important; font-size: 13px; color: var(--edl-discret); text-align: center; }

.edl-cours__corps { display: flex; gap: 40px; align-items: flex-start; padding: 40px 0 64px; }
.edl-cours__parcours { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.edl-fond .edl-cours__h2 { margin: 8px 0 4px; font-size: 26px; line-height: 1.25; font-weight: 700; }
.edl-cours__sous-titre { margin: 0; color: var(--edl-texte); }
.edl-cours__cote { width: 320px; flex-shrink: 0; display: flex; flex-direction: column; gap: 20px; margin-top: 4px; }
.edl-cours__cote .edl-carte p { margin: 0 0 16px; font-size: 15px; color: var(--edl-texte); }
.edl-cours__cote .edl-bouton { width: 100%; }
.edl-cours__cote h2 { margin-top: 12px; }

.edl-temps { padding: 0; overflow: hidden; }
.edl-temps__tete { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 16px 24px; border-bottom: 1px solid var(--edl-trait-doux); }
.edl-temps__numero { width: 32px; height: 32px; border-radius: 50%; background: var(--edl-bleu-pale); color: var(--edl-bleu); font-weight: 700; font-size: 15px; display: flex; align-items: center; justify-content: center; }
.edl-fond .edl-temps__tete h3 { margin: 0; flex: 1; font-size: 17px; font-weight: 600; }
.edl-temps__date { order: 3; flex-basis: 100%; padding-left: 46px; font-size: 14px; color: var(--edl-discret); }
.edl-temps__compte { font-size: 14px; color: var(--edl-discret); }
.edl-etapes { list-style: none; margin: 0; padding: 0; }
.edl-etape { display: flex; align-items: center; gap: 14px; padding: 13px 24px; border-bottom: 1px solid #f2f5f8; }
.edl-etape:last-child { border-bottom: 0; }
.edl-etat { flex-shrink: 0; }
.edl-etape__titre { flex: 1; font-size: 15px; color: var(--edl-encre); }
.edl-fond a.edl-etape__titre { color: var(--edl-encre); text-decoration: none; }
.edl-fond a.edl-etape__titre:hover { color: var(--edl-bleu); text-decoration: underline; }
.edl-etape--encours { background: #f7fbfe; }
.edl-etape--encours .edl-etape__titre { font-weight: 600; color: var(--edl-marine); }
.edl-etape--verrou .edl-etape__titre { color: #6b7682; }
.edl-etape__etat { width: 160px; text-align: right; font-size: 14px; color: #4f5b67; }
.edl-etape--fait .edl-etape__etat { color: var(--edl-vert); }
.edl-etape--encours .edl-etape__etat { color: var(--edl-bleu); }
.edl-etape--verrou .edl-etape__etat { color: #6b7682; }

/* Tablette en paysage : la colonne Bibliothèque / Aide passe sous le parcours */
@media (max-width: 1180px) {
	.edl-cours__corps { flex-direction: column; }
	.edl-cours__cote { width: 100%; flex-direction: row; }
	.edl-cours__cote > .edl-carte { flex: 1; }
}
@media (max-width: 980px) {
	.edl-cours__tete-rangee, .edl-cours__corps { flex-direction: column; gap: 32px; }
	.edl-progression, .edl-cours__cote { width: 100%; }
	.edl-fond .edl-cours__titre { font-size: 34px; }
}
@media (max-width: 640px) {
	.edl-etape { flex-wrap: wrap; padding: 12px 16px; }
	.edl-etape__titre { flex-basis: calc(100% - 34px); }
	.edl-etape .edl-pastille { margin-left: 34px; }
	.edl-etape__etat { width: auto; margin-left: auto; }
}

/* ---------- Leçon ---------- */
.edl-lecon { background: var(--edl-fond); color: var(--edl-encre); font: 400 16px/1.55 var(--edl-police); padding-bottom: 48px; }
.edl-lecon-barre__rangee { display: flex; align-items: center; gap: 20px; width: 80%; max-width: 1080px; margin: 0 auto; padding: 16px 0; }
.edl-sommaire-bouton { flex-shrink: 0; gap: 10px; padding: 0 16px 0 12px; }
.edl-sommaire-bouton__compte { font-size: 13px; font-weight: 500; color: var(--edl-texte); background: var(--edl-bleu-pale); border-radius: 999px; padding: 2px 9px; }
.edl-lecon-titre { margin: 0; font: 700 22px/1.3 var(--edl-police); color: var(--edl-marine); letter-spacing: -.01em; }
.edl-lecon-titre__module { color: var(--edl-bleu); font-weight: 600; }

/* Sommaire par-dessus le module */
html.edl-sommaire-ouvert { overflow: hidden; }
.edl-sommaire { position: fixed; inset: 0; z-index: 1000; }
.edl-sommaire[hidden] { display: none; }
.edl-sommaire__voile { position: absolute; inset: 0; border: 0; padding: 0; background: rgba(15, 30, 45, .28); cursor: pointer; }
.edl-sommaire__panneau { position: absolute; top: 0; bottom: 0; left: 0; width: min(360px, 92vw); overflow: auto; background: #fff; box-shadow: 0 15px 25px rgba(16, 32, 48, .12), 0 5px 10px rgba(16, 32, 48, .06); font-family: var(--edl-police); animation: edl-glisse .18s ease-out; }
@keyframes edl-glisse { from { transform: translateX(-24px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .edl-sommaire__panneau { animation: none; } }
.edl-sommaire__tete { display: flex; align-items: flex-start; gap: 12px; padding: 20px 20px 16px; border-bottom: 1px solid var(--edl-trait-doux); }
.edl-sommaire__tete > div { flex: 1; }
.edl-sommaire a.edl-sommaire__cours { display: block; margin-bottom: 10px; font-size: 15px; font-weight: 600; line-height: 1.35; color: var(--edl-marine); text-decoration: none; }
.edl-sommaire__compte { margin: 6px 0 0; font-size: 13px; color: var(--edl-discret); }
.edl-sommaire__fermer { width: 44px; height: 44px; margin: -8px -8px 0 0; border: 0; border-radius: 8px; background: transparent; color: var(--edl-texte); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.edl-sommaire__fermer:hover { background: var(--edl-fond); }
.edl-sommaire__temps { padding: 8px 0; border-bottom: 1px solid var(--edl-trait-doux); }
.edl-sommaire__groupe { display: flex; align-items: center; gap: 10px; margin: 0; padding: 8px 20px 4px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #4f5b67; }
.edl-sommaire__groupe span { width: 22px; height: 22px; border-radius: 50%; background: #f0f3f6; color: var(--edl-texte); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.edl-sommaire ul { list-style: none; margin: 0; padding: 0; }
.edl-sommaire__etape { display: flex; gap: 10px; align-items: center; padding: 7px 20px 7px 52px; font-size: 14px; color: var(--edl-texte); }
.edl-sommaire__etape svg { width: 18px; height: 18px; flex-shrink: 0; }
.edl-sommaire__etape a { color: inherit; text-decoration: none; }
.edl-sommaire__etape a:hover { color: var(--edl-bleu); text-decoration: underline; }
.edl-sommaire__etape--verrou { color: #7a8693; }
.edl-sommaire__etape.est-courant { background: var(--edl-bleu-pale); color: var(--edl-marine); font-weight: 600; }
.edl-sommaire__presentiel { display: flex; gap: 12px; align-items: flex-start; margin: 8px 16px; padding: 14px 16px; border-radius: 10px; background: var(--edl-bleu-pale); }
.edl-sommaire__presentiel.est-courant { box-shadow: inset 0 0 0 2px var(--edl-bleu); }
.edl-sommaire__presentiel svg { flex-shrink: 0; margin-top: 1px; }
.edl-sommaire__presentiel p { margin: 2px 0 0; }
.edl-sommaire__surtitre { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--edl-bleu); }
.edl-sommaire__presentiel a { display: block; margin-top: 2px; font-size: 14px; font-weight: 600; color: var(--edl-marine); text-decoration: none; }
.edl-sommaire__date { font-size: 13px; color: #4f5b67; }

/* Contenu de la leçon, rendu par LearnDash, recentré sur le module */
.edl-lecon__contenu { width: 80%; max-width: 1080px; margin: 0 auto; color: var(--edl-texte); font-size: 17px; line-height: 1.65; }
.edl-lecon__contenu a { color: var(--edl-bleu); }
.edl-lecon .learndash-wrapper { font-family: var(--edl-police); }
.edl-lecon .learndash-wrapper .ld-breadcrumbs, .edl-lecon .ld-lesson-status, .edl-lecon .learndash-wrapper .ld-course-step-back { display: none !important; }
.edl-lecon .ld-tabs-content p, .edl-lecon .ld-tab-content p { margin: 0 0 1em; }
.edl-lecon .learndash-wrapper, .edl-lecon .learndash-wrapper .ld-tabs { background: transparent; margin: 0; }
.edl-lecon .ld-tab-content > :not(:has(iframe)):not(.edl-encart) { max-width: 760px; }
.edl-lecon .ld-tab-content img { border-radius: 10px; }
/* Le module Storyline : centré, à la largeur disponible (1024 px au plus), au format 4/3 */
.edl-lecon iframe[src*="/story.html"] { display: block; width: 100% !important; max-width: 1024px; height: auto !important; aspect-ratio: 4 / 3; margin: 0 auto; border: 0; border-radius: 12px; background: var(--edl-marine); box-shadow: var(--edl-ombre-haute); }
.edl-questionnaire iframe, .edl-lecon iframe[src*="surveymonkey"] { display: block; width: 100% !important; max-width: 1024px; height: 760px !important; margin: 0 auto; border: 1px solid var(--edl-trait); border-radius: 12px; background: #fff; }

/* Encart « Terminer le module » (edl-learndash-tweaks) : sous le module, plus au-dessus (leçon v2) */
.edl-lecon .learndash-wrapper .ld-tabs .ld-tabs-content .ld-tab-content.ld-visible { display: flex; flex-direction: column; }
.edl-lecon .ld-tab-content > .edl-encart { order: 1; width: 100%; max-width: 1024px; margin: 16px auto 0; border-radius: 10px; font-size: 15px; }
.edl-lecon .ld-tab-content > .edl-encart strong.edl-encart-titre { font-size: 15px; }

/* Encarts et boutons de LearnDash au style du site (repris du CSS de Divi #796 : textes blancs) */
.edl-lecon .learndash-wrapper .ld-alert { border-radius: 10px; }
.edl-lecon .learndash-wrapper .ld-alert-success { color: var(--edl-encre) !important; border-color: var(--edl-vert); background-color: #e8f4ec; }
.edl-lecon .learndash-wrapper .ld-content-actions .ld-content-action { flex: 0 0 auto; width: auto; }
.edl-lecon .learndash-wrapper .ld-content-actions .ld-content-action .ld-button { width: auto; white-space: nowrap; max-width: none; }
.edl-lecon .learndash-wrapper .ld-content-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; max-width: 1024px; margin: 24px auto 0; padding: 0; border: 0; }
body .edl-lecon .learndash-wrapper .ld-button:not(.ld-button-reverse):not(.ld-button-transparent):not(.ld--ignore-inline-css),
body .edl-lecon .learndash-wrapper .learndash_mark_complete_button, body .edl-lecon .learndash-wrapper #learndash_mark_complete_button {
	min-height: 44px; padding: 0 18px; border-radius: 8px !important; background-color: var(--edl-bleu) !important; color: #fff !important;
	font: 600 15px/1 var(--edl-police) !important; text-transform: none; box-shadow: none; display: inline-flex; align-items: center; gap: 8px;
}
body .edl-lecon .learndash-wrapper .learndash_mark_complete_button, body .edl-lecon .learndash-wrapper #learndash_mark_complete_button { width: auto !important; min-width: max-content; max-width: none !important; white-space: nowrap !important; padding-right: 18px !important; }
body .edl-lecon .learndash-wrapper .ld-content-action:has(.learndash_mark_complete_button) form { width: auto !important; }
body .edl-lecon .learndash-wrapper .ld-button:not(.ld-button-reverse):not(.ld-button-transparent):not(.ld--ignore-inline-css):hover,
body .edl-lecon .learndash-wrapper .learndash_mark_complete_button:hover { background-color: var(--edl-bleu-fonce) !important; }
body .edl-lecon .learndash-wrapper .ld-content-action .ld-button.ld-button-transparent, .edl-lecon .ld-content-action a.ld-button { color: var(--edl-encre); }
/* Précédente / Suivante : texte blanc sur bleu (Fred, 24/10/2026) */
.edl-lecon .learndash-wrapper .ld-content-action .ld-button .ld-text, .edl-lecon .learndash-wrapper .ld-content-action .ld-button .ld-icon { color: #fff !important; }
/* Étape suivante verrouillée (navigation dans l'ordre, edl-learndash-tweaks) : bouton gris et la
   raison à côté, comme sur la maquette v2 */
body .edl-lecon .learndash-wrapper .ld-content-action .ld-button.edl-verrou { background-color: #c9d6e3 !important; filter: none; opacity: 1; }
.edl-lecon .learndash-wrapper .ld-content-action .ld-button.edl-verrou .ld-text, .edl-lecon .learndash-wrapper .ld-content-action .ld-button.edl-verrou .ld-icon { color: var(--edl-texte) !important; }
body .edl-lecon .learndash-wrapper .ld-content-action .ld-button.edl-verrou { position: relative; overflow: visible; }
.edl-lecon .learndash-wrapper .ld-content-action .ld-button.edl-verrou::before { content: attr(title); position: absolute; right: 0; top: calc(100% + 8px); width: max-content; max-width: 300px; text-align: right; font: 400 13px/1.35 var(--edl-police); color: var(--edl-discret); }
.edl-lecon .learndash-wrapper .ld-content-actions:has(.edl-verrou) { padding-bottom: 40px; }

/* Dépôt des devoirs (leçons 128 et 149) */
.edl-lecon .learndash-wrapper .ld-table-list { max-width: 760px; border-radius: 12px; overflow: hidden; box-shadow: var(--edl-ombre); }
.edl-lecon .learndash-wrapper .ld-table-list .ld-table-list-header { background: var(--edl-marine) !important; font-family: var(--edl-police); }
.edl-lecon .learndash-wrapper .ld-file-upload { max-width: 760px; border-radius: 12px; background: #fff; box-shadow: var(--edl-ombre); padding: 20px 24px; }
.edl-lecon .learndash-wrapper .ld-file-upload .ld-file-upload-heading { font: 600 17px/1.3 var(--edl-police); color: var(--edl-marine); }
.edl-lecon .learndash-wrapper .ld-file-upload .ld-file-upload-form label.ld-button { background: #fff !important; color: var(--edl-bleu) !important; border: 1px solid var(--edl-bleu); }
.edl-lecon .learndash_uploaded_assignments { margin-top: 20px; }
/* Repris de #796 : commentaires des devoirs sans bouton « Répondre », sans nom ni date */
.edl-lecon .learndash-wrapper .ld-focus-comment .ld-comment-reply a.comment-reply-link, .edl-lecon #respond, .edl-lecon span.fn, .edl-lecon span.comment_date { display: none; }

@media (max-width: 980px) {
	.edl-lecon-barre__rangee, .edl-lecon__contenu { width: auto; margin: 0 16px; }
	.edl-lecon-barre__rangee { flex-wrap: wrap; margin: 0 16px; }
	.edl-lecon-titre { font-size: 19px; }
}

/* Coche décorative de LearnDash à côté de « Marquer comme terminé » : seule quand l'extension
   Storyline masque le bouton (les modules se valident dans le module) */
.edl-lecon .learndash-wrapper .sfwd-mark-complete::after, .edl-lecon .learndash-wrapper #sfwd-mark-complete::after,
.edl-lecon .learndash-wrapper .sfwd-mark-complete::before, .edl-lecon .learndash-wrapper #sfwd-mark-complete::before { display: none !important; content: none !important; }
@media (max-width: 640px) { .edl-cours__cote { flex-direction: column; } }

/* Barre d'administration WordPress (admins, tuteurs) : le sommaire s'ouvre en dessous */
body.admin-bar .edl-sommaire { top: var(--wp-admin--admin-bar--height, 32px); }
