/* =========================================================
   Page prof — feuille de style
   Les couleurs sont regroupées ici : change-les à un seul endroit.
   ========================================================= */
:root {
  --menu: #15343B;        /* fond du menu */
  --menu-texte: #E6EFEE;
  --menu-survol: rgba(255,255,255,.08);
  --menu-trait: rgba(255,255,255,.15);
  --fond: #F4F2EC;        /* fond général */
  --carte: #FFFFFF;
  --bord: #DDD8CB;
  --texte: #1B2A2E;
  --texte-doux: #55676A;
  --accent: #0E7C74;      /* accent principal */
  --accent-fonce: #0A5F59;
  --accent-clair: #E1F0EE;
  --chaud: #F2B872;       /* « en cours » */
  --chaud-clair: #FBEBD5;
  --vert: #2E7D4F;
  --rouge: #B3261E;
  --rayon: 14px;
  --ombre: 0 1px 2px rgba(21, 52, 59, .06), 0 4px 14px rgba(21, 52, 59, .06);
  --police-texte: "Marianne", "Segoe UI", Arial, sans-serif;
  --police-titres: "Titres", "Century Gothic", "Questrial", "Segoe UI", sans-serif;
  font-size: 17px;
}
html.grand { font-size: 21px; }   /* bouton « Grand affichage » (vidéoprojecteur) */

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--police-texte);
  background: var(--fond);
  color: var(--texte);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .titre { font-family: var(--police-titres); font-weight: 700; line-height: 1.15; margin: 0; }
h1 { font-size: 1.8rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.08rem; }
p { margin: 0 0 .6em; }
a { color: var(--accent); }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--chaud); outline-offset: 2px; border-radius: 6px; }

