/* =====================================================================
   Coquille « par cours » (maquette de Maurice, 2026-10) : barre de menu,
   Mes cours, Accès direct, page d'un cours.
   ===================================================================== */
:root { --bleu: #0b5394; --bleu-clair: #6fa8dc; --rouge-actif: #cc0000; }
body { font-family: "Gill Sans", "Gill Sans MT", Calibri, "Trebuchet MS", system-ui, sans-serif; background: #fff; }

/* Barre de menu */
.menu { background: var(--bleu); color: #fff; padding: 8px 2.2vw 6px; }
.menu-haut { position: relative; display: flex; justify-content: center; align-items: center; min-height: 52px; }
.menu-haut h1 { margin: 0; font-size: clamp(26px, 3.2vw, 44px); font-weight: 800; }
.menu-prof { position: absolute; right: 0; top: 50%; transform: translateY(-50%); background: none; border: 0; color: #fff;
  font: inherit; font-weight: 700; font-size: clamp(13px, 1.3vw, 19px); text-decoration: underline; cursor: pointer; }
.menu-onglets { display: flex; gap: 10px; margin-top: 6px; overflow-x: auto; scrollbar-width: thin; padding-bottom: 2px; }
.onglet-menu { flex: 1 0 auto; min-width: 120px; max-width: 240px; text-align: center; background: #fff; color: #000;
  border: 3px solid #000; font-weight: 800; font-size: clamp(16px, 1.7vw, 24px); padding: 9px 12px; text-decoration: none;
  white-space: nowrap; }
.onglet-menu small { font-size: .72em; }
.onglet-menu:hover { background: #f1f1f1; }
.onglet-menu.actif { background: var(--rouge-actif); color: #fff; }

/* Dialogue de déconnexion */
.dlg-deconnexion { border: 2px solid #555; padding: 28px 36px; }
.dlg-deconnexion::backdrop, .dlg-cours::backdrop { background: #54504e99; }
.dlg-deconnexion form { display: flex; gap: 10px; }
.dlg-deconnexion button, .dlg-deconnexion a, .btn { font: inherit; font-size: 20px; background: #fff; color: #000;
  border: 3px solid #000; padding: 10px 26px; min-width: 220px; text-align: center; text-decoration: none; cursor: pointer; }
.dlg-deconnexion .fort, .btn.fort { font-weight: 800; }
.btn { min-width: 0; display: inline-block; }
.btn:hover, .dlg-deconnexion button:hover, .dlg-deconnexion a:hover { background: #f1f1f1; }
.btn:disabled { opacity: .5; cursor: default; }
button.lien { background: none; border: 0; font: inherit; text-decoration: underline; cursor: pointer; color: inherit; padding: 0; }

/* Mes cours */
.page.etroite { max-width: 1180px; padding-top: 34px; }
.liste-cours { width: 100%; border-collapse: collapse; font-size: 19px; }
.liste-cours th { text-align: left; border-bottom: 1.5px solid #333; padding: 6px 6px 8px; }
.liste-cours td { vertical-align: top; padding: 14px 6px 18px; }
.liste-cours .nom { font-weight: 800; white-space: nowrap; padding-right: 60px; }
.liste-cours .nom a { color: inherit; text-decoration: none; }
.liste-cours .nom a:hover { text-decoration: underline; }
.liste-cours .res { line-height: 1.45; }
.etoiles { letter-spacing: 1px; }
.vide-cours { border: 2px dashed #aab; padding: 24px; margin: 0 0 20px; font-size: 18px; }

/* Dialogue « Modifier cours » */
.dlg-cours { border: 2px solid #555; padding: 26px 30px; width: min(1100px, 94vw); }
.dlg-cours h2 { font-size: clamp(26px, 3vw, 40px); font-weight: 800; margin: 0 0 8px; display: block; }
.dlg-corps { display: grid; grid-template-columns: 1fr 240px; gap: 40px; }
.champs-cours { display: flex; gap: 16px; margin-bottom: 8px; }
.champs-cours label { flex: 1; font-weight: 700; font-size: 14px; }
.champs-cours input, .champs-cours select { margin: 4px 0 0; font-size: 16px; width: 100%; padding: 8px 10px;
  border: 1px solid #888; font-family: inherit; }
.entete-res { display: flex; justify-content: space-between; font-weight: 800; padding: 0 70px 4px 14px; }
.liste-res { border: 2px solid #555; padding: 8px 12px; max-height: 48vh; overflow: auto; }
.ligne-res { display: grid; grid-template-columns: 34px 1fr 110px; align-items: center; gap: 10px; padding: 5px 0; font-size: 18px; cursor: pointer; }
.ligne-res input[type=checkbox] { width: 28px; height: 28px; margin: 0; accent-color: #000; }
.ligne-res .titre-res { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.etoile { background: none; border: 0; font-size: 26px; line-height: 1; padding: 0 1px; cursor: pointer; color: #000; }
.dlg-droite { display: flex; flex-direction: column; gap: 10px; padding-top: 60px; }
.dlg-droite .pousse { flex: 1; min-height: 40px; }

/* Accès direct */
.page.acces { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 1400px; padding-top: 30px; }
.acces h2 { font-size: 24px; font-weight: 800; margin: 0 0 8px; display: block; }
.acces .boite { border: 1.5px solid #555; min-height: 55vh; padding: 14px 24px; display: flex; flex-direction: column; gap: 4px; }
.acces .boite a { color: inherit; text-decoration: none; font-size: 20px; padding: 8px 0; }
.acces .boite a:hover { text-decoration: underline; color: var(--bleu); }

/* Page d'un cours : barre de ressources + trois zones */
.barre-ressources { background: var(--bleu-clair); display: flex; justify-content: center; align-items: stretch; gap: 8px;
  padding: 6px 2.2vw; flex-wrap: wrap; }
.ressource { background: #fff; color: #000; border: 3px solid #000; font-weight: 800; font-size: clamp(14px, 1.35vw, 19px);
  padding: 6px 14px; width: 270px; min-height: 58px; display: flex; align-items: center; justify-content: center;
  text-align: center; text-decoration: none; line-height: 1.15; }
.ressource span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ressource.actif { background: var(--rouge-actif); color: #fff; }
.ressource.plus { width: 90px; font-size: 22px; }
.niveau-direct { align-self: center; font-weight: 700; color: #000; margin-left: 12px; }

.zones { display: grid; grid-template-columns: minmax(260px, 27%) minmax(170px, 16%) 1fr; gap: 2vw; padding: 22px 2.2vw 30px; align-items: start; }
.zones h2 { font-size: clamp(20px, 2vw, 28px); font-weight: 800; margin: 0 0 14px; display: block; }
.zones .chapitre-choisi { font-size: .6em; font-weight: 400; color: var(--doux); }
@media (max-width: 900px) { .zones, .page.acces, .dlg-corps { grid-template-columns: 1fr; } }

.zone-chapitres .arbre { border: 2.5px solid #555; padding: 10px 8px; max-height: calc(100vh - 290px); min-height: 300px; overflow: auto; display: block; }
.arbre ul { list-style: none; margin: 0; padding: 0; }
.arbre ul ul { padding-left: 26px; }
.arbre .rang { display: flex; align-items: center; gap: 6px; padding: 2px 0; }
.arbre .plier { width: 22px; height: 22px; flex: none; border: 1px solid #aaa; border-radius: 5px; background: #fff; cursor: pointer;
  font-size: 15px; line-height: 1; padding: 0; color: #444; }
.arbre .puce { width: 22px; flex: none; }
.arbre .chapitre { background: none; border: 0; font: inherit; font-size: 15px; text-align: left; padding: 4px 8px; border-radius: 5px;
  cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #333; }
.arbre .chapitre:hover { background: #eef3fb; }
.arbre .chapitre.choisi { background: var(--rouge-actif); color: #fff; font-weight: 700; }

.zone-parcours { display: flex; flex-direction: column; gap: 9px; }
.zone-parcours h2 { margin-bottom: 5px; }
.parcours { background: #fff; color: #000; border: 3px solid #000; font: inherit; font-weight: 800; font-size: clamp(15px, 1.4vw, 21px);
  padding: 9px 14px; text-align: left; cursor: pointer; }
.parcours.nouveau { background: #d9d9d9; text-align: center; }
.parcours:disabled { cursor: default; }

.grille-activites { display: grid; grid-template-columns: auto 1fr; gap: 9px 16px; align-items: start; }
.famille { font-weight: 800; text-align: right; font-size: clamp(14px, 1.25vw, 18px); padding-top: 9px; white-space: nowrap; }
.tuiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px 12px; }
.tuile { background: var(--famille); color: #fff; border: 3px solid #000; font: inherit; font-weight: 800; text-align: left;
  font-size: clamp(13px, 1.25vw, 18px); line-height: 1.05; padding: 6px 14px; min-height: 42px; cursor: pointer; }
.tuile:hover:not(:disabled) { filter: brightness(1.25); }
.tuile:disabled { cursor: default; }
.tuile.indispo, .tuile.sans-contenu { opacity: .38; }
.tuile:disabled:not(.indispo) { opacity: .7; }

/* Activité en cours : cadre plein écran par-dessus la page du cours. */
.hote-activite { position: fixed; inset: 0; width: 100vw; height: 100vh; border: 0; z-index: 1000; background: #10141c; }
body.en-activite { overflow: hidden; }

/* Parcours : liste (page du cours) et editeur. */
.parcours-ligne { display: flex; gap: 6px; }
.parcours-ligne .parcours { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.parcours small { font-weight: 400; font-size: .68em; color: #555; }
.parcours.lancer:hover:not(:disabled) { background: #f1f1f1; }
.parcours.nouveau:hover { background: #c9c9c9; }
.parcours-modifier { flex: none; width: 42px; background: #fff; border: 3px solid #000; font-size: 18px; cursor: pointer; }
.parcours-modifier:hover { background: #f1f1f1; }

.dlg-parcours .champs-cours input { max-width: 420px; }
.dp-colonnes { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 10px; }
.dp-colonnes .entete-res { padding: 0 0 4px 2px; }
.dp-colonnes .liste-res { height: 46vh; max-height: none; margin: 0; }
.dp-dispo { display: flex; flex-direction: column; gap: 6px; }
.dp-activite { background: var(--famille); color: #fff; border: 3px solid #000; font: inherit; font-weight: 800; font-size: 16px;
  padding: 7px 12px; text-align: left; }
button.dp-activite { cursor: pointer; }
button.dp-activite:hover { filter: brightness(1.25); }
.dp-etapes { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.dp-etapes li { display: flex; align-items: center; gap: 6px; }
.dp-etapes .dp-num { width: 1.8em; font-weight: 800; text-align: right; }
.dp-etapes .dp-activite { flex: 1; min-width: 0; }
.dp-outil { width: 34px; height: 34px; flex: none; background: #fff; border: 2px solid #000; font-size: 16px; cursor: pointer; }
.dp-outil:disabled { opacity: .3; cursor: default; }
.dp-vide { color: var(--doux); font-style: italic; padding: 8px 2px; }

/* Glisser-deposer : poignee, element saisi, trait de depot. */
.poignee { cursor: grab; color: #777; user-select: none; font-size: 18px; line-height: 1; }
.poignee:active { cursor: grabbing; }
.en-deplacement { opacity: .35; }
.depot-avant { box-shadow: 0 -4px 0 var(--rouge-actif); }
.depot-apres { box-shadow: 0 4px 0 var(--rouge-actif); }
tr.depot-avant > td { box-shadow: inset 0 4px 0 var(--rouge-actif); }
tr.depot-apres > td { box-shadow: inset 0 -4px 0 var(--rouge-actif); }
tr.depot-avant, tr.depot-apres { box-shadow: none; }
.liste-cours td.poignee { width: 30px; padding-right: 0; vertical-align: top; padding-top: 16px; }
.astuce { margin-left: 14px; font-size: 14px; }

/* Editeur de parcours : etapes avec poignee, reglages par etape. */
.dp-etape { flex-direction: column; align-items: stretch !important; gap: 4px !important; }
.dp-rang { display: flex; align-items: center; gap: 6px; }
.dp-rang .dp-num, .dp-rang span.dp-activite { cursor: grab; }
.dp-etapes .dp-activite small { display: block; font-weight: 400; font-size: 12px; opacity: .92; margin-top: 2px; }
.dp-outil.actif { background: #000; color: #fff; }
.dp-reglages { margin-left: 58px; padding: 8px 10px; background: #f1f1f1; border: 2px solid #000; display: flex; flex-wrap: wrap; gap: 8px 14px; }
.dp-reglages label { font-size: 13px; font-weight: 700; display: flex; flex-direction: column; gap: 2px; }
.dp-reglages select { width: auto; margin: 0; padding: 4px 6px; font: inherit; font-weight: 400; border: 1px solid #555; background: #fff; }

/* Editeur de parcours, version large : reglages toujours visibles a droite de
   chaque etape, boutons sous les listes. */
dialog.dlg-parcours { width: min(1500px, 96vw); max-width: none; max-height: 94vh; padding: 22px 28px; }
.dlg-parcours .champs-cours { max-width: 460px; }
.dlg-parcours .dp-colonnes { grid-template-columns: minmax(230px, 300px) 1fr; gap: 22px; }
.dlg-parcours .dp-colonnes .entete-res { display: flex; justify-content: space-between; align-items: baseline; padding: 0 4px 4px 2px; }
.dlg-parcours .dp-colonnes .entete-res .doux { font-weight: 400; font-size: 13px; }
.dlg-parcours .dp-colonnes .liste-res { height: min(56vh, 620px); }
.dlg-parcours .dp-etape { flex-direction: row !important; align-items: center !important; gap: 8px !important; padding: 3px 0; }
.dlg-parcours .dp-etapes .dp-activite { flex: none; width: 250px; }
.dlg-parcours .dp-etape .dp-reglages { flex: 1; min-width: 0; margin: 0; padding: 0; background: none; border: 0; display: flex;
  flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.dlg-parcours .dp-reglages label { flex-direction: row; align-items: center; gap: 5px; font-size: 13px; font-weight: 700; color: #555; white-space: nowrap; }
.dlg-parcours .dp-reglages select { font-size: 14px; padding: 4px 6px; border: 2px solid #bbb; color: #777; max-width: 190px; }
/* Un reglage fixe par le parcours ressort ; un reglage « habituel » reste discret. */
.dlg-parcours .dp-reglages label.fixe { color: #000; }
.dlg-parcours .dp-reglages label.fixe select { border-color: #000; color: #000; font-weight: 700; background: #fff7d6; }
.dlg-parcours .dp-reglages .dp-vide { padding: 0; font-size: 13px; }
.dp-pied { display: flex; gap: 10px; margin-top: 16px; }
.dp-pied .pousse { flex: 1; }
.dp-pied .btn { min-width: 190px; }

/* Mes cours : case « Afficher » (onglet du menu). */
.liste-cours .col-afficher { width: 80px; text-align: center; font-size: 14px; }
.liste-cours td.col-afficher { padding-top: 15px; }
.liste-cours .afficher { width: 24px; height: 24px; accent-color: #000; cursor: pointer; margin: 0; }
.liste-cours tr.masque .nom, .liste-cours tr.masque .res { opacity: .45; }

/* Dialogue « Synchroniser avec Seatingplanner ». */
dialog.dlg-synchro { width: min(1300px, 96vw); max-width: none; max-height: 94vh; padding: 22px 28px; }
.dlg-synchro > p { margin: 0 0 12px; font-size: 16px; }
.sy-colonnes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.sy-colonnes h3 { margin: 0; font-size: 20px; font-weight: 800; }
.sy-colonnes .petit { font-size: 13px; margin: 2px 0 6px; min-height: 2.6em; }
.sy-colonnes .liste-res { height: min(46vh, 480px); max-height: none; padding: 6px 10px; }
.sy-ligne { display: flex; align-items: flex-start; gap: 10px; padding: 6px 0; font-size: 17px; cursor: pointer; }
.sy-ligne input { width: 24px; height: 24px; flex: none; margin: 0; accent-color: #000; }
.sy-ligne small { display: block; font-size: 13px; color: var(--doux); }
.sy-ligne.sy-info { cursor: default; color: var(--vert); }
.sy-ligne.sy-info span { color: var(--texte); }
@media (max-width: 900px) { .sy-colonnes { grid-template-columns: 1fr; } }

/* Source d'une etape de parcours : bouton dans l'editeur + dialogue de choix. */
.dp-source { flex: none; width: 210px; font: inherit; font-size: 13px; text-align: left; background: #fff; color: #777; border: 2px dashed #bbb;
  padding: 4px 8px; cursor: pointer; line-height: 1.15; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.dp-source:hover { border-color: #000; color: #000; }
.dp-source.fixe { border: 2px solid #000; color: #000; font-weight: 700; background: #fff7d6; }
.dp-source.fixe span { overflow: hidden; text-overflow: ellipsis; }
.dp-source small { display: block; font-weight: 400; font-size: 11px; color: #555; overflow: hidden; text-overflow: ellipsis; }
dialog.dlg-source { width: min(720px, 94vw); max-height: 92vh; padding: 22px 28px; }
.dlg-source > p { margin: 0 0 12px; }
.dlg-source .ds-defaut { width: 100%; text-align: left; font-size: 18px; }
.dlg-source .ds-defaut small { font-weight: 400; color: #555; }
.dlg-source .ds-ou { margin: 14px 0 6px; font-weight: 800; }
.dlg-source select { width: 100%; font: inherit; font-size: 16px; padding: 8px 10px; border: 2px solid #555; margin: 0 0 8px; background: #fff; }
.dlg-source .ds-arbre { height: min(46vh, 460px); max-height: none; padding: 4px; display: block; }
.ds-chapitre { display: block; width: 100%; text-align: left; font: inherit; font-size: 15px; background: none; border: 0; padding: 5px 10px;
  cursor: pointer; border-radius: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-chapitre:hover { background: #eef3fb; }
.ds-chapitre.choisi { background: var(--rouge-actif); color: #fff; }
/* Exercices de comprehension : un bouton par exercice (plusieurs rangees si besoin). */
.tuile.dyn { font-size: clamp(12px, 1.05vw, 16px); line-height: 1.1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; padding-top: 5px; padding-bottom: 5px; }