/* ─── Organisation de l'emploi du temps (prototype) ─────────────────────── */

.edt-modal { display: flex; flex-direction: column; gap: 10px; font-size: 13px; color: #1a3556; }
.edt-page { display: flex; flex-direction: column; gap: 12px; padding: 12px 16px; height: 100%; box-sizing: border-box; min-height: 0; font-size: 13px; color: #1a3556; }
.edt-card { background: #fff; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,.12); padding: 10px 14px; }
/* Tuile qui occupe la hauteur restante de la page ; son tableau défile à l'intérieur */
.edt-card-fill { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.edt-card-fill > .edt-scroll { flex: 1; min-height: 0; max-height: none; }
/* La zone défile d'un seul tenant (en-têtes collants : tableau, jours de la grille) */
.edt-body { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; overflow: auto; }

.edt-toolbar, .edt-plan-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.edt-toolbar label, .edt-plan-head label { font-size: 12px; font-weight: 600; color: #6b7a8c; }
.edt-sem-filtre { display: inline-flex; gap: 10px; align-items: center; }
.edt-sem-filtre:empty { display: none; }
.edt-toolbar label.edt-sem-chk { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; color: #1a3556; cursor: pointer; user-select: none; }
.edt-sem-chk .edt-muted { font-weight: 400; font-size: 12px; }
.edt-sem-sep { font-size: 12px; font-weight: 600; color: #6b7a8c; margin-left: 6px; padding-left: 12px; border-left: 1px solid #d0d7e2; }
.edt-spacer { flex: 1; }
.edt-select, .edt-input, .edt-textarea {
  border: 1px solid #d0d7e2; border-radius: 6px; padding: 5px 8px; font-size: 13px; color: #1a3556; background: #fff;
}
.edt-select:focus, .edt-input:focus, .edt-textarea:focus { outline: none; border-color: #2e75b6; box-shadow: 0 0 0 2px rgba(46,117,182,.15); }
.edt-textarea { width: 100%; box-sizing: border-box; resize: vertical; font-family: inherit; }
.edt-mini { padding: 3px 4px; font-size: 12px; }
.edt-hours { width: 52px; text-align: right; padding: 3px 6px; }
.edt-fixed { font-weight: 600; }
.edt-hint, .edt-muted { color: #6b7a8c; }
.edt-hint { font-size: 12px; }
.edt-small { font-size: 11px; }
.edt-right { display: flex; justify-content: flex-end; }
.edt-intro { margin: 0; color: #34495e; line-height: 1.5; }
.edt-h4 { margin: 8px 0 4px; font-size: 13px; color: #1a3556; }
.edt-loading { padding: 24px; text-align: center; color: #2e75b6; }
.edt-error { color: #c0392b; padding: 8px 0; }
.edt-error-inline { color: #c0392b; }
.edt-info { background: #eaf2fb; border: 1px solid #d6e0eb; border-radius: 6px; padding: 8px 12px; color: #1a3556; }
.edt-empty { text-align: center; color: #6b7a8c; font-style: italic; padding: 14px !important; }
.edt-link { color: #2e75b6; }
.edt-comment { background: #f7f9fc; border-radius: 6px; padding: 8px 10px; white-space: pre-wrap; }
.edt-list { margin: 0; padding-left: 18px; }

.edt-fieldset { border: 1px solid #d6e0eb; border-radius: 8px; padding: 8px 12px 10px; display: flex; flex-direction: column; gap: 8px; }
.edt-fieldset legend { font-weight: 600; color: #1a3556; padding: 0 4px; }
.edt-form-grid { display: grid; grid-template-columns: 150px 1fr; gap: 8px 12px; align-items: center; }
.edt-form-grid label { font-weight: 600; color: #6b7a8c; font-size: 12px; }

/* Tableaux */
.edt-scroll { overflow: auto; max-height: 40vh; border: 1px solid #e2e8f0; border-radius: 6px; }
.edt-scroll-big { max-height: none; overflow: visible; flex: 0 0 auto; }
.edt-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.edt-table th { background: #f5f7fa; color: #1a3556; font-weight: 600; text-align: left; padding: 7px 8px; border-bottom: 2px solid #dde3ea; white-space: nowrap; position: sticky; top: 0; z-index: 1; }
.edt-table td { padding: 6px 8px; border-bottom: 1px solid #eef1f5; vertical-align: middle; }
.edt-table tbody tr:hover { background: #f7faff; }
.edt-table-compact td { padding: 4px 8px; }
.edt-num { text-align: right; }
.edt-c { text-align: center !important; }
.edt-actions { white-space: nowrap; text-align: right; }
.edt-add-row td { background: #fafbfd; border-top: 2px solid #eef1f5; }
.edt-add-row .edt-input { width: 100%; box-sizing: border-box; }
.edt-icon { border: none; background: none; cursor: pointer; color: #6b7a8c; padding: 3px 6px; border-radius: 4px; }
.edt-icon:hover { background: #eef2f7; color: #1a3556; }
.edt-danger:hover { color: #c0392b; }

.edt-badge { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; }
.edt-badge-green { background: #d5f5e3; color: #1e8449; }
.edt-badge-orange { background: #fdebd0; color: #b9770e; }
.edt-badge-red { background: #fadbd8; color: #c0392b; }
.edt-badge-grey { background: #eceff3; color: #6b7a8c; }

/* Fiche de vœux */
.edt-voeu-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; }
.edt-palette { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.edt-pal { border: 1px solid #d0d7e2; background: #fff; border-radius: 16px; padding: 4px 12px; cursor: pointer; font-size: 12px; color: var(--c); display: inline-flex; align-items: center; gap: 6px; }
.edt-pal.is-active { border-color: var(--c); box-shadow: 0 0 0 2px var(--bg); font-weight: 600; }
.edt-swatch { width: 12px; height: 12px; border-radius: 3px; background: var(--bg); border: 1px solid var(--c); }
.edt-counts { margin-left: auto; font-size: 12px; }
.edt-voeux-grid { width: 100%; border-collapse: separate; border-spacing: 4px; table-layout: fixed; }
.edt-voeux-grid th { font-size: 12px; color: #6b7a8c; font-weight: 600; padding: 4px; }
.edt-voeux-grid tbody th { text-align: right; width: 90px; }
.edt-voeux-grid td { height: 54px; border: 1px dashed #d0d7e2; border-radius: 6px; text-align: center; font-weight: 600; font-size: 12px; user-select: none; }
.edt-voeux-grid.is-editable td { cursor: pointer; }
.edt-voeux-grid.is-editable td:hover { box-shadow: inset 0 0 0 2px #2e75b6; }

/* Ruban : pastille « fiche à remplir » */
.ribbon-button.edt-has-badge { position: relative; }
.ribbon-button.edt-has-badge::after { content: ''; position: absolute; top: 3px; right: 5px; width: 9px; height: 9px; border-radius: 50%; background: #e74c3c; box-shadow: 0 0 0 2px #fff; }

/* Plan : onglets et interventions */
.edt-tabs { display: flex; gap: 4px; }
.edt-tab { border: 1px solid #d0d7e2; background: #fff; padding: 5px 12px; border-radius: 6px; cursor: pointer; color: #1a3556; font-size: 13px; }
.edt-tab.is-active { background: #2e75b6; border-color: #2e75b6; color: #fff; }
.edt-tab:disabled { color: #9aa5b4; background: #f5f7fa; border-style: dashed; cursor: not-allowed; }
.edt-tabs #edtPlanRun { margin-left: 8px; }
/* Assistant de placement */
.edt-wiz-steps { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.edt-wiz-step { padding: 3px 10px; border-radius: 12px; background: #eef1f5; color: #6b7a8c; font-size: 12px; }
.edt-wiz-step.is-active { background: #2e75b6; color: #fff; }
.edt-wiz-step.is-done { background: #dff0e3; color: #22663a; }
.edt-wiz-q { font-weight: 600; margin: 0 0 10px; color: #1a3556; }
.edt-wiz-opt { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid #d0d7e2; border-radius: 6px; margin-bottom: 8px; cursor: pointer; }
.edt-wiz-opt:hover { background: #f7faff; }
.edt-wiz-opt.is-checked { border-color: #2e75b6; background: #eef5fc; }
.edt-wiz-opt input { margin-top: 3px; }
.edt-wiz-opt small { display: block; color: #6b7a8c; margin-top: 2px; }
.edt-wiz-recap li { margin: 4px 0; }
.edt-empty-big { text-align: center; padding: 40px 20px; color: #1a3556; }
.edt-empty-big > i { font-size: 36px; color: #2e75b6; }
.edt-empty-big p { font-size: 14px; margin: 10px auto; max-width: 720px; line-height: 1.5; }
.edt-plan-table td { white-space: nowrap; }
.edt-plan-table tr[data-ligne] > td:nth-child(2) { white-space: normal; min-width: 130px; }   /* Matière (après « À placer ») */
.edt-maq { background: #f7f9fc; color: #6b7a8c; }
th.edt-maq { color: #6b7a8c; }
.edt-ens-row td { background: #eef4fb !important; border-top: 2px solid #d6e0eb; }
.edt-ens-row { cursor: default; }
.edt-ens-chev { color: #6b7a8c; font-size: 11px; width: 12px; transition: transform .15s; }
.edt-ens-row.is-closed .edt-ens-chev { transform: rotate(-90deg); }
.edt-ens-row:not(.is-closed) .edt-ens-nb { display: none; }
.edt-mat { font-weight: 600; }
.edt-nbs { font-size: 11px; color: #6b7a8c; margin-top: 3px; white-space: nowrap; }
/* Interventions : lignes alignées en haut ; séances × durée = heures */
.edt-plan-table tr[data-ligne] > td { vertical-align: top; }
.edt-formule { display: flex; align-items: center; gap: 3px; white-space: nowrap; }
.edt-formule .edt-op { color: #6b7a8c; font-size: 11px; }
.edt-formule { gap: 1px; }
.edt-formule select.edt-mini { width: 50px; padding: 3px 1px; }
.edt-formule .edt-input.edt-hours { width: 40px; padding: 3px 3px; }
.edt-formule .edt-input.edt-nbs-in { width: 34px; padding: 3px 3px; }
/* Total de l'enseignant sous la formule (ensemble des groupes ou promotion) */
.edt-total { text-align: right; margin-top: 3px; line-height: 1; }
.edt-total:empty { display: none; }
.edt-total-pill { display: inline-block; font-size: 10.5px; padding: 2px 7px; border-radius: 9px; background: #e8f0fa; color: #1f4e79; font-weight: 600; white-space: nowrap; }
.edt-plan-table td, .edt-plan-table th { padding-left: 5px; padding-right: 5px; }
.edt-plan-table td.edt-grp-cell { white-space: normal; min-width: 100px; }
.edt-plan-table td.edt-maq, .edt-plan-table th.edt-maq { padding-left: 3px; padding-right: 3px; }
.edt-plan-table td.edt-maq { padding-top: 10px; }
.edt-plan-table td.edt-actions { width: 1%; padding-left: 2px; padding-right: 2px; text-align: center; }
.edt-input.edt-nbs-in { width: 42px; padding: 2px 5px; font-size: 12px; text-align: right; }
.edt-placer { width: 1%; text-align: center; white-space: nowrap; }
th.edt-placer { font-size: 11px; }
.edt-placer input { cursor: pointer; }
tr.is-sans-placement > td:not(.edt-placer) { opacity: .45; }
tr.is-sans-placement .edt-mat { text-decoration: line-through; }
/* Cases remplies : fond bleuté et chiffres en gras pour les repérer d'un coup d'œil */
.edt-plan-table .edt-input:not(:placeholder-shown) { background: #e3eefb; border-color: #8db6e3; font-weight: 600; color: #123a66; }
.edt-plan-table select.edt-select:has(option:checked:not([value=""])) { background-color: #e3eefb; border-color: #8db6e3; font-weight: 600; color: #123a66; }
.edt-plan-table .edt-input.edt-nbs-reste { color: #c0392b; font-weight: 700; border-color: #e6a39b; background: #fdecea; }
.edt-chips { display: inline-flex; flex-wrap: wrap; gap: 3px; max-width: 220px; vertical-align: middle; }
.edt-chip { font-size: 11px; padding: 1px 6px; border-radius: 8px; background: #eceff3; color: #34495e; }
.edt-chip-t2 { background: #e3eefb; color: #1a56db; }
.edt-chip-t1 { background: #e8f6ee; color: #1e8449; }
.edt-chip-t3 { background: #f4ecf7; color: #7d3c98; }
tr.edt-saving td { background: #fffbe6 !important; }
tr.edt-saved td { background: #eafaf1 !important; transition: background .3s; }
.edt-grp-block { margin-bottom: 8px; }
.edt-grp-title { font-weight: 600; color: #6b7a8c; font-size: 12px; margin-bottom: 4px; }
.edt-grp { display: inline-flex; align-items: center; gap: 4px; margin: 2px 12px 2px 0; cursor: pointer; }

/* Brouillon : grille de la semaine type */
.edt-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: #6b7a8c; }
.edt-legend i:not(.fas) { display: inline-block; width: 12px; height: 12px; border: 1px solid; border-radius: 3px; vertical-align: -2px; margin-right: 4px; }
.edt-grid { display: grid; grid-template-columns: 56px repeat(5, minmax(150px, 1fr)); min-width: 820px; }
/* Brouillon : volet des non placées à gauche, calendrier à droite (défile seul) */
.edt-brouillon { display: flex; gap: 10px; align-items: flex-start; }
.edt-grid-host { flex: 1; min-width: 0; max-height: calc(100vh - 230px); }
.edt-np { flex: 0 0 280px; max-height: calc(100vh - 230px); display: flex; flex-direction: column; border: 1px solid #f1c6c0; border-radius: 6px; background: #fff; transition: flex-basis .15s; }
.edt-np.is-closed { flex-basis: 36px; }
.edt-np-head { display: flex; align-items: center; gap: 6px; padding: 7px 8px; border: none; border-bottom: 1px solid #f1c6c0; background: #fdecea; color: #c0392b; font-weight: 600; font-size: 13px; cursor: pointer; border-radius: 6px 6px 0 0; text-align: left; }
.edt-np-titre { flex: 1; }
.edt-np-nb { background: #c0392b; color: #fff; border-radius: 9px; padding: 0 7px; font-size: 11px; }
.edt-np.is-closed .edt-np-head { flex-direction: column; border-bottom: none; border-radius: 6px; height: 100%; padding: 8px 0; }
.edt-np.is-closed .edt-np-titre { writing-mode: vertical-rl; flex: 0; }
.edt-np.is-closed .edt-np-list { display: none; }
.edt-np-list { overflow: auto; padding: 6px; display: flex; flex-direction: column; gap: 6px; }
.edt-np-item { border-left: 4px solid var(--c); background: #f8fafc; border-radius: 5px; padding: 4px 7px; font-size: 11px; color: #34495e; }
.edt-np-item .fas { width: 12px; color: #8a97a8; font-size: 10px; }
.edt-np-mat { color: #1a3556; font-size: 12px; margin-bottom: 1px; }
.edt-np-motif { color: #c0392b; margin-top: 2px; }
.edt-ev-s .fas { width: 11px; font-size: 9px; color: #6b7a8c; }
.edt-ev-nosalle { color: #b9770e; }
.edt-grid-dayhead { height: 30px; line-height: 30px; text-align: center; font-weight: 600; color: #1a3556; background: #f5f7fa; border-bottom: 2px solid #dde3ea; position: sticky; top: 0; z-index: 3; }
.edt-grid-col-body { position: relative; height: var(--h); }
.edt-grid-col { border-left: 1px solid #e2e8f0; }
.edt-hour { position: absolute; right: 6px; transform: translateY(-50%); font-size: 11px; color: #6b7a8c; }
.edt-hour:first-child { transform: none; }
.edt-hline { position: absolute; left: 0; right: 0; border-top: 1px solid #eef1f5; }
.edt-pause { position: absolute; left: 0; right: 0; background: repeating-linear-gradient(45deg, #f4f6f9, #f4f6f9 6px, #eceff3 6px, #eceff3 12px); }
.edt-voeu-bg { position: absolute; left: 0; right: 0; opacity: .65; }
.edt-ev { position: absolute; box-sizing: border-box; background: var(--bg); border-left: 4px solid var(--c); border-radius: 5px; padding: 2px 22px 2px 6px; overflow: hidden; font-size: 11px; color: #1a3556; box-shadow: 0 1px 2px rgba(0,0,0,.12); z-index: 2; }
.edt-ev:hover { z-index: 4; box-shadow: 0 3px 10px rgba(0,0,0,.2); }
.edt-ev.is-locked { border: 2px solid var(--c); border-left-width: 4px; }
.edt-ev-t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.edt-ev-s { color: #34495e; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.edt-lock { position: absolute; top: 2px; right: 2px; border: none; background: rgba(255,255,255,.7); border-radius: 4px; cursor: pointer; color: #6b7a8c; font-size: 11px; padding: 2px 4px; }
.edt-lock:hover { color: #1a3556; background: #fff; }
.edt-ev.is-locked .edt-lock { color: var(--c); }

/* Brouillon sans filtre : occupation par créneau */

/* Groupes par type de cours (colonne et fenêtre) */
.edt-grp-cell.is-clickable { cursor: pointer; }
.edt-grp-cell.is-clickable:hover { background: #eef4fb; }
.edt-grp-type { display: flex; align-items: center; gap: 3px; flex-wrap: wrap; margin: 1px 0; }
.edt-grp-t { font-size: 10px; font-weight: 700; color: #6b7a8c; min-width: 26px; }
.edt-grp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.edt-grp-grid.is-seul { grid-template-columns: 1fr; }
.edt-grp-section legend .edt-small { font-weight: 400; margin-left: 4px; }
.edt-grp-cell .edt-chips { display: block; max-width: 260px; }
.edt-grp-promo { display: flex; margin: 4px 0 6px; padding-bottom: 6px; border-bottom: 1px dashed #d6e0eb; }

/* Filtres du brouillon (niveau, semestre, cursus, promotion, groupes…) */
.edt-bf { margin-top: 8px; padding: 6px 8px; background: #f6f8fb; border: 1px solid #e3e8ef; border-radius: 6px; row-gap: 6px; }
.edt-bf { column-gap: 14px; }
.edt-bf-f { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.edt-bf .edt-select { max-width: 220px; }
.edt-bf .edt-select.is-filled { background: #e3eefb; border-color: #8db6e3; color: #123a66; font-weight: 600; }

/* Horaires habituels et calendrier du semestre */
.edt-info.edt-warn { background: #fff6e5; border-color: #f0d49b; color: #6b4a00; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.edt-info.edt-warn > span { flex: 1; min-width: 200px; }
.edt-btn-alerte { border-color: #e0a63a !important; color: #8a5a00 !important; background: #fff6e5 !important; }
.edt-pause.edt-ferme { background: repeating-linear-gradient(45deg, #eef0f3, #eef0f3 5px, #e2e6eb 5px, #e2e6eb 10px); opacity: .9; }
.edt-horaires-jours { margin-top: 12px; width: auto; }
.edt-horaires-jours td, .edt-horaires-jours th { padding: 4px 10px; }
.edt-cal { display: flex; flex-direction: column; gap: 10px; }
.edt-cal h4 { margin: 8px 0 0; font-size: 13px; color: #2c3e50; }
.edt-cal-ligne { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 10px; background: #f6f8fb; border: 1px solid #e3e8ef; border-radius: 6px; }
.edt-cal-ligne.is-manque { background: #fff6e5; border-color: #f0d49b; }
.edt-cal-table td { vertical-align: top; }
.edt-cal-manque { display: inline-flex; gap: 4px; align-items: center; padding: 2px; border-radius: 4px; background: #fff6e5; }
.edt-cal-add:empty { display: none; }
.edt-cal .edt-input[type=date] { width: 140px; }

/* Horaires : semaine à peindre (vert = cours possibles, orange = exceptionnel) */
.edt-hg-outils { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 8px 0 4px; }
.edt-hg-modes { display: inline-flex; border: 1px solid #c5cdd6; border-radius: 6px; overflow: hidden; }
.edt-hg-mode { border: 0; background: #fff; padding: 6px 12px; cursor: pointer; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; color: #2c3e50; }
.edt-hg-mode + .edt-hg-mode { border-left: 1px solid #c5cdd6; }
.edt-hg-mode i:not(.fas) { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.edt-hg-mode.is-v i { background: #5cb85c; }
.edt-hg-mode.is-o i { background: #f0a030; }
.edt-hg-mode.is-active { background: #e3eefb; font-weight: 600; box-shadow: inset 0 -2px 0 #2e75b6; }
.edt-hg-zone { display: flex; gap: 16px; align-items: flex-start; }
.edt-hg { display: grid; grid-template-columns: 48px repeat(6, minmax(70px, 1fr)); flex: 1; user-select: none; border: 1px solid #d6dde6; border-radius: 6px; overflow: hidden; background: #fff; }
.edt-hg-coin, .edt-hg-jour { grid-row: 1; background: #f4f6f9; border-bottom: 2px solid #d6dde6; }
.edt-hg-jour { font-weight: 600; font-size: 12px; text-align: center; line-height: 28px; color: #2c3e50; }
.edt-hg-h { grid-column: 1; font-size: 10px; color: #6b7a8c; text-align: right; padding-right: 6px; border-top: 1px solid #e8ecf1; }
.edt-hg-c { border-left: 1px solid #e8ecf1; cursor: crosshair; }
.edt-hg-c.is-h { border-top: 1px solid #e8ecf1; }
.edt-hg-c.is-v { background: #8fd18f; }
.edt-hg-c.is-o { background: #f6c27a; }
.edt-hg-c.is-sel { box-shadow: inset 0 0 0 20px rgba(46, 117, 182, .35); }
.edt-hg-resume { width: 260px; font-size: 12px; display: flex; flex-direction: column; gap: 4px; }
.edt-hg-exc { color: #a35f00; }
.edt-hg-pas { margin-top: 10px; }
.edt-exc { position: absolute; left: 0; right: 0; background: rgba(240, 160, 48, .16); border-left: 3px solid rgba(240, 160, 48, .7); pointer-events: none; }
.edt-plan-table thead th { white-space: normal; }
/* Sous-colonnes CM / CMi / TD / TP : bande teintée une colonne sur deux (translucide,
   le survol de ligne reste visible), filet fin entre sous-colonnes, séparateur marqué entre blocs */
.edt-plan-table .edt-f.edt-col1, .edt-plan-table .edt-f.edt-col3 { background-color: rgba(46, 117, 182, .06); }
.edt-plan-table tbody tr:hover > td.edt-f { background-image: linear-gradient(#f7faff, #f7faff); background-blend-mode: multiply; }
.edt-plan-table .edt-col1, .edt-plan-table .edt-col2, .edt-plan-table .edt-col3 { border-left: 1px solid #e3e8ef; }
.edt-plan-table .edt-col0, .edt-plan-table .edt-bloc { border-left: 2px solid #c9d3e0; }
/* Fiche de vœux modifiée par le département */
.edt-voeux-grid td.is-modif { outline: 2px dashed #e67e22; outline-offset: -3px; }
.edt-modif-alerte { border: 1px solid #f0c27a; border-left: 4px solid #e67e22; background: #fff8ee; border-radius: 6px; padding: 10px 12px; margin-bottom: 10px; }
.edt-modif-titre { color: #8a4b08; margin-bottom: 6px; }
.edt-modif-bloc { margin: 6px 0; }
.edt-modif-bloc ul { margin: 4px 0 0 18px; padding: 0; }
.edt-modif-msg { margin: 4px 0; padding: 6px 10px; background: #fff; border-radius: 4px; font-style: italic; color: #34495e; }
.edt-modif-msg i { color: #c9a26b; margin-right: 4px; }
.edt-modif-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.edt-modif-alerte strong { color: #8a4b08; }

/* Brouillon : bascule semaine type / semaine par semaine */
.edt-vue { display: inline-flex; border: 1px solid #c8d3e0; border-radius: 6px; overflow: hidden; }
.edt-vue-b { border: none; background: #fff; color: #1a3556; padding: 5px 12px; font-size: 12px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.edt-vue-b + .edt-vue-b { border-left: 1px solid #c8d3e0; }
.edt-vue-b.is-active { background: #1a3556; color: #fff; }
.edt-vue-nav { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; }
.edt-vue-nav .edt-select { min-width: 280px; }
.edt-fer-jour { position: absolute; inset: 0; z-index: 2; display: flex; align-items: flex-start; justify-content: center; padding-top: 24px;
  background: repeating-linear-gradient(45deg, #f3f4f6, #f3f4f6 6px, #e7e9ee 6px, #e7e9ee 12px); }
.edt-fer-jour span { background: #fff; border: 1px solid #d5dae2; border-radius: 4px; padding: 3px 8px; font-size: 12px; font-weight: 600; color: #6b7a8c; text-align: center; max-width: 90%; }
.edt-fer-part { color: #e67e22; margin-left: 4px; cursor: help; }

/* Brouillon dans l'agenda : plein écran sous le ruban, grille Semaine de l'agenda */
.edtb-page { display: flex; flex-direction: column; gap: 8px; height: 100%; min-height: 0; box-sizing: border-box; padding: 8px 12px; font-size: 13px; color: #1a3556; }
.edtb-top { flex-shrink: 0; }
.edtb-cal { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.edtb-cal > .agweek-wrap { flex: 1; min-height: 0; }
.agweek-event-detail { font-size: 10px; line-height: 1.2; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.edtb-page { padding: 0; }
.edtb-info { margin-left: auto; font-size: 12px; color: #1a3556; white-space: nowrap; }

/* Brouillon (agenda) : grille + volet des filtres à droite */
.group-section[hidden] { display: none; }
.ribbon-button.is-on { background: #d6e4f5; border-color: #7da3cf; color: #123a66; }
.edtb-row { flex-direction: row; gap: 0; }
.edtb-row > .edtb-cal { min-width: 0; }
.edtb-volet { width: 300px; flex-shrink: 0; display: flex; flex-direction: column; min-height: 0; background: #fff; border-left: 1px solid #d0d5dd; box-shadow: -2px 0 8px rgba(0,0,0,.06); }
.edtb-volet[hidden] { display: none; }
.edtb-v-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; border-bottom: 1px solid #e3e8ef; background: #f6f9fc; }
.edtb-v-body { flex: 1; min-height: 0; overflow: auto; padding: 8px 12px; display: flex; flex-direction: column; gap: 12px; }
.edtb-v-sec { display: flex; flex-direction: column; gap: 8px; }
.edtb-v-sec + .edtb-v-sec { border-top: 1px solid #eef1f5; padding-top: 10px; }
.edtb-v-sec .mat-filter-select, .edtb-v-sec .edt-select, .edtb-v-sec .ff-select { width: 100%; min-width: 0; box-sizing: border-box; }
.edtb-v-sec .mat-filter-select.is-filled, .edtb-v-sec .ff-select.is-filled { background: #e3eefb; border-color: #8db6e3; font-weight: 600; }
.edtb-v-liste > label { font-size: 11px; font-weight: 600; color: #666; }
.edtb-v-liste .edt-input { width: 100%; box-sizing: border-box; }
.edtb-li-box { max-height: 26vh; overflow: auto; border: 1px solid #e3e8ef; border-radius: 5px; padding: 2px; }
.edtb-li { display: flex; width: 100%; justify-content: space-between; gap: 6px; border: none; background: none; text-align: left; padding: 4px 8px; border-radius: 4px; cursor: pointer; font-size: 12px; color: #1a3556; }
.edtb-li:hover { background: #f0f4f9; }
.edtb-li.is-sel { background: #1a3556; color: #fff; }
.edtb-li-n { color: #8a97a8; font-size: 11px; }
.edtb-li.is-sel .edtb-li-n { color: #cfe0f3; }
.edtb-v-foot { padding: 8px 12px; border-top: 1px solid #e3e8ef; }
.edtb-v-foot .win-btn { width: 100%; }
/* Fenêtre déplaçable des séances non placées */
.edtb-np { position: fixed; z-index: 900; width: 320px; max-height: 60vh; display: flex; flex-direction: column; background: #fff; border: 1px solid #c8d3e0; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.edtb-np[hidden] { display: none; }
.edtb-np-head { display: flex; align-items: center; gap: 6px; padding: 7px 10px; background: #fdf3e7; color: #a35b0b; font-weight: 600; border-bottom: 1px solid #f0d9bc; border-radius: 8px 8px 0 0; cursor: move; user-select: none; }
.edtb-np-n { background: #e67e22; color: #fff; border-radius: 10px; padding: 0 7px; font-size: 11px; }
.edtb-np-list { overflow: auto; padding: 6px; display: flex; flex-direction: column; gap: 6px; }

/* Brouillon (agenda) : glisser-déposer des séances */
.edtb-np-drag { cursor: grab; }
.edtb-np-drag:hover { box-shadow: 0 0 0 1px var(--c); }
body.edtb-glisse, body.edtb-glisse * { cursor: grabbing !important; user-select: none; }
.edtb-fantome { position: fixed; z-index: 2000; pointer-events: none; background: #1a3556; color: #fff; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 4px; box-shadow: 0 4px 12px rgba(0,0,0,.25); white-space: nowrap; }
.edtb-depot { position: absolute; left: 2px; right: 2px; z-index: 5; pointer-events: none; border: 2px dashed #2e75b6; background: rgba(46,117,182,.12); border-radius: 4px; font-size: 11px; font-weight: 700; color: #1a3556; padding: 2px 4px; box-sizing: border-box; }
.edtb-depot.is-refus { border-color: #c0392b; background: rgba(192,57,43,.1); color: #c0392b; }
.edtb-cal .agweek-event { cursor: grab; }
.edt-cal-toutes { margin-top: 12px; border-top: 1px solid #e3e8ef; padding-top: 8px; }
.edt-cal-toutes summary { cursor: pointer; margin-bottom: 6px; }

/* Brouillon (agenda) : conflits */
.ribbon-button.is-alerte { color: #c0392b; border-color: #e6a19a; }
.edtb-cal .agweek-event.edtb-conflit { outline: 2px solid #c0392b; outline-offset: -1px; }
.edtb-cf { width: 360px; }
.edtb-cf .edtb-np-head { background: #fbeceb; color: #a5281b; border-bottom-color: #efc8c3; }
.edtb-cf .edtb-np-n { background: #c0392b; }
.edtb-cf-item { border: 1px solid #efc8c3; border-radius: 6px; padding: 5px; display: flex; flex-direction: column; gap: 4px; background: #fffafa; }
.edtb-cf-titre { font-size: 12px; color: #a5281b; }

/* Préparer l'EDT : cases des semestres dans la barre de filtres */
.edt-bf-sems { display: inline-flex; align-items: center; gap: 12px; height: 30px; }

/* Couleurs des séances : TP en bordure pointillée, choix des couleurs */
.edt-ev.is-tp { border-left-style: dashed; }
.edt-couleurs { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #6b7a8c; margin-right: 8px; }
.edt-couleurs .edt-select { height: 26px; font-size: 12px; }
.agweek-toolbar .edt-couleurs { margin-left: 8px; }

/* Heures désactivées faute de groupe */
.edt-formule.is-eteint { opacity: .45; }
.edt-formule.is-eteint .edt-hours { text-decoration: line-through; }
.edt-total-pill.is-eteint { background: #eef0f3; color: #7f8a99; border-color: #d5dae2; font-style: italic; }
.edt-grp-eteint { color: #7f8a99; font-style: italic; }

/* Glisser-déposer : plages possibles de la séance dans la semaine affichée */
.edtb-dispo { position: absolute; left: 1px; right: 1px; z-index: 1; pointer-events: none; border-radius: 4px; box-sizing: border-box; }
.edtb-dispo.is-ok { border: 2px dashed #1e8449; background: repeating-linear-gradient(135deg, rgba(39,174,96,.16), rgba(39,174,96,.16) 6px, rgba(39,174,96,.06) 6px, rgba(39,174,96,.06) 12px); }
.edtb-dispo.is-prof { border: 1px dashed #d68910; background: repeating-linear-gradient(45deg, rgba(243,156,18,.14), rgba(243,156,18,.14) 5px, transparent 5px, transparent 10px); }
.edtb-depot.is-prof { border-color: #d68910; background: rgba(243,156,18,.15); color: #9c640c; }
.edtb-fantome-l { font-size: 10px; font-weight: 400; opacity: .9; margin-top: 2px; display: flex; align-items: center; gap: 4px; }
.edtb-fantome-l i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; }
.edtb-fantome-l i.is-ok { border: 1px dashed #7dcea0; background: rgba(39,174,96,.5); }
.edtb-fantome-l i.is-prof { border: 1px dashed #f5b041; background: rgba(243,156,18,.5); margin-left: 6px; }
/* Fenêtre des non placées comme zone de dépôt (retirer une séance placée) */
.edtb-np.is-depot { outline: 3px dashed #2e75b6; outline-offset: 2px; }
.edtb-np.is-depot-refus { outline-color: #c0392b; }

/* Brouillon (agenda) : cadenas bloquer / débloquer */
.edtb-cal .agweek-event { position: absolute; }
.edtb-lock { position: absolute; top: 1px; right: 1px; width: 20px; height: 20px; border: none; border-radius: 4px; background: rgba(255,255,255,.85);
  color: #6b7a8c; font-size: 10px; cursor: pointer; display: none; align-items: center; justify-content: center; padding: 0; z-index: 2; }
.edtb-cal .agweek-event:hover .edtb-lock, .edtb-cal .agweek-event.is-bloquee .edtb-lock { display: inline-flex; }
.edtb-cal .agweek-event.is-bloquee .edtb-lock { color: #1a3556; background: #fff; box-shadow: 0 0 0 1px rgba(26,53,86,.25); }
.edtb-lock:hover { color: #fff; background: #1a3556; }
.edtb-lock:disabled { cursor: default; opacity: .7; }

/* Brouillon (agenda) : jours bien séparés (fond alterné, séparations marquées) */
.edtb-cal .agweek-col { border-left: 2px solid #c9d4e2; }
.edtb-cal .agweek-col.agweek-alt { background: rgba(26, 53, 86, .045); }
.edtb-cal .agweek-col.agweek-col-today { background: rgba(192, 57, 43, .05); }
.edtb-cal .agweek-col-head { border-left: 2px solid #c9d4e2; background: #fafcfe; }
.edtb-cal .agweek-col-head.agweek-alt { background: #eef2f7; }
.edtb-cal .agweek-allday-cell { border-left: 2px solid #c9d4e2; }
.edtb-cal .agweek-allday-cell.agweek-alt { background: rgba(26, 53, 86, .045); }
.edtb-cal .agweek-col:first-child, .edtb-cal .agweek-col-head:first-of-type { border-left-width: 2px; }
/* Motif de non-placement : une ligne, texte complet au survol */
.edtb-motif { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: help; }

/* Icônes des types de cours (CM, CMi, TD, TP) */
.edt-type { white-space: nowrap; }
.edt-type .fas, .agweek-event-title .fas { width: 14px; text-align: center; opacity: .85; }

/* Icônes des types de cours : plus grandes et bien visibles */
.agweek-event-title .fas { font-size: 15px; width: 18px; opacity: 1; vertical-align: -2px; margin-right: 2px; }
.edtb-cal .agweek-event-title { line-height: 1.35; }
.edt-type .fas { font-size: 15px; width: 18px; opacity: 1; vertical-align: -2px; }

/* Brouillon (agenda) : icône du type de cours dans la marge gauche de la séance */
.edtb-cal .agweek-event.has-ic { display: flex; align-items: stretch; gap: 4px; padding-left: 2px; }
.edtb-cal .agweek-event-ic { flex: 0 0 22px; display: flex; align-items: center; justify-content: center; font-size: 16px; opacity: .9; }
.edtb-cal .agweek-event-txt { flex: 1; min-width: 0; overflow: hidden; }

/* Volet « Places possibles » */
.edtb-pl-seance.edt-np-item { cursor: grab; }
.edtb-pl-leg { display: inline-flex; align-items: center; gap: 4px; margin-left: 4px; }
.edtb-pl-leg i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; }
.edtb-pl-leg i.is-ok { border: 1px dashed #1e8449; background: rgba(39,174,96,.25); }
.edtb-pl-leg i.is-prof { border: 1px dashed #d68910; background: rgba(243,156,18,.25); margin-left: 6px; }
.edtb-pl-liste { display: flex; flex-direction: column; gap: 3px; }
.edtb-pl-sem { margin-top: 6px; font-size: 11px; font-weight: 700; color: #6b7a8c; text-transform: uppercase; letter-spacing: .03em; border-bottom: 1px solid #e3e8ef; padding-bottom: 2px; }
.edtb-pl-jour { display: flex; gap: 6px; align-items: flex-start; }
.edtb-pl-date { flex: 0 0 64px; font-size: 12px; font-weight: 600; color: #1a3556; padding-top: 3px; }
.edtb-pl-heures { display: flex; flex-wrap: wrap; gap: 3px; }
.edtb-place-chip { border: 1px dashed #1e8449; background: rgba(39,174,96,.12); color: #145a32; border-radius: 4px; font-size: 11px; padding: 2px 5px; cursor: pointer; }
.edtb-place-chip:hover, .edtb-place-chip.is-cible { background: #1e8449; color: #fff; border-style: solid; }
.edtb-place-chip.is-prof { border-color: #d68910; background: rgba(243,156,18,.10); color: #9c640c; cursor: not-allowed; }
.edt-np-item.is-sel { box-shadow: 0 0 0 2px #2e75b6; background: #eaf2fb; }

/* Menu contextuel en cascade */
.edtb-menu { position: fixed; z-index: 3000; min-width: 190px; max-height: 60vh; overflow-y: auto; background: #fff; border: 1px solid #c8d3e0; border-radius: 6px; box-shadow: 0 8px 24px rgba(0,0,0,.18); padding: 4px 0; }
.edtb-menu button { display: flex; align-items: center; gap: 8px; width: 100%; border: none; background: none; text-align: left; padding: 6px 12px; font-size: 13px; color: #1a3556; cursor: pointer; white-space: nowrap; }
.edtb-menu button:hover, .edtb-menu button.is-ouvert { background: #eaf2fb; }
.edtb-menu button:disabled { color: #9aa5b4; cursor: default; background: none; }
.edtb-menu button.is-gras span { font-weight: 700; }
.edtb-menu button .fas { width: 14px; text-align: center; color: #6b7a8c; }
.edtb-menu button .fa-check { color: #1e8449; }
.edtb-menu button .is-vide { visibility: hidden; }
.edtb-menu .edtb-menu-fl { margin-left: auto; font-size: 10px; }
.edtb-menu-sec { padding: 4px 12px; font-size: 11px; color: #6b7a8c; text-transform: uppercase; letter-spacing: .03em; }
