/* ============================================================
   fiche-eleve.css — fiche élève côté professeur, modernisée (2026-10)
   Portée : .eleve-modal-v2.fe (fiche d'un élève existant, et création : .fe.fe-creation). Chargé APRÈS styles.css. Préfixe fe-.
   Couleurs : encres ≥ 4,5:1 sur leur fond ; mode nuit (body.dark-mode) en fin de fichier.
   ============================================================ */

.eleve-modal-v2.fe { max-width: 1040px; border-radius: 18px; background: #fff; }
/* Hauteur fixe sur grand écran : la fiche ne « saute » plus d'un onglet à l'autre */
@media (min-width: 641px) { .eleve-modal-v2.fe { height: min(92vh, 940px); } }

/* --- en-tête --- */
.fe-tete { flex-shrink: 0; padding: 18px 22px 14px; background: linear-gradient(180deg, #f0fdfa 0%, #fff 100%); }
.fe-tete-l1 { display: flex; align-items: center; gap: 14px; }
.fe-av { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; flex-shrink: 0;
  font-weight: 800; font-size: 20px; color: #fff; background: #0f766e; background: var(--fe-av, #0f766e);
  box-shadow: 0 4px 12px rgba(15, 23, 42, .15); }
.fe-id { flex: 1; min-width: 0; }
.fe-nom { margin: 0; font-size: 22px; font-weight: 800; color: #0f172a; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fe-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.fe-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: #f1f5f9; color: #334155; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.fe-chip--txt { display: inline-block; }
.fe-chip--niv { background: #ccfbf1; color: #115e59; }
.fe-chip--v { background: #dcfce7; color: #166534; }
.fe-chip--o { background: #fef3c7; color: #92400e; }
.fe-chip--r { background: #fee2e2; color: #991b1b; }
.fe-point { width: 7px; height: 7px; border-radius: 50%; background: #94a3b8; flex-shrink: 0; }
.fe-point--v { background: #16a34a; box-shadow: 0 0 0 2px rgba(22, 163, 74, .2); }
.fe-actions { display: flex; gap: 8px; flex-shrink: 0; }
.fe-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 10px; border: 1px solid #e2e8f0; background: #fff;
  color: #334155; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s; }
.fe-btn:hover { background: #f0fdfa; border-color: #99f6e4; }
.fe-btn.u-hidden { display: none; }
.fe-fermer.eleve-modal-close { width: 38px; height: 38px; border-radius: 10px; border: 1px solid #e2e8f0; background: #fff; color: #475569; font-size: 16px;
  display: grid; place-items: center; cursor: pointer; flex-shrink: 0; backdrop-filter: none; -webkit-backdrop-filter: none; }
.fe-fermer.eleve-modal-close:hover { background: #f1f5f9; color: #0f172a; }

/* --- onglets : soulignés, plus de pastilles violettes --- */
.eleve-modal-v2.fe .eleve-tabs-bar { background: #fff; padding: 0 22px; gap: 2px; border-bottom: 1px solid #e5e7eb; }
.eleve-modal-v2.fe .eleve-tab-btn { padding: 11px 13px 10px; font-size: 14px; font-weight: 600; color: #64748b; border-radius: 0; background: none;
  border-bottom: 2.5px solid transparent; box-shadow: none; }
.eleve-modal-v2.fe .eleve-tab-btn:hover { color: #0f172a; background: none; }
.eleve-modal-v2.fe .eleve-tab-btn.active { color: #0f766e; background: none; border-bottom-color: #0f766e; box-shadow: none; }
.eleve-modal-v2.fe .eleve-tab-btn { flex-shrink: 0; display: inline-flex; align-items: center; }
.eleve-modal-v2.fe .eleve-tab-btn .tab-badge { position: static; inset: auto; transform: none; margin-left: 6px; vertical-align: 1px;
  min-width: 18px; width: auto; height: 18px; padding: 0 5px; border-radius: 999px; background: #dc2626; color: #fff;
  font-size: 11px; font-weight: 700; line-height: 18px; align-items: center; justify-content: center; box-shadow: none; }
.eleve-modal-v2.fe .eleve-modal-body { background: #f8fafc; padding: 18px 22px 24px; }

/* --- vue d'ensemble --- */
.fe-chargement { padding: 40px 16px; text-align: center; color: #475569; font-size: 14px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.fe-spin { width: 24px; height: 24px; border-radius: 50%; border: 3px solid #e5e7eb; border-top-color: #0d9488; animation: fe-tourne .8s linear infinite; }
@keyframes fe-tourne { to { transform: rotate(360deg); } }
.fe-gris { color: #64748b !important; }
.fe-r { color: #b91c1c !important; }
.fe-o { color: #b45309 !important; }
.fe-v { color: #15803d !important; }

.fe-alertes { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.fe-al { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 10px; font: inherit; font-size: 13px; cursor: pointer; text-align: left;
  border: 1px solid #fed7aa; background: #fff7ed; color: #9a3412; }
.fe-al b { margin-left: 4px; white-space: nowrap; }
.fe-al--r { border-color: #fecaca; background: #fef2f2; color: #991b1b; }
.fe-al--n { border-color: #e2e8f0; background: #f1f5f9; color: #334155; }
.fe-al:hover { filter: brightness(.97); }

.fe-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.fe-kpi { background: #fff; border: 1px solid #e5e7eb; border-radius: 14px; padding: 12px 14px; text-align: left; font: inherit; color: inherit; min-width: 0; }
.fe-kpi--btn { cursor: pointer; transition: border-color .12s, background .12s; }
.fe-kpi--btn:hover { border-color: #99f6e4; background: #f0fdfa; }
.fe-kpi small { display: block; font-size: 11.5px; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: .04em; }
.fe-kpi b { display: block; font-size: 19px; font-weight: 800; color: #0f172a; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fe-kpi span { display: block; font-size: 12.5px; color: #475569; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.fe-deux { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.fe-carte { background: #fff; border: 1px solid #e5e7eb; border-radius: 14px; padding: 14px 16px; min-width: 0; }
.fe-carte h4 { margin: 0 0 10px; font-size: 15px; font-weight: 700; color: #0f172a; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fe-carte .fe-h4-2 { margin-top: 16px; }
.fe-carte p { margin: 0 0 8px; font-size: 13.5px; line-height: 1.55; color: #334155; overflow-wrap: anywhere; }
.fe-theme { font-weight: 600; color: #0f172a !important; }
.fe-lab { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #64748b; margin: 10px 0 4px; }
.fe-lien { margin-left: auto; font: inherit; font-size: 12.5px; font-weight: 600; color: #0f766e; background: none; border: 0; padding: 2px 4px; border-radius: 6px; cursor: pointer; }
.fe-lien:hover { background: #f0fdfa; }
.fe-lien--bas { margin: 4px 0 0; display: block; }
.fe-dv { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid #f1f5f9; font-size: 13.5px; color: #1f2937; }
.fe-dv:first-of-type { border-top: 0; padding-top: 0; }
.fe-dv span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.fe-ech { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 7px; background: #f1f5f9; color: #334155; white-space: nowrap; }
.fe-ech--r { background: #fee2e2; color: #991b1b; }
.fe-ech--o { background: #fef3c7; color: #92400e; }
.fe-msg { background: #f1f5f9; border-radius: 12px 12px 12px 4px; padding: 9px 12px; font-size: 13.5px; color: #1f2937; overflow-wrap: anywhere; }
.fe-msg--prof { background: #ecfdf5; border-radius: 12px 12px 4px 12px; }
.fe-msg small { display: block; font-size: 11.5px; font-weight: 600; color: #64748b; margin-bottom: 2px; }
.fe-carte .se-t { min-width: 0; }

/* --- Résultats : segments ; Devoirs : section exercices cherchés --- */
.fe-seg { display: inline-flex; gap: 2px; padding: 3px; margin-bottom: 14px; border-radius: 12px; background: #e2e8f0; max-width: 100%; overflow-x: auto; }
.fe-seg-btn { font: inherit; font-size: 13.5px; font-weight: 600; color: #475569; background: none; border: 0; border-radius: 9px; padding: 7px 14px; cursor: pointer; white-space: nowrap; }
.fe-seg-btn:hover { color: #0f172a; }
.fe-seg-btn--act, .fe-seg-btn--act:hover { background: #fff; color: #0f766e; box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }
.fe-section { margin-top: 18px; background: #fff; border: 1px solid #e5e7eb; border-radius: 14px; padding: 14px 16px; }
.fe-section-titre { margin: 0 0 10px; font-size: 15px; font-weight: 700; color: #0f172a; }
.fe-petit { font-size: 13px; margin: 0; }

/* --- en-tête : menu « ⋯ » (arrêt du suivi, RGPD, suppression…) --- */
.fe-btn--icone { width: 38px; justify-content: center; padding: 8px 0; font-size: 18px; line-height: 1; }
.fe-plus { flex-shrink: 0; }
.eleve-modal-v2.fe .fe-plus .eleve-more-menu { top: calc(100% + 6px); bottom: auto; left: auto; right: 0; margin: 0; min-width: 290px; z-index: 30; border-radius: 12px; }
/* Menu « ⋯ » : icônes au trait + sous-titre ; les actions sensibles vivent dans Profil › Gestion du dossier */
.eleve-modal-v2.fe .fe-menu { padding: 6px; border-color: #e2e8f0; box-shadow: 0 12px 32px rgba(15, 23, 42, .14), 0 2px 6px rgba(15, 23, 42, .06); }
.eleve-modal-v2.fe .fe-menu.show { animation: fe-menu-in .12s ease-out; }
@keyframes fe-menu-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.eleve-modal-v2.fe .fe-mi { gap: 12px; padding: 9px 10px; border-radius: 9px; color: #0f172a; font-size: 14px; font-weight: 600; }
.eleve-modal-v2.fe .fe-mi:hover, .eleve-modal-v2.fe .fe-mi:focus-visible { background: #f0fdfa; outline: none; }
.fe-mi-ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; background: #f1f5f9; color: #0f766e; }
.fe-mi:hover .fe-mi-ic { background: #ccfbf1; }
.fe-mi-t { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.fe-mi-t small { font-size: 12px; font-weight: 500; color: #64748b; margin-top: 2px; }
.fe-mi-fl { margin-left: auto; color: #94a3b8; font-size: 18px; }
.fe-mi-sep { height: 1px; background: #e5e7eb; margin: 5px 6px; }

/* Profil › Gestion du dossier (dernière carte, après le journal) */
.fe-dossier { order: 11; background: #fff; border: 1px solid #e5e7eb; border-radius: 14px; padding: 6px 18px 4px; scroll-margin-top: 12px; }
.fe-dossier-titre { font-size: 15px; font-weight: 700; color: #0f172a; margin: 10px 0 2px; }
.fe-dz-ligne { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid #f1f5f9; }
.fe-dossier-titre + .fe-dz-ligne { border-top: 0; }
.fe-dz-ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; background: #f1f5f9; color: #475569; }
.fe-dz-ic.fe-dz--o { background: #fff7ed; color: #c2410c; }
.fe-dz-ic.fe-dz--r { background: #fef2f2; color: #b91c1c; }
.fe-dz-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.fe-dz-t strong { font-size: 14px; color: #0f172a; }
.fe-dz-t span { font-size: 12.5px; color: #64748b; line-height: 1.4; }
.fe-dz-btn { flex-shrink: 0; padding: 7px 14px; border-radius: 9px; border: 1px solid #e2e8f0; background: #fff; color: #334155; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: background .12s, border-color .12s; }
.fe-dz-btn:hover { background: #f8fafc; border-color: #cbd5e1; }
.fe-dz-btn.fe-dz--o { color: #c2410c; border-color: #fed7aa; }
.fe-dz-btn.fe-dz--o:hover { background: #fff7ed; }
.fe-dz-btn.fe-dz--r { color: #b91c1c; border-color: #fecaca; }
.fe-dz-btn.fe-dz--r:hover { background: #fef2f2; border-color: #fca5a5; }
@media (max-width: 520px) {
  .fe-dz-ligne { flex-wrap: wrap; }
  .fe-dz-t { flex-basis: calc(100% - 48px); }
  .fe-dz-btn { margin-left: 48px; }
}
.fe-sep { margin: 4px 0; border: 0; border-top: 1px solid #f1f5f9; }

/* --- pied : seulement sur Profil --- */
.eleve-modal-v2.fe .eleve-modal-footer.u-hidden { display: none; }
.eleve-modal-v2.fe .eleve-footer-right { display: flex; align-items: center; gap: 10px; }
.eleve-modal-v2.fe .eleve-footer-right .eleve-btn-ghost { width: auto; height: auto; font-size: 14px; font-weight: 600; padding: 9px 16px; border-radius: 10px; border: 1px solid #e2e8f0; background: #fff; color: #334155; }
.eleve-modal-v2.fe .eleve-footer-right .eleve-btn-ghost:hover { background: #f8fafc; color: #0f172a; }
body.dark-mode .eleve-modal-v2.fe .eleve-footer-right .eleve-btn-ghost { background: #1f2937; border-color: #374151; color: #e5e7eb; }
.fe-modifie { font-size: 13px; font-weight: 600; color: #b45309; }
.eleve-modal-v2.fe .eleve-footer-right { gap: 10px; }
.eleve-modal-v2.fe #saveEleve { background: #0f766e; color: #fff; border-radius: 10px; }
.eleve-modal-v2.fe #saveEleve:hover { background: #115e59; }

/* --- Profil (2026-10) : Identité → Scolarité → Famille → Espace élève → Journal → Dossier.
   L'identité vient en premier : c'est ce qu'on remplit à l'inscription. --- */
.fe-profil { display: flex; flex-direction: column; gap: 12px; }
.eleve-modal-v2.fe .fe-profil > * { margin: 0 !important; }
.eleve-modal-v2.fe .fe-profil .eleve-section, .eleve-modal-v2.fe .fe-carte-acces { background: #fff; border: 1px solid #e5e7eb; border-left: 1px solid #e5e7eb; border-radius: 14px; padding: 16px 18px; box-shadow: none; }
.eleve-modal-v2.fe .fe-profil .eleve-section:hover { box-shadow: none; }
.eleve-modal-v2.fe .fe-profil .eleve-section-title { font-size: 15px; font-weight: 700; color: #0f172a; text-transform: none; letter-spacing: 0; margin: 0 0 14px; padding: 0; border: 0; }
.eleve-modal-v2.fe .fe-carte-acces { order: 1; }
/* Champs : libellés en casse normale, saisies homogènes */
.fe-grille { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.fe-grille--haut { margin-top: 16px; }
.fe-grille .fe-large { grid-column: 1 / -1; }
.eleve-modal-v2.fe .fe-profil .field { margin: 0; }
.eleve-modal-v2.fe .fe-profil label, .eleve-modal-v2.fe .fe-profil .fe-lab { display: block; text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 600; color: #334155; margin: 0 0 6px; }
.eleve-modal-v2.fe .fe-profil .fe-champ { gap: 0; }
.eleve-modal-v2.fe .fe-profil .fe-champ small { display: block; font-size: 12px; font-weight: 400; color: #64748b; margin-top: 5px; line-height: 1.4; }
.fe-requis { color: #b91c1c; font-weight: 700; }
.fe-gris-txt { font-weight: 400; color: #64748b; }
.eleve-modal-v2.fe .fe-profil .input, .eleve-modal-v2.fe .fe-profil select.input, .eleve-modal-v2.fe .fe-profil textarea.input {
  width: 100%; box-sizing: border-box; font: inherit; font-size: 14px; color: #0f172a; background: #fff; border: 1px solid #cbd5e1; border-radius: 10px; padding: 9px 12px; min-height: 40px; }
.eleve-modal-v2.fe .fe-profil textarea.input { resize: vertical; min-height: 64px; }
.eleve-modal-v2.fe .fe-profil .input:focus { outline: 2px solid #5eead4; outline-offset: 0; border-color: #14b8a6; box-shadow: none; background: #fff; }
.eleve-modal-v2.fe .fe-profil .input::placeholder { color: #94a3b8; }
/* Niveau : teinte de la fiche (sarcelle) au lieu de l'indigo */
.eleve-modal-v2.fe .niveau-pill { border-radius: 999px; background: #fff; border-color: #cbd5e1; color: #334155; }
.eleve-modal-v2.fe .niveau-pill:hover { border-color: #5eead4; background: #f0fdfa; color: #0f766e; }
.eleve-modal-v2.fe .niveau-pill.selected, .eleve-modal-v2.fe .filiere-pill.selected { background: #0f766e; border-color: #0f766e; color: #fff; box-shadow: none; }
.eleve-modal-v2.fe .filiere-pills { background: #f0fdfa; border-color: #99f6e4; }
.eleve-modal-v2.fe .filiere-pill { border-color: #99f6e4; color: #115e59; }
.eleve-modal-v2.fe .filiere-pill:hover { background: #ccfbf1; }
.eleve-modal-v2.fe .eleve-collapse-toggle { padding: 12px 0 0; margin-top: 14px; border-top: 1px solid #f1f5f9; }
.eleve-modal-v2.fe .eleve-collapse-toggle label { margin: 0; }
.eleve-modal-v2.fe .fe-profil sup { font-size: .7em; line-height: 0; vertical-align: super; }
.eleve-modal-v2.fe #e-spe-count { margin: 6px 0 12px; color: #64748b; }
.eleve-modal-v2.fe .spe-chip, .eleve-modal-v2.fe .opt-chip { padding: 5px 11px; font-size: 12.5px; }
.eleve-modal-v2.fe .spe-chip.toggle-active-primary, .eleve-modal-v2.fe .opt-chip.toggle-active-purple { background: #0f766e !important; border-color: #0f766e !important; color: #fff !important; }
body.dark-mode .eleve-modal-v2.fe .spe-chip.toggle-active-primary, body.dark-mode .eleve-modal-v2.fe .opt-chip.toggle-active-purple { background: #0d9488 !important; border-color: #0d9488 !important; color: #fff !important; }
/* Espace élève : deux sous-blocs (compte, discussions) */
.fe-sous + .fe-sous { margin-top: 14px; padding-top: 14px; border-top: 1px solid #f1f5f9; }
.fe-sous-tete { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; }
.fe-sous-tete strong { font-size: 14px; color: #0f172a; }
.fe-sous-tete span { font-size: 12.5px; color: #475569; overflow-wrap: anywhere; }
.fe-sous-tete b { font-weight: 600; color: #0f172a; }
/* Parent choisi : carte compacte sous le champ, adresse reprise en un clic */
.fe-pc { margin-top: 8px; padding: 10px 12px; border: 1px solid #ccfbf1; background: #f0fdfa; border-radius: 10px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.fe-pc-id { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.fe-pc-id strong { color: #0f172a; font-size: 13.5px; }
.fe-pc-id span { color: #475569; overflow-wrap: anywhere; }
.fe-pc-bas { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.fe-pc-adr { color: #334155; }
.fe-pc-ok { color: #15803d; font-weight: 600; font-size: 12.5px; }
.fe-pc-btn { font: inherit; font-size: 12.5px; font-weight: 600; color: #0f766e; background: #fff; border: 1px solid #5eead4; border-radius: 999px; padding: 4px 11px; cursor: pointer; }
.fe-pc-btn:hover { background: #ccfbf1; }
.fe-lien-discret { font: inherit; font-size: 13px; font-weight: 600; color: #0f766e; background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #99f6e4; }
.fe-lien-discret:hover { text-decoration-color: currentColor; }
.fe-lien-discret.u-hidden, .fe-champ.u-hidden, .fe-pc.u-hidden { display: none; }

/* Compte et accès : état, code, envois avec destinataires, outils discrets */
.fe-acc { display: flex; flex-direction: column; gap: 12px; }
.fe-acc-ligne { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.fe-acc-code { display: inline-flex; align-items: center; gap: 4px; border: 1px dashed #5eead4; background: #f0fdfa; border-radius: 12px; padding: 4px 4px 4px 14px; }
.fe-acc-code #current-access-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 700; font-size: 19px; letter-spacing: 3px; color: #115e59; }
.fe-acc-copier { font: inherit; font-size: 12.5px; font-weight: 600; color: #0f766e; background: #fff; border: 1px solid #99f6e4; border-radius: 8px; padding: 5px 10px; margin-left: 8px; cursor: pointer; }
.fe-acc-copier:hover { background: #ccfbf1; }
.fe-acc-meta { display: flex; flex-direction: column; gap: 3px; }
.fe-acc-meta small { font-size: 12px; color: #64748b; }
.fe-acc-etat { align-self: flex-start; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.fe-acc-etat--v { background: #dcfce7; color: #166534; }
.fe-acc-etat--o { background: #fef3c7; color: #92400e; }
.fe-acc-etat--r { background: #fee2e2; color: #991b1b; }
.fe-acc-etat--gris { background: #f1f5f9; color: #334155; }
.fe-acc-aide { margin: 0; font-size: 13px; color: #475569; }
.fe-acc-envois { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.fe-acc-envoi { display: flex; align-items: center; gap: 10px; text-align: left; font: inherit; cursor: pointer; padding: 10px 14px; border-radius: 12px; border: 1px solid #cbd5e1; background: #fff; color: #0f172a; min-width: 0; }
.fe-acc-envoi svg { flex-shrink: 0; color: #0f766e; }
.fe-acc-envoi span { display: flex; flex-direction: column; min-width: 0; }
.fe-acc-envoi b { font-size: 14px; font-weight: 700; }
.fe-acc-envoi small { font-size: 12px; color: #64748b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fe-acc-envoi:hover { border-color: #5eead4; background: #f0fdfa; }
.fe-acc-envoi--prim { background: #0f766e; border-color: #0f766e; color: #fff; }
.fe-acc-envoi--prim svg, .fe-acc-envoi--prim small { color: #ccfbf1; }
.fe-acc-envoi--prim:hover { background: #115e59; border-color: #115e59; }
.fe-acc-envoi--seul { align-self: flex-start; }
.fe-acc-envoi:disabled { opacity: .7; cursor: wait; }
.fe-acc-outils { display: flex; flex-wrap: wrap; gap: 4px 6px; padding-top: 10px; border-top: 1px solid #f1f5f9; }
.fe-acc-outil { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 12.5px; font-weight: 600; color: #475569; background: none; border: 0; border-radius: 8px; padding: 6px 8px; cursor: pointer; }
.fe-acc-outil:hover { background: #f1f5f9; color: #0f172a; }
.fe-acc-outil--r { color: #b91c1c; margin-left: auto; }
.fe-acc-outil--r:hover { background: #fee2e2; color: #991b1b; }
.fe-acc-alerte { margin: 0; font-size: 13px; color: #92400e; background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px; padding: 8px 12px; }
@media (max-width: 767px) {
  .eleve-modal-v2.fe .fe-acc-envoi { min-height: 52px !important; height: auto !important; }
  .eleve-modal-v2.fe .fe-acc-outil, .eleve-modal-v2.fe .fe-acc-copier, .eleve-modal-v2.fe .fe-pc-btn, .eleve-modal-v2.fe .fe-lien-discret { min-height: 36px !important; height: auto !important; min-width: 0 !important; }
  .fe-acc-outil--r { margin-left: 0; }
  .eleve-modal-v2.fe .fe-acc-outil, .eleve-modal-v2.fe .fe-acc-copier { font-size: 13px !important; padding: 6px 9px !important; width: auto !important; }
  .eleve-modal-v2.fe .fe-acc-envoi b { font-size: 14px !important; }
}
.fe-disc { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.fe-disc-choix { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: #334155; cursor: pointer; margin: 0 !important; }
.fe-disc-choix input { width: 17px; height: 17px; accent-color: #0f766e; }
body.dark-mode .fe-disc-choix { color: #e5e7eb; }
body.dark-mode .fe-pc { background: #042f2e; border-color: #115e59; }
body.dark-mode .fe-pc-id strong, body.dark-mode .fe-pc-adr { color: #f3f4f6; }
body.dark-mode .fe-pc-id span { color: #9ca3af; }
body.dark-mode .fe-pc-ok { color: #86efac; }
body.dark-mode .fe-pc-btn, body.dark-mode .fe-acc-copier { background: #111827; border-color: #0f766e; color: #5eead4; }
body.dark-mode .fe-lien-discret { color: #5eead4; text-decoration-color: #115e59; }
body.dark-mode .fe-acc-code { background: #042f2e; border-color: #0f766e; }
body.dark-mode .fe-acc-code #current-access-code { color: #99f6e4; }
body.dark-mode .fe-acc-meta small, body.dark-mode .fe-acc-aide { color: #9ca3af; }
body.dark-mode .fe-acc-etat--v { background: #14532d; color: #bbf7d0; }
body.dark-mode .fe-acc-etat--o { background: #451a03; color: #fde68a; }
body.dark-mode .fe-acc-etat--r { background: #450a0a; color: #fecaca; }
body.dark-mode .fe-acc-etat--gris { background: #1f2937; color: #d1d5db; }
body.dark-mode .fe-acc-envoi { background: #1f2937; border-color: #374151; color: #f3f4f6; }
body.dark-mode .fe-acc-envoi svg { color: #5eead4; }
body.dark-mode .fe-acc-envoi small { color: #9ca3af; }
body.dark-mode .fe-acc-envoi--prim { background: #0f766e; border-color: #0f766e; }
body.dark-mode .fe-acc-envoi--prim svg, body.dark-mode .fe-acc-envoi--prim small { color: #ccfbf1; }
body.dark-mode .fe-acc-outils { border-color: #1f2937; }
body.dark-mode .fe-acc-outil { color: #d1d5db; }
body.dark-mode .fe-acc-outil:hover { background: #1f2937; color: #fff; }
body.dark-mode .fe-acc-outil--r { color: #fca5a5; }
body.dark-mode .fe-acc-alerte { background: #451a03; border-color: #92400e; color: #fde68a; }

/* Création */
.eleve-modal-v2.fe.fe-creation { max-width: 860px; }
@media (min-width: 641px) { .eleve-modal-v2.fe.fe-creation { height: auto; max-height: 92vh; } }
.fe-av--nouveau { --fe-av: #0f766e; font-size: 26px; font-weight: 600; }
.fe-tete-sous { margin: 4px 0 0; font-size: 13px; color: #475569; }
.fe-creation-note { font-size: 12.5px; color: #475569; padding: 0 4px; }
@media (max-width: 640px) {
  .fe-grille { grid-template-columns: 1fr; gap: 12px; }
  .eleve-modal-v2.fe .fe-profil .eleve-section, .eleve-modal-v2.fe .fe-carte-acces { padding: 14px; }
  .fe-tete-sous { width: 100%; order: 3; }
}
@media (max-width: 767px) {
  .eleve-modal-v2.fe .fe-profil .input { font-size: 16px; } /* pas de zoom iOS */
  .eleve-modal-v2.fe .spe-chip, .eleve-modal-v2.fe .opt-chip { min-height: 36px !important; height: auto !important; font-size: 13px !important; padding: 6px 12px !important; }
  .eleve-modal-v2.fe .niveau-pill, .eleve-modal-v2.fe .filiere-pill { min-height: 40px !important; height: auto !important; font-size: 14px !important; padding: 8px 14px !important; }
}
.fe-journal { order: 10; background: #fff; border: 1px solid #e5e7eb; border-radius: 14px; padding: 0 16px; }
.fe-journal > summary { list-style: none; cursor: pointer; padding: 13px 0; font-weight: 700; font-size: 15px; color: #0f172a; display: flex; align-items: baseline; gap: 10px; }
.fe-journal > summary::-webkit-details-marker { display: none; }
.fe-journal > summary::after { content: "›"; margin-left: auto; color: #64748b; transition: transform .15s; }
.fe-journal[open] > summary::after { transform: rotate(90deg); }
.fe-journal > summary span { font-size: 12.5px; font-weight: 500; color: #64748b; }
.fe-journal[open] { padding-bottom: 14px; }
.fe-journal > div:first-of-type { margin-top: 0 !important; }
.fe-alerte-champ { margin: 10px 0 0; padding: 8px 12px; border-radius: 10px; background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; font-size: 13px; }
.eleve-modal-v2.fe .niveau-pill { border-radius: 999px; }

/* --- Séances : frise --- */
.fe-frise { position: relative; padding-left: 22px; display: flex; flex-direction: column; gap: 10px; }
.fe-frise::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: #ccfbf1; border-radius: 2px; }
.fe-seance { position: relative; background: #fff; border: 1px solid #e5e7eb; border-radius: 14px; }
.fe-seance::before { content: ""; position: absolute; left: -20px; top: 17px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 3px solid #14b8a6; }
.fe-seance:first-child::before { background: #14b8a6; }
.fe-seance-tete { width: 100%; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; padding: 12px 16px; background: none; border: 0; font: inherit; text-align: left; cursor: pointer; color: inherit; border-radius: 14px; }
.fe-seance-tete:hover { background: #f8fafc; }
.fe-seance-date { font-weight: 700; color: #0f766e; font-size: 13.5px; white-space: nowrap; }
.fe-seance-theme { font-weight: 600; color: #0f172a; font-size: 14.5px; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.fe-seance-meta { font-size: 12.5px; color: #64748b; white-space: nowrap; }
.fe-seance-fleche { color: #64748b; transition: transform .15s; font-size: 16px; }
.fe-seance-fleche.fe-ouverte, .fe-seance-tete[aria-expanded="true"] .fe-seance-fleche { transform: rotate(90deg); }
.fe-seance-corps { padding: 2px 16px 14px; font-size: 13.5px; color: #334155; border-top: 1px solid #f1f5f9; }
.fe-seance-bloc { margin-top: 10px; }
.fe-seance-lab { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #64748b; margin-bottom: 3px; }
.fe-seance-txt { line-height: 1.55; overflow-wrap: anywhere; }
.fe-seance-txt img { max-width: 100%; height: auto; }
.fe-seance-bloc--suite { padding: 10px 12px; border-radius: 10px; background: #fffbeb; border: 1px solid #fde68a; }
.fe-seance-bloc--suite .fe-seance-lab { color: #92400e; }

/* --- Messages : discussion --- */
.fe-chat { display: flex; flex-direction: column; gap: 12px; }
.fe-chat-fil { display: flex; flex-direction: column; gap: 10px; max-height: 52vh; overflow-y: auto; padding: 4px 2px; }
.fe-chat-vide { text-align: center; padding: 36px 16px; color: #64748b; font-size: 14px; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.fe-chat-vide span { font-size: 34px; }
.fe-bulle { max-width: 78%; padding: 10px 13px; border-radius: 14px; font-size: 13.5px; line-height: 1.45; }
.fe-bulle--eleve { align-self: flex-start; background: #f1f5f9; border-bottom-left-radius: 4px; }
.fe-bulle--prof { align-self: flex-end; background: #ccfbf1; border-bottom-right-radius: 4px; }
.fe-bulle--nonlu { background: #fef3c7; box-shadow: 0 0 0 1px #fcd34d inset; }
.fe-bulle-tete { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #475569; margin-bottom: 3px; }
.fe-bulle-tete b { color: #0f172a; }
.fe-bulle-tete span { margin-left: auto; font-size: 11px; color: #64748b; padding-left: 10px; white-space: nowrap; }
.fe-bulle-point { width: 7px; height: 7px; border-radius: 50%; background: #f59e0b; display: inline-block; }
.fe-bulle-objet { font-weight: 700; color: #0f172a; margin-bottom: 2px; }
.fe-bulle-txt { white-space: pre-wrap; overflow-wrap: anywhere; color: #1f2937; }
.fe-bulle-vu { font-size: 11px; color: #0f766e; text-align: right; margin-top: 4px; }
.fe-chat-saisie { display: flex; gap: 8px; align-items: flex-end; background: #fff; border: 1px solid #e5e7eb; border-radius: 14px; padding: 8px; position: sticky; bottom: 0; }
.fe-chat-saisie textarea { flex: 1; min-width: 0; border: 0; outline: none; resize: vertical; font: inherit; font-size: 14px; padding: 6px 8px; min-height: 42px; max-height: 200px; background: transparent; color: #0f172a; }
#send-reply-btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border: 0; border-radius: 10px; background: #0f766e; color: #fff; font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; white-space: nowrap; }
#send-reply-btn:hover { background: #115e59; }
#send-reply-btn:disabled { opacity: .6; cursor: default; }

/* ------------------------------------------------------------------
   Tablette et téléphone
   ------------------------------------------------------------------ */
@media (max-width: 900px) {
  .fe-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fe-deux { grid-template-columns: 1fr; }
  .fe-btn span { display: none; }
  .fe-btn { padding: 8px 10px; }
}
@media (max-width: 640px) {
  .modal-overlay.fe-overlay { padding: 0; align-items: stretch; }
  /* styles.css (« modales responsives ») impose 95vw !important et une marge : la fiche prend tout l'écran */
  .modal-overlay.fe-overlay .modal.eleve-modal-v2.fe { width: 100vw !important; max-width: 100vw !important; height: 100%; max-height: none;
    min-height: 0; border-radius: 0; margin: 0; animation: none; overflow: hidden; }
  .fe-tete { padding: 14px 14px 12px; }
  .fe-tete-l1 { flex-wrap: wrap; align-items: center; row-gap: 10px; }
  .fe-id { display: contents; }
  .fe-nom { flex: 1; min-width: 0; }
  .fe-chips { order: 3; width: 100%; margin-top: 0; }
  .fe-chip { font-size: 11.5px; padding: 3px 8px; }
  .fe-av { width: 46px; height: 46px; border-radius: 13px; font-size: 17px; }
  .fe-nom { font-size: 19px; white-space: normal; }
  .fe-actions { order: 4; width: 100%; }
  .fe-btn { flex: 1; justify-content: center; }
  .fe-btn span { display: inline; }
  .fe-fermer.eleve-modal-close { order: 2; }
  .eleve-modal-v2.fe .eleve-tabs-bar { padding: 0 8px; }
  .eleve-modal-v2.fe .eleve-tab-btn { padding: 11px 10px 10px; font-size: 13.5px; }
  .eleve-modal-v2.fe .eleve-modal-body { padding: 14px; }
  .fe-kpi { padding: 10px 12px; }
  .fe-kpi b { font-size: 16px; white-space: normal; }
  .fe-kpi span { white-space: normal; }
  .fe-al { width: 100%; }
  .fe-al b { margin-left: auto; }
  .fe-bulle { max-width: 90%; }
  .fe-seance-meta { width: 100%; }
}
@media (max-width: 767px) {
  /* styles.css impose 44 px de haut à tous les boutons sous 768 px */
  .eleve-modal-v2.fe .fe-kpi--btn, .eleve-modal-v2.fe .fe-lien, .eleve-modal-v2.fe .fe-seg-btn, .eleve-modal-v2.fe .fe-seance-tete, .eleve-modal-v2.fe .fe-dc-edit, .eleve-modal-v2.fe .fe-assign-retirer, .eleve-modal-v2.fe .fe-mode-btn { min-height: 0 !important; height: auto !important; }
}

/* ------------------------------------------------------------------
   Mode nuit
   ------------------------------------------------------------------ */
body.dark-mode .eleve-modal-v2.fe { background: #0b1220; }
body.dark-mode .fe-tete { background: linear-gradient(180deg, #0f2a2a 0%, #111827 100%); }
body.dark-mode .fe-nom, body.dark-mode .fe-carte h4, body.dark-mode .fe-theme, body.dark-mode .fe-kpi b { color: #f3f4f6 !important; }
body.dark-mode .fe-chip { background: #1f2937; color: #e5e7eb; }
body.dark-mode .fe-chip--niv { background: #134e4a; color: #99f6e4; }
body.dark-mode .fe-chip--v { background: #14532d; color: #bbf7d0; }
body.dark-mode .fe-chip--o { background: #78350f; color: #fde68a; }
body.dark-mode .fe-chip--r { background: #7f1d1d; color: #fecaca; }
body.dark-mode .fe-btn, body.dark-mode .fe-fermer.eleve-modal-close { background: #111827; border-color: #374151; color: #e5e7eb; }
body.dark-mode .fe-btn:hover, body.dark-mode .fe-fermer.eleve-modal-close:hover { background: #134e4a; border-color: #2dd4bf; }
body.dark-mode .eleve-modal-v2.fe .eleve-tabs-bar { background: #111827; border-color: #374151; }
body.dark-mode .eleve-modal-v2.fe .eleve-tab-btn { color: #9ca3af; }
body.dark-mode .eleve-modal-v2.fe .eleve-tab-btn:hover { color: #f3f4f6; }
body.dark-mode .eleve-modal-v2.fe .eleve-tab-btn.active { color: #5eead4; border-bottom-color: #2dd4bf; }
body.dark-mode .eleve-modal-v2.fe .eleve-modal-body { background: #0b1220; }
body.dark-mode .fe-kpi, body.dark-mode .fe-carte { background: #111827; border-color: #374151; color: #e5e7eb; }
body.dark-mode .fe-kpi--btn:hover { background: #134e4a; border-color: #2dd4bf; }
body.dark-mode .fe-kpi small, body.dark-mode .fe-lab, body.dark-mode .fe-msg small, body.dark-mode .fe-gris { color: #9ca3af !important; }
body.dark-mode .fe-kpi span, body.dark-mode .fe-carte p, body.dark-mode .fe-dv, body.dark-mode .fe-chargement { color: #cbd5e1; }
body.dark-mode .fe-dv { border-color: #1f2937; }
body.dark-mode .fe-ech { background: #1f2937; color: #e5e7eb; }
body.dark-mode .fe-ech--r { background: #7f1d1d; color: #fecaca; }
body.dark-mode .fe-ech--o { background: #78350f; color: #fde68a; }
body.dark-mode .fe-msg { background: #1f2937; color: #e5e7eb; }
body.dark-mode .fe-msg--prof { background: #052e16; }
body.dark-mode .fe-lien { color: #5eead4; }
body.dark-mode .fe-lien:hover { background: #134e4a; }
body.dark-mode .fe-al { background: #451a03; border-color: #92400e; color: #fde68a; }
body.dark-mode .fe-al--r { background: #450a0a; border-color: #991b1b; color: #fecaca; }
body.dark-mode .fe-al--n { background: #1f2937; border-color: #374151; color: #e5e7eb; }
body.dark-mode .eleve-modal-v2.fe .eleve-modal-footer { background: #111827; border-color: #374151; }
body.dark-mode .fe-r { color: #fca5a5 !important; }
body.dark-mode .fe-o { color: #fcd34d !important; }
body.dark-mode .fe-v { color: #86efac !important; }
body.dark-mode .fe-seg { background: #1f2937; }
body.dark-mode .fe-seg-btn { color: #9ca3af; }
body.dark-mode .fe-seg-btn--act, body.dark-mode .fe-seg-btn--act:hover { background: #111827; color: #5eead4; }
body.dark-mode .fe-section { background: #111827; border-color: #374151; }
body.dark-mode .fe-section-titre { color: #f3f4f6; }
body.dark-mode .eleve-modal-v2.fe .fe-profil .eleve-section, body.dark-mode .eleve-modal-v2.fe .fe-carte-acces,
body.dark-mode .fe-journal { background: #111827; border-color: #374151; color: #e5e7eb; }
body.dark-mode .eleve-modal-v2.fe .fe-profil .eleve-section-title, body.dark-mode .fe-journal > summary, body.dark-mode .fe-sous-tete strong, body.dark-mode .fe-sous-tete b { color: #f3f4f6; }
body.dark-mode .fe-journal > summary span, body.dark-mode .fe-sous-tete span, body.dark-mode .fe-gris-txt, body.dark-mode .fe-tete-sous, body.dark-mode .fe-creation-note,
body.dark-mode .eleve-modal-v2.fe .fe-profil .fe-champ small { color: #9ca3af; }
body.dark-mode .eleve-modal-v2.fe .fe-profil label, body.dark-mode .eleve-modal-v2.fe .fe-profil .fe-lab { color: #d1d5db; }
body.dark-mode .eleve-modal-v2.fe .fe-profil .input { background: #1f2937; border-color: #374151; color: #f3f4f6; }
body.dark-mode .fe-sous + .fe-sous, body.dark-mode .eleve-modal-v2.fe .eleve-collapse-toggle { border-color: #1f2937; }
body.dark-mode .eleve-modal-v2.fe .niveau-pill { background: #1f2937; border-color: #374151; color: #e5e7eb; }
body.dark-mode .eleve-modal-v2.fe .niveau-pill.selected, body.dark-mode .eleve-modal-v2.fe .filiere-pill.selected { background: #0d9488; border-color: #0d9488; color: #fff; }
body.dark-mode .eleve-modal-v2.fe .filiere-pills { background: #042f2e; border-color: #115e59; }
body.dark-mode .eleve-modal-v2.fe .filiere-pill { background: #111827; border-color: #115e59; color: #99f6e4; }
body.dark-mode .eleve-modal-v2.fe .fe-plus .eleve-more-menu { background: #111827; border-color: #374151; }
body.dark-mode .eleve-modal-v2.fe .fe-mi { color: #f3f4f6; }
body.dark-mode .eleve-modal-v2.fe .fe-mi:hover, body.dark-mode .eleve-modal-v2.fe .fe-mi:focus-visible { background: #134e4a33; }
body.dark-mode .fe-mi-ic, body.dark-mode .fe-dz-ic { background: #1f2937; color: #5eead4; }
body.dark-mode .fe-mi:hover .fe-mi-ic { background: #134e4a; }
body.dark-mode .fe-mi-t small, body.dark-mode .fe-dz-t span { color: #9ca3af; }
body.dark-mode .fe-mi-sep { background: #374151; }
body.dark-mode .fe-dossier { background: #111827; border-color: #374151; }
body.dark-mode .fe-dossier-titre, body.dark-mode .fe-dz-t strong { color: #f3f4f6; }
body.dark-mode .fe-dz-ligne { border-top-color: #1f2937; }
body.dark-mode .fe-dz-ic.fe-dz--o { background: #431407; color: #fdba74; }
body.dark-mode .fe-dz-ic.fe-dz--r { background: #450a0a; color: #fca5a5; }
body.dark-mode .fe-dz-btn { background: #1f2937; border-color: #374151; color: #e5e7eb; }
body.dark-mode .fe-dz-btn:hover { background: #273244; }
body.dark-mode .fe-dz-btn.fe-dz--o { color: #fdba74; border-color: #7c2d12; }
body.dark-mode .fe-dz-btn.fe-dz--r { color: #fca5a5; border-color: #7f1d1d; }
body.dark-mode .eleve-modal-v2.fe .eleve-more-item { color: #e5e7eb; }
body.dark-mode .eleve-modal-v2.fe .eleve-more-item:hover { background: #1f2937; }
body.dark-mode .fe-sep { border-top-color: #374151; }
body.dark-mode .fe-alerte-champ { background: #451a03; border-color: #92400e; color: #fde68a; }
body.dark-mode .fe-frise::before { background: #134e4a; }
body.dark-mode .fe-seance, body.dark-mode .fe-chat-saisie { background: #111827; border-color: #374151; }
body.dark-mode .fe-seance::before { background: #111827; border-color: #2dd4bf; }
body.dark-mode .fe-seance:first-child::before { background: #2dd4bf; }
body.dark-mode .fe-seance-tete:hover { background: #1f2937; }
body.dark-mode .fe-seance-date { color: #5eead4; }
body.dark-mode .fe-seance-theme, body.dark-mode .fe-bulle-tete b, body.dark-mode .fe-bulle-objet { color: #f3f4f6; }
body.dark-mode .fe-seance-corps, body.dark-mode .fe-bulle-txt, body.dark-mode .fe-chat-saisie textarea { color: #e5e7eb; }
body.dark-mode .fe-seance-corps { border-color: #1f2937; }
body.dark-mode .fe-seance-meta, body.dark-mode .fe-seance-lab, body.dark-mode .fe-bulle-tete, body.dark-mode .fe-bulle-tete span { color: #9ca3af; }
body.dark-mode .fe-seance-bloc--suite { background: #451a03; border-color: #92400e; }
body.dark-mode .fe-seance-bloc--suite .fe-seance-lab { color: #fde68a; }
body.dark-mode .fe-bulle--eleve { background: #1f2937; }
body.dark-mode .fe-bulle--prof { background: #134e4a; }
body.dark-mode .fe-bulle--nonlu { background: #451a03; box-shadow: 0 0 0 1px #92400e inset; }
body.dark-mode .fe-bulle-vu { color: #5eead4; }

/* Devoirs : année scolaire précédente, repliée (2026-10) */
.fe-anciens { margin: 14px 0 4px; border: 1px dashed #cbd5e1; border-radius: 12px; padding: 0 12px; background: #f8fafc; }
.fe-anciens > summary { list-style: none; cursor: pointer; padding: 11px 2px; font-weight: 700; font-size: 13.5px; color: #475569; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.fe-anciens > summary::-webkit-details-marker { display: none; }
.fe-anciens > summary::after { content: "›"; margin-left: auto; color: #94a3b8; transition: transform .15s; }
.fe-anciens[open] > summary::after { transform: rotate(90deg); }
.fe-anciens > summary span { font-weight: 500; font-size: 12.5px; color: #64748b; }
.fe-anciens[open] { padding-bottom: 6px; }
.fe-anciens .assignment-card { opacity: .85; }
body.dark-mode .fe-anciens { background: #0f172a; border-color: #374151; }
body.dark-mode .fe-anciens > summary { color: #d1d5db; }
body.dark-mode .fe-anciens > summary span { color: #9ca3af; }

/* ===== Onglet Devoirs (refonte 2026-10) ===== */
.fe-dv-onglet { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.fe-dv-tete { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.fe-dv-tete h4 { margin: 0; font-size: 16px; font-weight: 700; color: #0f172a; display: flex; align-items: center; gap: 8px; }
.fe-dv-n { min-width: 24px; padding: 1px 8px; border-radius: 999px; background: #ccfbf1; color: #115e59; font-size: 12.5px; text-align: center; }
.fe-dv-assigner { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 10px; border: 0; background: #0f766e; color: #fff; font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.fe-dv-assigner:hover { background: #115e59; }
.fe-dv-assigner[aria-expanded="true"] { background: #e2e8f0; color: #0f172a; }
.fe-dv-vide { padding: 22px; text-align: center; color: #64748b; font-size: 14px; background: #fff; border: 1px dashed #cbd5e1; border-radius: 14px; }

/* Carte devoir */
.fe-dc { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; background: #fff; border: 1px solid #e5e7eb; border-radius: 14px; cursor: pointer; transition: border-color .12s, box-shadow .12s; }
.fe-dc:hover { border-color: #99f6e4; box-shadow: 0 2px 10px rgba(15, 23, 42, .05); }
.fe-dc--rendu { border-color: #86efac; box-shadow: inset 4px 0 0 #22c55e; }
.fe-dc-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; background: #f0fdfa; color: #0f766e; }
.fe-dc-ic--lien { background: #eff6ff; color: #1d4ed8; }
.fe-dc-ic--fichier { background: #fff7ed; color: #c2410c; }
.fe-dc-ic--bilan { background: #f5f3ff; color: #6d28d9; }
.fe-dc-ic--ok { background: #f0fdf4; color: #16a34a; }
.fe-dc-corps { flex: 1; min-width: 0; }
.fe-dc-titre { font-size: 14.5px; font-weight: 600; color: #0f172a; line-height: 1.35; overflow-wrap: anywhere; }
.fe-dc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 5px; font-size: 12.5px; color: #64748b; }
.fe-dc-ech { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; background: #f1f5f9; color: #475569; font-weight: 600; }
.fe-dc-ech--r { background: #fee2e2; color: #991b1b; }
.fe-dc-ech--o { background: #fef3c7; color: #92400e; }
.fe-dc-ech--b { background: #e0f2fe; color: #075985; }
.fe-dc-edit { background: none; border: 0; padding: 0 0 0 2px; cursor: pointer; font-size: 11px; opacity: .55; }
.fe-dc-edit:hover { opacity: 1; }
.fe-dc-theme { padding: 2px 8px; border-radius: 999px; background: #eef2ff; color: #3730a3; font-weight: 600; }
.fe-dc-lien { display: inline-block; margin-top: 6px; font-size: 12.5px; font-weight: 600; color: #0f766e; text-decoration: none; }
.fe-dc-lien:hover { text-decoration: underline; }
.fe-dc-consigne { margin-top: 6px; font-size: 13px; color: #475569; padding-left: 10px; border-left: 3px solid #e2e8f0; }
.fe-dc-copie { margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: #f0fdf4; border: 1px solid #bbf7d0; font-size: 12.5px; color: #166534; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.fe-dc-copie span { font-weight: 600; }
.fe-dc-copie small { font-weight: 400; color: #15803d; }
.fe-dc-copie a { margin-left: auto; padding: 3px 10px; border-radius: 8px; background: #16a34a; color: #fff; font-weight: 600; text-decoration: none; }
.fe-dc-copie p { flex-basis: 100%; margin: 0; font-style: italic; }
.fe-dc-actions { display: flex; gap: 6px; flex-shrink: 0; align-items: center; }
.fe-dc-fait, .fe-dc-suppr, .fe-dc-archiver { font: inherit; font-size: 12.5px; font-weight: 600; border-radius: 9px; cursor: pointer; border: 1px solid #e2e8f0; background: #fff; color: #334155; padding: 6px 11px; }
.fe-dc-fait { color: #15803d; border-color: #bbf7d0; }
.fe-dc-fait:hover { background: #f0fdf4; }
.fe-dc-suppr { padding: 6px 8px; color: #94a3b8; display: grid; place-items: center; }
.fe-dc-suppr:hover { color: #b91c1c; border-color: #fecaca; background: #fef2f2; }
.fe-dc-archiver:hover { background: #f8fafc; }
.fe-dc--fait { cursor: pointer; background: #fcfcfd; }
.fe-dc--fait .fe-dc-titre { color: #64748b; font-weight: 500; }
.fe-dc--fait .fe-dc-ic { width: 30px; height: 30px; }
.fe-anciens .fe-dc { margin-bottom: 8px; }
.fe-termines > summary span { padding: 0 8px; border-radius: 999px; background: #e2e8f0; color: #334155; font-weight: 600; }

/* Panneau « Assigner un devoir » */
.fe-assign { background: #fff; border: 1px solid #99f6e4; border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 6px 20px rgba(15, 118, 110, .07); }
.fe-assign[hidden] { display: none; }
.fe-modes { display: inline-flex; gap: 2px; padding: 3px; border-radius: 12px; background: #e2e8f0; align-self: flex-start; max-width: 100%; overflow-x: auto; }
.fe-mode-btn { font: inherit; font-size: 13.5px; font-weight: 600; color: #475569; background: none; border: 0; border-radius: 9px; padding: 7px 14px; cursor: pointer; white-space: nowrap; }
.fe-mode-btn:hover { color: #0f172a; }
.fe-mode-btn--act, .fe-mode-btn--act:hover { background: #fff; color: #0f766e; box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }
[data-fe-pane][hidden] { display: none; }
.fe-assign-choisir { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 14px; border: 1.5px dashed #5eead4; border-radius: 12px; background: #f0fdfa; color: #0f766e; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.fe-assign-choisir:hover { background: #ccfbf1; }
.fe-assign-liste { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.fe-assign-liste:empty { display: none; }
.fe-assign-liste li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: #f8fafc; border: 1px solid #e5e7eb; font-size: 13.5px; color: #0f172a; }
.fe-assign-liste li span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.fe-assign-liste li small { color: #64748b; white-space: nowrap; }
.fe-assign-retirer { background: none; border: 0; color: #94a3b8; font-size: 18px; line-height: 1; cursor: pointer; padding: 0 2px; }
.fe-assign-retirer:hover { color: #b91c1c; }
.fe-assign-alerte { margin-top: 8px; padding: 10px 12px; border-radius: 10px; background: #fffbeb; border: 1px solid #fde68a; color: #92400e; font-size: 13px; }
.fe-assign-alerte ul { margin: 4px 0; padding-left: 18px; }
.fe-assign-alerte small { color: #a16207; }
.fe-champ { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; font-weight: 600; color: #475569; }
.fe-champ em { font-weight: 400; font-style: normal; color: #94a3b8; }
.fe-champ input { font: inherit; font-size: 14px; font-weight: 400; color: #0f172a; padding: 9px 12px; border: 1px solid #cbd5e1; border-radius: 10px; background: #fff; width: 100%; box-sizing: border-box; }
.fe-champ input:focus { outline: 2px solid #5eead4; outline-offset: 0; border-color: #14b8a6; }
[data-fe-pane="lien"] { display: flex; flex-direction: column; gap: 10px; }
.fe-assign-champs { display: grid; grid-template-columns: minmax(150px, 200px) 1fr; gap: 10px; }
.fe-depot { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px; border: 1.5px dashed #fdba74; border-radius: 12px; background: #fff7ed; color: #9a3412; font-size: 13.5px; cursor: pointer; text-align: center; }
.fe-depot small { color: #c2410c; opacity: .8; }
.fe-depot--survol, .fe-depot:hover { background: #ffedd5; }
.fe-depot-fichier { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px; background: #fff7ed; color: #9a3412; font-size: 13.5px; }
.fe-depot-fichier span { flex: 1; min-width: 0; overflow-wrap: anywhere; font-weight: 600; }
.fe-depot-fichier button { background: none; border: 0; font-size: 18px; color: #b91c1c; cursor: pointer; }
.fe-assign-pied { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 4px; border-top: 1px solid #f1f5f9; }
.fe-assign-pied p { margin: 8px 0 0; font-size: 12.5px; color: #64748b; flex: 1; min-width: 200px; }
.fe-assign-go { margin-top: 8px; padding: 10px 22px; border-radius: 10px; border: 0; background: #0f766e; color: #fff; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.fe-assign-go:hover { background: #115e59; }
.fe-assign-go:disabled { opacity: .6; cursor: wait; }

@media (max-width: 640px) {
  .fe-dc { flex-wrap: wrap; }
  .fe-dc-corps { flex-basis: calc(100% - 48px); }
  .fe-dc-actions { margin-left: 48px; }
  .fe-assign-champs { grid-template-columns: 1fr; }
  .fe-assign { padding: 14px 12px; }
  .fe-assign-go { width: 100%; }
}

body.dark-mode .fe-dv-tete h4, body.dark-mode .fe-dc-titre { color: #f3f4f6; }
body.dark-mode .fe-dv-n { background: #134e4a; color: #99f6e4; }
body.dark-mode .fe-dv-assigner[aria-expanded="true"] { background: #374151; color: #f3f4f6; }
body.dark-mode .fe-dv-vide { background: #111827; border-color: #374151; color: #9ca3af; }
body.dark-mode .fe-dc, body.dark-mode .fe-assign { background: #111827; border-color: #374151; }
body.dark-mode .fe-dc--fait { background: #0f172a; }
body.dark-mode .fe-dc:hover { border-color: #0f766e; }
body.dark-mode .fe-dc--rendu { border-color: #166534; }
body.dark-mode .fe-dc-ic { background: #134e4a; color: #5eead4; }
body.dark-mode .fe-dc-ic--lien { background: #1e3a8a; color: #bfdbfe; }
body.dark-mode .fe-dc-ic--fichier { background: #431407; color: #fdba74; }
body.dark-mode .fe-dc-ic--bilan { background: #2e1065; color: #ddd6fe; }
body.dark-mode .fe-dc-ic--ok { background: #14532d; color: #86efac; }
body.dark-mode .fe-dc-meta, body.dark-mode .fe-dc-consigne, body.dark-mode .fe-assign-pied p, body.dark-mode .fe-champ { color: #9ca3af; }
body.dark-mode .fe-dc-ech { background: #1f2937; color: #d1d5db; }
body.dark-mode .fe-dc-ech--r { background: #450a0a; color: #fecaca; }
body.dark-mode .fe-dc-ech--o { background: #451a03; color: #fde68a; }
body.dark-mode .fe-dc-ech--b { background: #082f49; color: #bae6fd; }
body.dark-mode .fe-dc-theme { background: #1e1b4b; color: #c7d2fe; }
body.dark-mode .fe-dc-consigne { border-left-color: #374151; }
body.dark-mode .fe-dc-copie { background: #052e16; border-color: #166534; color: #bbf7d0; }
body.dark-mode .fe-dc-fait, body.dark-mode .fe-dc-suppr, body.dark-mode .fe-dc-archiver { background: #1f2937; border-color: #374151; color: #e5e7eb; }
body.dark-mode .fe-dc-fait { color: #86efac; }
body.dark-mode .fe-modes { background: #1f2937; }
body.dark-mode .fe-mode-btn { color: #9ca3af; }
body.dark-mode .fe-mode-btn--act, body.dark-mode .fe-mode-btn--act:hover { background: #111827; color: #5eead4; }
body.dark-mode .fe-assign-choisir { background: #042f2e; border-color: #0f766e; color: #5eead4; }
body.dark-mode .fe-assign-liste li { background: #1f2937; border-color: #374151; color: #f3f4f6; }
body.dark-mode .fe-assign-alerte { background: #451a03; border-color: #92400e; color: #fde68a; }
body.dark-mode .fe-champ input { background: #1f2937; border-color: #374151; color: #f3f4f6; }
body.dark-mode .fe-depot, body.dark-mode .fe-depot-fichier { background: #431407; border-color: #9a3412; color: #fed7aa; }
body.dark-mode .fe-assign-pied { border-top-color: #1f2937; }
body.dark-mode .fe-termines > summary span { background: #374151; color: #e5e7eb; }
@media (max-width: 768px) {
  .eleve-modal-v2.fe .fe-dc-edit { min-height: 0 !important; min-width: 0 !important; padding: 0 0 0 2px !important; font-size: 11px !important; }
  .eleve-modal-v2.fe .fe-assign-retirer { min-height: 0 !important; min-width: 28px !important; padding: 0 4px !important; font-size: 18px !important; }
}
/* Mode nuit : les formules suivent la couleur du texte (la règle globale « [class*=bg-gray-] mjx-container »
   les forçait en gris foncé, invisibles sur fond sombre) */
body.dark-mode .eleve-modal-v2.fe mjx-container, body.dark-mode .eleve-modal-v2.fe .MathJax { color: inherit !important; }

/* ===== Résultats › Bulletins et Notes saisies (2026-10) ===== */
.fe-modes--petit { margin-bottom: 12px; }
.fe-modes--petit .fe-mode-btn { font-size: 13px; padding: 6px 12px; }
.fe-note-val { display: inline-flex; align-items: baseline; gap: 1px; font-weight: 800; font-size: 17px; color: #334155; white-space: nowrap; }
.fe-note-val small { font-size: 11px; font-weight: 600; color: #94a3b8; }
.fe-note-val--v { color: #15803d; } .fe-note-val--b { color: #1d4ed8; } .fe-note-val--o { color: #b45309; } .fe-note-val--r { color: #b91c1c; } .fe-note-val--n { color: #94a3b8; }
.fe-note-val--c { align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: #334155; }
.fe-note-val--c i, .fe-pt { width: 12px; height: 12px; border-radius: 50%; background: var(--c); display: inline-block; flex-shrink: 0; }

/* Notes saisies */
.fe-note-form { background: #fff; border: 1px solid #e5e7eb; border-radius: 14px; padding: 14px 16px; margin-bottom: 12px; display: flex; flex-direction: column; gap: 10px; }
.fe-note-form-t { font-size: 14px; font-weight: 700; color: #0f172a; }
.fe-note-grille { display: grid; grid-template-columns: 1.3fr auto 1fr 1fr; gap: 10px; align-items: end; }
.fe-note-grille .fe-modes--petit { margin: 0; }
.fe-champ select { font: inherit; font-size: 14px; font-weight: 400; color: #0f172a; padding: 9px 12px; border: 1px solid #cbd5e1; border-radius: 10px; background: #fff; width: 100%; box-sizing: border-box; }
.fe-pastilles { display: flex; gap: 8px; align-items: center; min-height: 40px; }
.fe-pastille-btn { width: 28px; height: 28px; border-radius: 50%; background: var(--c); border: 3px solid #fff; box-shadow: 0 0 0 1px #cbd5e1; cursor: pointer; padding: 0; }
.fe-pastille-btn--act { box-shadow: 0 0 0 2px #0f172a; }
.fe-note-bas { display: flex; gap: 10px; align-items: flex-end; }
.fe-note-bas .fe-champ { flex: 1; }
.fe-note-bas .fe-assign-go { margin: 0; }
.fe-notes, .fe-moyennes { display: flex; flex-direction: column; gap: 6px; }
.fe-note { display: grid; grid-template-columns: minmax(74px, max-content) minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 14px; background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; }
.fe-note-txt { display: flex; flex-direction: column; min-width: 0; }
.fe-note-txt strong { font-size: 14px; color: #0f172a; }
.fe-note-txt span { font-size: 12.5px; color: #64748b; overflow-wrap: anywhere; }
.fe-note-date { font-size: 12.5px; color: #94a3b8; white-space: nowrap; }
.fe-moy { padding: 12px 14px; background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; }
.fe-moy-tete { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.fe-moy-tete strong { font-size: 14px; color: #0f172a; }
.fe-moy-g { display: inline-flex; align-items: baseline; gap: 8px; font-size: 12.5px; color: #64748b; }
.fe-mats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.fe-mat { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 8px; background: #f1f5f9; font-size: 12.5px; color: #334155; }
.fe-mat b { font-weight: 600; }

/* Bulletins */
.fe-bul-tete { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.fe-bul-annee { display: inline-flex; align-items: center; gap: 4px; padding: 3px; border-radius: 12px; background: #e2e8f0; }
.fe-bul-annee span { padding: 0 10px; font-weight: 700; font-size: 14.5px; color: #0f172a; }
.fe-bul-annee em { font-style: normal; font-size: 11.5px; font-weight: 600; color: #92400e; background: #fef3c7; padding: 1px 7px; border-radius: 999px; margin-left: 4px; }
.fe-bul-annee button { width: 32px; height: 30px; border: 0; border-radius: 9px; background: #fff; color: #0f172a; font-size: 18px; line-height: 1; cursor: pointer; box-shadow: 0 1px 2px rgba(15, 23, 42, .08); }
.fe-bul-annee button[disabled] { opacity: .35; cursor: default; box-shadow: none; background: transparent; }
.fe-bul-ajout { margin-bottom: 14px; }
.fe-bul-info { margin: 0; font-size: 13px; color: #475569; }
.fe-depot--bleu { border-color: #93c5fd; background: #eff6ff; color: #1e40af; }
.fe-depot--bleu small { color: #2563eb; }
.fe-depot--bleu.fe-depot--survol, .fe-depot--bleu:hover { background: #dbeafe; }
.fe-ou { display: flex; align-items: center; gap: 10px; color: #94a3b8; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; }
.fe-ou::before, .fe-ou::after { content: ""; flex: 1; height: 1px; background: #e5e7eb; }
.fe-assign-choisir--bleu { border-color: #93c5fd; background: #fff; color: #1d4ed8; }
.fe-assign-choisir--bleu:hover { background: #eff6ff; }
.fe-depot-fichier--bleu { background: #eff6ff; color: #1e40af; margin-bottom: 10px; }
.fe-bul-progres { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: #eff6ff; margin-bottom: 10px; font-size: 13px; color: #1e40af; }
#bulletin-progress-detail { font-size: 12px; color: #64748b; }
.fe-bul-accord { display: flex; gap: 9px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: #fffbeb; border: 1px solid #fde68a; margin-bottom: 10px; cursor: pointer; font-size: 12.5px; color: #92400e; line-height: 1.45; }
.fe-bul-accord input { margin-top: 2px; width: 16px; height: 16px; flex-shrink: 0; }
#bulletin-upload-btn { width: 100%; margin: 0; }
#bulletin-upload-btn[disabled] { opacity: .5; cursor: not-allowed; }
.fe-buls { display: flex; flex-direction: column; gap: 12px; }
.fe-bul { background: #fff; border: 1px solid #e5e7eb; border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.fe-bul-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.fe-bul-titre { font-size: 16px; font-weight: 700; color: #0f172a; }
.fe-bul-titre span { font-size: 13px; font-weight: 500; color: #64748b; margin-left: 6px; }
.fe-bul-meta { font-size: 12.5px; color: #64748b; margin-top: 2px; }
.fe-bul-bdgs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.fe-bdg { font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: #f1f5f9; color: #475569; }
.fe-bdg--violet { background: #ede9fe; color: #6d28d9; } .fe-bdg--vert { background: #dcfce7; color: #166534; } .fe-bdg--rouge { background: #fee2e2; color: #991b1b; } .fe-bdg--orange { background: #fef3c7; color: #92400e; }
.fe-bul-moy { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; padding: 8px 12px; border-radius: 12px; background: #f8fafc; }
.fe-bul-moy .fe-note-val { font-size: 24px; }
.fe-bul-moy > span:last-child { font-size: 12px; color: #64748b; }
.fe-bnotes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.fe-bnote { display: flex; flex-direction: column; gap: 1px; padding: 9px 11px; border-radius: 12px; background: #f8fafc; border: 1px solid #f1f5f9; min-width: 0; }
.fe-bnote--moi { background: #f0fdfa; border-color: #99f6e4; }
.fe-bnote-mat { font-size: 12.5px; font-weight: 600; color: #334155; overflow-wrap: anywhere; }
.fe-bnote--moi .fe-bnote-mat { color: #0f766e; }
.fe-bnote-val { font-size: 19px; }
.fe-bnote-cl { font-size: 11.5px; color: #64748b; }
.fe-bnote-cl .fe-plus { color: #15803d; } .fe-bnote-cl .fe-moins { color: #b91c1c; }
.fe-bul-app { margin: 0; padding: 10px 14px; border-left: 3px solid #fcd34d; background: #fffbeb; border-radius: 0 10px 10px 0; font-size: 13px; color: #78350f; font-style: italic; }
.fe-bul-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; padding-top: 10px; border-top: 1px solid #f1f5f9; }
.fe-bbtn { font: inherit; font-size: 12.5px; font-weight: 600; padding: 6px 11px; border-radius: 9px; border: 1px solid #e2e8f0; background: #fff; color: #334155; cursor: pointer; display: inline-flex; align-items: center; }
.fe-bbtn:hover { background: #f8fafc; }
.fe-bbtn--suppr { color: #94a3b8; padding: 6px 8px; }
.fe-bbtn--suppr:hover { color: #b91c1c; border-color: #fecaca; background: #fef2f2; }
.fe-bul-analyse { margin-top: 14px; background: #fff; border: 1px solid #e5e7eb; border-radius: 16px; padding: 16px; }
.fe-bul-analyse h4 { margin: 0 0 12px; font-size: 15px; font-weight: 700; color: #0f172a; }
@media (max-width: 640px) {
  .fe-note-grille { grid-template-columns: 1fr 1fr; }
  .fe-note-bas { flex-direction: column; align-items: stretch; }
  .fe-note { grid-template-columns: minmax(64px, max-content) minmax(0, 1fr); }
  .fe-note-date { grid-column: 2; }
  .fe-bul-moy { align-items: flex-start; }
  .fe-bul-actions { justify-content: flex-start; }
}
@media (max-width: 768px) {
  .eleve-modal-v2.fe .fe-pastille-btn { min-height: 0 !important; min-width: 0 !important; width: 32px; height: 32px; padding: 0 !important; }
  .eleve-modal-v2.fe .fe-bul-annee button { min-height: 0 !important; min-width: 0 !important; padding: 0 !important; font-size: 18px !important; }
}
body.dark-mode .fe-note-form, body.dark-mode .fe-note, body.dark-mode .fe-moy, body.dark-mode .fe-bul, body.dark-mode .fe-bul-analyse { background: #111827; border-color: #374151; }
body.dark-mode .fe-note-form-t, body.dark-mode .fe-note-txt strong, body.dark-mode .fe-moy-tete strong, body.dark-mode .fe-bul-titre, body.dark-mode .fe-bul-annee span, body.dark-mode .fe-bul-analyse h4 { color: #f3f4f6; }
body.dark-mode .fe-note-val { color: #e5e7eb; }
body.dark-mode .fe-note-val--v { color: #86efac; } body.dark-mode .fe-note-val--b { color: #93c5fd; } body.dark-mode .fe-note-val--o { color: #fcd34d; } body.dark-mode .fe-note-val--r { color: #fca5a5; }
body.dark-mode .fe-champ select { background: #1f2937; border-color: #374151; color: #f3f4f6; }
body.dark-mode .fe-pastille-btn { border-color: #111827; box-shadow: 0 0 0 1px #4b5563; }
body.dark-mode .fe-pastille-btn--act { box-shadow: 0 0 0 2px #f3f4f6; }
body.dark-mode .fe-mat, body.dark-mode .fe-bdg { background: #1f2937; color: #d1d5db; }
body.dark-mode .fe-bul-annee { background: #1f2937; }
body.dark-mode .fe-bul-annee button { background: #111827; color: #f3f4f6; }
body.dark-mode .fe-bul-info, body.dark-mode .fe-bul-meta, body.dark-mode .fe-bul-titre span, body.dark-mode .fe-bnote-cl, body.dark-mode .fe-bul-moy > span:last-child, body.dark-mode .fe-note-txt span { color: #9ca3af; }
body.dark-mode .fe-depot--bleu, body.dark-mode .fe-depot-fichier--bleu, body.dark-mode .fe-bul-progres { background: #172554; border-color: #1e40af; color: #bfdbfe; }
body.dark-mode .fe-assign-choisir--bleu { background: #111827; border-color: #1e40af; color: #93c5fd; }
body.dark-mode .fe-bul-accord { background: #451a03; border-color: #92400e; color: #fde68a; }
body.dark-mode .fe-bul-moy, body.dark-mode .fe-bnote { background: #1f2937; border-color: #374151; }
body.dark-mode .fe-bnote--moi { background: #042f2e; border-color: #0f766e; }
body.dark-mode .fe-bnote-mat { color: #e5e7eb; }
body.dark-mode .fe-bul-app { background: #451a03; border-left-color: #b45309; color: #fde68a; }
body.dark-mode .fe-bul-actions { border-top-color: #1f2937; }
body.dark-mode .fe-bbtn { background: #1f2937; border-color: #374151; color: #e5e7eb; }

/* ===== Messages : discussion (refonte 2026-10) ===== */
.fe-chat { gap: 8px; }
.fe-chat-tete { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: #fff; border: 1px solid #e5e7eb; border-radius: 14px; }
.fe-chat-tete > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.fe-chat-tete strong { font-size: 14.5px; color: #0f172a; }
.fe-chat-tete small { font-size: 12.5px; color: #64748b; }
.fe-chat-live { font-size: 11.5px; font-weight: 600; color: #16a34a; white-space: nowrap; }
.fe-chat-fil { gap: 2px; max-height: 56vh; padding: 6px 4px 10px; background: #fff; border: 1px solid #e5e7eb; border-radius: 14px; }
.fe-chat-vide small { font-size: 12.5px; color: #94a3b8; }
.fe-chat-jour { display: flex; justify-content: center; margin: 12px 0 6px; position: sticky; top: 0; z-index: 1; }
.fe-chat-jour span { font-size: 11.5px; font-weight: 600; color: #475569; background: #f1f5f9; padding: 3px 10px; border-radius: 999px; box-shadow: 0 1px 2px rgba(15, 23, 42, .06); }
.fe-cm { display: flex; align-items: flex-end; gap: 8px; margin-top: 8px; padding: 0 8px; }
.fe-cm--suite { margin-top: 2px; }
.fe-cm--prof { justify-content: flex-end; }
.fe-cm-av { width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; background: #fed7aa; color: #9a3412; font-size: 11.5px; font-weight: 700; }
.fe-cm--suite .fe-cm-av { background: transparent; }
.fe-cm-av--grand { width: 38px; height: 38px; font-size: 13px; }
.fe-cm .fe-bulle { max-width: min(78%, 560px); padding: 8px 12px 6px; border-radius: 16px; }
.fe-cm--eleve .fe-bulle { background: #f1f5f9; border-bottom-left-radius: 5px; }
.fe-cm--prof .fe-bulle { background: #0f766e; color: #fff; border-bottom-right-radius: 5px; }
.fe-cm--suite.fe-cm--eleve .fe-bulle { border-top-left-radius: 5px; }
.fe-cm--suite.fe-cm--prof .fe-bulle { border-top-right-radius: 5px; }
.fe-cm--prof .fe-bulle-txt, .fe-cm--prof .fe-bulle-objet { color: #fff; }
.fe-cm .fe-bulle--nonlu { background: #fef3c7; box-shadow: inset 0 0 0 1px #fcd34d; }
.fe-bulle-objet { display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: .02em; padding: 1px 8px; border-radius: 999px; background: rgba(15, 23, 42, .07); margin-bottom: 4px; }
.fe-cm--prof .fe-bulle-objet { background: rgba(255, 255, 255, .18); }
.fe-bulle-pied { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 2px; font-size: 11px; color: #64748b; }
.fe-cm--prof .fe-bulle-pied { color: #ccfbf1; }
.fe-cm .fe-bulle-vu { color: inherit; margin: 0; font-weight: 600; }
.fe-bulle-nouveau { font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: #b45309; }
.fe-chat-saisie { padding: 6px 6px 6px 10px; align-items: flex-end; box-shadow: 0 4px 14px rgba(15, 23, 42, .05); }
.fe-chat-saisie:focus-within { border-color: #5eead4; box-shadow: 0 0 0 3px rgba(20, 184, 166, .15); }
.fe-chat-saisie textarea { resize: none; min-height: 40px; line-height: 1.45; border: 0 !important; box-shadow: none !important; outline: none !important; background: transparent !important; }
#send-reply-btn { display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 11px; background: #0f766e; color: #fff; font: inherit; font-size: 14px; font-weight: 600; padding: 10px 14px; cursor: pointer; }
#send-reply-btn:hover { background: #115e59; }
#send-reply-btn[disabled] { opacity: .6; cursor: wait; }
.fe-chat-aide { display: flex; justify-content: space-between; font-size: 11.5px; color: #94a3b8; padding: 0 6px; }
@media (max-width: 640px) {
  .fe-chat-live, .fe-chat-aide > span:first-child { display: none; }
  .fe-cm .fe-bulle { max-width: 84%; }
  #send-reply-btn span { display: none; }
  .fe-chat-fil { max-height: 60vh; }
}
@media (max-width: 768px) {
  .eleve-modal-v2.fe #send-reply-btn { min-height: 44px !important; min-width: 44px !important; padding: 0 12px !important; justify-content: center; }
}
body.dark-mode .fe-chat-tete, body.dark-mode .fe-chat-fil { background: #111827; border-color: #374151; }
body.dark-mode .fe-chat-tete strong { color: #f3f4f6; }
body.dark-mode .fe-chat-tete small, body.dark-mode .fe-bulle-pied { color: #9ca3af; }
body.dark-mode .fe-chat-jour span { background: #1f2937; color: #d1d5db; }
body.dark-mode .fe-cm--eleve .fe-bulle { background: #1f2937; }
body.dark-mode .fe-cm--prof .fe-bulle { background: #115e59; }
body.dark-mode .fe-cm .fe-bulle--nonlu { background: #451a03; box-shadow: inset 0 0 0 1px #92400e; }
body.dark-mode .fe-cm-av { background: #7c2d12; color: #fed7aa; }
body.dark-mode .fe-cm--suite .fe-cm-av { background: transparent; }
body.dark-mode .fe-bulle-objet { background: rgba(255, 255, 255, .1); }
/* Réponses rapides */
.fe-rapides { display: flex; flex-wrap: wrap; gap: 6px; }
.fe-rapides:empty { display: none; }
.fe-rapide { display: inline-flex; align-items: center; border: 1px solid #cbd5e1; border-radius: 999px; background: #fff; overflow: hidden; }
.fe-rapide-txt { font: inherit; font-size: 12.5px; color: #334155; background: none; border: 0; padding: 5px 4px 5px 11px; cursor: pointer; white-space: nowrap; }
.fe-rapide:hover { border-color: #5eead4; background: #f0fdfa; }
.fe-rapide-x { font: inherit; font-size: 14px; line-height: 1; color: #94a3b8; background: none; border: 0; padding: 4px 9px 4px 5px; cursor: pointer; opacity: .55; }
.fe-rapide:hover .fe-rapide-x { opacity: 1; }
.fe-rapide-x:hover { color: #b91c1c; }
.fe-rapide-plus { font: inherit; font-size: 12.5px; font-weight: 600; color: #0f766e; background: none; border: 1px dashed #5eead4; border-radius: 999px; padding: 5px 11px; cursor: pointer; }
@media (max-width: 768px) {
  .eleve-modal-v2.fe .fe-rapide-txt, .eleve-modal-v2.fe .fe-rapide-x, .eleve-modal-v2.fe .fe-rapide-plus { min-height: 34px !important; min-width: 0 !important; font-size: 13px !important; padding-top: 4px !important; padding-bottom: 4px !important; }
  .eleve-modal-v2.fe .fe-rapide-txt { padding-left: 11px !important; padding-right: 4px !important; }
  .eleve-modal-v2.fe .fe-rapide-x { padding-left: 5px !important; padding-right: 9px !important; }
  .eleve-modal-v2.fe .fe-rapide-plus { padding-left: 11px !important; padding-right: 11px !important; }
}
body.dark-mode .fe-rapide { background: #111827; border-color: #374151; }
body.dark-mode .fe-rapide-txt { color: #e5e7eb; }
body.dark-mode .fe-rapide:hover { background: #042f2e; border-color: #0f766e; }
body.dark-mode .fe-rapide-plus { color: #5eead4; border-color: #0f766e; }