.skip { position: absolute; left: -9999px; top: 0; background: var(--carte); padding: .5rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; top: 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Mise en page ---------- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 272px; flex-shrink: 0;
  background: var(--menu); color: var(--menu-texte);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  padding: 1rem .75rem;
}
.brand { display: flex; align-items: center; gap: .6rem; padding: .25rem .5rem 1rem; }
.brand span { font-family: var(--police-titres); font-weight: 700; font-size: 1.25rem; }
.sidebar .menu-toggle { display: none; }
.nav { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.nav a, .side-btn {
  display: flex; align-items: center; gap: .7rem;
  padding: .6rem .75rem; border-radius: 10px;
  color: var(--menu-texte); text-decoration: none; font-weight: 500;
  background: none; border: 0; font: inherit; font-weight: 500; width: 100%; text-align: left; cursor: pointer;
}
.nav a:hover, .side-btn:hover { background: var(--menu-survol); }
.nav a[aria-current="page"], .sidebar-bottom a[aria-current="page"] { background: var(--accent); color: #fff; }
.nav .sep { height: 1px; background: var(--menu-trait); margin: .5rem .5rem; }
/* Groupes du menu (Outils, Organisation) */
.nav-groupe .chevron { margin-left: auto; width: .55rem; height: .55rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .2s; opacity: .8; }
.nav-groupe[aria-expanded="true"] .chevron { transform: rotate(45deg); }
.nav-groupe.contient-actuelle { color: var(--chaud); }
.sous-nav { list-style: none; margin: 2px 0 4px; padding: 0 0 0 1.1rem; display: flex; flex-direction: column; gap: 2px; border-left: 1px solid var(--menu-trait); margin-left: 1.3rem; }
.sous-nav a { padding: .45rem .7rem; font-weight: 400; }
.sous-nav .intertitre { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .65; padding: .55rem .7rem .15rem; }
.sidebar-bottom { margin-top: auto; padding-top: 1rem; display: flex; flex-direction: column; gap: 2px; }
.icone { width: 1.25em; height: 1.25em; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.main-wrap { flex: 1; min-width: 0; display: flex; flex-direction: column; }
main { padding: 1.25rem 1.5rem 3rem; outline: none; flex: 1; }

/* ---------- Bandeau « séance en cours » ---------- */
.banner {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding: .9rem 1.5rem; background: var(--carte); border-bottom: 1px solid var(--bord);
  position: sticky; top: 0; z-index: 10;
}
.banner.en-cours { background: var(--chaud-clair); border-bottom-color: var(--chaud); }
.badge {
  display: inline-block; padding: .2rem .6rem; border-radius: 999px;
  font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  background: var(--accent-clair); color: var(--accent-fonce);
}
.badge.chaud { background: var(--chaud); color: var(--menu); }
.banner-info { flex: 1; min-width: 220px; }
.banner-titre { font-family: var(--police-titres); font-weight: 700; font-size: 1.35rem; }
.banner-sous { color: var(--texte-doux); }
.banner-reste { font-family: var(--police-titres); font-weight: 700; font-size: 1.6rem; white-space: nowrap; }
.barre { height: 8px; background: rgba(21,52,59,.12); border-radius: 99px; overflow: hidden; margin-top: .4rem; }
.barre > span { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .5s; }
.en-cours .barre > span { background: var(--menu); }
.horloge { font-family: var(--police-titres); font-size: 1.2rem; color: var(--texte-doux); white-space: nowrap; }
.mini-minuteur {
  display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .8rem; border-radius: 999px;
  background: var(--menu); color: #fff; text-decoration: none; font-weight: 700; font-variant-numeric: tabular-nums;
}
.mini-minuteur.fini { background: var(--rouge); }

/* ---------- Boutons & champs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  font: inherit; font-weight: 700; cursor: pointer; text-decoration: none;
  padding: .6rem 1rem; border-radius: 10px; min-height: 44px;
  border: 2px solid var(--accent); background: var(--carte); color: var(--accent-fonce);
}
.btn:hover { background: var(--accent-clair); }
.btn.principal { background: var(--accent); color: #fff; }
.btn.principal:hover { background: var(--accent-fonce); border-color: var(--accent-fonce); }
.btn.discret { border-color: var(--bord); color: var(--texte); }
.btn.danger { border-color: var(--rouge); color: var(--rouge); }
.btn.danger:hover { background: #FBE9E7; }
.btn.grand { font-size: 1.25rem; padding: .85rem 1.6rem; min-height: 60px; }
.btn.icone-seule { padding: .5rem; min-width: 44px; }
.btn[aria-pressed="true"] { background: var(--accent); color: #fff; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.rangee { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.rangee.entre { justify-content: space-between; }
label { font-weight: 500; }
input[type=text], input[type=url], input[type=number], input[type=time], input[type=search], input[type=password], select, textarea {
  font: inherit; color: inherit; padding: .5rem .65rem; min-height: 44px;
  border: 2px solid var(--bord); border-radius: 10px; background: var(--carte);
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-clair); }
textarea { width: 100%; resize: vertical; }
.champ { display: flex; flex-direction: column; gap: .25rem; }
input[type=range] { accent-color: var(--accent); width: 100%; }
input[type=checkbox] { accent-color: var(--accent); width: 1.3rem; height: 1.3rem; }

/* ---------- Cartes & grilles ---------- */
.section { margin-bottom: 2rem; }
.section-titre { display: flex; align-items: center; gap: .6rem; margin-bottom: .8rem; }
.carte {
  background: var(--carte); border: 1px solid var(--bord); border-radius: var(--rayon);
  box-shadow: var(--ombre); padding: 1.1rem 1.2rem;
}
.carte-tete { display: flex; align-items: center; gap: .6rem; margin-bottom: .7rem; }
.carte-tete .icone { color: var(--accent); width: 1.6em; height: 1.6em; }
.grille-outils { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.grille-2 { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.carte-outil { display: flex; flex-direction: column; gap: .7rem; }
.carte-outil .bas { margin-top: auto; }
.gros-chiffre { font-family: var(--police-titres); font-weight: 700; font-size: 2.4rem; font-variant-numeric: tabular-nums; line-height: 1; }
.doux { color: var(--texte-doux); }
.vide { color: var(--texte-doux); font-style: italic; }
.info { background: var(--accent-clair); border-left: 4px solid var(--accent); padding: .8rem 1rem; border-radius: 8px; }
.alerte { background: #FBE9E7; border-left: 4px solid var(--rouge); padding: .8rem 1rem; border-radius: 8px; }

.page-tete { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.page-tete h1 { flex: 1; }

/* ---------- Vue « outil » (plein écran possible) ---------- */
.vue-outil { background: var(--fond); }
.vue-outil:fullscreen { padding: 2rem; overflow: auto; }
.vue-outil:-webkit-full-screen { padding: 2rem; overflow: auto; }

/* Minuteur */
.minuteur-ecran {
  text-align: center; padding: 1.5rem 1rem; border-radius: var(--rayon);
  background: var(--carte); border: 1px solid var(--bord); transition: background .3s;
}
.minuteur-temps {
  font-family: var(--police-titres); font-weight: 700; font-variant-numeric: tabular-nums;
  font-size: clamp(4.5rem, 20vw, 16rem); line-height: 1; letter-spacing: -.02em;
}
.minuteur-ecran.bientot { background: var(--chaud-clair); }
.minuteur-ecran.fini { background: var(--rouge); color: #fff; animation: clignote 1s steps(2) 6; }
.minuteur-ecran .barre { height: 14px; max-width: 900px; margin: 1rem auto 0; }
.minuteur-ecran.bientot .barre > span { background: var(--chaud); }
@keyframes clignote { 50% { background: #7d1a15; } }
/* Import Pronote */
.etapes-import { margin: .4rem 0 1rem; padding-left: 1.3rem; }
.tableau-import { overflow-x: auto; border: 1px solid var(--bord); border-radius: 10px; max-height: 55vh; overflow-y: auto; }
.tableau-import table { border-collapse: collapse; width: 100%; font-size: .92rem; }
.tableau-import th { position: sticky; top: 0; background: var(--fond); text-align: left; padding: .5rem; font-weight: 700; }
.tableau-import td { padding: .3rem .5rem; border-top: 1px solid var(--bord); white-space: nowrap; }
.tableau-import td input[type=text] { min-height: 36px; padding: .25rem .45rem; width: 100%; min-width: 4.5rem; }

/* Roue du tirage */
.tirage-roue { display: flex; align-items: center; justify-content: center; gap: 2rem 4vw; flex-wrap: wrap; width: 100%; }
.roue { display: none; position: relative; width: clamp(240px, 34vw, 560px); aspect-ratio: 1; flex-shrink: 0; }
.avec-roue .roue { display: block; }
.roue-toile { width: 100%; height: 100%; display: block; filter: drop-shadow(0 4px 12px rgba(0,0,0,.18)); }
.roue-fleche { position: absolute; top: -6px; left: 50%; transform: translateX(-50%); width: 0; height: 0;
  border-left: 18px solid transparent; border-right: 18px solid transparent; border-top: 34px solid var(--menu); filter: drop-shadow(0 2px 2px rgba(0,0,0,.3)); }
.avec-roue .nom-tire { font-size: clamp(2.5rem, 6vw, 6rem); }
html.projection .roue { width: min(46vw, 80vh); }

/* Cadran visuel (minuteur, fin de contrôle) */
.minuteur-visuel { display: flex; align-items: center; justify-content: center; gap: 2rem 4vw; flex-wrap: wrap; }
.cadran { width: clamp(220px, 30vw, 480px); height: auto; flex-shrink: 0; overflow: visible; }
.cadran-fond { fill: color-mix(in srgb, var(--accent) 10%, #fff); }
.cadran-secteur { fill: var(--accent); transition: d .3s linear; }
.cadran.bientot .cadran-secteur { fill: var(--chaud); }
.cadran.fini .cadran-secteur { fill: var(--rouge); }
.cadran-graduations line { stroke: #1B2A2E; stroke-width: 1; }
.cadran-graduations line.long { stroke-width: 2; }
.cadran-graduations text { font-family: var(--police-titres); font-weight: 700; font-size: 15px; fill: #1B2A2E; }
.cadran-centre { fill: #1B2A2E; }
.minuteur-ecran.fini .cadran-graduations line { stroke: #fff; }
.minuteur-ecran.fini .cadran-graduations text, .minuteur-ecran.fini .cadran-centre { fill: #fff; }
.minuteur-visuel .minuteur-temps { font-size: clamp(5rem, 15vw, 17rem); }
html.projection .minuteur-visuel .cadran, .vue-outil:fullscreen .cadran { width: min(42vw, 72vh); }
html.projection .minuteur-visuel .minuteur-temps, .vue-outil:fullscreen .minuteur-visuel .minuteur-temps { font-size: clamp(6rem, 20vw, 24rem); }

/* Fin de contrôle */
.controle-fin { font-family: var(--police-titres); font-weight: 700; font-size: clamp(1.6rem, 4vw, 3.2rem); margin-bottom: .5rem; }
.controle-horloge { margin-top: 1rem; font-size: clamp(1.1rem, 2.5vw, 2rem); color: var(--texte-doux); }
.controle-ecran.fini .controle-horloge { color: inherit; }
.controle-ecran { position: relative; }
.minuteur-temps.message-fin { font-size: clamp(3rem, 9vw, 9rem); letter-spacing: 0; }
.controle-ecran.urgent .minuteur-temps { color: var(--rouge); }
.controle-annonce {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(90%, 60rem);
  background: var(--menu); color: #fff; padding: 1.5rem 2rem; border-radius: var(--rayon);
  font-family: var(--police-titres); font-weight: 700; font-size: clamp(2rem, 6vw, 5.5rem); box-shadow: 0 10px 40px rgba(0,0,0,.3);
  animation: apparait .4s ease-out;
}
@keyframes apparait { from { opacity: 0; transform: translate(-50%, -40%); } }
.controle-reglages { margin-top: 1rem; }
.controle-reglages .rangee { align-items: flex-end; }
.prereglages .btn { font-size: 1.3rem; min-width: 5.5rem; min-height: 64px; }
.vue-outil:fullscreen .minuteur-temps { font-size: clamp(6rem, 28vw, 30rem); }

/* Tirage */
.scene-tirage {
  min-height: 40vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 2rem 1rem; border-radius: var(--rayon); background: var(--carte); border: 1px solid var(--bord);
}
.nom-tire { font-family: var(--police-titres); font-weight: 700; font-size: clamp(3rem, 12vw, 10rem); line-height: 1.05; word-break: break-word; }
.nom-tire.defile { color: var(--texte-doux); }
.puces { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; margin: 0; }
.puce { padding: .3rem .7rem; border-radius: 999px; background: var(--accent-clair); color: var(--accent-fonce); font-weight: 500; }
.puce.barree { background: #ECE9E1; color: var(--texte-doux); text-decoration: line-through; }
.liste-cases { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .3rem .8rem; }
.liste-cases label { display: flex; gap: .5rem; align-items: center; font-weight: 400; padding: .25rem 0; }

/* Groupes */
.grille-groupes { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.groupe h3 { color: var(--accent-fonce); margin-bottom: .4rem; }
.groupe ul { margin: 0; padding-left: 1.1rem; font-size: 1.25rem; }
.vue-outil:fullscreen .groupe ul { font-size: 1.6rem; }

/* Bruitomètre */
.bruit-etat {
  text-align: center; padding: 2rem 1rem; border-radius: var(--rayon); color: #fff;
  font-family: var(--police-titres); font-weight: 700; font-size: clamp(2.5rem, 9vw, 7rem);
  transition: background .4s; background: var(--texte-doux);
}
.bruit-etat.z0 { background: var(--vert); }
.bruit-etat.z1 { background: var(--chaud); color: var(--menu); }
.bruit-etat.z2 { background: var(--rouge); }
.jauge { position: relative; height: 56px; border-radius: 14px; overflow: hidden; margin: 1rem 0 .4rem; border: 2px solid var(--menu); }
.jauge-zones { position: absolute; inset: 0; display: flex; }
.jauge-zones > div { height: 100%; }
.jauge-aiguille { position: absolute; top: 0; bottom: 0; width: 6px; margin-left: -3px; background: var(--menu); box-shadow: 0 0 0 2px #fff; transition: left .08s linear; }
.jauge-legende { display: flex; justify-content: space-between; color: var(--texte-doux); font-size: .9rem; }

/* Tableau blanc */
.tb-zone { position: relative; height: calc(100vh - 260px); min-height: 360px; background: var(--carte); border: 1px solid var(--bord); border-radius: var(--rayon); overflow: hidden; }
.vue-outil:fullscreen .tb-zone { height: calc(100vh - 140px); }
.tb-zone canvas { display: block; touch-action: none; cursor: crosshair; }
.pastille { width: 44px; height: 44px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 2px var(--bord); cursor: pointer; }
.pastille[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--menu); }

/* Outils de création (carte mentale, schéma, frise) */
.barre-doc { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; justify-content: space-between; margin-bottom: .8rem; }
.doc-titre { font-family: var(--police-titres); font-weight: 700; font-size: 1.25rem; flex: 1; min-width: 14rem; max-width: 34rem; }
.barre-outils { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; padding: .6rem; margin-bottom: .8rem; background: var(--carte); border: 1px solid var(--bord); border-radius: var(--rayon); }
.champ-noeud { flex: 1; min-width: 14rem; font-size: 1.1rem !important; }
.champ-noeud:disabled { background: var(--fond); }
.pastille.petite { width: 32px; height: 32px; border-width: 2px; }
.pastille:disabled { opacity: .35; cursor: not-allowed; }
.zone-dessin { background: var(--carte); border: 1px solid var(--bord); border-radius: var(--rayon); overflow: auto; }
.zone-dessin svg.dessin { display: block; width: 100%; height: auto; max-height: calc(100vh - 330px); min-height: 360px; user-select: none; touch-action: none; }
.zone-dessin.frise svg.dessin { max-height: none; min-height: 0; touch-action: auto; }
.zone-dessin.mode-fleche { outline: 3px dashed var(--chaud); outline-offset: -3px; }
.vue-outil:fullscreen .zone-dessin svg.dessin { max-height: calc(100vh - 210px); }
.aide { font-size: .92rem; margin-top: .6rem; }
.form-frise { display: flex; flex-direction: column; gap: 1rem; margin-top: 1.2rem; }
.lignes-frise { display: flex; flex-direction: column; gap: .5rem; }
.ligne-frise { display: flex; flex-wrap: wrap; gap: .5rem; align-items: end; padding: .5rem; border: 1px solid var(--bord); border-radius: 10px; }
.ligne-frise input[type=number] { width: 7rem; }
.date-frise { display: flex; align-items: center; gap: .3rem; border: 0; padding: 0; margin: 0; flex-wrap: wrap; }
.date-frise legend { font-weight: 500; padding: 0; margin-bottom: .25rem; float: left; width: 100%; }
.date-frise .jour { width: 4.6rem; }
.date-frise .annee { width: 6.5rem; }
.date-frise select { width: 8.5rem; }
.ligne-frise .champ.large { flex: 1; min-width: 14rem; }
.ligne-frise .champ.large input { width: 100%; }

/* ---------- Écran de classe ---------- */
.scene-ecran {
  position: relative; height: calc(100vh - 290px); min-height: 460px; border-radius: var(--rayon);
  border: 1px solid var(--bord); overflow: hidden; background: var(--fond);
}
.scene-ecran:fullscreen { height: 100vh; border-radius: 0; border: 0; }
.scene-ecran:-webkit-full-screen { height: 100vh; border-radius: 0; border: 0; }
.scene-ecran { display: flex; }
.zone-plateau { position: relative; flex: 1; min-width: 0; }
.plateau { position: absolute; inset: 0; }
.scene-ecran.depot { outline: 4px dashed var(--accent); outline-offset: -8px; }
/* Colonne de documents (à droite) */
.colonne-docs { display: none; width: clamp(120px, 13%, 220px); flex-shrink: 0; overflow-y: auto; padding: .6rem; gap: .6rem; flex-direction: column;
  background: rgba(255,255,255,.55); border-left: 1px solid rgba(0,0,0,.08); }
.scene-ecran.avec-colonne .colonne-docs { display: flex; }
.doc-vignette { position: relative; display: flex; flex-direction: column; gap: .3rem; padding: .4rem; border-radius: 10px; background: var(--carte);
  box-shadow: 0 1px 3px rgba(0,0,0,.15); cursor: pointer; }
.doc-vignette:hover { box-shadow: 0 0 0 2px var(--accent); }
.doc-vignette.ouvert { box-shadow: 0 0 0 3px var(--chaud); }
.doc-image { aspect-ratio: 4 / 3; display: grid; place-items: center; overflow: hidden; border-radius: 6px; background: var(--fond); }
.doc-image img { max-width: 100%; max-height: 100%; object-fit: contain; }
.doc-image .ico-fichier { width: 50%; height: 60%; }
.doc-nom { font-size: .8rem; line-height: 1.2; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.doc-retirer { position: absolute; top: .2rem; right: .2rem; opacity: 0; background: var(--carte); }
.doc-vignette:hover .doc-retirer, .doc-vignette:focus-within .doc-retirer { opacity: 1; }
.doc-absent { font-size: .75rem; color: var(--texte-doux); text-align: center; padding: .3rem; }
/* Document affiché en grand, par-dessus les outils */
.doc-agrandi { position: absolute; inset: 0; z-index: 500; display: grid; place-items: center; background: rgba(20, 30, 32, .92); padding: 1rem; }
.doc-agrandi img { max-width: 100%; max-height: 100%; object-fit: contain; box-shadow: 0 8px 30px rgba(0,0,0,.4); background: var(--carte); }
.doc-agrandi iframe { width: 100%; height: 100%; border: 0; background: var(--carte); border-radius: 6px; }
.doc-agrandi .doc-absent { color: #fff; font-size: 1.2rem; }
.doc-commandes { position: absolute; bottom: 1rem; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: .4rem;
  background: var(--carte); padding: .35rem .5rem; border-radius: 12px; box-shadow: 0 4px 16px rgba(0,0,0,.3); }
.doc-page { min-width: 3.5rem; text-align: center; font-weight: 700; }
input.mini { min-height: 34px; padding: .2rem .4rem; font-size: .85rem; border-width: 1.5px; border-radius: 8px; }
/* Fenêtre « Ajouter un document depuis Ressources » */
.dialogue-ressources { width: min(640px, calc(100vw - 2rem)); max-height: 80vh; border: 0; border-radius: var(--rayon); padding: 1.2rem; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.dialogue-ressources::backdrop { background: rgba(21, 52, 59, .45); }
.dialogue-tete { display: flex; align-items: center; justify-content: space-between; margin-bottom: .4rem; }
.dialogue-corps .liste-fichiers { max-height: 50vh; overflow-y: auto; }
.scene-vide { position: absolute; inset: 0; display: grid; place-items: center; color: var(--texte-doux); font-style: italic; margin: 0; padding: 1rem; text-align: center; }
.widget {
  position: absolute; display: flex; flex-direction: column; background: var(--carte); border-radius: 16px;
  box-shadow: 0 2px 4px rgba(21,52,59,.12), 0 10px 28px rgba(21,52,59,.16); overflow: hidden; min-width: 0;
}
.widget-tete {
  display: flex; align-items: center; gap: .4rem; padding: .3rem .4rem .3rem .7rem; cursor: grab; touch-action: none;
  background: var(--fond); border-bottom: 1px solid var(--bord); font-size: .85rem; user-select: none;
}
.widget-tete:active { cursor: grabbing; }
.widget-titre { display: flex; align-items: center; gap: .4rem; font-weight: 700; color: var(--texte-doux); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.widget-titre .icone { color: var(--accent); }
.widget-actions { display: flex; gap: .25rem; }
.widget-corps { flex: 1; min-height: 0; container-type: size; display: flex; flex-direction: column; }
.widget-poignee {
  position: absolute; right: 0; bottom: 0; width: 22px; height: 22px; cursor: nwse-resize; touch-action: none;
  background: linear-gradient(135deg, transparent 50%, var(--bord) 50%, var(--bord) 60%, transparent 60%, transparent 70%, var(--bord) 70%, var(--bord) 80%, transparent 80%);
}
/* Verrouillé : pas d'en-têtes ni de poignées, contrôles visibles au survol seulement */
.scene-ecran.verrou .widget-tete, .scene-ecran.verrou .widget-poignee { display: none; }
.scene-ecran.verrou .w-controles { opacity: 0; transition: opacity .2s; }
.scene-ecran.verrou .widget:hover .w-controles, .scene-ecran.verrou .widget:focus-within .w-controles { opacity: 1; }

.btn.mini { min-height: 34px; padding: .25rem .55rem; font-size: .85rem; border-width: 1.5px; border-radius: 8px; }
.btn.mini.icone-seule { min-width: 34px; padding: .25rem; }
select.mini { min-height: 34px; padding: .2rem .4rem; font-size: .85rem; border-width: 1.5px; border-radius: 8px; }

.w-pile { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: stretch; justify-content: center; gap: 2cqh; padding: 3cqh 3cqw; }
.w-geant {
  font-family: var(--police-titres); font-weight: 700; line-height: 1; text-align: center; font-variant-numeric: tabular-nums;
  font-size: min(34cqh, 21cqw); flex: 1; display: grid; place-items: center; min-height: 0;
}
.w-nom { font-size: min(26cqh, 13cqw); word-break: break-word; }
.w-sous { text-align: center; color: var(--texte-doux); font-size: min(9cqh, 6cqw); }
.w-moyen { font-family: var(--police-titres); font-weight: 700; font-size: min(20cqh, 11cqw); }
.w-info { color: var(--texte-doux); font-size: .85rem; white-space: nowrap; }
.w-vide { color: var(--texte-doux); font-style: italic; text-align: center; padding: 1rem; margin: auto; }
.w-controles { display: flex; flex-wrap: wrap; gap: .3rem; justify-content: center; align-items: center; }
.w-barre { height: max(8px, 3cqh); margin: 0; }
.w-pile.w-bientot { background: var(--chaud-clair); }
.w-pile.w-alerte { background: var(--rouge); color: #fff; }
.w-texte { flex: 1; padding: 4cqh 4cqw; overflow: auto; outline: none; white-space: pre-wrap; line-height: 1.3; font-weight: 500; }
.w-texte:empty::before { content: attr(data-placeholder); color: var(--texte-doux); font-style: italic; }
.w-texte:focus { box-shadow: inset 0 0 0 3px var(--accent-clair); }
.w-bruit { flex: 1; display: grid; place-items: center; text-align: center; border-radius: 12px; background: #ECE9E1; color: var(--texte); transition: background .4s; min-height: 0; }
.w-jauge { height: max(18px, 9cqh); margin: 0; border-width: 1.5px; }
.w-mode { flex: 1; min-height: 0; border-radius: 12px; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2cqh; transition: background .3s; }
.w-icone svg { width: min(46cqh, 50cqw); height: min(46cqh, 50cqw); display: block; }
.w-mode-nom { font-family: var(--police-titres); font-weight: 700; font-size: min(12cqh, 11cqw); text-align: center; line-height: 1.05; padding: 0 .3rem; }
.w-mini-icone svg { width: 20px; height: 20px; display: block; }
.w-groupes { flex: 1; min-height: 0; overflow: auto; display: grid; gap: .5rem; align-content: start;
  grid-template-columns: repeat(auto-fill, minmax(max(110px, 22cqw), 1fr)); font-size: clamp(.8rem, 4.2cqh, 1.6rem); }
.w-groupe { background: var(--accent-clair); border-radius: 10px; padding: .4rem .6rem; }
.w-groupe strong { color: var(--accent-fonce); }
.w-groupe ul { margin: .2rem 0 0; padding-left: 1.1em; }
.w-etapes { flex: 1; min-height: 0; overflow: auto; padding: 3cqh 4cqw; font-size: clamp(.85rem, min(5cqh, 4.2cqw), 1.5rem); }
.w-etapes-tete { margin-bottom: .4em; color: var(--texte-doux); }
.w-etapes ol { margin: 0; padding-left: 1.3em; }
.w-etapes li { padding: .15em 0; }
.w-etapes li > * { vertical-align: middle; }
.w-etapes li.faite .w-etape-titre { text-decoration: line-through; color: var(--texte-doux); }
.w-etapes li.active { color: #8a4b00; font-weight: 700; }
.w-etape-titre { margin-right: .4em; }
.w-etapes .btn.mini { margin-left: .3em; }
.w-image { flex: 1; min-height: 0; display: grid; place-items: center; padding: .4rem; }
.w-image img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }

/* Séance & emploi du temps */
.etapes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .4rem; }
.etape { display: flex; align-items: center; gap: .6rem; padding: .5rem .6rem; border-radius: 10px; border: 1px solid var(--bord); background: var(--carte); flex-wrap: wrap; }
.etape.active { border-color: var(--chaud); background: var(--chaud-clair); }
.etape.faite .etape-titre { text-decoration: line-through; color: var(--texte-doux); }
.etape-titre { flex: 1; min-width: 8rem; }
.etape-heure { font-variant-numeric: tabular-nums; color: var(--texte-doux); min-width: 3.2rem; }
.etape input[type=text] { flex: 1; min-width: 10rem; }
.etape input[type=number] { width: 5.5rem; }
.creneaux { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .4rem; }
.creneau { display: flex; gap: .8rem; align-items: center; padding: .55rem .8rem; border-radius: 10px; border: 1px solid var(--bord); background: var(--carte); }
.creneau .heures { font-variant-numeric: tabular-nums; font-weight: 700; min-width: 7.5rem; }
.creneau.passe { opacity: .55; }
.creneau.actuel { background: var(--chaud-clair); border: 2px solid var(--chaud); }
.onglets { display: flex; gap: .3rem; flex-wrap: wrap; margin-bottom: 1rem; }
.ligne-edt { display: grid; grid-template-columns: 8rem 8rem 1fr 7rem 1fr auto; gap: .5rem; align-items: end; padding: .6rem; border: 1px solid var(--bord); border-radius: 10px; background: var(--carte); margin-bottom: .5rem; }
.ligne-edt input { width: 100%; }
.creneau.sans-cours > :not(.statut) { text-decoration: line-through; opacity: .6; }
.badge.statut { background: #FBE4E2; color: var(--rouge); }
.badge.statut:not(.barre) { background: var(--accent-clair); color: var(--accent-fonce); }

/* Ma semaine (Pronote) */
.semaine-carte { margin-bottom: 1.2rem; }
.semaine-tete { display: flex; justify-content: space-between; align-items: center; gap: .6rem 1rem; flex-wrap: wrap; }
.semaine-tete h2 { margin: 0; }
.semaine-defile { overflow-x: auto; overflow-y: hidden; padding-bottom: .3rem; }
.semaine { display: grid; min-width: min-content; }
.semaine-jour { text-align: center; padding: .4rem .2rem .5rem; display: flex; flex-direction: column; line-height: 1.2; border-bottom: 1px solid var(--bord); }
.semaine-jour strong { text-transform: capitalize; }
.semaine-jour span { color: var(--texte-doux); font-size: .9rem; }
.semaine-jour.aujourdhui { color: var(--accent-fonce); background: var(--accent-clair); border-radius: 10px 10px 0 0; }
.semaine-heures { position: relative; }
.semaine-heures span { position: absolute; right: .5rem; transform: translateY(-50%); font-size: .8rem; color: var(--texte-doux); font-variant-numeric: tabular-nums; }
.semaine-heures span:first-child { transform: none; }
.semaine-col { position: relative; border-left: 1px solid var(--bord); background-image: linear-gradient(to bottom, var(--bord) 1px, transparent 1px); }
.semaine-col.aujourdhui { background-color: #F3FAF9; }
.semaine-cours { position: absolute; overflow: hidden; border-radius: 8px; border-left: 5px solid; padding: .2rem .45rem; font-size: .85rem; line-height: 1.25; color: var(--texte); }
.semaine-cours-ligne { display: flex; justify-content: space-between; gap: .3rem; }
.semaine-cours-ligne strong { font-size: .95rem; }
.semaine-cours .salle { color: var(--texte-doux); font-variant-numeric: tabular-nums; }
.semaine-cours-detail { color: var(--texte-doux); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.semaine-statut { font-weight: 700; color: var(--rouge); font-size: .8rem; }
.semaine-cours.sans-cours { background: repeating-linear-gradient(135deg, #F4F2EC 0 6px, #FFFFFF 6px 12px) !important; border-left-color: #B9B3A6 !important; }
.semaine-cours.sans-cours .semaine-cours-ligne, .semaine-cours.sans-cours .semaine-cours-detail { text-decoration: line-through; opacity: .65; }
.semaine-cours.actuel { outline: 3px solid var(--chaud); outline-offset: -1px; }
.semaine-maintenant { position: absolute; left: 0; right: 0; height: 2px; background: var(--rouge); z-index: 2; pointer-events: none; }
.semaine-maintenant::before { content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--rouge); }
.semaine-conge { position: absolute; inset: .5rem; display: grid; place-items: center; text-align: center; border-radius: 10px; background: var(--accent-clair); color: var(--accent-fonce); font-weight: 700; }
.semaine-type summary { cursor: pointer; padding: .2rem 0; }

/* Raccourcis */
.grille-liens { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.lien-carte {
  display: flex; align-items: center; gap: .7rem; padding: 1rem; border-radius: var(--rayon);
  background: var(--carte); border: 1px solid var(--bord); box-shadow: var(--ombre);
  color: var(--texte); text-decoration: none; font-weight: 700;
}
.lien-carte:hover { border-color: var(--accent); }
.lien-carte .initiale, .apercu-logo .initiale {
  width: 2.8rem; height: 2.8rem; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0;
  background: var(--accent); color: #fff; font-family: var(--police-titres);
}
.logo-lien { width: 2.8rem; height: 2.8rem; object-fit: contain; border-radius: 10px; flex-shrink: 0; }
.liste-edition { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .5rem; }
.ligne-raccourci { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; background: var(--carte); border: 1px solid var(--bord); border-radius: 12px; padding: .5rem .7rem; }
.champs-raccourci { display: flex; gap: .5rem; flex: 1; min-width: 14rem; flex-wrap: wrap; }
.champs-raccourci input { flex: 1; min-width: 8rem; }
.champs-raccourci .url { flex: 2; min-width: 12rem; }

/* Notification */
.toast {
  position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%) translateY(150%);
  background: var(--menu); color: #fff; padding: .8rem 1.2rem; border-radius: 12px; font-weight: 500;
  transition: transform .25s, opacity .25s; z-index: 200; max-width: 90vw;
  opacity: 0; pointer-events: none;
}
.toast.visible { transform: translateX(-50%) translateY(0); opacity: 1; }

/* ---------- Écran projeté : seulement les résultats, aucun réglage ---------- */
html.projection .sidebar, html.projection .banner { display: none; }
html.projection main { padding: 1rem; }
html.projection main :is(.page-tete, .barre-doc, .barre-outils, .aide, .w-controles, .widget-tete, .widget-poignee,
  .prof-seul, .form-frise, details, form, button, select, input, label, .widget-actions) { display: none !important; }
html.projection [data-export="non"], html.projection .doc-commandes { display: none; }
html.projection .w-vide, html.projection .scene-vide, html.projection .w-info { visibility: hidden; }
html.projection .zone-dessin, html.projection .scene-ecran, html.projection .tb-zone { border: 0; }
html.projection .zone-dessin svg.dessin { max-height: calc(100vh - 2rem); }
html.projection .scene-ecran { height: calc(100vh - 2rem); }
html.projection:fullscreen .scene-ecran { height: calc(100vh - 2rem); }
html.projection .tb-zone { height: calc(100vh - 2rem); }
html.projection .scene-tirage { min-height: calc(100vh - 2rem); border: 0; }
html.projection .minuteur-ecran { min-height: calc(100vh - 2rem); display: flex; flex-direction: column; justify-content: center; border: 0; }
html.projection .minuteur-temps { font-size: clamp(6rem, 28vw, 30rem); }
html.projection .bruit-etat { min-height: 55vh; display: grid; place-items: center; }
html.projection .groupe ul { font-size: 1.7rem; }
html.projection .widget-corps { cursor: default; }
.projection-attente { min-height: 90vh; display: grid; place-content: center; text-align: center; font-family: var(--police-titres); font-size: 2rem; }
.btn-projection {
  position: fixed; top: 1rem; right: 1rem; z-index: 300; opacity: 0; pointer-events: none; transition: opacity .3s;
  background: var(--menu); color: #fff; border-color: var(--menu);
}
.btn-projection.visible { opacity: 1; pointer-events: auto; }
html:fullscreen .btn-projection { display: none; }

/* ---------- Ressources (mes cours) ---------- */
.recherche { display: flex; align-items: center; gap: .4rem; position: relative; flex: 0 1 22rem; }
.recherche .icone { position: absolute; left: .7rem; color: var(--texte-doux); pointer-events: none; }
.champ-recherche { width: 100%; padding-left: 2.4rem !important; }
.fil { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; margin-bottom: .8rem; font-size: 1.05rem; }
.fil [aria-current] { font-weight: 700; }
.fil-sep { color: var(--texte-doux); }
.lien { background: none; border: 0; padding: .2rem .1rem; font: inherit; color: var(--accent-fonce); text-decoration: underline; cursor: pointer; }
.recents { margin-bottom: 1.2rem; }
.recents h2 { font-size: 1rem; margin-bottom: .5rem; color: var(--texte-doux); }
.puce-fichier {
  display: inline-flex; align-items: center; gap: .4rem; max-width: 22rem; padding: .4rem .8rem; border-radius: 999px;
  border: 1.5px solid var(--bord); background: var(--carte); font: inherit; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.puce-fichier:hover { border-color: var(--accent); }
.liste-fichiers { list-style: none; margin: 0; padding: 0; background: var(--carte); border: 1px solid var(--bord); border-radius: var(--rayon); overflow: hidden; }
.liste-fichiers li { display: flex; align-items: center; gap: .4rem; padding-right: .6rem; border-top: 1px solid var(--bord); }
.liste-fichiers li:first-child { border-top: 0; }
.ligne-fichier {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: .9rem; padding: .7rem 1rem;
  background: none; border: 0; font: inherit; color: inherit; text-align: left; text-decoration: none; cursor: pointer;
}
.liste-fichiers li:hover { background: var(--accent-clair); }
.ico-fichier { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 10px; background: var(--accent-clair); color: var(--accent-fonce); flex-shrink: 0; }
.ico-fichier .icone { width: 1.4rem; height: 1.4rem; }
.ico-fichier.t-cours { background: var(--chaud-clair); color: #8A5A16; }
.ico-fichier.t-pdf { background: #FBE3E1; color: #A1271F; }
.ico-fichier.t-diapo { background: #FCE7D6; color: #A24A0E; }
.ico-fichier.t-tableur { background: #DDF1E2; color: #23683A; }
.ico-fichier.t-video, .ico-fichier.t-audio { background: #E8E2F6; color: #5A3A9A; }
.nom-fichier { display: flex; flex-direction: column; min-width: 0; font-weight: 500; overflow-wrap: anywhere; }
.nom-fichier small { color: var(--texte-doux); font-weight: 400; font-size: .85rem; }
/* Explorateur : barre d'affichage, icônes, volet d'aperçu */
.barre-affichage { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin-bottom: .8rem; }
.groupe-boutons { display: inline-flex; }
.groupe-boutons .btn { border-radius: 0; }
.groupe-boutons .btn:first-child { border-radius: 8px 0 0 8px; }
.groupe-boutons .btn:last-child { border-radius: 0 8px 8px 0; margin-left: -1.5px; }
.curseur-taille { display: inline-flex; align-items: center; gap: .4rem; color: var(--texte-doux); }
.curseur-taille input { width: 9rem; }
.tri { display: inline-flex; align-items: center; gap: .4rem; font-weight: 400; color: var(--texte-doux); }
.barre-affichage > .btn:last-child { margin-left: auto; }
.explorateur { display: grid; gap: 1rem; align-items: start; }
.explorateur.avec-volet { grid-template-columns: minmax(0, 1fr) minmax(280px, 30%); }
.explorateur-contenu { min-width: 0; }
.liste-fichiers .ligne-fichier { width: 100%; border-top: 1px solid var(--bord); }
.liste-fichiers .ligne-fichier:first-child { border-top: 0; }
.liste-fichiers .ligne-fichier:hover, .tuile:hover { background: var(--accent-clair); }
.ligne-fichier[aria-current="true"], .tuile[aria-current="true"] { background: var(--accent-clair); box-shadow: inset 0 0 0 2px var(--accent); }
.grille-icones { --taille: 130px; display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--taille), 1fr)); gap: .5rem; }
.tuile {
  display: flex; flex-direction: column; align-items: center; gap: .4rem; padding: .6rem .4rem; min-width: 0;
  background: var(--carte); border: 1px solid var(--bord); border-radius: 12px; font: inherit; color: inherit; cursor: pointer;
}
.tuile-image { width: 100%; height: calc(var(--taille) * .78); display: grid; place-items: center; overflow: hidden; border-radius: 8px; }
.tuile-image img { max-width: 100%; max-height: 100%; object-fit: contain; box-shadow: 0 1px 4px rgba(0,0,0,.18); background: var(--carte); }
.tuile-image img.attente { width: 60%; height: 80%; background: linear-gradient(90deg, #eee, #f7f7f7, #eee); box-shadow: none; }
.tuile-image > .icone { width: 45%; height: 45%; color: #A1271F; }
.tuile .ico-fichier { width: 70%; height: 80%; border-radius: 14px; }
.tuile .ico-fichier .icone { width: 50%; height: 50%; }
.tuile .nom-fichier { width: 100%; text-align: center; font-size: clamp(.78rem, calc(var(--taille) / 9), 1rem);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.volet-apercu {
  position: sticky; top: 6.5rem; background: var(--carte); border: 1px solid var(--bord); border-radius: var(--rayon);
  padding: 1rem; display: flex; flex-direction: column; gap: .5rem; max-height: calc(100vh - 8rem); overflow: auto;
}
.volet-vide { display: grid; justify-items: center; text-align: center; padding: 3rem 1rem; color: var(--texte-doux); }
.volet-vide .icone { width: 3rem; height: 3rem; opacity: .5; }
.volet-image { height: min(48vh, 28rem); display: grid; place-items: center; background: var(--fond); border-radius: 10px; overflow: hidden; }
.volet-image iframe { width: 100%; height: 100%; border: 0; }
.volet-image img, .volet-image video { max-width: 100%; max-height: 100%; object-fit: contain; }
.volet-image.type-audio audio { width: 95%; }
.volet-image pre { place-self: stretch; margin: 0; padding: .8rem; overflow: auto; white-space: pre-wrap; font: inherit; font-size: .9rem; }
.ico-fichier.grand { width: 7rem; height: 7rem; border-radius: 22px; }
.ico-fichier.grand .icone { width: 3.5rem; height: 3.5rem; }
.volet-nom { overflow-wrap: anywhere; }
@media (max-width: 1000px) {
  .explorateur.avec-volet { grid-template-columns: 1fr; }
  .volet-apercu { display: none; }
}

.barre-apercu { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: .8rem; }
.titre-apercu { flex: 1; min-width: 12rem; font-size: 1.2rem; overflow-wrap: anywhere; }
.telecommande {
  display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-bottom: .8rem; padding: .6rem 1rem;
  background: var(--chaud-clair); border: 1.5px solid var(--chaud); border-radius: var(--rayon);
}
.num-page { width: 5rem; text-align: center; }
.apercu { background: var(--carte); border: 1px solid var(--bord); border-radius: var(--rayon); overflow: hidden; height: calc(100vh - 16rem); min-height: 22rem; display: grid; place-items: center; }
.apercu iframe { width: 100%; height: 100%; border: 0; }
.apercu img, .apercu video { max-width: 100%; max-height: 100%; object-fit: contain; }
.apercu.type-image, .apercu.type-video { background: #111; }
.apercu.type-audio audio { width: min(40rem, 90%); }
.apercu pre, .texte-projete { width: 100%; height: 100%; margin: 0; padding: 1.5rem; overflow: auto; white-space: pre-wrap; font: inherit; font-size: 1.15rem; place-self: stretch; }
.apercu:fullscreen { height: 100vh; border-radius: 0; }

/* Fichier sur l'écran projeté */
.scene-ressource { height: calc(100vh - 2rem); display: grid; place-items: center; }
.scene-ressource.type-image, .scene-ressource.type-video { background: #000; }
html.projection main:has(.scene-ressource.type-image, .scene-ressource.type-video) { padding: 0; background: #000; }
html.projection main:has(.scene-ressource.type-image, .scene-ressource.type-video) .scene-ressource,
html.projection main:has(.scene-ressource.type-pdf) .scene-ressource { height: 100vh; }
html.projection main:has(.scene-ressource.type-pdf) { padding: 0; }
.scene-ressource iframe { width: 100%; height: 100%; border: 0; }
.scene-ressource img, .scene-ressource video { width: 100%; height: 100%; object-fit: contain; }
.texte-projete { font-size: clamp(1.4rem, 3vw, 3rem); line-height: 1.4; max-width: 70ch; }
.audio-projete { display: grid; justify-items: center; gap: 1rem; font-family: var(--police-titres); font-size: 2.5rem; text-align: center; }
.audio-projete .icone { width: 8rem; height: 8rem; color: var(--accent); }
.attente-son { position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%); background: var(--menu); color: #fff; padding: .7rem 1.2rem; border-radius: 999px; }

/* ---------- Tableau de bord : colonne « ma journée » à droite ---------- */
.accueil { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 340px); gap: 1.5rem; align-items: start; }
.accueil-principal > .section:first-child { margin-top: 0; }
.accueil-colonne { position: sticky; top: 6.5rem; display: flex; flex-direction: column; gap: 1rem; height: calc(100vh - 8rem); min-height: 520px; }
.accueil-colonne > .carte-journee { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.accueil-colonne .creneau { flex-wrap: wrap; }

/* ---------- Tuiles du tableau de bord ---------- */
.accueil-barre { display: flex; justify-content: flex-end; margin-bottom: .6rem; }
/* Grille : colonnes d'au moins 210 px, rangées de 40 px ; chaque tuile dit combien elle en prend. */
/* Rangées fines de 10 px (réglage précis de la hauteur) ; l'écart vertical est la marge du bas de chaque tuile. */
.tuiles { display: grid; column-gap: 1rem; row-gap: 0; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); grid-auto-rows: 10px; grid-auto-flow: dense; }
.tdb { position: relative; min-width: 0; min-height: 0; overflow: hidden auto; margin-bottom: 16px; }
.tdb.redim { outline-style: solid !important; z-index: 3; }
.tdb.redim::after { content: attr(data-taille); position: absolute; right: 2.4rem; bottom: .5rem; padding: .15rem .5rem; border-radius: 6px; background: var(--menu); color: #fff; font-size: .8rem; font-weight: 700; }
.tuile-poignee { position: absolute; right: 0; bottom: 0; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 0 0 var(--rayon) 0; cursor: nwse-resize; touch-action: none;
  background: linear-gradient(135deg, transparent 0 50%, var(--accent) 50% 58%, transparent 58% 68%, var(--accent) 68% 76%, transparent 76%); }
.tuile-poignee:hover, .tuile-poignee:focus-visible { background-color: var(--accent-clair); }
.tuiles .tuile-ajout { grid-row: span 17; min-height: 0; }
.tdb .carte-tete .badge { margin-left: auto; }
.tuiles.en-edition .tdb:not(.tuile-ajout) { outline: 2px dashed var(--accent); outline-offset: 3px; padding-top: 3.3rem; }
.tuile-commandes { position: absolute; top: .55rem; left: .55rem; right: .55rem; display: flex; gap: .3rem; flex-wrap: wrap; }
.tuile-commandes .danger { margin-left: auto; }
.tuile-ajout { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4rem; min-height: 140px; border: 2px dashed var(--bord); border-radius: var(--rayon); background: transparent; color: var(--accent-fonce); font: inherit; font-weight: 700; cursor: pointer; }
.tuile-ajout:hover, .tuile-ajout:focus-visible { border-color: var(--accent); background: var(--accent-clair); }
.tuile-ajout .icone { width: 2rem; height: 2rem; }
.tuile-a-lien { padding: 0; overflow: hidden; }
.tuile-lien { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem; text-align: center; padding: 1.2rem 1rem; height: 100%; min-height: 140px; color: var(--texte); text-decoration: none; }
.tuile-lien:hover, .tuile-lien:focus-visible { background: var(--accent-clair); }
.tuile-lien .tuile-nom { font-family: var(--police-titres); font-weight: 700; font-size: 1.15rem; }
.tuile-lien .tuile-sous { color: var(--texte-doux); font-size: .85rem; }
.tuile-logo { display: inline-grid; place-items: center; width: 3.6rem; height: 3.6rem; }
.tuile-logo .logo-lien { width: 3.4rem; height: 3.4rem; }
.tuile-logo .initiale { width: 3.4rem; height: 3.4rem; font-size: 1.6rem; }
.tuile-lien.interne .icone { width: 2.6rem; height: 2.6rem; color: var(--accent); }
.tdb.large .tuile-lien { flex-direction: row; justify-content: flex-start; text-align: left; gap: 1rem; }
.tuile-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.tuile-liste li + li { border-top: 1px solid var(--bord); }
.tuile-liste a { display: flex; flex-direction: column; gap: .1rem; padding: .5rem .2rem; color: var(--texte); text-decoration: none; border-radius: 6px; }
.tuile-liste a:hover, .tuile-liste a:focus-visible { background: var(--accent-clair); }
.tl-titre { font-weight: 500; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tl-info { color: var(--texte-doux); font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tuile-liste .non-lu .tl-titre { font-weight: 800; }
.tuile-liste .non-lu .tl-titre::before { content: ""; display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; background: var(--accent); margin-right: .4rem; vertical-align: .1em; }
.lien-bouton { background: none; border: 0; padding: 0; color: var(--accent-fonce); text-decoration: underline; font: inherit; cursor: pointer; min-height: 0; }
.dialogue-tuiles { width: min(760px, calc(100vw - 2rem)); overflow-y: auto; }
.dialogue-tuiles h3 { margin: 1.1rem 0 .5rem; font-size: 1rem; }
.choix-tuiles { display: grid; gap: .5rem; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.choix-tuile { display: flex; align-items: center; gap: .6rem; text-align: left; padding: .55rem .7rem; border: 1.5px solid var(--bord); border-radius: 10px; background: var(--carte); font: inherit; color: var(--texte); cursor: pointer; min-height: 52px; }
.choix-tuile:hover, .choix-tuile:focus-visible { border-color: var(--accent); background: var(--accent-clair); }
.choix-tuile .icone { width: 1.6rem; height: 1.6rem; color: var(--accent); flex-shrink: 0; }
.choix-tuile .tuile-logo { width: 2rem; height: 2rem; }
.choix-tuile .tuile-logo .logo-lien, .choix-tuile .tuile-logo .initiale { width: 2rem; height: 2rem; font-size: 1rem; }
.grille-champs { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.grille-champs input, .grille-champs select { width: 100%; }
.flux-groupe { border: 1px solid var(--bord); border-radius: 10px; margin: .8rem 0 0; padding: .5rem .8rem .7rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .2rem .8rem; }
.flux-groupe legend { font-weight: 700; padding: 0 .3rem; }
.flux-groupe > p, .flux-groupe > form, .flux-groupe > ul { grid-column: 1 / -1; }
.case { display: flex; align-items: center; gap: .35rem; cursor: pointer; min-height: 34px; }
.case input { width: 1.1rem; height: 1.1rem; }
.liste-flux-perso { list-style: none; padding: 0; margin: 0 0 .4rem; }
.liste-flux-perso li { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.liste-flux-perso .doux { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Connexion ---------- */
.ecran-connexion { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 1rem; background: var(--menu); overflow-y: auto; }
.connexion-carte { width: min(420px, 100%); display: flex; flex-direction: column; gap: .2rem; }
.connexion-carte form { display: flex; flex-direction: column; gap: .8rem; }
.connexion-carte h2 { margin: .6rem 0 0; }
.connexion-carte input[type=text], .connexion-carte input[type=password] { width: 100%; }
.connexion-carte .btn.principal { margin-top: .3rem; }
.connexion-marque { display: flex; align-items: center; gap: .7rem; font-family: var(--police-titres); font-weight: 700; font-size: 1.6rem; color: var(--texte); }
.connexion-marque img { border-radius: 10px; }
.connexion-message { margin: 0; padding: .6rem .8rem; border-radius: 8px; background: #FDE3E1; color: #8E1C16; }
.champ-code { font-variant-numeric: tabular-nums; letter-spacing: .25em; font-size: 1.3rem !important; max-width: 11rem; text-align: center; }
.bloc-double { margin: .4rem 0 .6rem; }
.double-ok { margin: .8rem 0 .4rem; padding: .5rem .7rem; border-radius: 8px; background: #E3F2E8; color: #1D5A36; font-weight: 700; }
.qr-double { width: 200px; height: 200px; margin: .4rem 0; background: var(--carte); padding: .3rem; border: 1px solid var(--bord); border-radius: 10px; }
.qr-double svg { width: 100%; height: 100%; display: block; }
.cle-double { font-size: .95rem; word-break: break-all; }
.codes-secours { display: grid; grid-template-columns: repeat(2, max-content); gap: .3rem 1.5rem; padding-left: 1.2rem; font-size: 1.1rem; }
.liste-comptes { list-style: none; padding: 0; margin: 0 0 .8rem; }
.liste-comptes li { display: flex; align-items: center; gap: .6rem; padding: .3rem 0; border-bottom: 1px solid var(--bord); }
.liste-comptes code { margin-left: auto; }

/* ---------- Ma journée (colonne de droite) ---------- */
.carte-journee h2 { font-size: 1.1rem; text-transform: none; }
.carte-journee h2::first-letter { text-transform: uppercase; }
.journee-etat { margin: -.2rem 0 .8rem; padding: .5rem .7rem; border-radius: 8px; background: var(--accent-clair); color: var(--accent-fonce); }
.journee-etat.chaud { background: var(--chaud-clair); color: var(--texte); }
.journee { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .45rem; }
.journee-cours { display: grid; grid-template-columns: 3.2rem 3.1rem minmax(0, 1fr); gap: .6rem; align-items: center; padding: .5rem .6rem; border: 1px solid var(--bord); border-left: 6px solid; border-radius: 10px; background: var(--carte); }
.journee-heure { display: flex; flex-direction: column; font-variant-numeric: tabular-nums; font-weight: 700; line-height: 1.2; font-size: .92rem; }
.journee-heure .doux { font-weight: 400; font-size: .82rem; }
.journee-pastille { display: grid; place-items: center; height: 2.4rem; border-radius: 8px; color: #fff; font-weight: 800; font-size: 1rem; letter-spacing: .02em; }
.journee-texte { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.journee-texte strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.journee-texte .doux { font-size: .85rem; }
.journee-statut { font-size: .8rem; font-weight: 700; color: var(--accent-fonce); }
.journee-statut.annule { color: var(--rouge); }
.journee-cours.passe { opacity: .5; }
.journee-cours.sans-cours { background: repeating-linear-gradient(135deg, #F7F5F0 0 6px, #fff 6px 12px); }
.journee-cours.sans-cours .journee-texte strong, .journee-cours.sans-cours .journee-heure { text-decoration: line-through; opacity: .7; }
.journee-cours.actuel { box-shadow: 0 0 0 3px var(--chaud); background: var(--chaud-clair); }
.barre-cours { height: 6px; border-radius: 3px; background: rgba(0,0,0,.08); margin-top: .35rem; overflow: hidden; }
.barre-cours span { display: block; height: 100%; border-radius: 3px; }
.couleurs-classes { display: flex; flex-wrap: wrap; gap: .5rem 1rem; margin-bottom: .8rem; }
.puce-couleur { display: flex; align-items: center; gap: .4rem; font-weight: 700; cursor: pointer; }
.puce-couleur input[type=color] { width: 2.2rem; height: 2.2rem; padding: 0; border: 1px solid var(--bord); border-radius: 8px; background: none; cursor: pointer; }

/* ---------- Mails ---------- */
.mails { display: grid; grid-template-columns: minmax(260px, 380px) minmax(0, 1fr); gap: 1rem; align-items: start; }
@media (max-width: 900px) { .mails { grid-template-columns: 1fr; } }
.colonne-mails { padding: .4rem; max-height: 75vh; overflow-y: auto; }
.liste-mails { list-style: none; margin: 0; padding: 0; }
.liste-mails .mail + .mail { border-top: 1px solid var(--bord); }
.liste-mails button { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .1rem .6rem; width: 100%; text-align: left; padding: .6rem .7rem; border: 0; border-radius: 8px; background: none; font: inherit; color: var(--texte); cursor: pointer; }
.liste-mails button:hover, .liste-mails button:focus-visible { background: var(--accent-clair); }
.liste-mails .choisi button { background: var(--accent-clair); box-shadow: inset 4px 0 0 var(--accent); }
.mail-de { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-date { color: var(--texte-doux); font-size: .82rem; font-variant-numeric: tabular-nums; }
.mail-sujet { grid-column: 1 / -1; color: var(--texte-doux); font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail.non-lu .mail-de, .mail.non-lu .mail-sujet { font-weight: 800; color: var(--texte); }
.mail.non-lu .mail-de::before { content: ""; display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; background: var(--accent); margin-right: .4rem; }
.lecture-mail { min-height: 50vh; }
.lecture-mail h2 { margin-top: 0; text-transform: none; font-size: 1.3rem; }
.entetes-mail { padding-bottom: .8rem; border-bottom: 1px solid var(--bord); line-height: 1.6; overflow-wrap: anywhere; }
.pieces-mail { background: var(--fond); padding: .5rem .8rem; border-radius: 8px; }
.corps-mail { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; font-size: 1.02rem; }
.formulaire-mail { max-width: 760px; }

/* ---------- Orthographe ---------- */
.ortho-saisie { width: 100%; min-height: 14rem; resize: vertical; font: inherit; font-size: 1.05rem; line-height: 1.6; padding: .8rem 1rem; border: 1.5px solid var(--bord); border-radius: 10px; }
.ortho-sortie { margin-top: 1rem; }
.ortho-bilan .rangee { gap: .5rem; }
.ortho-ok { color: var(--vert); font-weight: 700; margin: 0; }
.ortho-resultat { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.9; font-size: 1.05rem; margin-top: .6rem; }
.ortho-resultat:empty { display: none; }
.ortho-resultat.perime { opacity: .45; }
.ortho-puce { padding: .2rem .6rem; border-radius: 999px; font-size: .85rem; font-weight: 700; }
.ortho-faute { font: inherit; color: inherit; background: none; border: 0; padding: 0 1px; margin: 0; cursor: pointer; text-decoration: underline wavy; text-decoration-thickness: 2px; text-underline-offset: 3px; border-radius: 3px; white-space: pre-wrap; }
.ortho-faute:hover, .ortho-faute:focus-visible { background: #FFF4CC; }
.f-ortho { text-decoration-color: #D32F2F; } .ortho-puce.f-ortho { background: #FDE3E1; color: #A3211A; }
.f-gram { text-decoration-color: #1F5FBF; } .ortho-puce.f-gram { background: #E1EBFA; color: #17468F; }
.f-typo { text-decoration-color: #9A8F7A; } .ortho-puce.f-typo { background: #EFEBE3; color: #5F5645; }
.ortho-bulle { display: inline-block; position: absolute; z-index: 20; max-width: min(420px, calc(100vw - 3rem)); margin-top: 1.9rem; margin-left: -2rem; padding: .7rem .8rem; background: var(--carte); border: 1px solid var(--bord); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.18); white-space: normal; line-height: 1.4; font-size: .95rem; }
.ortho-message { margin: 0 0 .5rem; }
@media (max-width: 1100px) { .accueil { grid-template-columns: 1fr; } .accueil-colonne { position: static; } }

/* ---------- Réglages ---------- */
.grille-reglages { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(440px, 100%), 1fr)); align-items: start; }
.grille-reglages .colonne { display: flex; flex-direction: column; gap: 1rem; }
.reglage-image { margin-top: .9rem; gap: .7rem; }
.reglage-image > div { flex: 1; min-width: 10rem; }
.apercu-logo-appli { width: 3rem; height: 3rem; object-fit: contain; border-radius: 10px; background: var(--menu); padding: .3rem; }
.apercu-fond { width: 4.5rem; height: 3rem; object-fit: cover; border-radius: 8px; border: 1px solid var(--bord); display: block; }
.vide-fond { background: repeating-linear-gradient(45deg, #eee 0 6px, #f8f8f8 6px 12px); }
.brand img { object-fit: contain; border-radius: 8px; }
/* Avec une image de fond : le bandeau devient un peu transparent */
html.avec-fond-image .banner:not(.en-cours) { background: color-mix(in srgb, var(--carte) 88%, transparent); backdrop-filter: blur(6px); }
.ligne-menu input[type=checkbox] { flex-shrink: 0; }
.grille-reglages h2 { margin-bottom: .8rem; }
.grille-couleurs { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: .6rem; margin-top: 1rem; }
.couleur { display: flex; align-items: center; gap: .6rem; font-weight: 400; }
.couleur input[type=color] { width: 3rem; height: 2.4rem; padding: 0; border: 2px solid var(--bord); border-radius: 8px; background: none; cursor: pointer; }
.palette { gap: .5rem; }
.pastilles { display: inline-flex; }
.pastilles i { width: .9rem; height: .9rem; border-radius: 50%; border: 1.5px solid #fff; margin-left: -.25rem; box-shadow: 0 0 0 1px rgba(0,0,0,.15); }
.arbre-menu { display: flex; flex-direction: column; gap: .3rem; }
.ligne-menu { display: flex; align-items: center; gap: .5rem; }
.ligne-menu .nom-menu { flex: 1; min-width: 6rem; min-height: 38px; padding: .3rem .55rem; }
.ligne-menu.est-intertitre .nom-menu { font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; }
.ligne-menu.masquee .nom-menu { opacity: .5; }
.sous-menu { display: flex; flex-direction: column; gap: .3rem; margin-left: 1.9rem; padding-left: .8rem; border-left: 2px solid var(--bord); }
.petit { font-size: .8rem; }
code { background: var(--accent-clair); padding: .05rem .35rem; border-radius: 5px; font-size: .92em; }

/* ---------- Petits écrans : menu replié en haut ---------- */
@media (max-width: 860px) {
  .layout { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: relative; padding: .6rem 1rem; }
  .brand { padding: 0; }
  .sidebar .menu-toggle { display: inline-flex; position: absolute; right: 1rem; top: .55rem; }
  .sidebar .nav, .sidebar .sidebar-bottom { display: none; }
  .sidebar.ouvert .nav, .sidebar.ouvert .sidebar-bottom { display: flex; }
  .sidebar.ouvert .nav { margin-top: .8rem; }
  main { padding: 1rem; }
  .banner { padding: .7rem 1rem; position: static; }
  .ligne-edt { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---------- Professeur principal ---------- */
input[type=date] { font: inherit; color: inherit; padding: .5rem .65rem; min-height: 44px; border: 2px solid var(--bord); border-radius: 10px; background: var(--carte); }
.pp-rgpd { margin-bottom: 1rem; }
.pp-rgpd summary { cursor: pointer; font-weight: 700; }
.pp-rgpd ul { margin: .5rem 0 0; padding-left: 1.2rem; }
.pp-suivi { display: grid; grid-template-columns: minmax(15rem, 20rem) 1fr; gap: 1rem; align-items: start; }
@media (max-width: 800px) { .pp-suivi { grid-template-columns: 1fr; } }
.pp-gauche { display: flex; flex-direction: column; gap: .6rem; }
.pp-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; max-height: 70vh; overflow-y: auto; }
.pp-eleve { display: flex; align-items: center; gap: .5rem; width: 100%; min-height: 40px; padding: .45rem .7rem; border: 0; border-radius: 8px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.pp-eleve:hover { background: var(--accent-clair); }
.pp-eleve[aria-pressed="true"] { background: var(--accent); color: #fff; }
.pp-nom { flex: 1; }
.pp-etoile { color: var(--chaud); font-size: 1.1rem; }
.pp-eleve[aria-pressed="true"] .pp-etoile { color: #fff; }
.pp-compte { min-width: 1.6rem; padding: .05rem .45rem; border-radius: 99px; background: var(--accent-clair); color: var(--accent-fonce); font-size: .8rem; font-weight: 700; text-align: center; }
.pp-fiche, .pp-pile, .pp-rdv { display: flex; flex-direction: column; gap: .8rem; }
.pp-ajout { display: flex; flex-direction: column; gap: .6rem; padding: .9rem; background: var(--fond); border-radius: 10px; }
.pp-ajout .btn { align-self: flex-start; }
.pp-notes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .7rem; }
.pp-note { display: flex; flex-direction: column; gap: .3rem; padding: .2rem 0 .2rem .8rem; border-left: 4px solid var(--accent); }
.pp-mini { margin: 0; padding-left: 1.2rem; }
.pp-table { display: flex; flex-direction: column; gap: .5rem; }
.pp-ligne { display: grid; grid-template-columns: 14rem 1fr 1fr; gap: .6rem; align-items: start; padding: .6rem; background: var(--carte); border: 1px solid var(--bord); border-radius: 10px; }
.pp-ligne.entete { padding-bottom: 0; background: none; border: 0; font-weight: 700; }
@media (max-width: 800px) { .pp-ligne { grid-template-columns: 1fr; } .pp-ligne.entete { display: none; } }
.lien-bouton { padding: 0; border: 0; background: none; color: var(--accent); font: inherit; font-size: .9rem; text-decoration: underline; cursor: pointer; }
.pp-creneau { display: grid; grid-template-columns: 7.5rem minmax(12rem, 1fr) 11rem 1.4fr auto auto; gap: .5rem; align-items: center; padding: .5rem; background: var(--carte); border: 1px solid var(--bord); border-radius: 10px; }
.pp-creneau textarea { min-height: 44px; }
@media (max-width: 1000px) { .pp-creneau { grid-template-columns: 1fr 1fr; } }
.pp-creneau.fait, .pp-rdv.fait { opacity: .6; }
.pp-section { margin-top: 2rem; }

/* ---------- Ma journée en agenda (colonne de droite) ---------- */
.journee-nav { margin-left: auto; display: flex; gap: .25rem; }
.carte-journee .carte-tete h2 { flex: 1; min-width: 0; }
.agenda { position: relative; flex: 1; min-height: 360px; margin: .7rem .2rem .3rem 2.4rem; }
.agenda-heure { position: absolute; left: 0; right: 0; border-top: 1px solid var(--bord); }
.agenda-heure span { position: absolute; left: -2.4rem; top: -.65em; width: 2rem; text-align: right; font-size: .78rem; color: var(--texte-doux); font-variant-numeric: tabular-nums; }
.agenda-zone { position: absolute; inset: 0; }
.agenda-bloc { position: absolute; display: flex; gap: .45rem; align-items: flex-start; overflow: hidden; padding: .25rem .4rem; border: 1px solid var(--bord); border-left: 5px solid; border-radius: 8px; background: var(--carte); box-shadow: var(--ombre); font-size: .86rem; line-height: 1.25; }
.agenda-bloc .journee-pastille { height: auto; padding: .1rem .4rem; border-radius: 6px; font-size: .8rem; flex-shrink: 0; }
.agenda-texte { display: flex; flex-direction: column; min-width: 0; }
.agenda-texte strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agenda-texte .doux { font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agenda-bloc.passe { opacity: .5; }
.agenda-bloc.actuel { background: var(--chaud-clair); box-shadow: 0 0 0 3px var(--chaud); z-index: 1; }
.agenda-bloc.sans-cours { background: repeating-linear-gradient(135deg, #F7F5F0 0 6px, #fff 6px 12px); }
.agenda-bloc.sans-cours strong { text-decoration: line-through; opacity: .7; }
.agenda-maintenant { position: absolute; left: -.35rem; right: 0; border-top: 2px solid var(--rouge); z-index: 2; pointer-events: none; }
.agenda-maintenant::before { content: ""; position: absolute; left: 0; top: -5px; width: 8px; height: 8px; border-radius: 50%; background: var(--rouge); }
.agenda-vide { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: var(--texte-doux); font-style: italic; pointer-events: none; }
@media (max-width: 1100px) { .accueil-colonne { height: auto; min-height: 0; } .agenda { min-height: 560px; flex: none; } }

/* ---------- Tuile météo ---------- */
.tdb-meteo { container-type: size; }
.meteo { display: flex; flex-direction: column; gap: .7rem; }
.meteo-actuel { display: flex; align-items: center; gap: .6rem; }
.meteo-picto { font-size: 2.6rem; line-height: 1; }
.meteo-temp { font-family: var(--police-titres); font-weight: 700; font-size: 2.4rem; line-height: 1; }
.meteo-desc { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.meteo-desc .doux { font-size: .82rem; }
.meteo-heures, .meteo-jours { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; grid-template-columns: repeat(auto-fill, minmax(3.4rem, 1fr)); }
.meteo-heures li, .meteo-jours li { display: flex; flex-direction: column; align-items: center; gap: .05rem; padding: .3rem .2rem; border-radius: 8px; background: var(--fond); font-size: .85rem; }
.meteo-heures li > [aria-hidden], .meteo-jours li > [aria-hidden] { font-size: 1.35rem; line-height: 1.2; }
.meteo-jours { padding-top: .6rem; border-top: 1px solid var(--bord); }
.meteo-jour-nom { font-weight: 700; text-transform: capitalize; }
.meteo-pluie { font-size: .72rem; color: #1F5FBF; }
@container (max-height: 330px) { .meteo-jours { display: none; } }
@container (max-height: 200px) { .meteo-heures { display: none; } }

/* ---------- Tuile calendrier ---------- */
.calendrier { display: flex; flex-direction: column; gap: .5rem; }
.cal-tete { display: flex; align-items: center; gap: .3rem; }
.cal-mois { flex: 1; text-align: center; text-transform: capitalize; }
.cal-grille { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; font-variant-numeric: tabular-nums; }
.cal-nom { font-size: .75rem; font-weight: 700; color: var(--texte-doux); padding-bottom: .15rem; }
.cal-case { position: relative; padding: .3rem 0; border-radius: 6px; font-size: .88rem; }
.cal-case.weekend { color: var(--texte-doux); }
.cal-case.conge { background: var(--chaud-clair); }
.cal-case.aujourdhui { background: var(--accent); color: #fff; font-weight: 700; }
.cal-case.avec-evt::after { content: ""; position: absolute; left: 50%; bottom: 2px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--rouge); }
.cal-case.aujourdhui.avec-evt::after { background: var(--carte); }
.cal-avenir { margin-top: .2rem; border-top: 1px solid var(--bord); }
.cal-evt { display: flex; flex-direction: column; gap: .1rem; padding: .45rem .2rem; color: var(--texte); text-decoration: none; }

/* ---------- Tuiles : couleurs pastel et glisser-déposer ---------- */
.tuiles.en-edition .tdb[draggable="true"] { cursor: grab; }
.tdb.glisse { opacity: .35; }
.tuile-saisir { display: grid; place-items: center; width: 26px; height: 34px; color: var(--accent-fonce); font-size: 1.2rem; cursor: grab; user-select: none; }
.pastille { display: inline-block; width: 1.25rem; height: 1.25rem; border-radius: 50%; border: 1.5px solid rgba(21,52,59,.35); }
.pastille-btn { background: var(--carte); }
.tuile-palette { position: absolute; top: 2.9rem; left: .55rem; z-index: 5; display: flex; flex-wrap: wrap; gap: .35rem; max-width: 12.5rem; padding: .5rem; border: 1px solid var(--bord); border-radius: 10px; background: var(--carte); box-shadow: var(--ombre); }
.tuile-palette .pastille { width: 1.9rem; height: 1.9rem; cursor: pointer; padding: 0; }
.tuile-palette .pastille[aria-pressed="true"] { outline: 3px solid var(--accent); outline-offset: 1px; }
.tdb .meteo-heures li, .tdb .meteo-jours li { background: rgba(255,255,255,.6); }

/* ---------- Cahier de textes ---------- */
.cdt-nav { margin-bottom: 1rem; }
.cdt-nav strong { font-family: var(--police-titres); font-size: 1.15rem; min-width: 14rem; text-align: center; }
.cdt-jour { margin-bottom: 1.6rem; }
.cdt-jour h2 { margin-bottom: .6rem; }
.cdt-jour h2::first-letter { text-transform: uppercase; }
.cdt-seance { display: flex; flex-direction: column; gap: .7rem; margin-bottom: .7rem; border-left: 6px solid; }
.cdt-seance.sans-cours { opacity: .6; background: repeating-linear-gradient(135deg, #F7F5F0 0 6px, #fff 6px 12px); }
.cdt-seance.reporte { background: #F3FAF6; }
.cdt-seance.cible { box-shadow: 0 0 0 3px var(--chaud), var(--ombre); }
.cdt-tete { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.cdt-tete .journee-pastille { height: auto; padding: .15rem .5rem; }
.cdt-reporte { margin-left: auto; font-weight: 500; }
.cdt-verifier { margin: 0; padding: .45rem .7rem; border-radius: 8px; background: var(--chaud-clair); }
a.agenda-bloc { color: inherit; text-decoration: none; cursor: pointer; }
a.agenda-bloc:hover { box-shadow: 0 0 0 2px var(--accent); }
.agenda-note { position: absolute; right: .35rem; top: .2rem; color: var(--accent-fonce); font-weight: 700; }

/* ---------- Professeur principal : bulletins ---------- */
.pp-import { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem; border-style: dashed; }
.pp-import.survol { border-color: var(--accent); background: var(--accent-clair); }
.pp-tableau-wrap { overflow-x: auto; }
.pp-tableau { width: 100%; border-collapse: collapse; background: var(--carte); font-size: .95rem; }
.pp-tableau th { text-align: left; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--texte-doux); padding: .5rem .6rem; border-bottom: 2px solid var(--bord); }
.pp-tableau td { padding: .5rem .6rem; border-bottom: 1px solid var(--bord); vertical-align: top; }
.pp-tableau tr.cliquable { cursor: pointer; }
.pp-tableau tr.cliquable:hover, .pp-tableau tr.cliquable:focus-visible { background: var(--accent-clair); }
.pp-tableau .nb { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pp-tableau .bas { color: var(--rouge); font-weight: 700; }
.pp-tableau .hausse { color: var(--vert); font-weight: 700; }
.pp-tableau .baisse { color: var(--rouge); }
.pp-tableau.matieres td.appr { line-height: 1.4; min-width: 18rem; }
.pp-themes { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.pp-theme { padding: .15rem .6rem; border-radius: 99px; font-size: .85rem; font-weight: 600; cursor: help; }
.pp-theme.pos { background: #E3F2E8; color: #1D5A36; }
.pp-theme.neg { background: #FBE9E7; color: #8E1C16; }

/* =========================================================
   Style (26/11) : titres plus présents, icônes en pastille,
   filigrane dans les tuiles, fonds météo illustrés.
   ========================================================= */
/* Titre des pages : pastille d'icône devant le titre */
.page-tete h1 { display: flex; align-items: center; gap: .7rem; letter-spacing: -.01em; }
.titre-icone { display: inline-grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 14px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-fonce)); color: #fff; box-shadow: 0 4px 12px rgba(14,124,116,.28); }
.titre-icone .icone { width: 1.45rem; height: 1.45rem; }

/* Tuiles du tableau de bord */
.tdb { --ton: var(--accent); border: 1px solid rgba(21,52,59,.08); box-shadow: 0 1px 2px rgba(21,52,59,.06), 0 8px 24px rgba(21,52,59,.07); }
.tdb::before { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(160deg, rgba(255,255,255,.65), rgba(255,255,255,0) 55%); }
.tdb > * { position: relative; }
.tdb > .tuile-commandes, .tdb > .tuile-poignee, .tdb > .tuile-palette { position: absolute; }
.tdb .carte-tete { gap: .65rem; margin-bottom: .9rem; }
.tdb .carte-tete > span:first-child > .icone, .tdb .carte-tete > .icone { box-sizing: content-box; width: 1.25rem; height: 1.25rem; padding: .5rem; border-radius: 12px;
  background: var(--carte); color: var(--ton); box-shadow: 0 2px 6px rgba(21,52,59,.12); }
.tdb .carte-tete h3 { font-size: 1.12rem; color: var(--texte); letter-spacing: -.005em; }
/* Le filigrane remplit la tuile sans jamais dépasser (pas de barre de défilement) */
.tuile-filigrane { position: absolute !important; inset: 0; overflow: hidden; z-index: 0; pointer-events: none; border-radius: inherit; }
.tuile-filigrane .icone { position: absolute; right: -1.2rem; bottom: -1.4rem; width: 7.5rem; height: 7.5rem; stroke-width: 1.6; color: var(--ton); opacity: .09; transform: rotate(-12deg); }
.tdb .gros-chiffre { color: var(--texte); }
.tdb .bas a, .tdb a.lien-bouton, .tdb .lien-bouton { color: var(--ton); font-weight: 600; }
.tuiles.en-edition .tdb .tuile-filigrane { display: none; }

/* Actualités : logo du journal + image de l'article */
.actu-article { display: grid !important; grid-template-columns: 2rem minmax(0, 1fr) auto; align-items: center; gap: .6rem !important; }
.actu-logo { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 8px; overflow: hidden; background: var(--carte); box-shadow: 0 1px 3px rgba(21,52,59,.15); }
.actu-logo .logo-lien { width: 1.5rem; height: 1.5rem; object-fit: contain; }
.actu-logo .initiale { width: 2rem; height: 2rem; display: grid; place-items: center; font-weight: 800; font-size: .9rem; color: #fff; background: var(--ton); }
.actu-texte { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.actu-image { width: 4.4rem; height: 3.1rem; object-fit: cover; border-radius: 8px; }
.tdb:not(.large) .actu-image { display: none; }

/* Météo : fond illustré selon le temps qu'il fait */
.meteo-fond { color: #fff; border: 0; }
.meteo-fond::before { background: none; }
.meteo-fond .carte-tete > .icone { background: rgba(255,255,255,.22); color: #fff; box-shadow: none; }
.meteo-fond .carte-tete h3, .meteo-fond .meteo-temp, .meteo-fond .meteo-desc strong { color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.25); }
.meteo-fond .doux, .meteo-fond .meteo-desc .doux { color: rgba(255,255,255,.85); }
.meteo-fond .meteo-heures li, .meteo-fond .meteo-jours li { background: rgba(15,25,45,.24); backdrop-filter: blur(6px); color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.3); }
.meteo-fond .meteo-jours { border-top-color: rgba(255,255,255,.3); }
.meteo-fond .meteo-pluie { color: #D6ECFF; }
.meteo-fond .tuile-filigrane { display: none; }
.meteo-fond .meteo-picto { filter: drop-shadow(0 2px 4px rgba(0,0,0,.2)); }
/* Nuages dessinés (SVG) réutilisés par plusieurs ambiances */
.meteo-fond { --nuage: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 100'%3E%3Cpath fill='white' d='M45 88a27 27 0 0 1 2-54 38 38 0 0 1 72-10 30 30 0 0 1 52 25 22 22 0 0 1-6 39z'/%3E%3C/svg%3E"); }
.ciel-soleil { background:
  radial-gradient(circle at 88% 12%, #FFF3B0 0 34px, rgba(255,226,120,.55) 35px 58px, rgba(255,226,120,.18) 59px 95px, transparent 96px),
  linear-gradient(165deg, #2F86D6 0%, #5CB2EE 55%, #9AD3F7 100%) !important; }
.ciel-eclaircies { background:
  var(--nuage) right -30px top 18px / 62% auto no-repeat,
  radial-gradient(circle at 80% 14%, #FFF3B0 0 30px, rgba(255,226,120,.45) 31px 52px, transparent 53px),
  linear-gradient(165deg, #3A86C8 0%, #6BA9DC 60%, #A5CBEA 100%) !important; }
.ciel-couvert { background:
  var(--nuage) right -40px top 8px / 70% auto no-repeat,
  var(--nuage) left -60px bottom -10px / 75% auto no-repeat,
  linear-gradient(170deg, #6F7F92 0%, #8E9CAD 60%, #B3BFCC 100%) !important; }
.ciel-couvert, .ciel-pluie, .ciel-orage { --nuage: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 100'%3E%3Cpath fill='%23E8EDF2' fill-opacity='.35' d='M45 88a27 27 0 0 1 2-54 38 38 0 0 1 72-10 30 30 0 0 1 52 25 22 22 0 0 1-6 39z'/%3E%3C/svg%3E"); }
.ciel-pluie { background:
  var(--nuage) right -40px top -6px / 72% auto no-repeat,
  linear-gradient(170deg, #4A5A6E 0%, #66778B 60%, #8796A8 100%) !important; }
.ciel-orage { background:
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 80'%3E%3Cpath fill='%23FFE066' d='M24 0 6 44h12L10 80 34 30H21z'/%3E%3C/svg%3E") right 18% top 30% / 34px auto no-repeat,
  var(--nuage) right -40px top -6px / 72% auto no-repeat,
  linear-gradient(170deg, #2E3348 0%, #474D66 60%, #5F6680 100%) !important; }
.ciel-neige { color: var(--texte); background:
  var(--nuage) right -30px top 4px / 66% auto no-repeat,
  linear-gradient(170deg, #9DB3C9 0%, #C7D6E4 60%, #E8EFF6 100%) !important; }
.ciel-brouillard { background:
  repeating-linear-gradient(180deg, rgba(255,255,255,0) 0 18px, rgba(255,255,255,.35) 18px 30px),
  linear-gradient(180deg, #9AA4AE 0%, #BCC4CB 100%) !important; }
.ciel-nuit { background:
  radial-gradient(circle at 84% 16%, #FDF6D8 0 24px, transparent 25px),
  radial-gradient(circle at 80% 13%, transparent 0 22px, transparent 23px),
  radial-gradient(1.5px 1.5px at 20% 20%, #fff 50%, transparent 51%),
  radial-gradient(1.5px 1.5px at 45% 12%, #fff 50%, transparent 51%),
  radial-gradient(1px 1px at 62% 30%, #fff 50%, transparent 51%),
  radial-gradient(1.5px 1.5px at 12% 45%, #fff 50%, transparent 51%),
  radial-gradient(1px 1px at 35% 38%, #fff 50%, transparent 51%),
  linear-gradient(170deg, #141E46 0%, #263A78 65%, #3B5598 100%) !important; }
/* Pluie et neige qui tombent (désactivé si l'ordinateur demande moins d'animations) */
.ciel-pluie::after, .ciel-orage::after, .ciel-neige::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; z-index: 0; }
.ciel-pluie::after, .ciel-orage::after { background-image: repeating-linear-gradient(105deg, transparent 0 14px, rgba(220,235,255,.35) 14px 15.5px, transparent 15.5px 31px);
  background-size: 120px 120px; animation: pluie .7s linear infinite; mask-image: linear-gradient(to bottom, transparent 15%, #000 45%); }
.ciel-neige::after { background-image: radial-gradient(2.5px 2.5px at 10% 20%, #fff 50%, transparent 51%), radial-gradient(2px 2px at 40% 60%, #fff 50%, transparent 51%),
  radial-gradient(3px 3px at 70% 30%, #fff 50%, transparent 51%), radial-gradient(2px 2px at 85% 75%, #fff 50%, transparent 51%);
  background-size: 140px 140px; animation: neige 6s linear infinite; }
.ciel-neige .carte-tete h3, .ciel-neige .meteo-temp, .ciel-neige .meteo-desc strong { color: var(--texte); text-shadow: none; }
.ciel-neige .doux, .ciel-neige .meteo-heures li, .ciel-neige .meteo-jours li { color: var(--texte); }
@keyframes pluie { to { background-position: -30px 120px; } }
@keyframes neige { to { background-position: 20px 140px; } }
@media (prefers-reduced-motion: reduce) { .ciel-pluie::after, .ciel-orage::after, .ciel-neige::after { animation: none; } }
@container (max-height: 300px) { .meteo-jours { display: none; } }

/* Bulletins : surlignage des appréciations */
.phrase { border-radius: 4px; box-decoration-break: clone; -webkit-box-decoration-break: clone; transition: background .15s, opacity .15s; }
.pp-legende .phrase.cat-positif, .surligne .phrase.cat-positif { background: #CFEFDA; }
.pp-legende .phrase.cat-travail, .surligne .phrase.cat-travail { background: #F9D2CE; }
.pp-legende .phrase.cat-comportement, .surligne .phrase.cat-comportement { background: #E4D5F7; }
.pp-legende { font-size: .88rem; }
.pp-tableau.vise-actif .phrase:not(.vise) { opacity: .35; }
.pp-tableau .phrase.vise { outline: 2px solid var(--chaud); background: #FFE9B8; opacity: 1; }
.pp-tableau.surligne .phrase.vise.cat-positif { background: #A8E2BC; }
.pp-tableau.surligne .phrase.vise.cat-travail { background: #F3AFA8; }
.pp-tableau.surligne .phrase.vise.cat-comportement { background: #CDB4F0; }
button.pp-theme { border: 0; font: inherit; font-size: .85rem; font-weight: 600; }
.pp-theme.cat-positif { background: #E3F2E8; color: #1D5A36; }
.pp-theme.cat-travail { background: #FBE9E7; color: #8E1C16; }
.pp-theme.cat-comportement { background: #EEE4FA; color: #5B2F94; }
.pp-theme:hover, .pp-theme:focus-visible { box-shadow: 0 0 0 2px currentColor; }
.pp-options { padding: .6rem .8rem; border: 1px solid var(--bord); border-radius: 10px; background: var(--fond); }
.pp-options summary { cursor: pointer; font-weight: 700; }

/* ---------- Visionneuse (Ressources, Écran de classe) ---------- */
.visionneuse { position: relative; overflow: auto; width: 100%; height: 100%; background: #E9E6DF; cursor: default; outline: none; }
.visionneuse.interactive { cursor: grab; }
.visionneuse.saisi { cursor: grabbing; user-select: none; }
.vis-contenu { min-height: 100%; display: flex; align-items: flex-start; padding: 2px; }
/* Centré quand le document est plus petit que le cadre, mais jamais coupé à gauche quand on zoome */
.vis-contenu > * { margin-left: auto; margin-right: auto; flex-shrink: 0; }
.vis-contenu.vis-image img { display: block; max-width: none; }
.vis-page { display: block; background: var(--carte); box-shadow: 0 2px 10px rgba(0,0,0,.18); }
.vis-texte { margin: 0; padding: 1.5rem; background: var(--carte); white-space: pre-wrap; font-size: 1rem; width: 900px; }
.vis-erreur, .office-attente { margin: 2rem auto; color: var(--texte-doux); font-style: italic; text-align: center; }
.vis-commandes { display: inline-flex; align-items: center; gap: .25rem; flex-wrap: wrap; }
.vis-commandes .btn { min-width: 34px; }
.vis-pct, .vis-pages { min-width: 3.4rem; text-align: center; font-variant-numeric: tabular-nums; font-weight: 700; font-size: .85rem; }

/* Documents bureautiques */
.office { background: transparent; }
.office-word .docx-wrapper { background: transparent !important; padding: 12px !important; }
.office-word .docx-wrapper > section.docx { box-shadow: 0 2px 10px rgba(0,0,0,.18); margin-bottom: 14px !important; }
.office-tableur { background: var(--carte); padding: .5rem; min-width: 600px; }
.office-onglets { display: flex; gap: .25rem; flex-wrap: wrap; margin-bottom: .5rem; }
.office-onglets button { font: inherit; font-size: .85rem; padding: .25rem .7rem; border: 1px solid var(--bord); border-radius: 6px 6px 0 0; background: var(--fond); cursor: pointer; }
.office-onglets button[aria-pressed="true"] { background: var(--carte); border-bottom-color: #fff; font-weight: 700; }
.office-feuille table { border-collapse: collapse; font-size: .85rem; }
.office-feuille td { border: 1px solid #D6D2C6; padding: .2rem .45rem; white-space: nowrap; }
.office-diapo, .office-odp { display: flex; flex-direction: column; gap: 14px; width: 860px; padding: 12px; }
.diapo { position: relative; aspect-ratio: 16 / 9; overflow: hidden; padding: 2.2rem 2.6rem; background: var(--carte); border-radius: 6px; box-shadow: 0 2px 10px rgba(0,0,0,.18); display: flex; flex-direction: column; gap: .6rem; }
.diapo-num { position: absolute; right: .8rem; bottom: .5rem; font-size: .8rem; color: var(--texte-doux); }
.diapo-titre { font-size: 1.9rem; color: var(--menu); }
.diapo ul { margin: 0; padding-left: 1.3rem; font-size: 1.2rem; line-height: 1.45; }
.diapo-images { display: flex; gap: .6rem; flex: 1; min-height: 0; }
.diapo-images img { flex: 1; min-width: 0; object-fit: contain; max-height: 100%; }
.office-odt { width: 794px; padding: 2.5rem 3rem; background: var(--carte); box-shadow: 0 2px 10px rgba(0,0,0,.18); }
.odf-vignette { display: block; margin: 0 auto 1rem; max-width: 50%; border: 1px solid var(--bord); }

/* Ressources : aperçu bureautique */
.volet-image.type-office { height: 320px; padding: 0; overflow: hidden; }
.volet-image.type-office .visionneuse { cursor: default; }
.apercu.type-office { height: calc(100vh - 15rem); min-height: 420px; border-radius: 10px; overflow: hidden; border: 1px solid var(--bord); }
.scene-ressource.type-office { position: fixed; inset: 0; }

/* Écran de classe : outil « Document » */
.widget-document .widget-corps { padding: 0; overflow: hidden; }
.w-document { width: 100%; height: 100%; }
.w-doc-vide { justify-content: center; gap: .6rem; }
.w-doc-cmd .vis-commandes { gap: .15rem; }
.w-doc-cmd .btn.mini { min-height: 28px; padding: .1rem .35rem; }
.widget-titre { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
html.projection .w-doc-cmd { display: none; }

/* =========================================================
   Lot du 26/11 (après-midi)
   ========================================================= */
.tdb { background: var(--pastel, var(--carte)); }

/* Météo : photo de la ville en fond (Wikipédia) avec un voile pour la lisibilité */
.meteo-fond.avec-photo { background:
  linear-gradient(180deg, rgba(8,16,32,.30) 0%, rgba(8,16,32,.55) 100%),
  var(--photo) center / cover no-repeat !important; }
.ciel-pluie.avec-photo, .ciel-orage.avec-photo { background:
  linear-gradient(180deg, rgba(30,40,60,.55) 0%, rgba(20,28,45,.7) 100%),
  var(--photo) center / cover no-repeat !important; }
.ciel-nuit.avec-photo { background:
  linear-gradient(180deg, rgba(10,16,48,.65) 0%, rgba(10,16,48,.8) 100%),
  var(--photo) center / cover no-repeat !important; }
.ciel-neige.avec-photo { background:
  linear-gradient(180deg, rgba(235,242,250,.45) 0%, rgba(200,214,228,.6) 100%),
  var(--photo) center / cover no-repeat !important; }

/* Bulletins : en-tête en cases lisibles */
.bul-stats { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.bul-stat { display: flex; flex-direction: column; gap: .1rem; padding: .6rem .8rem; border-radius: 12px; background: var(--fond); border: 1px solid var(--bord); }
.bul-stat-titre { font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--texte-doux); }
.bul-stat-valeur { font-family: var(--police-titres); font-size: 1.55rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.bul-stat-sous { font-size: .82rem; color: var(--texte-doux); }
.bul-stat.bien { border-color: #8FD1A7; background: #EAF7EF; }
.bul-stat.bien .bul-stat-valeur { color: #1D6A3E; }
.bul-stat.alerte { border-color: #F0A9A2; background: #FDEDEB; }
.bul-stat.alerte .bul-stat-valeur { color: #A3261E; }
.bul-stat.engagement { grid-column: span 2; border-color: var(--chaud); background: var(--chaud-clair); }
.bul-engagement { display: inline-flex; align-items: center; gap: .45rem; font-size: 1.15rem; }
.bul-engagement .icone { color: #A65E12; width: 1.4rem; height: 1.4rem; }
.bul-badge { display: inline-block; padding: .1rem .5rem; border-radius: 99px; background: var(--chaud-clair); border: 1px solid var(--chaud); font-size: .8rem; font-weight: 700; white-space: nowrap; }

/* Conseil de classe : liste | bulletin | points à aborder */
.conseil-general > summary { cursor: pointer; list-style: revert; }
.conseil-3col { display: grid; grid-template-columns: 15rem minmax(0, 1fr) 20rem; gap: 1rem; align-items: start; }
.conseil-3col.sans-droite { grid-template-columns: 15rem minmax(0, 1fr); }
.conseil-liste { position: sticky; top: 6rem; max-height: calc(100vh - 7rem); overflow-y: auto; padding: .6rem; background: var(--carte); border: 1px solid var(--bord); border-radius: var(--rayon); }
.conseil-liste ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.conseil-liste .pp-eleve { font-size: .92rem; min-height: 36px; padding: .35rem .5rem; }
.conseil-moy { font-size: .8rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--texte-doux); }
.conseil-moy.bas { color: var(--rouge); }
.pp-eleve[aria-pressed="true"] .conseil-moy { color: #fff; }
.conseil-note { color: var(--accent-fonce); font-weight: 700; }
.conseil-droite { position: sticky; top: 6rem; max-height: calc(100vh - 7rem); overflow-y: auto; }
.conseil-vide { color: var(--texte-doux); }
@media (max-width: 1300px) { .conseil-3col { grid-template-columns: 13rem minmax(0, 1fr); } .conseil-droite { grid-column: 1 / -1; position: static; max-height: none; } }
@media (max-width: 800px) { .conseil-3col, .conseil-3col.sans-droite { grid-template-columns: 1fr; } .conseil-liste { position: static; max-height: 14rem; } }

/* Prise du cours */
.prise { display: grid; grid-template-columns: 17rem minmax(0, 1fr); gap: 1rem; align-items: start; }
@media (max-width: 900px) { .prise { grid-template-columns: 1fr; } }
.prise-liste { position: sticky; top: 6rem; max-height: calc(100vh - 7rem); overflow-y: auto; display: flex; flex-direction: column; gap: .35rem; padding: .7rem; background: var(--carte); border: 1px solid var(--bord); border-radius: var(--rayon); }
.prise-nav { gap: .3rem; }
.prise-nav strong { flex: 1; text-align: center; font-size: .9rem; }
.prise-jour { margin: .6rem 0 .1rem; font-size: .85rem; text-transform: capitalize; color: var(--texte-doux); }
.prise-cours { display: flex; align-items: center; gap: .5rem; width: 100%; padding: .4rem .5rem; border: 1px solid var(--bord); border-left: 5px solid; border-radius: 8px; background: var(--carte); color: inherit; font: inherit; text-align: left; cursor: pointer; }
.prise-cours:hover { background: var(--accent-clair); }
.prise-cours[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--accent); background: var(--accent-clair); }
.prise-cours.annule { opacity: .55; text-decoration: line-through; }
.prise-cours .journee-pastille { height: auto; padding: .1rem .4rem; font-size: .78rem; border-radius: 6px; }
.prise-cours-texte { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.2; }
.prise-marque { color: var(--accent-fonce); font-weight: 800; }
.prise-doc { display: flex; flex-direction: column; gap: .8rem; min-width: 0; }
.prise-tete { display: flex; justify-content: space-between; gap: .8rem; flex-wrap: wrap; align-items: center; }
.prise-tete h2 { font-size: 1.2rem; }
.prise-editeur .ql-toolbar { background: var(--carte); border-color: var(--bord) !important; border-radius: 10px 10px 0 0; position: sticky; top: 5.5rem; z-index: 2; }
.prise-editeur .ql-container { background: #fff; color: #1B2A2E; border-color: var(--bord) !important; border-radius: 0 0 10px 10px; font-family: var(--police-texte); font-size: 1.05rem; min-height: 55vh; }
.prise-editeur .ql-editor { min-height: 55vh; line-height: 1.55; }
.prise-editeur .ql-editor img { max-width: 100%; }
.prise-lecture { max-height: 22rem; overflow: auto; padding: .5rem 0 0; font-size: .92rem; }
.prise-prec > summary { cursor: pointer; font-weight: 700; }
.scene-prise { position: fixed; inset: 0; display: flex; flex-direction: column; padding: 2rem 3rem; background: #fff; color: #1B2A2E; }
.prise-titre-projete { font-size: 1.4rem; color: #55676A; margin-bottom: 1rem; }
.prise-projetee { flex: 1; overflow: auto; font-size: 2rem; line-height: 1.5; padding: 0; }

/* Films documentaires (Jellyfin) */
.films-barre { margin-bottom: 1rem; }
.films-barre input[type=search] { flex: 1; min-width: 14rem; }
.films { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 440px); gap: 1rem; align-items: start; }
@media (max-width: 1000px) { .films { grid-template-columns: 1fr; } }
.films-grille { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.film { display: flex; flex-direction: column; gap: .3rem; padding: 0 0 .5rem; border: 1px solid var(--bord); border-radius: 12px; overflow: hidden; background: var(--carte); color: inherit; font: inherit; text-align: left; cursor: pointer; }
.film:hover, .film[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--accent); }
.film img, .film-sans-image { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; background: var(--accent-clair); }
.film-sans-image { display: grid; place-items: center; font-size: 3rem; font-weight: 800; color: var(--accent-fonce); }
.film-nom, .film .doux { padding: 0 .55rem; }
.film-nom { font-weight: 700; line-height: 1.2; }
.films-detail { position: sticky; top: 6rem; display: flex; flex-direction: column; gap: .7rem; }
.film-lecteur video { width: 100%; border-radius: 10px; background: #000; }
.film-resume { max-height: 14rem; overflow: auto; margin: 0; }

/* =========================================================
   Mode sombre (bouton dans le menu, ou comme Windows)
   ========================================================= */
html.sombre { color-scheme: dark; }
html.sombre .tdb { background: color-mix(in srgb, var(--pastel, var(--carte)) 14%, var(--carte)); border-color: rgba(255,255,255,.07); }
html.sombre .tdb::before { background: linear-gradient(160deg, rgba(255,255,255,.05), rgba(255,255,255,0) 55%); }
html.sombre .tdb .carte-tete > span:first-child > .icone { background: rgba(255,255,255,.08); box-shadow: none; color: color-mix(in srgb, var(--ton) 55%, #fff); }
html.sombre .tuile-filigrane .icone { color: #fff; opacity: .05; }
html.sombre .tdb .bas a, html.sombre .tdb .lien-bouton { color: color-mix(in srgb, var(--ton) 50%, #fff); }
html.sombre a { color: var(--accent-fonce); }
html.sombre .btn { color: var(--accent-fonce); }
html.sombre .btn.principal { color: #0E1518; }
html.sombre .btn.discret { color: var(--texte); }
html.sombre .btn.danger { color: #FF8A80; border-color: #FF8A80; }
html.sombre .btn.danger:hover, html.sombre .alerte { background: #3A1E1C; }
html.sombre .btn[aria-pressed="true"] { color: #0E1518; }
html.sombre .journee-statut.annule, html.sombre .pp-tableau .bas, html.sombre .conseil-moy.bas { color: #FF8A80; }
html.sombre .pp-tableau .hausse { color: #7ED69E; }
html.sombre .surligne .phrase.cat-positif, html.sombre .pp-legende .phrase.cat-positif { background: #1E4A30; }
html.sombre .surligne .phrase.cat-travail, html.sombre .pp-legende .phrase.cat-travail { background: #5A2622; }
html.sombre .surligne .phrase.cat-comportement, html.sombre .pp-legende .phrase.cat-comportement { background: #3E2B5E; }
html.sombre .pp-tableau .phrase.vise { background: #5C4515; }
html.sombre .pp-theme.cat-positif { background: #1E4A30; color: #A9E8C0; }
html.sombre .pp-theme.cat-travail { background: #5A2622; color: #FFC2BC; }
html.sombre .pp-theme.cat-comportement { background: #3E2B5E; color: #DCC8FF; }
html.sombre .bul-stat.bien { background: #173A27; border-color: #2E7D4F; }
html.sombre .bul-stat.bien .bul-stat-valeur { color: #8BE0AA; }
html.sombre .bul-stat.alerte { background: #3E1F1C; border-color: #8E3A33; }
html.sombre .bul-stat.alerte .bul-stat-valeur { color: #FFADA5; }
html.sombre .bul-engagement .icone { color: var(--chaud); }
html.sombre .cal-case.conge { background: #4A3A22; }
html.sombre .agenda-bloc.sans-cours, html.sombre .cdt-seance.sans-cours { background: repeating-linear-gradient(135deg, #1F2A2E 0 6px, var(--carte) 6px 12px); }
html.sombre .meteo-pluie { color: #9CCBFF; }
html.sombre .actu-logo { background: #fff; }
/* Les documents restent sur fond blanc (comme sur papier) */
html.sombre .vis-page, html.sombre .diapo, html.sombre .office-tableur, html.sombre .office-odt, html.sombre .vis-texte { background: #fff; color: #1B2A2E; }
html.sombre .visionneuse { background: #2A3439; }
html.sombre .ql-toolbar .ql-stroke { stroke: var(--texte); }
html.sombre .ql-toolbar .ql-fill { fill: var(--texte); }
html.sombre .ql-toolbar .ql-picker { color: var(--texte); }
html.sombre .ql-picker-options { background: var(--carte); }
html.sombre .prise-editeur .ql-container { background: #1E2A2E; color: var(--texte); }
html.sombre .prise-lecture { color: var(--texte); }
html.sombre .scene-prise { background: #121A1D; color: #E4ECEB; }

/* Éditeur de la prise du cours : menus en français */
.ql-snow .ql-picker.ql-header .ql-picker-label::before, .ql-snow .ql-picker.ql-header .ql-picker-item::before { content: 'Texte'; }
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="1"]::before, .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]::before { content: 'Titre 1'; }
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="2"]::before, .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]::before { content: 'Titre 2'; }
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="3"]::before, .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]::before { content: 'Titre 3'; }
.ql-snow .ql-picker.ql-size .ql-picker-label::before, .ql-snow .ql-picker.ql-size .ql-picker-item::before { content: 'Taille normale'; }
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="small"]::before, .ql-snow .ql-picker.ql-size .ql-picker-item[data-value="small"]::before { content: 'Petit'; }
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="large"]::before, .ql-snow .ql-picker.ql-size .ql-picker-item[data-value="large"]::before { content: 'Grand'; }
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="huge"]::before, .ql-snow .ql-picker.ql-size .ql-picker-item[data-value="huge"]::before { content: 'Très grand'; }
.ql-snow .ql-picker.ql-header, .ql-snow .ql-picker.ql-size { width: 8.5rem; }
.ql-snow .ql-tooltip::before { content: 'Lien :'; }
.ql-snow .ql-tooltip[data-mode=link]::before { content: 'Adresse du lien :'; }
.ql-snow .ql-tooltip a.ql-action::after { content: 'Modifier'; }
.ql-snow .ql-tooltip a.ql-remove::before { content: 'Retirer'; }
.ql-snow .ql-tooltip.ql-editing a.ql-action::after { content: 'Valider'; }

/* =========================================================
   Prise du cours : éditeur façon Word (CKEditor 5)
   ========================================================= */
.prise { grid-template-columns: 19rem minmax(0, 1fr); }
.prise-vues { margin: 0 0 .2rem; }
.prise-vues .btn { flex: 1; }
.prise-bilan { margin: .2rem 0; padding: .35rem .6rem; border-radius: 8px; background: var(--chaud-clair); font-size: .85rem; font-weight: 600; }
.prise-bilan.ok { background: var(--accent-clair); color: var(--accent-fonce); }
.prise-cours { align-items: stretch; }
.prise-heure { display: flex; flex-direction: column; min-width: 2.9rem; font-variant-numeric: tabular-nums; line-height: 1.2; }
.prise-cours .journee-pastille { align-self: center; }
.prise-cours.fini { opacity: .75; }
.prise-cours.en-cours { box-shadow: 0 0 0 2px var(--chaud); background: var(--chaud-clair); }
.prise-encours { font-size: .72rem; font-weight: 800; text-transform: uppercase; color: #A65E12; }
.prise-marque.ok { color: var(--vert); }
/* (pas d'overflow: hidden ici, sinon la barre d'outils ne reste plus collée en haut de l'écran) */
.prise-editeur { display: flex; flex-direction: column; border: 1px solid var(--bord); border-radius: 12px; background: #E9E6DF; }
.prise-barre { position: sticky; top: 5.2rem; z-index: 5; background: var(--carte); border-bottom: 1px solid var(--bord); border-radius: 12px 12px 0 0; }
.prise-barre .ck.ck-toolbar { border: 0; background: var(--carte); flex-wrap: wrap; }
.prise-barre .ck.ck-toolbar > .ck-toolbar__items { flex-wrap: wrap; }
.prise-feuille { padding: 1.5rem 1rem 2.5rem; max-height: none; }
.prise-page.ck-editor__editable, .prise-page { width: min(21cm, 100%); min-height: 29.7cm; margin: 0 auto; padding: 2cm 2cm !important; background: #fff; color: #1B2A2E; box-shadow: 0 2px 12px rgba(0,0,0,.18); border: 0 !important; border-radius: 2px; font-family: Marianne, Arial, sans-serif; font-size: 12pt; line-height: 1.5; }
.prise-page.ck-focused { box-shadow: 0 2px 12px rgba(0,0,0,.18), 0 0 0 2px var(--accent) !important; }
.prise-page h1 { font-size: 20pt; } .prise-page h2 { font-size: 16pt; } .prise-page h3 { font-size: 14pt; } .prise-page h4 { font-size: 12pt; }
.ck.ck-balloon-panel, .ck.ck-dropdown__panel { z-index: 60; }
.prise-lecture { font-family: Marianne, Arial, sans-serif; }
.prise-projetee.ck-content { font-size: 1.8rem; line-height: 1.5; }
@media (max-width: 900px) { .prise-page.ck-editor__editable, .prise-page { padding: 1cm !important; min-height: 60vh; } }
html.sombre .prise-editeur { background: #2A3439; }
html.sombre .prise-page.ck-editor__editable, html.sombre .prise-page { background: #fff; color: #1B2A2E; }

/* Témoin de synchronisation (bas du menu) */
.etat-sync { display: flex; align-items: center; gap: .45rem; margin-top: .4rem; padding: .35rem .75rem; border: 0; border-radius: 8px; background: transparent; color: var(--menu-texte); opacity: .8; font: inherit; font-size: .78rem; text-align: left; cursor: pointer; }
.etat-sync::before { content: ""; width: .55rem; height: .55rem; border-radius: 50%; background: #C9C9C9; flex-shrink: 0; }
.etat-sync.ok::before { background: #5CC48A; }
.etat-sync.erreur::before { background: #FF7B72; }
.etat-sync.erreur { opacity: 1; }
.etat-sync:hover { background: var(--menu-survol); opacity: 1; }

/* Prise du cours : rappel de la séance précédente sur l'écran projeté */
.prise-rappel { flex-shrink: 0; max-height: 45%; overflow: auto; margin-bottom: 1.2rem; padding: 1rem 1.4rem; border-radius: 14px; background: #FFF6E5; border: 3px solid #F2B872; }
.prise-rappel-titre { font-size: 1.5rem; color: #A65E12; margin: 0 0 .4rem; }
.prise-rappel-corps { font-size: 1.5rem; line-height: 1.45; }
html.sombre .prise-rappel { background: #3A2E1F; border-color: #A65E12; }
html.sombre .prise-rappel-titre { color: #F2B872; }

/* =========================================================
   Tabula (cartes et croquis)
   ========================================================= */
.tb { display: grid; grid-template-columns: 20rem minmax(0, 1fr); gap: 1rem; align-items: start; }
@media (max-width: 1000px) { .tb { grid-template-columns: 1fr; } }
.tb-panneau { display: flex; flex-direction: column; gap: .7rem; max-height: calc(100vh - 7rem); overflow-y: auto; position: sticky; top: 6rem; padding-right: .2rem; }
.tb-bloc { display: flex; flex-direction: column; gap: .35rem; padding: .7rem .8rem; background: var(--carte); border: 1px solid var(--bord); border-radius: 12px; }
.tb-bloc h3 { font-size: .95rem; margin: 0; }
.tb-bloc select, .tb-bloc input[type=text] { width: 100%; }
.tb-couches { display: grid; grid-template-columns: 1fr; gap: 0; }
.tb-outils { display: grid; grid-template-columns: 1fr 1fr; gap: .25rem; }
.tb-outils .btn { justify-content: flex-start; }
.tb-cat { display: flex; flex-direction: column; gap: .25rem; margin-top: .4rem; }
.tb-figure { display: flex; flex-direction: column; gap: .3rem; padding: .25rem; border-radius: 8px; border: 1.5px solid transparent; }
.tb-figure.actif { border-color: var(--accent); background: var(--accent-clair); }
.tb-ech { padding: 0; border: 1px solid var(--bord); border-radius: 6px; background: #fff; cursor: pointer; line-height: 0; flex-shrink: 0; }
.tb-ech:hover { border-color: var(--accent); }
.tb-style { display: flex; flex-wrap: wrap; gap: .35rem .6rem; padding: .4rem; background: var(--fond); border-radius: 8px; }
.tb-style input[type=color] { width: 2rem; height: 1.8rem; padding: 0; border: 1px solid var(--bord); border-radius: 6px; background: none; }
.tb-scene { background: #fff; border: 1px solid var(--bord); border-radius: 10px; overflow: hidden; box-shadow: var(--ombre); }
.tb-svg { display: block; width: 100%; height: auto; touch-action: none; user-select: none; }
.tb-scene[data-outil="ponctuel"] .tb-svg, .tb-scene[data-outil="lineaire"] .tb-svg, .tb-scene[data-outil="surface"] .tb-svg { cursor: crosshair; }
.tb-scene[data-outil="texte"] .tb-svg { cursor: text; }
.tb-scene[data-outil="main"] .tb-svg { cursor: grab; }
.tb-scene[data-outil="gomme"] .tb-svg [data-id] { cursor: not-allowed; }
.tb-scene[data-outil="selection"] .tb-svg [data-id] { cursor: move; }
.tb-svg.tb-libre [data-legende] { cursor: move; }
.tb-choisi { filter: drop-shadow(0 0 4px rgba(242,184,114,1)) drop-shadow(0 0 2px rgba(242,184,114,1)); }
.tb-poignee { fill: #fff; stroke: #0E7C74; stroke-width: 2.5; cursor: grab; }
.tb-projete { position: fixed; inset: 0; display: grid; place-items: center; background: #fff; }
.tb-projete .tb-scene { width: min(100vw, calc(100vh * 1.4147)); border: 0; border-radius: 0; box-shadow: none; }
.tb-scene:fullscreen { display: grid; place-items: center; background: #fff; }
.tb-scene:fullscreen .tb-svg { width: min(100vw, calc(100vh * 1.4147)); }
html.sombre .tb-ech { background: #fff; }

/* Films : séries (saisons, épisodes) */
.film { position: relative; }
.film-badge { position: absolute; top: .4rem; left: .4rem; padding: .1rem .5rem; border-radius: 99px; background: var(--menu); color: #fff; font-size: .75rem; font-weight: 800; }
.film-serie-image img { width: 100%; max-height: 260px; object-fit: cover; border-radius: 10px; }
.film-episodes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; max-height: 18rem; overflow-y: auto; }
.film-episode { width: 100%; text-align: left; padding: .45rem .6rem; border: 1px solid var(--bord); border-radius: 8px; background: var(--carte); color: inherit; font: inherit; cursor: pointer; }
.film-episode:hover { background: var(--accent-clair); }
.film-episode[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-clair); font-weight: 600; }

/* Tabula : figuré utilisé pour dessiner, barres à glisser, parties de la légende */
.tb-pinceau { display: flex; flex-direction: column; gap: .4rem; margin-top: .4rem; padding: .5rem; border-radius: 10px; background: var(--fond); }
.tb-palette { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; }
.tb-palette .tb-ech[aria-pressed="true"] { outline: 3px solid var(--accent); outline-offset: 1px; }
.tb-curseur { display: grid; grid-template-columns: 5.2rem 1fr 2.6rem; align-items: center; gap: .4rem; width: 100%; font-size: .85rem; }
.tb-curseur input[type=range] { width: 100%; }
.tb-valeur { text-align: right; font-variant-numeric: tabular-nums; }
.tb-partie { display: flex; flex-direction: column; gap: .25rem; margin-top: .45rem; padding: .45rem; border: 1.5px dashed var(--bord); border-radius: 10px; }
.tb-partie.a-classer { background: var(--chaud-clair); border-color: var(--chaud); }
.tb-partie.survol { border-color: var(--accent); background: var(--accent-clair); }
.tb-num { min-width: 1.8rem; font-family: var(--police-titres); }
.tb-ligne { display: flex; align-items: center; gap: .3rem; padding: .15rem .2rem; border-radius: 8px; background: var(--carte); border: 1px solid var(--bord); cursor: grab; }
.tb-ligne.actif { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.tb-ligne.glisse, .tb-ech.glisse { opacity: .4; }
.tb-poignee-glisser { color: var(--texte-doux); cursor: grab; padding: 0 .1rem; }
.tb-vide-partie { margin: 0; padding: .3rem; font-size: .8rem; color: var(--texte-doux); font-style: italic; text-align: center; }

/* Tabula : pot de peinture, propositions visuelles, couleurs façon Word */
.tb-fond-traits { pointer-events: none; }
.tb-scene[data-outil="remplir"] .tb-svg { cursor: cell; }
.tb-scene.tb-calcul .tb-svg { cursor: progress; }
.tb-scene[data-outil="remplir"] .tb-surfaces [data-id]:hover { filter: brightness(.9); }
.tb-scene[data-outil="surface"] .tb-svg { cursor: crosshair; }
.tb-rubrique { display: flex; flex-direction: column; gap: .2rem; }
.tb-etiquette { font-size: .75rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--texte-doux); }
.tb-modeles { display: grid; grid-template-columns: repeat(3, 1fr); gap: .25rem; }
.tb-modele { display: flex; flex-direction: column; align-items: center; gap: .1rem; padding: .25rem .15rem; border: 1px solid var(--bord); border-radius: 8px; background: #fff; color: #1B2A2E; font: inherit; font-size: .72rem; line-height: 1.15; text-align: center; cursor: pointer; }
.tb-modele:hover { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-clair); }
.tb-choix { display: flex; flex-wrap: wrap; gap: .25rem; }
.tb-choix .tb-ech[aria-pressed="true"], .tb-palette .tb-ech[aria-pressed="true"] { outline: 3px solid var(--accent); outline-offset: 1px; }
.tb-couleur { position: relative; }
.tb-couleur > summary { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .4rem; border: 1px solid var(--bord); border-radius: 8px; background: var(--carte); cursor: pointer; list-style: none; }
.tb-couleur > summary::-webkit-details-marker { display: none; }
.tb-fleche-menu { font-size: .7rem; color: var(--texte-doux); }
.tb-pastille { display: inline-block; width: 1.5rem; height: 1.5rem; padding: 0; border: 1px solid rgba(0,0,0,.25); border-radius: 5px; cursor: pointer; }
.tb-pastille.aucune { background: repeating-linear-gradient(135deg, #fff 0 5px, #e33 5px 6.5px) !important; }
.tb-pastille.choisie { outline: 3px solid var(--accent); outline-offset: 1px; }
.tb-couleurs-panneau { position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; padding: .5rem; background: var(--carte); border: 1px solid var(--bord); border-radius: 10px; box-shadow: var(--ombre); }
.tb-grille-couleurs { display: grid; grid-template-columns: repeat(10, 1.5rem); gap: 3px; }
.tb-grille-couleurs .tb-pastille:hover { transform: scale(1.15); }

/* Photos des élèves, bandeau, engagements à cocher, tableau des trimestres */
.photo-eleve { flex: none; object-fit: cover; border-radius: 50%; background: var(--accent-clair); color: var(--accent); display: inline-grid; place-items: center; font-weight: 700; border: 2px solid var(--carte); box-shadow: 0 0 0 1px var(--bord); }
.photo-eleve.mini { width: 2rem; height: 2rem; font-size: .72rem; }
.photo-eleve.moyenne { width: 3rem; height: 3rem; font-size: .95rem; }
.photo-eleve.grande { width: 6.5rem; height: 8rem; border-radius: 14px; font-size: 1.8rem; }
.pp-eleve { display: flex; align-items: center; gap: .5rem; }
.bul-bandeau { display: flex; gap: 1rem; align-items: flex-start; }
.bul-bandeau-corps { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .5rem; }
.bul-bandeau-corps h2 { margin: 0; }
.bul-stat.engagement { display: flex; flex-direction: column; gap: .2rem; }
.pp-engagements { border: 1px solid var(--bord); border-radius: 12px; padding: .5rem .8rem .7rem; margin: 0; }
.pp-engagements legend { font-weight: 700; padding: 0 .3rem; }
.pp-cases { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.pp-case { display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .6rem; border: 1px solid var(--bord); border-radius: 999px; cursor: pointer; font-size: .92rem; }
.pp-case.cochee { background: #FBE6CF; border-color: #E8A75A; color: #6B3A00; font-weight: 600; }
.pp-cases input[type="text"] { width: 12rem; padding: .25rem .5rem; }
.pp-trimestres th[scope="row"] { text-align: left; font-weight: 600; white-space: nowrap; }
.pp-trimestres td.nb, .pp-trimestres thead th.nb { text-align: center; min-width: 8rem; }
.pp-trimestres tr.forte td { font-size: 1.1rem; }
.pp-trimestres tr.separation th { text-align: left; background: var(--fond); color: var(--texte-doux); font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; }

.tb-scene[data-outil="limite"] .tb-svg { cursor: crosshair; }
.tb-aide-remplir { display: flex; flex-direction: column; gap: .35rem; padding: .5rem .6rem; border-radius: 10px; background: var(--accent-clair); }
.tb-limite { pointer-events: stroke; }

/* Mes classes : élèves avec photo */
.classe-eleves { list-style: none; padding: 0; margin: .6rem 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: .3rem .8rem; }
.classe-eleves li { display: flex; align-items: center; gap: .5rem; }


/* Bulletins : une classe = un bouton */
.bul-classes { flex-wrap: wrap; gap: .4rem; margin: .2rem 0 1rem; }
.bul-classes .btn { min-width: 3.6rem; justify-content: center; font-size: 1.05rem; font-weight: 700; }


/* Carte mentale : bulle qu'on fait glisser */
.dessin .carte-glisse { opacity: .75; pointer-events: none; }
.dessin [data-id] { touch-action: none; }


/* Frise : saisie en direct sur la frise, générateur */
.zone-dessin.frise { position: relative; }
.frise-saisie { position: absolute; z-index: 5; font-size: 1.1rem !important; border: 3px solid #B3261E !important; box-shadow: 0 6px 20px rgba(0,0,0,.2); }
.frise-generateur { margin-top: 1rem; padding-top: .8rem; border-top: 1px dashed var(--bord); }


/* =========================================================
   Mur d'idées (Padlet maison)
   ========================================================= */
.mur { container-type: inline-size; position: relative; min-height: 60vh; padding: 1rem; border-radius: var(--rayon); border: 1px solid var(--bord); }
.mur[data-fond="creme"] { background: #F6F1E4; }
.mur[data-fond="liege"] { background: #C9A27A radial-gradient(rgba(90,55,20,.25) 1px, transparent 1.6px) 0 0 / 7px 7px; }
.mur[data-fond="ardoise"] { background: #23332F radial-gradient(rgba(255,255,255,.05) 1px, transparent 2px) 0 0 / 9px 9px; }
.mur[data-fond="ciel"] { background: linear-gradient(160deg, #CFE6FA, #F7E6F1); }
.mur[data-fond="quadrillage"] { background: #FFFFFF linear-gradient(#E3EAF0 1px, transparent 1px) 0 0 / 22px 22px, #FFFFFF linear-gradient(90deg, #E3EAF0 1px, transparent 1px) 0 0 / 22px 22px; background-blend-mode: multiply; }
.mur[data-fond="ardoise"] .mur-col-titre, .mur[data-fond="ardoise"] .mur-vide { color: #F3F0E6; }
/* Les cartes */
.mur-carte { position: relative; break-inside: avoid; margin: 0 0 1rem; padding: .8rem .9rem; border-radius: 10px; color: #1B2A2E;
  box-shadow: 0 1px 2px rgba(0,0,0,.12), 0 6px 16px rgba(0,0,0,.10); overflow-wrap: anywhere; }
.mur-carte[draggable="true"] { cursor: grab; }
.mur-carte.glisse { opacity: .55; }
.mur-carte.cible, .mur-colonne.cible { outline: 3px dashed #0E7C74; outline-offset: 3px; }
.mur-carte.cachee { opacity: .45; background-image: repeating-linear-gradient(135deg, transparent 0 10px, rgba(0,0,0,.05) 10px 20px) !important; }
.mur-titre { font-size: 1.12rem; margin: 0 0 .35rem; color: #1B2A2E; }
.mur-texte { margin: 0; white-space: pre-wrap; line-height: 1.4; }
.mur-image { display: block; width: calc(100% + 1.8rem); margin: -.8rem -.9rem .6rem; border-radius: 10px 10px 0 0; max-height: 260px; object-fit: cover; }
.mur-image.absente { padding: 1rem; font-size: .85rem; color: #666; background: rgba(0,0,0,.05); }
.mur-lien { display: inline-block; margin-top: .45rem; font-weight: 700; font-size: .9rem; color: #0A5F59; }
.mur-actions { position: absolute; top: .3rem; right: .3rem; display: none; gap: .2rem; background: rgba(255,255,255,.9); border-radius: 8px; padding: .15rem; }
.mur-carte:hover .mur-actions, .mur-carte:focus-within .mur-actions { display: flex; }
.mur-dos { display: grid; place-items: center; min-height: 6rem; font-size: 3rem; font-weight: 700; color: rgba(0,0,0,.35); }
.mur-vide { text-align: center; color: var(--texte-doux); margin-top: 20vh; }
/* Grille */
.mur[data-format="grille"] { column-width: 250px; column-gap: 1rem; }
/* Colonnes */
.mur[data-format="colonnes"] { display: flex; gap: 1rem; overflow-x: auto; align-items: flex-start; }
.mur-colonne { flex: 1 0 240px; max-width: 360px; min-height: 50vh; padding: .5rem; border-radius: 12px; background: rgba(255,255,255,.35); }
.mur-col-tete { display: flex; gap: .3rem; align-items: center; margin-bottom: .6rem; }
input.mur-col-titre { flex: 1; font-weight: 700; font-size: 1.1rem; background: rgba(255,255,255,.7); }
h2.mur-col-titre { margin: .2rem .2rem .8rem; }
.mur-ajout { width: 100%; }
/* Libre : positions en % (même place au vidéoprojecteur), taille relative au mur */
.mur[data-format="libre"] { aspect-ratio: 16 / 9; min-height: 0; overflow: hidden; }
.mur[data-format="libre"] .mur-carte { position: absolute; width: 17cqw; margin: 0; font-size: max(.75rem, 1.15cqw); touch-action: none; cursor: grab; }
.mur[data-format="libre"] .mur-titre { font-size: max(.85rem, 1.35cqw); }
/* Écran projeté : plus grand */
.mur-projete .mur-carte { font-size: 1.2rem; }
.mur-projete .mur-titre { font-size: 1.4rem; }
/* Fenêtre de modification */
.mur-dialogue { width: min(560px, 94vw); border: 0; border-radius: 16px; padding: 1.2rem 1.4rem; box-shadow: 0 20px 60px rgba(0,0,0,.35); background: var(--carte); color: var(--texte); }
.mur-dialogue::backdrop { background: rgba(10,20,25,.45); }
.mur-form { display: flex; flex-direction: column; gap: .7rem; }
.mur-apercu-image { display: flex; align-items: center; gap: .6rem; }
.mur-apercu-image img { max-width: 160px; max-height: 100px; border-radius: 8px; object-fit: cover; }
.mur-pastille { width: 2rem; height: 2rem; border-radius: 50%; border: 2px solid rgba(0,0,0,.2); cursor: pointer; }
.mur-pastille.choisie { outline: 3px solid var(--accent); outline-offset: 2px; }

/* =========================================================
   Plickers maison
   ========================================================= */
.pk-classe { display: flex; flex-direction: column; gap: 1rem; }
.pk-pilote { display: flex; flex-direction: column; gap: .8rem; }
.pk-q h2 { margin: .2rem 0 .5rem; font-size: 1.4rem; }
.pk-q-choix { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; }
.pk-q-ch b, .pk-lettre, .pk-barre-l { display: inline-grid; place-items: center; width: 1.8rem; height: 1.8rem; border-radius: 6px; color: #fff; font-weight: 700; }
.pk-q-ch.bonne { font-weight: 700; outline: 3px solid #2E7D4F; outline-offset: 3px; border-radius: 6px; }
.pk-deux { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
@media (max-width: 1000px) { .pk-deux { grid-template-columns: 1fr; } }
.pk-camera { position: relative; background: #15343B; border-radius: 10px; overflow: hidden; aspect-ratio: 16 / 9; display: grid; place-items: center; }
.pk-video, .pk-calque { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.pk-camera:not(.active) .pk-video, .pk-camera:not(.active) .pk-calque { display: none; }
.pk-camera.active .pk-cam-attente { display: none; }
.pk-cam-attente { color: #cfe; margin: 0; }
.pk-compteur { font-size: 1.3rem; margin-bottom: .6rem; }
.pk-compteur strong { font-size: 2rem; }
.pk-eleves { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: .3rem; }
.pk-eleve { display: flex; align-items: center; gap: .4rem; padding: .25rem .4rem; border-radius: 8px; border: 1px solid var(--bord); font-size: .9rem; }
.pk-eleve.a-repondu { background: var(--accent-clair); }
.pk-eleve.juste { background: #DCF2C8; }
.pk-eleve.faux { background: #FFD9D4; }
.pk-num { font-size: .75rem; color: var(--texte-doux); min-width: 1.4rem; }
.pk-nom { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk-rep { display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 6px; color: #fff; font-weight: 700; }
.pk-rep.vide { color: var(--texte-doux); }
.pk-repartition { margin-top: 1rem; }
.pk-barres { display: flex; flex-direction: column; gap: .5rem; }
.pk-barre { display: flex; align-items: center; gap: .6rem; }
.pk-barre-fond { flex: 1; height: 1.6rem; background: var(--fond); border-radius: 6px; overflow: hidden; }
.pk-barre-val { height: 100%; transition: width .6s; }
.pk-barre-n { min-width: 3.2rem; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.pk-barre.bonne .pk-barre-fond { outline: 3px solid #2E7D4F; outline-offset: 2px; }
.pk-ok { color: #2E7D4F; font-size: 1.4rem; font-weight: 700; }
.pk-question { display: flex; flex-direction: column; gap: .5rem; margin-bottom: .8rem; }
.pk-choix { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: .4rem .8rem; }
.pk-choix-ligne { display: flex; align-items: center; gap: .4rem; }
.pk-choix-ligne input[type=text] { flex: 1; }
.pk-choix-ligne.bonne input[type=text] { border-color: #2E7D4F; background: #EEF8E6; }
.pk-liste-cartes { columns: 3 14rem; margin: .4rem 0 0; }
/* Écran projeté */
.pk-projete { min-height: 85vh; display: flex; flex-direction: column; gap: 2rem; padding: 2rem 3rem; }
.pk-attente { margin: auto; font-family: var(--police-titres); font-size: 3rem; font-weight: 700; text-align: center; }
.pk-proj-tete { display: flex; justify-content: space-between; font-size: 1.5rem; color: var(--texte-doux); }
.pk-proj-nb { font-weight: 700; color: var(--accent-fonce); }
.pk-proj-q { font-size: clamp(2rem, 4vw, 3.6rem); line-height: 1.15; }
.pk-proj-choix { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem 2rem; }
.pk-proj-ch { display: flex; align-items: center; gap: 1rem; font-size: clamp(1.4rem, 2.6vw, 2.4rem); }
.pk-proj-ch b { display: inline-grid; place-items: center; width: 3.4rem; height: 3.4rem; border-radius: 10px; color: #fff; flex: none; }
.pk-barres.grand .pk-barre { font-size: 2rem; }
.pk-barres.grand .pk-barre-fond { height: 3rem; }
.pk-barres.grand .pk-barre-l { width: 3.2rem; height: 3.2rem; }

.pk-barre-fond { position: relative; }
.pk-barre-txt { position: absolute; left: .6rem; top: 50%; transform: translateY(-50%); font-weight: 700; color: #1B2A2E; text-shadow: 0 0 4px #fff, 0 0 2px #fff; white-space: nowrap; overflow: hidden; max-width: 95%; }


/* Plickers : numéros de carte, import */
.pk-numeros { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .35rem .8rem; margin-top: .6rem; }
.pk-numero { display: flex; align-items: center; gap: .5rem; }
.pk-numero input { width: 4.2rem; text-align: center; font-weight: 700; }
.pk-numero.doublon input { border-color: var(--rouge); background: #FDECEA; }
.pk-coller { margin: .4rem 0 .8rem; }
.pk-coller summary, .pk-import summary { cursor: pointer; }
.pk-import { margin-top: 1rem; }
.pk-import textarea { width: 100%; font-family: ui-monospace, Consolas, monospace; }

