/* =========================================================================
   Pinpon — espace enseignants
   Même famille graphique que le site élèves, en plus sobre et plus dense.
   ========================================================================= */

:root {
  --encre: #2B2340;
  --fond: #F6F3EC;
  --papier: #FFFFFF;
  --ligne: #E4E0D8;
  --texte-doux: #6B6480;
  --jaune: #FFD166;
  --vert: #7BD389;
  --rouge: #E86F51;
  --bleu: #6FB3F2;
  --ciel: #E3F1FC;
  --police-titre: "Fredoka", "Nunito", "Segoe UI", system-ui, sans-serif;
  --police: "Nunito", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: var(--police); font-size: 15px; font-weight: 600; color: var(--encre); background: var(--fond); }
a { color: inherit; }
h1, h2, h3 { font-family: var(--police-titre); font-weight: 600; margin: 0; }
h2 { font-size: 1.25rem; margin-bottom: 14px; display: flex; align-items: baseline; gap: 8px; }
h2 small { font-size: .9rem; color: var(--texte-doux); font-family: var(--police); }
button, input, select { font: inherit; color: inherit; }
code { background: #EEEAF7; padding: 1px 6px; border-radius: 6px; font-size: .9em; }
svg { display: block; }
[hidden] { display: none !important; }

/* --- Structure ---------------------------------------------------------- */
.app { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.lateral { background: var(--encre); color: #fff; padding: 30px 16px 20px; display: flex; flex-direction: column; gap: 24px; position: sticky; top: 0; height: 100vh; }
.marque { display: flex; align-items: center; gap: 12px; text-decoration: none; font-family: var(--police-titre); font-size: 1.05rem; line-height: 1.15; }
.marque small { display: block; font-family: var(--police); font-size: .75rem; opacity: .65; font-weight: 600; }
.marque-pastille { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 12px; position: relative; background: var(--jaune); color: var(--encre); font-weight: 700; transform: rotate(-6deg); }
.marque-pastille .marque-yeux { width: 34px; height: 34px; }
/* Gyrophare « pin-pon » sur le toit de la pastille (voir gyrophare_svg() dans inc/dessins.php) */
.marque-gyrophare { position: absolute; left: -2px; top: -16px; width: 24px; height: 20px; transform: rotate(-12deg); transform-origin: 50% 100%; }
.marque-sous-titre { opacity: .45; }
.menu { display: flex; flex-direction: column; gap: 4px; }
.menu a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; text-decoration: none; opacity: .8; }
.menu a:hover { background: rgba(255, 255, 255, .08); opacity: 1; }
.menu a.actif { background: var(--jaune); color: var(--encre); opacity: 1; font-weight: 800; }
.menu .ico { width: 20px; height: 20px; }
.lateral-pied { margin-top: auto; display: flex; flex-direction: column; gap: 6px; font-size: .85rem; opacity: .8; }
.principal { padding: 28px clamp(16px, 3vw, 40px) 60px; min-width: 0; }
.titre-page { font-size: 1.9rem; margin-bottom: 18px; }
.fil { margin: -8px 0 16px; font-size: .9rem; }

/* --- Composants --------------------------------------------------------- */
.carte { background: var(--papier); border: 2px solid var(--encre); border-radius: 16px; padding: 20px; margin-bottom: 20px; box-shadow: 4px 4px 0 var(--encre); }
.tuiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.tuile { background: var(--papier); border: 2px solid var(--encre); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.tuile b { font-family: var(--police-titre); font-size: 1.7rem; font-weight: 600; }
.tuile span { font-size: .85rem; color: var(--texte-doux); }
.colonnes { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.colonnes-3 { grid-template-columns: 1fr 1fr 1fr; }
.colonnes-asym { grid-template-columns: 340px 1fr; }
.colonnes > .carte { margin-bottom: 0; }
.colonnes { margin-bottom: 20px; }
.flash { padding: 10px 14px; border-radius: 10px; border: 2px solid var(--encre); margin-bottom: 14px; background: var(--ciel); }
.flash-ok { background: #E3F7E8; }
.flash-erreur { background: #FFE5E0; }
.flash-info { background: var(--ciel); }
.petit { font-size: .85rem; color: var(--texte-doux); }
.etiquette { display: inline-block; font-size: .72rem; padding: 1px 8px; border-radius: 999px; background: #EEE; color: var(--texte-doux); vertical-align: middle; }
.point-vert { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #2ECC71; box-shadow: 0 0 0 3px rgba(46, 204, 113, .25); vertical-align: middle; margin-left: 4px; }
.inactif { opacity: .55; }
.grandir { flex: 1; }
.zone-danger { margin-top: 20px; padding-top: 16px; border-top: 2px dashed var(--ligne); display: flex; gap: 20px; flex-wrap: wrap; align-items: flex-end; }

/* Boutons */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 10px; border: 2px solid var(--encre); background: var(--papier); font-weight: 800; text-decoration: none; cursor: pointer; box-shadow: 3px 3px 0 var(--encre); transition: transform .06s, box-shadow .06s; white-space: nowrap; }
.btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--encre); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--encre); }
.btn:disabled { opacity: .4; pointer-events: none; }
.btn-principal { background: var(--jaune); }
.btn-secondaire { background: var(--papier); }
.btn-danger { background: #FFD9D0; }
.btn-mini { padding: 4px 10px; font-size: .8rem; box-shadow: 2px 2px 0 var(--encre); border-radius: 8px; }

/* Formulaires */
label { display: flex; flex-direction: column; gap: 4px; font-size: .88rem; color: var(--texte-doux); }
label > input, label > select { color: var(--encre); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], select {
  padding: 8px 10px; border: 2px solid var(--encre); border-radius: 10px; background: var(--papier); font-weight: 600; min-width: 0;
}
input:focus, select:focus { outline: 3px solid var(--jaune); outline-offset: 1px; }
.bloc { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.bloc > label { width: 100%; }
.bloc .grille-form { width: 100%; }
.grille-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.formulaire-ligne { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-top: 12px; }
.inline { display: inline; }
.case { flex-direction: row; align-items: center; gap: 8px; color: var(--encre); }
.champ-unite { display: flex; align-items: center; gap: 8px; }
.champ-unite input { width: 90px; }
.unite { color: var(--texte-doux); font-size: .85rem; }
.champ-icone { display: flex; align-items: center; gap: 10px; }
.barre-outils { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.barre-outils h2 { margin: 0; }
.barre-outils .filtre-table { margin-left: auto; }
.barre-outils label { flex-direction: row; align-items: center; gap: 8px; }

/* Pastilles couleur / avatar dans les formulaires */
.choix-pastilles { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.choix-pastilles input { position: absolute; opacity: 0; width: 0; height: 0; }
.pastille-couleur span { display: block; width: 28px; height: 28px; border-radius: 8px; background: var(--c); border: 2px solid var(--encre); cursor: pointer; }
.pastille-couleur input:checked + span { outline: 3px solid var(--encre); outline-offset: 2px; }
.pastille-avatar span { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: #F1EEE8; border: 2px solid var(--encre); cursor: pointer; overflow: hidden; }
.pastille-avatar span svg { width: 34px; height: 34px; }
.pastille-avatar input:checked + span { background: var(--jaune); outline: 3px solid var(--encre); outline-offset: 2px; }
.pastille-classe { display: inline-block; width: 22px; height: 22px; border-radius: 6px; background: var(--c); border: 2px solid var(--encre); flex: none; }
.ligne-classe { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid var(--ligne); }
.ligne-classe input[type=text] { flex: 1; min-width: 140px; }
.ligne-classe label { flex-direction: row; align-items: center; gap: 6px; }

/* Avatars & pastilles (partagés avec le site élèves) */
.avatar { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--av, var(--jaune)); border: 2px solid var(--encre); overflow: hidden; flex: none; }
.avatar svg { width: 76%; height: 76%; }
.avatar-mini { width: 34px; height: 34px; }
.avatar-grand { width: 96px; height: 96px; box-shadow: 4px 4px 0 var(--encre); }
.pastille { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--pc, var(--jaune)); border: 2px solid var(--encre); color: var(--encre); flex: none; }
.pastille .ico { width: 26px; height: 26px; }
.pastille-mini { width: 36px; height: 36px; }
.pastille-mini .ico { width: 20px; height: 20px; }
.entete-eleve { display: flex; align-items: center; gap: 20px; }
.nom-eleve { font-size: 1.7rem; }

/* Tableaux */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--ligne); vertical-align: middle; }
.table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--texte-doux); }
.table th[data-tri] { cursor: pointer; user-select: none; }
.table th[data-tri]:hover { color: var(--encre); }
.table th.tri-asc::after { content: " ↑"; } .table th.tri-desc::after { content: " ↓"; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table tbody tr:hover { background: #FBF9F4; }
.table-compacte th, .table-compacte td { padding: 6px 8px; font-size: .9rem; }
.lien-eleve { font-weight: 800; text-decoration: none; }
.lien-eleve:hover { text-decoration: underline; }
.carte { overflow-x: auto; }

/* Barres (temps par jeu) */
.barres { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.barres li { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; }
.barres li .barres-barre { grid-column: 1 / -1; }
.barres-lib { display: flex; align-items: center; gap: 8px; font-weight: 800; }
.barres-barre { height: 14px; border-radius: 999px; border: 2px solid var(--encre); overflow: hidden; background: var(--papier); }
.barres-barre i { display: block; height: 100%; }
.barres-val { font-size: .82rem; color: var(--texte-doux); white-space: nowrap; }

/* Listes de badges */
.liste-badges { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.liste-badges li { display: flex; align-items: center; gap: 10px; }
.liste-badges li > span:not(.pastille) { flex: 1; line-height: 1.25; }
.liste-badges li.verrou { opacity: .5; }
.liste-badges li.verrou .pastille { filter: grayscale(1); }
.liste-badges small { color: var(--texte-doux); }

/* Details (badges, jeux) */
.details { padding: 0; }
.details summary { display: flex; align-items: center; gap: 14px; padding: 14px 18px; cursor: pointer; list-style: none; }
.details summary::-webkit-details-marker { display: none; }
.details summary h2 { margin: 0; }
.details summary::after { content: "▾"; margin-left: auto; opacity: .5; }
.details[open] summary::after { content: "▴"; }
.details > form, .details > .bloc { padding: 4px 18px 18px; border-top: 1px dashed var(--ligne); }
.details.nouveau { border-style: dashed; background: #FFFBEA; }
.details.inactif { opacity: 1; }
.details.inactif summary { opacity: .55; }
.details-inline summary { list-style: none; display: inline-flex; }
.details-inline summary::-webkit-details-marker { display: none; }
.liste-cartes-badges { display: flex; flex-direction: column; gap: 12px; }
.liste-cartes-badges .carte { margin: 0; }

/* Page de connexion */
.page-login { display: grid; place-items: center; min-height: 100vh; padding: 20px; }
.boite-login { width: min(380px, 100%); background: var(--papier); border: 3px solid var(--encre); border-radius: 20px; padding: 28px; box-shadow: 6px 6px 0 var(--encre); display: flex; flex-direction: column; gap: 14px; }
.boite-login .marque { color: var(--encre); margin: 10px 0 8px; }
.boite-login .btn { align-self: flex-start; }

/* --- Responsive --------------------------------------------------------- */
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .lateral { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 16px; }
  .menu { flex-direction: row; flex-wrap: wrap; }
  .menu a { padding: 8px 10px; font-size: .9rem; }
  .lateral-pied { margin-top: 0; width: 100%; flex-direction: row; justify-content: space-between; }
  .colonnes, .colonnes-3, .colonnes-asym { grid-template-columns: 1fr; }
  .grille-form { grid-template-columns: 1fr; }
  .barres li { grid-template-columns: 1fr; gap: 4px; }
  .carte { overflow-x: auto; }
}

/* --- V2 : navigation ------------------------------------------------------- */
.sous-menu { display: flex; flex-direction: column; gap: 2px; margin: 2px 0 8px 12px; padding-left: 10px; border-left: 2px solid rgba(255,255,255,.18); }
.sous-menu a { padding: 7px 10px; font-size: .9rem; }
.sous-menu-titre { display: flex; align-items: center; gap: 8px; padding: 6px 10px 2px; font-family: var(--police-titre); font-size: .95rem; opacity: .9; }
.sous-menu-titre i { width: 12px; height: 12px; border-radius: 4px; background: var(--c, var(--jaune)); border: 1.5px solid #fff; }
.fil .etiquette { margin-left: 6px; }
textarea { padding: 8px 10px; border: 2px solid var(--encre); border-radius: 10px; background: var(--papier); font: inherit; font-weight: 600; color: var(--encre); min-width: 0; width: 100%; resize: vertical; }
textarea:focus { outline: 3px solid var(--jaune); outline-offset: 1px; }
.boite-large { width: min(560px, 100%); }
.bloc-login { display: flex; flex-direction: column; gap: 14px; }
.bloc-login .grille-form { gap: 10px; }

/* Classes */
.grille-classes { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.carte-classe { display: flex; flex-direction: column; gap: 6px; padding: 16px 16px 14px; text-decoration: none; background: var(--papier); border: 2px solid var(--encre); border-radius: 14px; box-shadow: 4px 4px 0 var(--encre); position: relative; overflow: hidden; transition: transform .08s, box-shadow .08s; }
.carte-classe::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 8px; background: var(--c); }
.carte-classe:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--encre); }
.carte-classe-nom { font-family: var(--police-titre); font-size: 1.25rem; margin-left: 6px; }
.carte-classe-nom small { font-size: .8rem; color: var(--texte-doux); font-family: var(--police); }
.carte-classe-code { font-family: var(--police-titre); font-size: 1.5rem; letter-spacing: .18em; margin-left: 6px; }
.carte-classe .petit, .carte-classe .etiquette { margin-left: 6px; }
.carte-classe .etiquette { align-self: flex-start; }
.tuile-code b { letter-spacing: .15em; }
.carte-codes { border-style: dashed; background: #FFFBEA; }
.cases-annees { display: flex; flex-wrap: wrap; gap: 6px; }
.case-annee input { position: absolute; opacity: 0; width: 0; height: 0; }
.case-annee span { display: inline-block; padding: 4px 10px; border-radius: 999px; border: 2px solid var(--encre); background: var(--papier); font-size: .82rem; font-weight: 800; cursor: pointer; }
.case-annee input:checked + span { background: var(--jaune); }
.case-annee input:focus-visible + span { outline: 3px solid var(--jaune); outline-offset: 1px; }

/* Étiquettes de statut */
.etiquette-publie { background: #E3F7E8; color: #1F7A45; }
.etiquette-a_tester { background: #FFF1C2; color: #7A5A00; }
.etiquette-brouillon { background: #EEE; }
.etiquette-archive { background: #F4DDD8; color: #8A3A2A; }
.etiquette-suspect, .etiquette-rejetee_securite { background: #FFD9D0; color: #8A3A2A; }
.etiquette-en_attente { background: #E3F1FC; color: #1F4E7A; }
.etiquette-en_cours { background: #FFF1C2; color: #7A5A00; }
.etiquette-livree { background: #E3F7E8; color: #1F7A45; }
.etiquette-superadmin { background: var(--jaune); color: var(--encre); }
.etiquette-suspendu { background: #FFD9D0; color: #8A3A2A; }
.etiquette-origine { border: 2px solid var(--encre); font-weight: 800; color: var(--encre); }
.etiquette-origine-systeme { background: #EEE; }
.etiquette-origine-atelier { background: #E3F1FC; }
.etiquette-origine-claude-code { background: var(--jaune); }

/* Onglets */
.onglets { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.onglets a { padding: 8px 14px; border-radius: 10px; border: 2px solid var(--encre); background: var(--papier); text-decoration: none; font-weight: 800; font-size: .9rem; }
.onglets a.actif { background: var(--jaune); box-shadow: 3px 3px 0 var(--encre); }
.onglets a small { color: var(--texte-doux); font-weight: 600; }

/* Catalogue de l'Atelier */
.grille-jeux-catalogue { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.carte-jeu-cat { display: flex; flex-direction: column; gap: 8px; padding: 16px; background: var(--papier); border: 2px solid var(--encre); border-radius: 14px; box-shadow: 4px 4px 0 var(--encre); position: relative; }
.carte-jeu-cat-entete { display: flex; align-items: center; gap: 12px; }
.carte-jeu-cat-titre { font-family: var(--police-titre); font-size: 1.15rem; text-decoration: none; }
.carte-jeu-cat-titre:hover { text-decoration: underline; }
.carte-jeu-cat .petit { line-height: 1.35; }
.carte-jeu-cat-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; align-items: center; }
.carte-jeu-cat-actions form { display: inline; }
.notation { display: inline-flex; gap: 1px; vertical-align: middle; }
.notation i { width: 16px; height: 16px; color: #D6D8E2; display: inline-block; }
.notation i.pleine { color: #F2B705; }
.notation i.demi { color: #F2B705; opacity: .55; }
.notation .ico { width: 16px; height: 16px; }
.notation-nb { margin-left: 6px; color: var(--texte-doux); font-size: .82rem; }
.choix-note { display: inline-flex; flex-direction: row-reverse; gap: 2px; }
.choix-note input { position: absolute; opacity: 0; width: 0; height: 0; }
.choix-note label { cursor: pointer; }
.choix-note label .ico { width: 30px; height: 30px; color: #D6D8E2; transition: color .08s; }
.choix-note input:checked ~ label .ico, .choix-note label:hover .ico, .choix-note label:hover ~ label .ico { color: #F2B705; }
.gabarits-choix { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.gabarit-choix input { position: absolute; opacity: 0; width: 0; height: 0; }
.gabarit-choix span { display: flex; flex-direction: column; gap: 6px; padding: 12px; border: 2px solid var(--encre); border-radius: 12px; background: var(--papier); cursor: pointer; height: 100%; }
.gabarit-choix input:checked + span { background: #FFF1C2; box-shadow: 3px 3px 0 var(--encre); }
.gabarit-choix b { font-family: var(--police-titre); font-size: 1rem; }
.gabarit-choix small { color: var(--texte-doux); line-height: 1.3; }
.gabarit-apercu { display: flex; gap: 4px; margin-top: 4px; }
.gabarit-apercu i { display: block; height: 10px; flex: 1; border-radius: 3px; background: var(--ciel); border: 1.5px solid var(--encre); }
.gabarit-apercu i:first-child { background: var(--jaune); }
.quota { display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--ciel); border: 2px solid var(--encre); font-size: .85rem; }
.cadre-apercu { border: 2px solid var(--encre); border-radius: 14px; overflow: hidden; background: #fff; }
.cadre-apercu iframe { display: block; width: 100%; height: 560px; border: 0; }
.commentaires { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.commentaires li { padding: 10px 12px; border: 1.5px solid var(--ligne); border-radius: 10px; }
.commentaires li .petit { display: block; margin-bottom: 4px; }
.versions { font-size: .88rem; color: var(--texte-doux); }
.pre { white-space: pre-wrap; font-family: inherit; background: #F6F3EC; border-radius: 8px; padding: 10px; margin: 6px 0; font-size: .9rem; }
.drapeau { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: .72rem; background: #FFD9D0; color: #8A3A2A; margin-right: 4px; }
.journal-liste { list-style: none; margin: 0; padding: 0; font-size: .88rem; }
.journal-liste li { padding: 6px 0; border-bottom: 1px solid var(--ligne); }
.journal-liste time { color: var(--texte-doux); margin-right: 8px; }
.colonnes-fiche { grid-template-columns: 2fr 1fr; }
@media (max-width: 900px) { .colonnes-fiche { grid-template-columns: 1fr; } .sous-menu { flex-direction: row; flex-wrap: wrap; border-left: 0; margin: 0; padding: 0; width: 100%; } }

/* Tableau ordonnable par glisser-déposer (jeux de la classe) */
.table-ordonnable tbody tr[draggable] { cursor: grab; }
.table-ordonnable tbody tr.en-deplacement { opacity: .4; }
.table-ordonnable tbody tr.cible-dessus td { border-top: 3px solid var(--jaune); }
.table-ordonnable tbody tr.cible-dessous td { border-bottom: 3px solid var(--jaune); }
.table-ordonnable .poignee { width: 1%; white-space: nowrap; }
.poignee-grip { font-weight: 800; letter-spacing: -2px; color: var(--texte-doux); user-select: none; margin-right: 6px; }
.poignee .fleches { display: inline-flex; flex-direction: column; gap: 2px; vertical-align: middle; }
.poignee .fleches .btn { padding: 0 6px; line-height: 1.3; font-size: .7rem; }

/* Textes libres (enseignant) */
.etiquette-texte-remis { background: #FFF1C2; color: #7A5A00; }
.etiquette-texte-annote { background: #E3F1FC; color: #1F4E7A; }
.etiquette-texte-termine { background: #E3F7E8; color: #1F7A45; }
.etiquette-texte-brouillon { background: #EEE; }
.texte-eleve { font-size: 1rem; line-height: 1.6; min-height: 80px; }
.commentaires li.echange-annotation { background: #E3F1FC; }

/* Textes riches (Textes libres) : rendu, éditeur, annotations */
.texte-riche { line-height: 1.6; font-size: 1.05rem; font-weight: 500; }
.texte-riche b { font-weight: 800; }
.texte-riche h3 { margin: .4em 0 .2em; font-size: 1.3em; }
.texte-riche p { margin: 0 0 .5em; }
.texte-riche ul, .texte-riche ol { margin: 0 0 .5em; padding-left: 1.6em; }
.texte-riche mark { background: #FFE58A; border-radius: 4px; padding: 0 2px; box-shadow: 0 2px 0 #E4B400; cursor: help; counter-increment: note; }
.texte-riche { counter-reset: note; }
.texte-riche mark::after { content: counter(note); display: inline-block; min-width: 1.3em; height: 1.3em; margin-left: 3px; border-radius: 999px; background: #2B2340; color: #fff; font-size: .7em; line-height: 1.3em; text-align: center; font-weight: 800; vertical-align: super; }
.liste-notes { margin: 6px 0 0; padding-left: 1.4em; line-height: 1.5; }
.liste-notes li { margin-bottom: 4px; }
.liste-notes .corr { color: #1F7A45; font-weight: 700; }
.barre-editeur { display: flex; gap: 6px; flex-wrap: wrap; }
.barre-editeur button { font: inherit; font-weight: 800; padding: 6px 12px; border-radius: 10px; border: 2px solid #2B2340; background: #fff; cursor: pointer; box-shadow: 2px 2px 0 #2B2340; }
.barre-editeur button.actif { background: #FFD166; }
.barre-editeur button:active { transform: translate(2px, 2px); box-shadow: none; }
.editeur-zone { min-height: 320px; padding: 16px; background: #FFF8EC; border: 3px solid #2B2340; border-radius: 16px; box-shadow: inset 3px 3px 0 rgba(43, 35, 64, .12); outline: none; }
.editeur-zone:focus { outline: 4px solid #FFD166; outline-offset: 2px; }
.editeur-zone:empty::before, .editeur-zone[data-placeholder]:has(> p:only-child > br:only-child)::before { content: attr(data-placeholder); color: #8b859a; position: absolute; pointer-events: none; }
.editeur-zone { position: relative; }
.panneau-note { margin: 10px 0; padding: 12px; border: 2px dashed var(--encre); border-radius: 10px; background: #FFF8EC; display: flex; flex-direction: column; gap: 8px; }
.panneau-note label { display: block; }
.panneau-note input { width: 100%; }
.texte-eleve { padding: 12px; background: #F6F3EC; border-radius: 8px; user-select: text; }

/* --- Boîte à messages (admin/boite.php) --------------------------------- */
.etiquette-boite-idee { background: #FFF1C2; color: #7A5A00; }
.etiquette-boite-aide { background: #E3F1FC; color: #1F4E7A; }
.etiquette-boite-bug { background: #FFD9D0; color: #8A3A2A; }
.etiquette-boite-autre { background: #DDF6F1; color: #1F6B5E; }
.boite-non-lu td { background: #FFFBEA; }
.filtres-boite a { text-decoration: none; }
.filtres-boite a.actif { font-weight: 800; text-decoration: underline; }
.boite-echanges { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.boite-echange { padding: 10px 14px; border: 1.5px solid var(--ligne); border-radius: 12px; max-width: 85%; }
.boite-echange .petit { display: block; margin-bottom: 4px; }
.boite-echange-eleve { background: #F6F3EC; align-self: flex-start; }
.boite-echange-prof { background: #E3F1FC; align-self: flex-end; }
.menu-compteur { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 6px; border-radius: 999px; background: var(--corail); color: #fff; font-size: .72rem; font-weight: 800; text-align: center; line-height: 20px; }
