/* Les marques de l'enseignant : gommettes (où en est une étape), tampons (d'où vient un contenu). Puis étapes, objectifs, résultats. */

/* Gommette : pleine = fait, jaune = à faire maintenant, vide pointillée = facultatif */
.gommette { flex: none; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--trait-fort); background: var(--panneau); }
.gommette.faite { background: var(--vert); border-color: var(--vert); }
.gommette.encours { background: var(--jaune); border-color: var(--jaune); }
.gommette.facultative { border-style: dashed; }
.point { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--trait-fort); flex: none; }
.point.ok { background: var(--vert); }
.point.alerte { background: var(--jaune); }
.point.info { background: var(--doux); }

/* Tampon : petite marque à double filet, légèrement de travers, jamais plus grande qu'une étiquette */
.tampon {
  display: inline-block; flex: none; padding: 1px 6px; border-radius: 4px; line-height: 1.5;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap;
  color: var(--vert); border: 1px solid currentColor; outline: 1px solid currentColor; outline-offset: 1px; margin: 2px;
  transform: rotate(-1.5deg); opacity: .92;
}
.tampon.rouge { color: var(--rouge); }
.tampon.vert { color: var(--vert); }
/* Le tampon se pose : une seule fois, à l'arrivée d'un résultat */
.tampon.pose { animation: poser .45s cubic-bezier(.16, 1, .3, 1) both; }
@keyframes poser { from { transform: scale(1.8) rotate(-10deg); opacity: 0; } 60% { opacity: 1; } to { transform: rotate(-1.5deg); opacity: .92; } }

.cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Étapes */
.etape { display: grid; gap: 12px; }
.etape-tete { display: flex; align-items: center; gap: 10px; }
.etape-tete h2 { margin: 0; }
.etape-tete .doux { margin-left: auto; font-weight: 400; }
.etape-aide { margin: -4px 0 0; }
details.etape > summary { list-style: none; cursor: pointer; }
details.etape > summary::-webkit-details-marker { display: none; }
details.etape > summary::after { content: "Ouvrir"; margin-left: 12px; font-size: 13px; color: var(--action); font-weight: 700; }
details.etape[open] > summary::after { content: "Replier"; }
details.etape { display: block; }
details.etape .etape-corps { display: grid; gap: 12px; margin-top: 16px; }

/* Barre d'action : reste en bas de l'écran pendant qu'on remplit les étapes */
.barre-action {
  position: relative; z-index: 4; padding: 14px 20px;
  background: var(--carte); border: 1px solid var(--trait); border-radius: 10px 10px 0 0; box-shadow: var(--ombre-haute);
  display: grid; gap: 10px;
}
.barre-action.collante { position: sticky; bottom: 0; }
.barre-action .ligne { justify-content: space-between; flex-wrap: nowrap; }
.barre { height: 8px; background: var(--fond); border-radius: 999px; overflow: hidden; }
.barre div { height: 100%; width: 0; background: var(--action); transition: width .4s cubic-bezier(.16, 1, .3, 1); }

/* Objectifs du PER */
#liste-objectifs {
  max-height: 440px; overflow-y: auto; border: 1px solid var(--trait-fort); border-radius: 8px; margin-top: 8px;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; column-gap: 1px;
  /* Filet vertical entre les deux colonnes, recouvert par les en-têtes de groupe */
  background: linear-gradient(var(--trait), var(--trait)) center / 1px 100% no-repeat, var(--panneau);
}
#liste-objectifs > .axe, #liste-objectifs > p { grid-column: 1 / -1; }
.axe.ligne { position: static; gap: 10px; flex-wrap: nowrap; }
.axe { position: sticky; top: 0; z-index: 1; background: var(--survol); padding: 6px 14px; font-size: 13px; font-weight: 700; color: var(--doux); border-bottom: 1px solid var(--trait); }
.consigne-ligne { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; }
.consigne-liste { margin: 0; font-size: 15px; }
.icone-loupe { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--trait-fort); background: var(--panneau); color: var(--texte); }
.icone-loupe:hover { border-color: var(--action); color: var(--action); }
.icone-loupe.actif { background: var(--action); border-color: var(--action); color: var(--sur-action); }
.explorateur { border: 1px solid var(--trait-fort); border-radius: 8px; overflow: hidden; background: var(--panneau); }
.explorateur-filtres { display: grid; gap: 12px; padding: 12px 14px; background: var(--survol); border-bottom: 1px solid var(--trait); }
.explorateur #liste-objectifs { border: 0; border-radius: 0; margin: 0; }
.objectif {
  display: grid; grid-template-columns: 18px 1fr auto; align-items: center; gap: 2px 12px; width: 100%;
  border: 0; background: none; text-align: left; padding: 9px 14px; border-bottom: 1px solid var(--trait);
}
.objectif:hover { background: var(--survol); }
.objectif.actif { background: var(--action-doux); font-weight: 700; }
.objectif small { grid-column: 2; display: block; color: var(--doux); font-weight: 400; }
.objectif .tampon { grid-column: 3; grid-row: 1 / span 2; }
/* Rond à cocher : vide au repos, plein quand l'objectif est choisi */
.radio { grid-column: 1; grid-row: 1 / span 2; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--trait-fort); background: var(--panneau); }
.objectif:hover .radio { border-color: var(--action); }
.objectif.actif .radio { border-color: var(--action); box-shadow: inset 0 0 0 3px var(--panneau); background: var(--action); }
.objectif.actif { box-shadow: inset 0 0 0 1px var(--action); }
.objectif.cadre { border: 1px solid var(--trait); border-radius: 8px; margin-bottom: 6px; }
.choisi { display: grid; gap: 4px; margin-top: 12px; padding: 12px 14px; border-radius: 8px; background: var(--survol); font-size: 14px; }
.choisi .ligne { gap: 8px; }

