/* Page d'un exercice : énoncé et correction. S'appuie sur ../../css/style.css (couleurs, bandeau, boutons). */

.exo { max-width: 60rem; }
.exo-tete { border-left: 4px solid var(--marge); padding-left: 1rem; margin-bottom: 1.25rem; }
.exo-fil { margin: 0 0 0.25rem; font-size: 0.88rem; color: var(--gris); }
.exo-fil a { color: var(--gris); }
.exo-tete h1 { margin: 0; }

/* Navigation entre les exercices */
.exo-nav { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; background: var(--carte); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 0.5rem 0.75rem; margin-bottom: 1.25rem; }
.exo-fleche { padding: 0.4rem 0.9rem; border-radius: var(--rayon); background: var(--encre); color: #fff; text-decoration: none; font-weight: 600; white-space: nowrap; }
.exo-fleche:hover { background: var(--encre-fonce); color: #fff; }
.exo-fleche.est-inactive { background: #e5e8f5; color: #8a90ad; }
.exo-numeros { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.25rem; flex-wrap: wrap; flex: 1 1 12rem; justify-content: center; }
.exo-numeros a { display: block; min-width: 2.1rem; text-align: center; padding: 0.2rem 0.4rem; border: 1px solid var(--bord); border-radius: 4px; text-decoration: none; background: #f4f6fd; }
.exo-numeros a:hover { background: #e3e8fb; }
.exo-numeros a[aria-current="page"] { background: var(--surligneur); border-color: #cdb400; color: #000; font-weight: 700; }

/* Énoncé */
.exo-enonce, .exo-correction, .exo-manuels { background: var(--carte); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 1rem 1.25rem; margin-bottom: 1.25rem; }
.exo-enonce h2, .exo-correction > h2 { border-bottom: 2px solid var(--ligne); padding-bottom: 0.3rem; }
.exo-etiquettes { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 0 0 0.75rem; }
.etiquette { display: inline-block; font-weight: 700; font-size: 0.85rem; padding: 0.15rem 0.7rem; border-radius: 999px; }
.etiquette-d1 { background: #d9f3d0; color: #1c5a0c; }
.etiquette-d2 { background: #e6f5c8; color: #3c5a06; }
.etiquette-d3 { background: #ffe6bd; color: #7a4600; }
.etiquette-d4 { background: #ffd6d6; color: #8c1a1a; }
.etiquette-methode { background: #ebdcfb; color: #4b1d82; }
.exo-commentaire { display: flex; gap: 1rem; align-items: center; background: var(--surligneur); border-radius: var(--rayon); padding: 0.6rem 0.9rem; margin: 0 0 1rem; box-shadow: 6px 5px 0 rgba(27, 28, 17, 0.12); }
.exo-commentaire img { border-radius: 4px; flex: 0 0 auto; height: auto; }
.exo-images { text-align: center; }
.exo-images img { display: block; margin: 0 auto 0.75rem; max-width: 100%; height: auto; -webkit-user-select: none; user-select: none; -webkit-user-drag: none; }

/* Correction */
.exo-details > summary { cursor: pointer; font-family: var(--police-titre); font-size: 1.25rem; font-weight: 700; color: var(--encre); list-style: none; padding: 0.25rem 0; }
.exo-details > summary::-webkit-details-marker { display: none; }
.exo-details > summary::before { content: "▸"; display: inline-block; margin-right: 0.5rem; color: var(--marge); transition: transform 0.15s; }
.exo-details[open] > summary::before { transform: rotate(90deg); }
.exo-details[open] > summary { border-bottom: 2px solid var(--ligne); margin-bottom: 0.75rem; }
.exo-verrou { background: #fff8d6; border: 1px solid #e6d36b; border-radius: var(--rayon); padding: 0.9rem 1.1rem; }
.exo-verrou-titre { font-weight: 700; margin-top: 0; }
.exo-connexion { display: grid; gap: 0.35rem; max-width: 20rem; margin: 0.75rem 0; }
.exo-connexion label { font-weight: 600; font-size: 0.9rem; }
.exo-connexion input { padding: 0.45rem 0.6rem; border: 1px solid #9aa5d6; border-radius: 4px; font: inherit; }
.exo-connexion .bouton { margin-top: 0.4rem; }
.exo-liens { display: flex; gap: 0.4rem 1.25rem; flex-wrap: wrap; margin: 0.5rem 0; }

/* Espace prof */
.exo-prof { background: #eef1fc; border: 1px dashed var(--lien); border-radius: var(--rayon); padding: 0.6rem 1rem; margin-bottom: 1.25rem; }
.exo-prof summary { cursor: pointer; font-weight: 600; }
.exo-prof form { display: grid; gap: 0.5rem; margin-top: 0.75rem; }
.exo-prof fieldset { display: flex; gap: 0.4rem 1rem; flex-wrap: wrap; border: 1px solid var(--bord); border-radius: 4px; }
.exo-prof textarea { width: 100%; font: inherit; padding: 0.5rem; border: 1px solid #9aa5d6; border-radius: 4px; }
.exo-case { display: flex; gap: 0.4rem; align-items: center; }

/* Manuels */
.exo-manuels { text-align: center; }
.exo-manuels-niveaux { margin: 0; font-variant: small-caps; color: var(--lien); font-size: 0.9rem; }
.exo-manuels h2 { color: #c2410c; margin: 0.2rem 0; }
.manuels { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr)); gap: 1rem; padding: 0; margin: 1rem 0; align-items: end; }
.manuels li { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; }
.manuels img { max-width: 100%; height: auto; border-radius: 4px; box-shadow: 0 2px 8px rgba(15, 24, 64, 0.2); }
.manuel-feuilleter { font-size: 0.85rem; font-weight: 600; }
.exo-erreur { text-align: center; font-size: 0.9rem; color: var(--gris); }

@media print {
  .bandeau, .exo-nav, .exo-prof, .exo-manuels, .exo-erreur { display: none; }
  .exo-enonce, .exo-correction { border: 0; padding: 0; }
  .exo-details > summary { display: none; }
}
