/* Le Tuteur du soir : mêmes couleurs et mêmes formes que la maquette du 06/12/2026. */
:root {
  --fond: #F6F5F1; --carte: #FFFFFF; --encre: #1B1F27; --gris: #5B6270; --bord: #E3E1DA;
  --bleu: #3346C8; --bleu-fonce: #26359A; --bleu-pale: #E8EBFB;
  --orange: #B4540A; --orange-fonce: #8A3F06; --orange-pale: #FFF6EC;
  --vert: #1F7A4D; --vert-fonce: #14532F; --vert-pale: #EAF5EF;
  --titre: "Space Grotesk", Inter, system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--fond); color: var(--encre); font: 17px/1.45 Inter, system-ui, -apple-system, "Segoe UI", sans-serif; display: flex; flex-direction: column; }
button, input, select { font: inherit; }
h1, h2 { font-family: var(--titre); margin: 0; line-height: 1.15; }
h1 { font-size: 34px; } h2 { font-size: 20px; }
p { margin: 0; }
[hidden] { display: none !important; }

.barre { min-height: 64px; padding: env(safe-area-inset-top) 24px 0; background: var(--carte); border-bottom: 1px solid var(--bord); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.marque { display: flex; align-items: center; gap: 10px; font-family: var(--titre); font-weight: 700; font-size: 19px; }
.barre-droite { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.pastille-ia { padding: 6px 12px; border-radius: 999px; background: var(--bleu-pale); color: var(--bleu-fonce); font-weight: 600; white-space: nowrap; }
.discret { color: var(--gris); }
.retour { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 8px 0 0; background: none; border: 0; color: var(--encre); font-weight: 600; cursor: pointer; }

main { flex: 1; min-height: 0; padding: 24px; display: flex; flex-direction: column; gap: 20px; max-width: 1180px; width: 100%; margin: 0 auto; }
.grille { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.colonne { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
@media (max-width: 820px) { .grille { grid-template-columns: minmax(0, 1fr); } h1 { font-size: 28px; } }

.carte { background: var(--carte); border: 1px solid var(--bord); border-radius: 20px; padding: 20px 22px; display: flex; flex-direction: column; gap: 12px; }
.etiquette { font-size: 13px; font-weight: 600; color: var(--gris); }
.etiquette.orange { color: var(--orange); text-transform: uppercase; letter-spacing: .06em; }

.btn { min-height: 52px; padding: 0 22px; border-radius: 14px; border: 0; background: var(--bleu); color: #FFF; font-weight: 600; cursor: pointer; text-align: center; }
.btn:hover { background: var(--bleu-fonce); }
.btn.second { background: var(--carte); color: var(--bleu-fonce); border: 1px solid #C9CFF2; }
.btn.second:hover { background: var(--bleu-pale); }
.btn.lien { background: none; color: var(--gris); text-decoration: underline; }
.btn.indice { background: var(--orange-pale); color: var(--orange-fonce); border: 1px solid #E8B98A; white-space: nowrap; }
.btn:disabled { opacity: .5; cursor: default; }
.btn-photo { display: flex; align-items: center; gap: 22px; padding: 26px; border-radius: 20px; background: var(--bleu); color: #FFF; border: 0; cursor: pointer; text-align: left; width: 100%; }
.btn-photo:hover { background: var(--bleu-fonce); }
.btn-photo .rond { width: 68px; height: 68px; border-radius: 18px; background: rgba(255,255,255,.16); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.btn-photo strong { display: block; font-family: var(--titre); font-size: 24px; }
.btn-ligne { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; text-align: left; width: 100%; cursor: pointer; font: inherit; color: inherit; }

.chiffres { display: flex; gap: 28px; flex-wrap: wrap; }
.chiffres b { display: block; font-size: 22px; }
.barre-prog { height: 8px; border-radius: 4px; background: #F0EEE8; }
.barre-prog > div { height: 8px; border-radius: 4px; background: var(--bleu); }
.ligne { display: flex; justify-content: space-between; gap: 12px; }

.champ { height: 54px; border: 1px solid #C9CDD6; border-radius: 12px; padding: 0 16px; font-size: 18px; width: 100%; background: #FFF; }
.erreur { color: var(--orange-fonce); background: var(--orange-pale); border-radius: 12px; padding: 12px 16px; }
.attente { display: flex; align-items: center; gap: 12px; color: var(--gris); }
.roue { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--bleu-pale); border-top-color: var(--bleu); animation: tourne 1s linear infinite; }
@keyframes tourne { to { transform: rotate(360deg); } }

.pastilles { display: flex; gap: 8px; flex-wrap: wrap; }
.pastille { padding: 6px 12px; border-radius: 999px; background: var(--fond); font-size: 14px; }
.pastille.lien { padding: 12px 16px; min-height: 44px; border: 1px solid var(--bleu-pale); color: var(--bleu-fonce); cursor: pointer; font: inherit; font-size: 14px; text-decoration: underline; }
.pastille.bleue { background: var(--bleu-pale); color: var(--bleu-fonce); font-weight: 600; }
.pastille.orange { background: var(--orange-pale); color: var(--orange-fonce); font-weight: 600; }

.dialogue { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 24px; flex: 1; min-height: 0; }
@media (max-width: 820px) { .dialogue { grid-template-columns: minmax(0, 1fr); } }
.fil { background: var(--carte); border: 1px solid var(--bord); border-radius: 20px; display: flex; flex-direction: column; min-height: 420px; }
.messages { flex: 1; overflow-y: auto; padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.bulle { max-width: 82%; padding: 12px 16px; white-space: pre-wrap; overflow-wrap: anywhere; }
.bulle.tuteur { align-self: flex-start; background: #F1F2FB; border-radius: 4px 16px 16px 16px; }
.bulle.indice { align-self: flex-start; background: var(--orange-pale); border-radius: 4px 16px 16px 16px; }
.bulle.enfant { align-self: flex-end; background: var(--bleu); color: #FFF; border-radius: 16px 4px 16px 16px; }
.qui { font-size: 12px; font-weight: 600; color: var(--gris); margin-bottom: 4px; }
.saisie { border-top: 1px solid var(--bord); padding: 14px 16px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.saisie .champ { flex: 1; min-width: 200px; }
.paliers { display: flex; flex-direction: column; gap: 10px; }
.palier { display: flex; align-items: center; gap: 12px; font-size: 15px; color: var(--gris); }
.palier i { width: 28px; height: 28px; border-radius: 50%; background: #F0EEE8; display: flex; align-items: center; justify-content: center; font-style: normal; font-weight: 700; font-size: 13px; flex-shrink: 0; }
.palier.pris { color: var(--encre); font-weight: 600; }
.palier.pris i { background: var(--orange); color: #FFF; }

.question { display: flex; flex-direction: column; gap: 10px; }
.choix { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 600px) { .choix { grid-template-columns: minmax(0, 1fr); } }
.choix button { min-height: 50px; border-radius: 12px; border: 1px solid #C9CDD6; background: #FFF; cursor: pointer; padding: 8px 10px; }
.choix button.juste { border: 2px solid var(--vert); background: var(--vert-pale); color: var(--vert-fonce); font-weight: 600; }
.choix button.faux { border: 2px solid var(--orange); background: var(--orange-pale); color: var(--orange-fonce); }
.retour-q.juste { color: var(--vert-fonce); } .retour-q.faux { color: var(--orange-fonce); }
ol.notions { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }

.encadre-sombre { background: var(--encre); color: #FFF; border-radius: 20px; padding: 20px 22px; display: flex; flex-direction: column; gap: 8px; }
.encadre-sombre .etiquette { color: #F5C28A; text-transform: uppercase; letter-spacing: .06em; }
.encadre-sombre p { font-family: var(--titre); font-size: 21px; line-height: 1.3; }
.alerte { background: var(--orange-pale); border: 1px solid #F0D2B0; border-radius: 16px; padding: 14px 18px; color: #6B3205; }
table.simple { width: 100%; border-collapse: collapse; font-size: 15px; }
table.simple td { padding: 8px 0; border-bottom: 1px solid var(--bord); vertical-align: top; }
.sure { color: var(--vert); font-weight: 600; } .fragile { color: var(--orange); font-weight: 600; } .encours { color: var(--bleu); font-weight: 600; }
.centre { max-width: 460px; margin: 40px auto; width: 100%; }
