:root {
  /* Couleurs Elocor School : rouge du badge, fond ivoire chaud */
  --fond: #f7f2ec;
  --carte: #ffffff;
  --texte: #241f1c;
  --doux: #6e6560;
  --bord: #e7ded5;
  --accent: #d62828;
  --accent-f: #b51f1f;
  --bleu: #1a4fd0;
  --vert: #1f8a4c;
  --rouge: #c0392b;
  --r: 6px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--fond);
  color: var(--texte);
  font: 15px/1.55 Arial, "Helvetica Neue", Helvetica, sans-serif;
}
a { color: var(--accent-f); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 26px; line-height: 1.25; margin: 0 0 8px; }
h2 { font-size: 19px; margin: 28px 0 12px; }
h3 { font-size: 16px; margin: 0 0 6px; }
p { margin: 0 0 12px; }
.doux { color: var(--doux); }
.petit { font-size: 13px; }

/* barre */
.ef-barre { background: var(--carte); border-top: 3px solid var(--accent); border-bottom: 1px solid var(--bord); }
.ef-barre-in { max-width: 1180px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.ef-logo { display: flex; align-items: center; gap: 8px; color: var(--texte); font-weight: bold; }
.ef-logo img { height: 38px; display: block; }
.ef-logo span { font-size: 15px; color: var(--doux); font-weight: normal; padding-left: 8px; border-left: 1px solid var(--bord); }
.ef-logo:hover { text-decoration: none; }
.ef-nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.ef-nav a { color: var(--texte); }
.ef-nav .ef-nav-sec { color: var(--doux); }
.ef-nav .ef-btn { color: #fff; }

.ef-main { max-width: 1000px; margin: 0 auto; padding: 28px 16px 48px; }
.ef-main-large { max-width: 1280px; }
.ef-pied { text-align: center; color: var(--doux); font-size: 12px; padding: 20px 16px 30px; }

/* boutons, champs */
.ef-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 16px; border-radius: var(--r); border: 1px solid var(--bord); background: var(--carte); color: var(--texte); font: inherit; cursor: pointer; text-decoration: none !important; }
.ef-btn:hover { border-color: #d6cabe; }
.ef-btn-p { background: var(--accent); border-color: var(--accent); color: #fff; }
.ef-btn-p:hover { background: var(--accent-f); border-color: var(--accent-f); }
.ef-btn-s { padding: 6px 12px; font-size: 14px; }
.ef-btn-danger { color: var(--rouge); }
.ef-lien { background: none; border: 0; padding: 0; font: inherit; color: var(--accent-f); cursor: pointer; }
.ef-lien-danger { color: var(--rouge); }

label { display: block; font-size: 13px; color: var(--doux); margin: 0 0 4px; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=url], select, textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--bord); border-radius: var(--r); font: inherit; background: #fff; color: var(--texte);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
textarea { min-height: 120px; resize: vertical; }
.ef-champ { margin-bottom: 14px; }
.ef-ligne { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.ef-case { display: flex; gap: 8px; align-items: center; color: var(--texte); font-size: 14px; }

.ef-carte { background: var(--carte); border: 1px solid var(--bord); border-radius: var(--r); padding: 20px; }
.ef-carte + .ef-carte { margin-top: 16px; }
.ef-etroit { max-width: 440px; margin: 20px auto; }

.ef-msg { padding: 11px 14px; border-radius: var(--r); border: 1px solid var(--bord); background: var(--carte); margin-bottom: 18px; }
.ef-msg-alerte { border-color: #e7c3bf; color: #8e2a1f; }
.ef-msg-ok { border-color: #bfdcc9; color: #17663a; }

/* catalogue */
.ef-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.ef-formation { background: var(--carte); border: 1px solid var(--bord); border-radius: var(--r); padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.ef-formation .ef-meta { display: flex; gap: 14px; color: var(--doux); font-size: 13px; }
.ef-formation .ef-prix { font-weight: bold; }
.ef-formation .ef-actions { margin-top: auto; padding-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; }
.ef-barre-prog { height: 4px; background: var(--bord); border-radius: 2px; overflow: hidden; }
.ef-barre-prog i { display: block; height: 100%; background: var(--vert); }

.ef-plan { list-style: none; padding: 0; margin: 0; border: 1px solid var(--bord); border-radius: var(--r); background: var(--carte); }
.ef-plan li { display: flex; justify-content: space-between; gap: 12px; padding: 11px 14px; border-top: 1px solid var(--bord); }
.ef-plan li:first-child { border-top: 0; }

/* tableaux */
.ef-table-wrap { overflow-x: auto; background: var(--carte); border: 1px solid var(--bord); border-radius: var(--r); }
table.ef-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ef-table th, .ef-table td { padding: 10px 12px; text-align: left; border-top: 1px solid var(--bord); vertical-align: top; }
.ef-table thead th { border-top: 0; color: var(--doux); font-weight: normal; font-size: 13px; background: #fbf7f3; }
.ef-table td.num { text-align: right; }
.ef-tag { display: inline-block; padding: 1px 7px; border: 1px solid var(--bord); border-radius: 4px; font-size: 12px; color: var(--doux); }
.ef-tag-ok { color: var(--vert); border-color: #bfdcc9; }
.ef-tag-alerte { color: var(--rouge); border-color: #e7c3bf; }

.ef-onglets { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--bord); margin-bottom: 22px; }
.ef-onglets a { padding: 9px 12px; color: var(--doux); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.ef-onglets a.actif { color: var(--texte); border-bottom-color: var(--accent); }
.ef-onglets a:hover { text-decoration: none; color: var(--texte); }

.ef-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 20px; }
.ef-stat { background: var(--carte); border: 1px solid var(--bord); border-radius: var(--r); padding: 14px 16px; }
.ef-stat b { display: block; font-size: 24px; }
.ef-stat span { color: var(--doux); font-size: 13px; }

/* ---------- espace de cours protégé ---------- */
body.ef-protege { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
body.ef-protege input, body.ef-protege textarea { -webkit-user-select: text; user-select: text; }
.ef-cours { display: grid; grid-template-columns: 300px 1fr; gap: 20px; align-items: start; }
.ef-sommaire { background: var(--carte); border: 1px solid var(--bord); border-radius: var(--r); position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; }
.ef-sommaire h2 { font-size: 15px; margin: 0; padding: 14px; border-bottom: 1px solid var(--bord); }
.ef-sommaire a { display: flex; gap: 10px; padding: 10px 14px; color: var(--texte); border-top: 1px solid var(--bord); font-size: 14px; }
.ef-sommaire a:first-of-type { border-top: 0; }
.ef-sommaire a.actif { background: #f5ece4; font-weight: bold; }
.ef-sommaire a:hover { text-decoration: none; background: #faf5f0; }
.ef-sommaire .ef-ico { width: 18px; flex: none; color: var(--doux); }
.ef-sommaire .fait .ef-ico { color: var(--vert); }

.ef-scene { position: relative; background: #000; border-radius: var(--r); overflow: hidden; aspect-ratio: 16 / 9; }
.ef-scene video { width: 100%; height: 100%; display: block; background: #000; }
.ef-scene:fullscreen { border-radius: 0; aspect-ratio: auto; }
.ef-scene:-webkit-full-screen { border-radius: 0; }

.ef-filigrane { position: absolute; inset: 0; pointer-events: none; z-index: 5; overflow: hidden; }
.ef-filigrane .ef-fil-mobile { position: absolute; color: rgba(255,255,255,.42); font-size: 15px; font-weight: bold; text-shadow: 0 0 2px rgba(0,0,0,.6); white-space: nowrap; transition: left 1.6s ease, top 1.6s ease; }
.ef-filigrane .ef-fil-fond { position: absolute; inset: -50%; background-repeat: repeat; transform: rotate(-24deg); opacity: .09; }

.ef-cmd { position: absolute; left: 0; right: 0; bottom: 0; z-index: 6; display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: linear-gradient(transparent, rgba(0,0,0,.7)); color: #fff; font-size: 13px; opacity: 0; transition: opacity .2s; }
.ef-scene:hover .ef-cmd, .ef-scene.pause .ef-cmd { opacity: 1; }
.ef-cmd button { background: none; border: 0; color: #fff; cursor: pointer; padding: 4px; display: flex; }
.ef-cmd input[type=range] { flex: 1; accent-color: #fff; }
.ef-cmd select { width: auto; padding: 2px 4px; background: rgba(0,0,0,.4); color: #fff; border-color: rgba(255,255,255,.3); font-size: 12px; }
.ef-gros-play { position: absolute; inset: 0; margin: auto; width: 72px; height: 72px; border-radius: 50%; border: 0; background: rgba(0,0,0,.55); color: #fff; cursor: pointer; z-index: 6; display: flex; align-items: center; justify-content: center; }
.ef-scene:not(.pause) .ef-gros-play { display: none; }

.ef-voile { position: fixed; inset: 0; z-index: 9999; background: #10141c; color: #fff; display: none; align-items: center; justify-content: center; text-align: center; padding: 24px; }
.ef-voile p { max-width: 420px; color: #c9cfdb; }
body.ef-masque .ef-voile { display: flex; }
body.ef-masque .ef-contenu-protege { filter: blur(24px); }

.ef-texte { position: relative; background: var(--carte); border: 1px solid var(--bord); border-radius: var(--r); padding: 28px 32px; font-size: 16px; line-height: 1.7; overflow: hidden; }
.ef-texte .ef-fil-texte { position: absolute; inset: 0; pointer-events: none; background-repeat: repeat; opacity: .07; z-index: 2; }
.ef-texte img { max-width: 100%; height: auto; pointer-events: none; }
.ef-texte h2, .ef-texte h3 { margin-top: 22px; }

.ef-nav-lecon { display: flex; justify-content: space-between; gap: 10px; margin-top: 16px; flex-wrap: wrap; }

@media print {
  body * { display: none !important; }
  body::after { content: "Impression désactivée : contenu protégé."; display: block !important; }
}
@media (max-width: 860px) {
  .ef-cours { grid-template-columns: 1fr; }
  .ef-sommaire { position: static; max-height: none; order: 2; }
  .ef-texte { padding: 20px 16px; }
  h1 { font-size: 22px; }
}
.ef-scene.ef-plein { position: fixed; inset: 0; z-index: 9000; border-radius: 0; aspect-ratio: auto; }
.ef-scene button svg { pointer-events: none; }