/* Tableau des élèves */
.defile { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th { text-align: left; font-size: 13px; font-weight: 400; color: var(--doux); padding: 8px 6px; border-bottom: 1px solid var(--trait-fort); white-space: nowrap; }
td { padding: 6px; border-bottom: 1px solid var(--trait); vertical-align: top; }
td input[type=text], td select { padding: 5px 8px; min-height: 32px; border-color: transparent; background: transparent; }
td input[type=text]:hover, td select:hover { border-color: var(--trait-fort); }
td input[type=text]:focus, td select:focus { border-color: var(--action); background: var(--panneau); }
.col-prenom { width: 120px; } .col-degre { width: 72px; } .col-niveau { width: 146px; } .col-niveau select { min-width: 138px; }
.aides { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-width: 150px; position: relative; }
.aide-choisie { cursor: default; }
.aides-choix summary { display: inline-block; list-style: none; outline-offset: 2px; cursor: pointer; font-size: 13px; color: var(--action); font-weight: 700; padding: 3px 6px; border-radius: 6px; }
.aides-choix summary::-webkit-details-marker { display: none; }
.aides-choix summary::marker, details.aides-choix:not(.etape) > summary::before { content: none; }
.aides-choix summary:hover { background: var(--action-doux); }
.aides-choix[open] .aides-liste { position: absolute; z-index: 5; top: 100%; left: 0; margin-top: 4px; display: grid; gap: 4px; padding: 8px; background: var(--carte); border: 1px solid var(--trait); border-radius: 8px; box-shadow: 0 8px 20px rgba(42, 29, 69, .14); min-width: 180px; }
.aides .puce { min-height: 26px; padding: 2px 8px; font-size: 13px; }

/* Résultats */
.resultat { display: grid; gap: 14px; }
.resultat-tete { display: flex; align-items: center; gap: 10px; }
.resultat-tete h2 { margin: 0; }
.fichier { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--trait); }
.pile > .fichier:first-child { border-top: 1px solid var(--trait); }
.fichier .nom { font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bandeau { border: 1px solid var(--trait-fort); border-radius: 8px; padding: 10px 14px; background: var(--survol); font-size: 14px; }
.bandeau.grave { border-color: var(--rouge); background: var(--rouge-doux); }
.bandeau ul { margin: 4px 0 0; padding-left: 18px; }
.erreur { color: var(--rouge); }
details summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; align-items: center; gap: 8px; }
details summary::-webkit-details-marker { display: none; }
details:not(.etape) > summary::before { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .2s; }
details:not(.etape)[open] > summary::before { transform: rotate(45deg); }
.avis-resultat { border-top: 1px solid var(--trait); padding-top: 14px; }

/* Import et avis */
#depot { border: 2px dashed var(--trait-fort); border-radius: 10px; padding: 32px; text-align: center; background: var(--fond); }
#depot.survol { border-color: var(--action); background: var(--action-doux); }
#avis { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--texte); color: var(--fond); padding: 10px 18px; border-radius: 8px; box-shadow: var(--ombre); z-index: 10; }
dialog { background: var(--carte); color: var(--texte); border: 1px solid var(--trait); border-radius: 12px; padding: 24px; width: min(520px, 92vw); box-shadow: var(--ombre); }
dialog::backdrop { background: rgba(15, 12, 22, .55); }

@media (prefers-reduced-motion: reduce) { .barre div { transition: none; } .tampon { transform: none; } .tampon.pose { animation: none; } }
.avis-resultat[open] > summary { margin-bottom: 12px; }

/* Explication d'un écran : se ferme, se réaffiche dans les Paramètres */
/* Aide (mode d'emploi, guide) : cadre en pointillés sur le fond de page, comme l'encadré « Le rappel » des fiches.
   Ni blanc (cartes de travail) ni violet (ce qui est choisi) : décisions de Yann du 13.11.2026. */
.aide, .guide { background: transparent; border: 1.5px dashed var(--trait-fort); border-radius: 10px; padding: 14px 20px 16px; font-size: 15px; }
.aide-tete h2::before { content: "?"; display: inline-grid; place-items: center; width: 20px; height: 20px; margin-right: 8px; border-radius: 50%;
  background: var(--texte); color: var(--panneau); font-size: 12px; font-weight: 700; vertical-align: 2px; }
