/* Module enseignants - © 2026 Aïda Sebaa, neuropsychologue (CC BY-NC-ND 4.0)
   Styles limités au module (#module, classes « m- ») : s'ajoute à css/style.css du site sans rien écraser. */
#module { --vert-doux: #eef3ec; padding-top: 1.5rem; }
#module h2:focus { outline: none; }
#module h3 { font-size: 1.3rem; line-height: 1.3; margin: 0 0 0.4rem; }
#module h4 { font-size: 1.05rem; margin: 1.2rem 0 0.5rem; color: var(--texte-doux); text-transform: uppercase; letter-spacing: 0.04em; }
#module [hidden] { display: none !important; }
.m-invisible { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Barre de navigation du module */
.m-nav { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-bottom: 1.5rem; }
.m-bouton {
  font: inherit; font-size: 1rem; font-weight: 600; cursor: pointer; line-height: 1.3;
  background: var(--accent); color: #fff; border: 2px solid var(--accent);
  padding: 0.65rem 1.2rem; border-radius: 999px; text-decoration: none; display: inline-block;
}
.m-bouton:hover { background: var(--accent-fonce); border-color: var(--accent-fonce); color: #fff; }
.m-bouton.m-second { background: transparent; color: var(--accent); }
.m-bouton.m-second:hover { background: var(--fond-doux); color: var(--accent-fonce); }
.m-bouton[aria-current="page"] { background: var(--fond-doux); }
.m-bouton[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }
.m-compteur { display: inline-block; min-width: 1.6em; padding: 0 0.4em; margin-left: 0.3em; border-radius: 999px; background: var(--accent); color: #fff; text-align: center; }

/* Présentation de l'outil (haut de page) */
.m-intro { background: #fff; border: 2px solid var(--accent); border-radius: var(--rayon); padding: 1.2rem 1.4rem 0.4rem; margin-bottom: 1.5rem; }
.m-intro h2 { font-size: 1.4rem; }
.m-etapes { list-style: none; padding: 0; margin: 0 0 1rem; counter-reset: etape; }
.m-etapes li { counter-increment: etape; position: relative; padding-left: 2.8rem; margin-bottom: 0.7rem; min-height: 2rem; }
.m-etapes li::before {
  content: counter(etape); position: absolute; left: 0; top: 0;
  width: 2rem; height: 2rem; border-radius: 999px; background: var(--accent); color: #fff;
  font-weight: 700; display: flex; align-items: center; justify-content: center;
}

/* Appel vers la fiche (fin de l'écran des idées) */
.m-fin { background: #fbeee6; border: 2px solid var(--accent); border-radius: var(--rayon); padding: 1.3rem 1.4rem; margin: 2rem 0 1.5rem; }
.m-fin h3 { margin-bottom: 0.5rem; }
.m-fin .m-bouton { font-size: 1.15rem; padding: 0.85rem 1.6rem; }
.m-fin p:last-child { margin-bottom: 0; }

/* Repères */
.m-reperes { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 0.75rem; }
.m-reperes li { background: #fff; border: 1px solid var(--bord); border-radius: var(--rayon); padding: 0.8rem 1rem; margin: 0; }
.m-reperes strong { display: block; color: var(--vert); }

/* Réglages */
.m-reglages { display: flex; flex-wrap: wrap; gap: 0.75rem 2rem; margin-bottom: 1.5rem; }
.m-reglages fieldset { border: 1px solid var(--bord); border-radius: var(--rayon); padding: 0.5rem 1rem 0.7rem; margin: 0; background: #fff; }
.m-reglages legend { font-weight: 600; padding: 0 0.3rem; font-size: 1rem; }
.m-reglages label { margin-right: 1.1rem; font-size: 1rem; white-space: nowrap; cursor: pointer; }
.m-reglages input { accent-color: var(--accent); width: 1.1rem; height: 1.1rem; vertical-align: -0.15em; margin-right: 0.3rem; }

/* Pictogrammes de la charte (Charte/pictogrammes.svg) : trait dessiné dans une pastille aux bords irréguliers */
.m-pastille {
  display: inline-grid; place-items: center; flex-shrink: 0; width: 2.6rem; height: 2.6rem;
  border-radius: 46% 54% 52% 48% / 56% 44% 56% 44%; background: #fbeee6; color: var(--accent-fonce);
}
.m-pastille.m-vert { background: var(--vert-doux); color: var(--vert); border-radius: 55% 45% 48% 52% / 46% 56% 44% 54%; }
.m-pastille svg { width: 66%; height: 66%; }
.m-regard .m-pastille { background: #fff; }
#module h3.m-titre-picto { display: flex; align-items: center; gap: 0.7rem; }
.m-avec-picto { display: inline-flex; align-items: center; gap: 0.5rem; }
.m-avec-picto svg { width: 1.3em; height: 1.3em; }

/* Tuiles */
.m-tuiles { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(16.5rem, 1fr)); gap: 0.75rem; }
.m-tuiles li { margin: 0; }
.m-tuile {
  font: inherit; text-align: left; cursor: pointer; width: 100%; height: 100%;
  display: grid; grid-template-columns: 2.6rem 1fr; gap: 0.1rem 0.8rem; align-items: start;
  background: #fff; color: var(--texte); border: 2px solid var(--bord); border-radius: var(--rayon); padding: 0.85rem 1rem;
}
.m-tuile:hover { border-color: var(--accent); }
.m-tuile .m-ico { grid-row: span 2; transition: transform 0.2s; }
.m-tuile:hover .m-ico { transform: rotate(-6deg); }
.m-tuile .m-lib { font-weight: 700; font-size: 1.05rem; }
.m-tuile .m-obs { font-size: 0.98rem; color: var(--texte-doux); line-height: 1.45; }
.m-tuile[aria-pressed="true"] { border-color: var(--accent); background: #fbeee6; box-shadow: inset 0 0 0 1px var(--accent); }
.m-tuile[aria-pressed="true"] .m-lib::after { content: " ✓"; color: var(--accent); }
.m-conseil { min-height: 1.6em; color: var(--accent-fonce); font-weight: 600; margin-bottom: 0.8rem; }

/* Résultats */
.m-bloc { background: #fff; border: 1px solid var(--bord); border-radius: var(--rayon); padding: 1.3rem 1.4rem 0.6rem; margin-bottom: 1.5rem; }
.m-bloc > .m-obs-rappel { color: var(--texte-doux); font-style: italic; margin-top: -0.1rem; }
.m-regard { background: var(--vert-doux); border-color: #cfdcc9; }
.m-encadre { border-left: 5px solid var(--vert); background: #fff; padding: 1rem 1.25rem; border-radius: 0 var(--rayon) var(--rayon) 0; margin: 0 0 1.5rem; }
.m-encadre p:last-child { margin-bottom: 0; }
.m-pistes { list-style: none; padding: 0; margin: 0 0 0.8rem; }
.m-piste { display: flex; gap: 0.8rem; align-items: flex-start; justify-content: space-between; padding: 0.7rem 0; border-top: 1px solid var(--bord); margin: 0; }
.m-pistes > .m-piste:first-child { border-top: 0; }
.m-piste .m-titre { font-weight: 700; display: block; }
.m-piste .m-texte { color: var(--texte); font-size: 1.02rem; }
.m-retenir {
  font: inherit; font-size: 0.92rem; font-weight: 600; cursor: pointer; flex-shrink: 0; white-space: nowrap;
  background: #fff; color: var(--accent); border: 2px solid var(--accent); border-radius: 999px; padding: 0.3rem 0.8rem;
}
.m-retenir:hover { background: var(--fond-doux); }
.m-retenir[aria-pressed="true"] { background: var(--accent); color: #fff; }
.m-badge { display: inline-block; font-size: 0.8rem; font-weight: 600; color: var(--vert); border: 1px solid var(--vert); border-radius: 999px; padding: 0 0.5rem; margin-left: 0.4rem; vertical-align: 0.1em; }
#module details { margin: 0 0 1rem; }
#module summary { cursor: pointer; font-weight: 600; color: var(--accent-fonce); padding: 0.3rem 0; }
#module summary:hover { text-decoration: underline; }
.m-gratuit { font-size: 0.95rem; color: var(--vert); font-weight: 600; margin: -0.3rem 0 0.4rem; }
.m-rappels { color: var(--texte-doux); font-size: 1rem; }
.m-licence { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--bord); font-size: 0.92rem; color: var(--texte-doux); }
.m-vide { color: var(--texte-doux); font-style: italic; }
.m-entete-impression { display: none; }

@media (max-width: 600px) {
  .m-piste { flex-direction: column; gap: 0.4rem; }
  .m-bloc { padding: 1rem 1rem 0.4rem; }
}
@media print {
  body { font-size: 11pt; background: #fff; }
  .entete, .pied, .evitement, .titre-page, .m-bandeau, .m-intro, .m-nav, .m-retenir, .m-imprimer, #vue-choisir, #vue-idees { display: none !important; }
  .m-bloc { border: 1px solid #999; break-inside: avoid; }
  .m-piste { break-inside: avoid; }
  .m-entete-impression { display: block !important; }
}
