/* Salle de cours Guitarisation — gros textes, gros boutons, peu de choix à l'écran. */
:root {
  --fond: #f7f4ee; --carte: #ffffff; --texte: #1f2328; --doux: #5f6670; --trait: #e3ded4;
  --accent: #c4501a; --accent-fonce: #9e3f12; --vert: #23874c; --vert-clair: #e5f4ea; --orange: #b85c00; --orange-clair: #fdf0e2;
  --rouge: #c0392b; --rouge-clair: #fbe9e7; --bulle: #f1ede5; --ombre: 0 2px 10px rgba(0,0,0,.07);
  --video: #15181c;
}
@media (prefers-color-scheme: dark) {
  :root { --fond: #16181b; --carte: #202328; --texte: #eceae6; --doux: #a4a9b0; --trait: #34383e;
    --accent: #e8743b; --accent-fonce: #f08a55; --vert: #4cc27c; --vert-clair: #1d3326; --orange: #f0a04b; --orange-clair: #3a2a17;
    --rouge: #ff7b6b; --rouge-clair: #3b1f1c; --bulle: #2b2f35; --ombre: none; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; touch-action: manipulation; }
* { -webkit-tap-highlight-color: transparent; }
body { margin: 0; background: var(--fond); color: var(--texte); font: 18px/1.5 -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
.page { max-width: 640px; margin: 0 auto; padding: 20px 16px 48px; }
h1 { font-size: 28px; line-height: 1.25; margin: 8px 0 12px; }
h2 { font-size: 22px; margin: 0 0 10px; }
p { margin: 0 0 14px; }
.doux { color: var(--doux); }
.petit { font-size: 15px; }
.carte { background: var(--carte); border: 1px solid var(--trait); border-radius: 18px; padding: 20px; margin: 14px 0; box-shadow: var(--ombre); }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--accent); font-size: 17px; }
.logo span { font-size: 26px; }
button, .bouton { font: inherit; font-weight: 600; border: 0; border-radius: 14px; min-height: 56px; padding: 12px 22px; cursor: pointer;
  background: var(--accent); color: #fff; display: inline-flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; }
button:hover { background: var(--accent-fonce); }
button:disabled { opacity: .5; cursor: default; }
button.second { background: var(--bulle); color: var(--texte); }
button.second:hover { background: var(--trait); }
button.vert { background: var(--vert); }
button.lien { background: none; color: var(--accent); min-height: 44px; padding: 6px 4px; text-decoration: underline; }
.large { width: 100%; }
.pile { display: flex; flex-direction: column; gap: 12px; }
.ligne { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.badge { display: inline-block; font-size: 14px; font-weight: 600; padding: 3px 10px; border-radius: 99px; background: var(--bulle); }
.badge.ok { background: var(--vert-clair); color: var(--vert); }
.badge.attention { background: var(--orange-clair); color: var(--orange); }
.badge.non { background: var(--rouge-clair); color: var(--rouge); }
.cache { display: none !important; }
label.case { display: flex; gap: 12px; align-items: center; font-size: 17px; padding: 8px 0; cursor: pointer; }
label.case input { width: 26px; height: 26px; accent-color: var(--accent); }
select, input[type=text], textarea { font: inherit; font-size: 17px; width: 100%; padding: 12px; border-radius: 12px; border: 1px solid var(--trait); background: var(--carte); color: var(--texte); }
.illustration { width: 100%; max-width: 360px; height: auto; border-radius: 12px; border: 1px solid var(--trait); background: #fff; display: block; margin: 8px 0; }

/* Test son */
.compte { font-size: 64px; font-weight: 800; text-align: center; color: var(--accent); margin: 6px 0; }
.vumetre { height: 26px; border-radius: 13px; background: var(--bulle); overflow: hidden; margin: 12px 0; }
.vumetre div { height: 100%; width: 0; background: linear-gradient(90deg, var(--vert), #9bd35a 70%, #f0b23c 88%, var(--rouge)); transition: width .08s; }
.resultat { font-size: 26px; font-weight: 800; margin-bottom: 8px; }
.probleme { border-left: 5px solid var(--orange); background: var(--orange-clair); border-radius: 10px; padding: 12px 14px; margin: 10px 0; }
.probleme b { display: block; }
.etapes { padding-left: 22px; margin: 6px 0 12px; } .etapes li { margin: 6px 0; }

/* Assistant */
.voile { position: fixed; inset: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; background: rgba(0,0,0,.45); z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.feuille { color: var(--texte); overflow-y: auto; background: var(--carte); width: 100%; max-width: 640px; height: 92vh; height: 92dvh; border-radius: 20px 20px 0 0; display: flex; flex-direction: column; }
.feuille-tete { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--trait); font-weight: 700; }
.feuille-tete button { min-height: 44px; padding: 6px 14px; }
.fil { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 88%; padding: 12px 14px; border-radius: 16px; white-space: pre-wrap; word-wrap: break-word; }
.msg.moi { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.msg.lui { align-self: flex-start; background: var(--bulle); border-bottom-left-radius: 4px; }
.msg img.photo { max-width: 100%; border-radius: 10px; display: block; margin-top: 6px; }
.msg button { margin-top: 8px; min-height: 48px; }
.saisie { border-top: 1px solid var(--trait); padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); display: flex; gap: 8px; align-items: flex-end; }
.saisie textarea { resize: none; height: 52px; max-height: 120px; }
.saisie button { min-height: 52px; padding: 8px 14px; flex: none; }
.ecrit { color: var(--doux); font-style: italic; }

/* Salle : la personne en face en plein écran, boutons par-dessus (cachés pendant la séance) */
body.salle { background: var(--video); color: #f1f1f1; overflow: hidden; }
.scene { position: fixed; inset: 0; }
.ecran { position: absolute; inset: 0; background: #000; }
.cadre { background: #000; }
.cadre video { width: 100%; height: 100%; display: block; object-fit: contain; background: #000; }
.cadre video.miroir { transform: scaleX(-1); }
.cadre.grand { position: absolute; inset: 0; z-index: 1; }
.cadre.petit { position: absolute; z-index: 3; width: 24%; max-width: 200px; aspect-ratio: var(--ratio, 4 / 3); border-radius: 12px; overflow: hidden;
  border: 2px solid rgba(255,255,255,.7); box-shadow: 0 4px 16px rgba(0,0,0,.5); touch-action: none; cursor: grab; transition: width .2s; }
.cadre.petit video { object-fit: cover; }
.cadre.petit.reduite { width: 12%; max-width: 96px; }
@media (orientation: portrait) { .cadre.petit { width: 30%; } .cadre.petit.reduite { width: 16%; } }
.ecran[data-coin=hd] .cadre.petit { top: 12px; right: 12px; }
.ecran[data-coin=hg] .cadre.petit { top: 12px; left: 12px; }
.ecran[data-coin=bd] .cadre.petit { bottom: 104px; right: 12px; }
.ecran[data-coin=bg] .cadre.petit { bottom: 104px; left: 12px; }
.scene.masque .ecran[data-coin^=b] .cadre.petit { bottom: 12px; }
.ecran.galerie { display: flex; gap: 4px; padding-bottom: 96px; }
.scene.masque .ecran.galerie { padding-bottom: 0; }
@media (orientation: portrait) { .ecran.galerie { flex-direction: column; } }
.ecran.galerie .cadre { position: relative; inset: auto; flex: 1; min-width: 0; min-height: 0; width: auto; max-width: none; aspect-ratio: auto; border: 0; border-radius: 0; box-shadow: none; transform: none !important; }
.ecran.galerie .cadre video { object-fit: contain; }
.vu-direct { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: rgba(0,0,0,.45); }
.vu-direct div { height: 100%; width: 0; background: #3ad07a; }
.bandeau { position: absolute; z-index: 4; left: 12px; top: 12px; right: 40%; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; pointer-events: none; }
.coin-plein-ecran { position: absolute; z-index: 5; left: 12px; top: 12px; width: 44px; min-width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 12px; background: rgba(0,0,0,.6); color: #fff; transition: opacity .25s; }
.scene.masque .coin-plein-ecran { opacity: 0; pointer-events: none; }
.ecran.avec-coin .bandeau { left: 68px; }
.actions-reglage { display: flex; gap: 8px; flex-wrap: wrap; border-top: 1px solid var(--trait); padding-top: 14px; margin-top: 4px; }
.actions-reglage button { flex: 1 1 140px; min-height: 44px; padding: 6px 12px; font-size: 15px; gap: 8px; }
.pastille { white-space: nowrap; background: rgba(0,0,0,.6); color: #fff; padding: 6px 12px; border-radius: 99px; font-size: 15px; font-weight: 600; }
.message-central { white-space: pre-line; position: absolute; z-index: 2; inset: 0 0 96px; display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px; font-size: 22px; line-height: 1.4; pointer-events: none; text-shadow: 0 1px 6px rgba(0,0,0,.8); }
.commandes { position: absolute; z-index: 5; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; gap: 8px; padding: 14px 10px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(transparent, rgba(0,0,0,.75) 35%); flex-wrap: wrap; transition: transform .25s, opacity .25s; }
.scene.masque .commandes { transform: translateY(100%); opacity: 0; pointer-events: none; }
.commandes button { flex-direction: column; gap: 3px; min-width: 70px; min-height: 64px; padding: 8px 10px; font-size: 12.5px; font-weight: 500; background: rgba(42,46,53,.92); color: #fff; border-radius: 16px; }
.commandes button:hover { background: #3a3f47; }
.commandes button.coupe { background: #6b2a24; }
.commandes button.rouge { background: #c0392b; }
.commandes button.actif { background: #f1f1f1; color: #1f2328; }
.attente-prof { position: absolute; z-index: 4; left: 12px; bottom: 104px; display: flex; flex-direction: column; gap: 8px; max-width: calc(100% - 24px); }
.attente-prof .carte { margin: 0; padding: 12px 14px; color: var(--texte); }
.qualite { width: 12px; height: 12px; border-radius: 50%; display: inline-block; margin-right: 6px; background: #888; }
.qualite.vert { background: #3ad07a; } .qualite.orange { background: #f0a04b; } .qualite.rouge { background: #ff5b4b; }
.son-bloque { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); z-index: 6; }
.volume-eleve { position: absolute; z-index: 4; right: 12px; bottom: 104px; background: rgba(0,0,0,.65); color: #fff; padding: 10px 14px; border-radius: 14px; display: flex; align-items: center; gap: 10px; font-size: 15px; }
.scene.masque .volume-eleve { display: none; }
.volume-eleve input { width: 140px; accent-color: #3ad07a; }
.conseil-paysage { position: absolute; z-index: 6; left: 12px; right: calc(30% + 24px); top: 56px; font-size: 15px !important; background: #f1f1f1; color: #1f2328; border-radius: 14px; padding: 12px 44px 12px 14px; display: flex; gap: 12px; align-items: center; font-size: 16px; font-weight: 600; box-shadow: 0 4px 16px rgba(0,0,0,.4); }
.conseil-paysage .fermer { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); min-height: 36px; padding: 0 10px; background: none; color: #1f2328; font-size: 26px; }

/* Prof */
.eleve-ligne { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--trait); flex-wrap: wrap; }
.eleve-ligne:last-child { border-bottom: 0; }
.eleve-ligne .nom { font-weight: 700; }
.eleve-ligne button { min-height: 44px; padding: 6px 14px; font-size: 15px; }
.onglets { display: flex; gap: 8px; margin: 10px 0; }
.onglets button { flex: 1; }
.onglets button.actif { background: var(--texte); color: var(--fond); }
.toast { position: fixed; left: 50%; bottom: 110px; transform: translateX(-50%); background: #1f2328; color: #fff; padding: 12px 18px; border-radius: 12px; z-index: 100; font-size: 16px; max-width: 90%; text-align: center; }
.point { display: inline-block; width: 14px; height: 14px; border-radius: 50%; margin-right: 10px; vertical-align: middle; background: var(--doux); }
.point.ok { background: var(--vert); } .point.attention { background: var(--orange); }
.feuille { color: var(--texte); }
.commandes button svg { display: block; }
.lecteur { min-height: 72px; font-size: 22px; }
.progression { height: 10px; border-radius: 5px; background: var(--bulle); overflow: hidden; }
.progression div { height: 100%; background: var(--accent); transition: width .2s linear; }

.conseil-paysage svg { flex: none; }
.ligne-hp { display: flex; gap: 8px; }
.ligne-hp select { flex: 1; min-width: 0; }
.ligne-hp button { min-height: 44px; padding: 6px 12px; font-size: 15px; gap: 6px; flex: none; }

.pastille.cliquable { pointer-events: auto; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; min-height: 0; border: 0; font: inherit; font-size: 15px; font-weight: 600; }
.pastille.cliquable:hover { background: rgba(0,0,0,.8); }
.reglages-eleve h3 { margin: 10px 0 0; font-size: 16px; }
.reglages-eleve .actions-reglage { border-top: 0; padding-top: 0; margin-top: 0; }
.actions-reglage button.actif { background: var(--accent, #c4561d); color: #fff; }
.actions-reglage select { flex: 1 1 180px; }
.demande-prof { position: absolute; z-index: 7; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(92%, 420px); background: var(--carte, #fff); color: var(--texte, #1f2328); border-radius: 18px; padding: 20px; box-shadow: 0 8px 30px rgba(0,0,0,.5); display: flex; flex-direction: column; gap: 10px; text-align: center; }
.demande-prof p { margin: 0; font-size: 19px; font-weight: 600; }
.attention-volume { color: var(--orange); font-weight: 600; margin: 0; }