.aide p, .aide ul { max-width: 78ch; }
.aide-tete { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.aide-tete h2 { margin: 0; }
.aide p { margin: 6px 0 0; }
.aide-exemples > p { margin: 12px 0 0; }
.exemples-grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin-top: 8px; }
.choix.exemple { padding: 10px 12px; gap: 2px; }
.choix.exemple strong { font-size: 15px; padding-right: 0; }
.choix .exemple-tete { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--action); }
.aide ul { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 4px; color: var(--doux); }
/* Élèves à cocher : la coche dit l'état, pas seulement la couleur. */
.puces-eleves .puce::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 6px; border: 1.5px solid currentColor; border-radius: 3px; vertical-align: -1px; }
.puces-eleves .puce.actif::before { content: "✓"; border-color: transparent; font-size: 12px; line-height: 12px; text-align: center; font-weight: 700; }
/* Précisions : groupes en colonnes, cases à cocher (13.11.2026). */
.precisions-grille { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 6px; }
.precision-groupe { border: 1px solid var(--trait); border-radius: 8px; padding: 10px 14px 12px; margin: 0; display: grid; gap: 6px; align-content: start; }
.precision-groupe legend { padding: 0 4px; margin-left: -4px; font-size: 13px; font-weight: 700; color: var(--doux); }
.case { display: flex; align-items: center; gap: 8px; font-size: 15px; cursor: pointer; }
.case:has(input:checked) { font-weight: 700; }
@media (max-width: 900px) { .precisions-grille { grid-template-columns: 1fr; } }
.resume-demande { display: grid; gap: 2px; min-width: 0; }
.resume-demande strong { font-size: 15px; overflow-wrap: anywhere; }
.verrouille { opacity: .5; }
.demande-repliee { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.demande-repliee > div:first-child { display: grid; gap: 2px; min-width: 0; }
/* Mes documents : tableau filtrable (13.11.2026). */
.filtres-documents { display: grid; grid-template-columns: minmax(220px, 2fr) repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.table-documents td { vertical-align: middle; }
.doc-date { white-space: nowrap; color: var(--doux); font-variant-numeric: tabular-nums; }
.doc-titre { font-weight: 700; }
.doc-sujet .tampon { margin-left: 6px; }
.doc-themes { color: var(--doux); font-size: 14px; margin-top: 2px; }
.doc-type { display: inline-block; font-size: 13px; font-weight: 400; color: var(--doux); padding: 2px 8px; border-radius: 999px; border: 1px solid var(--trait-fort); white-space: nowrap; }
.doc-actions { white-space: nowrap; text-align: right; }
.doc-pour { white-space: nowrap; }
.doc-actions .bouton { padding: 4px 10px; font-size: 14px; }
.doc-actions .bouton:hover { background: var(--action-doux); color: var(--action); }
.doc-niveau { white-space: nowrap; color: var(--doux); }
@media (max-width: 1000px) { .filtres-documents { grid-template-columns: 1fr 1fr; } }
.doc-ligne { cursor: pointer; }
.doc-ligne:hover td { background: var(--survol); }
.retour { padding-left: 0; margin-bottom: 4px; }
/* Détail d'une génération : métadonnées en une ligne, étiquettes de thèmes, une carte par fiche (13.11.2026) */
.etiquettes { display: flex; flex-wrap: wrap; gap: 6px; }
.etiquette { font-size: 13px; padding: 2px 10px; border-radius: 999px; background: var(--survol); border: 1px solid var(--trait); color: var(--doux); }
.fiches-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px; }
.fiche-carte { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px 6px 16px; background: var(--carte); border: 1px solid var(--trait); border-radius: 8px; min-height: 52px; }
.fiche-nom { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fiche-actions { display: flex; gap: 2px; flex: none; }
.fiche-actions .bouton { text-decoration: none; padding: 4px 10px; font-size: 14px; }
.fiche-actions .bouton:hover { background: var(--survol); }
/* Mode d'emploi replié : seule la ligne de titre reste. */
.aide.replie > :not(.aide-tete) { display: none; }
.aide.replie { padding-top: 10px; padding-bottom: 10px; }
.aide-bascule { margin-left: 10px; font-size: 13px; font-weight: 400; vertical-align: 1px; }
.doc-ouvrir { color: var(--doux); font-size: 20px; text-align: right; width: 24px; }
.detail-pied { border-top: 1px solid var(--trait); padding-top: 12px; margin-top: 8px; }
.bouton.danger { color: var(--rouge); }
/* Page Mes classes. */
.grille-classes { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.carte-classe { min-height: 84px; align-content: center; }
.doc-actions-archive { white-space: nowrap; text-align: right; }

/* En ligne : écran d'entrée par code, sans colonne */
body.sans-colonne { grid-template-columns: 1fr; }
body.sans-colonne #cote { display: none; }
.connexion { max-width: 440px; margin: 10vh auto 0; display: grid; gap: 14px; padding: 28px; }
.connexion-marque { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 700; }
.connexion-marque img { width: 34px; height: 34px; }
