/* Coaching CAP : agenda par formatrice, tuiles, élèves et panneau latéral. Tout est limité à #coaching-view. */
#coaching-view { --cap-violet: #7b2d8e; --cap-lavande: #f8f0fb; --cap-ligne: #e6dceb; --cap-ligne-f: #d3c2dc; --cap-muted: #5e5670; --cap-warn: #80500b; --cap-warn-bg: #fff5df; --cap-ok: #1f6b3a; --cap-ok-bg: #e3f2e7; --cap-bad: #8a3030; --cap-ombre: 0 1px 2px #1f1a2b08, 0 3px 10px #1f1a2b08; }
#coaching-view [hidden] { display: none !important; }
#coaching-view .cap-status:empty { display: none; }
#coaching-view .cap-status { margin: 12px 0; padding: 12px 14px; border-radius: 10px; background: var(--cap-lavande); color: #4a1459; font-weight: 600; font-size: 14px; }

#coaching-view .cap-bandeau { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding: 20px 24px; border-radius: 18px; color: #fff; background: linear-gradient(120deg, #7b2d8e, #5b1a6e 70%); box-shadow: var(--cap-ombre); }
#coaching-view .cap-bandeau h2 { font-size: 26px; color: #fff; }
#coaching-view .cap-bandeau p { margin: 4px 0 0; opacity: .88; font-size: 14px; max-width: 62ch; color: #fff; }
#coaching-view .cap-gestes { display: flex; flex-wrap: wrap; gap: 8px; }
#coaching-view .cap-clair { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 10px; border: 1px solid #ffffff55; background: #ffffff1f; color: #fff; font-weight: 600; font-size: 14px; }
#coaching-view .cap-clair:hover { background: #ffffff33; }
#coaching-view .cap-clair svg { width: 18px; height: 18px; }

#coaching-view .cap-tuiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
#coaching-view .cap-tuile { padding: 14px 16px; border: 1px solid var(--cap-ligne); border-radius: 14px; background: #fff; box-shadow: var(--cap-ombre); text-align: left; }
#coaching-view .cap-tuile:hover { border-color: var(--cap-ligne-f); background: #fff; }
#coaching-view .cap-tuile strong { display: block; font: 800 28px/1.1 var(--font-heading, inherit); color: var(--cap-violet); }
#coaching-view .cap-tuile span { font-size: 13px; color: var(--cap-muted); }
#coaching-view .cap-tuile.cap-alerte { background: var(--cap-warn-bg); border-color: #ecd29a; }
#coaching-view .cap-tuile.cap-alerte strong { color: var(--cap-warn); }

#coaching-view .cap-onglets { scrollbar-width: none; display: flex; gap: 4px; padding: 3px; border: 1px solid var(--cap-ligne-f); border-radius: 12px; background: #fff; width: max-content; max-width: 100%; overflow-x: auto; }
#coaching-view .cap-onglets button { min-height: 40px; padding: 0 16px; border: 0; border-radius: 9px; background: none; font-weight: 600; font-size: 14px; color: var(--cap-muted); white-space: nowrap; }
#coaching-view .cap-onglets button[aria-selected="true"] { background: var(--cap-lavande); color: var(--cap-violet); box-shadow: inset 0 0 0 1px var(--cap-violet); }

#coaching-view .cap-barre { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 16px 0 12px; }
#coaching-view .cap-nav { display: flex; align-items: center; gap: 8px; }
#coaching-view .cap-nav h3 { font-size: 17px; min-width: 13ch; text-align: center; }
#coaching-view .cap-nav button { min-width: 40px; min-height: 40px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--cap-ligne-f); background: #fff; }
#coaching-view .cap-legende { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--cap-muted); }
#coaching-view .cap-legende i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 5px; vertical-align: -2px; }
#coaching-view .cap-legende i.cap-l-libre { border: 1px dashed #b9a6c4; }
#coaching-view .cap-legende i.cap-l-exam { background: #fbf1dc; border: 1px solid #b8923f; }

#coaching-view .cap-zone { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: start; }
#coaching-view .cap-zone.ouverte { grid-template-columns: minmax(0, 1fr) 400px; }

#coaching-view .cap-agenda { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--cap-ligne); border-radius: 16px; background: #fff; overflow: hidden; box-shadow: var(--cap-ombre); }
#coaching-view .cap-jour { border-right: 1px solid var(--cap-ligne); min-width: 0; }
#coaching-view .cap-jour:last-child { border-right: 0; }
#coaching-view .cap-jour h3 { padding: 10px 8px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--cap-muted); text-align: center; background: #fdfbfe; border-bottom: 1px solid var(--cap-ligne); }
#coaching-view .cap-jour h3 b { display: block; font-size: 22px; letter-spacing: -.03em; color: #1f1a2b; text-transform: none; }
#coaching-view .cap-jour.cap-auj h3 { background: var(--cap-lavande); }
#coaching-view .cap-jour.cap-auj h3 b { color: var(--cap-violet); }
#coaching-view .cap-jour.cap-passe h3 { opacity: .65; }
#coaching-view .cap-creneaux { display: flex; flex-direction: column; gap: 6px; padding: 8px 6px; min-height: 220px; }
#coaching-view .cap-vide { margin: auto 0; text-align: center; font-size: 12px; color: var(--cap-muted); }
#coaching-view .cap-cr { display: block; width: 100%; padding: 7px 8px; border-radius: 9px; border: 1px dashed var(--cap-ligne-f); border-left: 4px solid var(--c); background: #fff; text-align: left; font-size: 12px; line-height: 1.3; overflow-wrap: anywhere; }
#coaching-view .cap-cr:hover { border-color: var(--cap-violet); border-left-color: var(--c); }
#coaching-view .cap-cr b { display: block; font-size: 12px; }
#coaching-view .cap-cr .cap-q { color: var(--cap-muted); }
#coaching-view .cap-cr.cap-pris { border-style: solid; background: color-mix(in srgb, var(--c) 9%, #fff); }
#coaching-view .cap-cr.cap-exam { box-shadow: inset 0 0 0 1px #b8923f; }
#coaching-view .cap-cr.cap-fini { opacity: .55; }
#coaching-view .cap-cr[aria-current="true"] { outline: 2px solid var(--cap-violet); outline-offset: 1px; }
#coaching-view .cap-tag { display: inline-block; margin-top: 3px; padding: 1px 6px; border-radius: 99px; background: #fbf1dc; color: #7a5a12; font-weight: 600; font-size: 11px; }
#coaching-view .cap-off { padding: 6px; border-radius: 8px; background: repeating-linear-gradient(135deg, #faf7fb 0 6px, #f3eef6 6px 12px); font-size: 11px; color: var(--cap-muted); text-align: center; }

#coaching-view .cap-panneau { position: sticky; top: 90px; border: 1px solid var(--cap-ligne); border-radius: 16px; background: #fff; box-shadow: 0 10px 30px #1f1a2b14; overflow: hidden; }
#coaching-view .cap-panneau header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--cap-ligne); background: #fdfbfe; }
#coaching-view .cap-panneau header h2 { font-size: 18px; }
#coaching-view .cap-panneau header p { margin: 2px 0 0; font-size: 13px; color: var(--cap-muted); overflow-wrap: anywhere; }
#coaching-view .cap-fermer { flex: none; width: 36px; height: 36px; padding: 0; border-radius: 10px; border: 1px solid var(--cap-ligne); background: #fff; font-size: 20px; line-height: 1; }
#coaching-view .cap-corps { display: grid; gap: 14px; padding: 16px 18px; }
#coaching-view .cap-lbl { margin-bottom: 6px; font-size: 13px; font-weight: 600; }
#coaching-view .cap-champ { display: grid; gap: 6px; font-size: 13px; font-weight: 600; }
#coaching-view .cap-champ input, #coaching-view .cap-champ select, #coaching-view .cap-champ textarea { min-height: 44px; padding: 8px 12px; border: 1px solid var(--cap-ligne-f); border-radius: 10px; background: #fff; font-weight: 400; font-size: 14px; width: 100%; }
#coaching-view .cap-deux { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
#coaching-view .cap-choix { display: flex; gap: 6px; }
#coaching-view .cap-choix button { flex: 1; min-height: 42px; padding: 4px 8px; border: 1px solid var(--cap-ligne-f); border-radius: 10px; background: #fff; font-weight: 600; font-size: 13px; }
#coaching-view .cap-choix button[aria-pressed="true"] { border-color: var(--cap-violet); background: var(--cap-lavande); color: var(--cap-violet); }
#coaching-view .cap-apercu { padding: 12px; border-radius: 12px; background: var(--cap-lavande); font-size: 13px; margin: 0; }
#coaching-view .cap-puces { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
#coaching-view .cap-puces span { padding: 2px 8px; border-radius: 99px; background: #fff; border: 1px solid var(--cap-ligne-f); font-weight: 600; font-size: 12px; }
#coaching-view .cap-attention { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--cap-warn-bg); color: var(--cap-warn); font-size: 13px; font-weight: 600; }
#coaching-view .cap-ok { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--cap-ok-bg); color: var(--cap-ok); font-size: 13px; font-weight: 600; }
#coaching-view .cap-infos { display: grid; gap: 8px; margin: 0; font-size: 14px; }
#coaching-view .cap-infos div { display: grid; grid-template-columns: 100px 1fr; gap: 8px; }
#coaching-view .cap-infos dt { margin: 0; color: var(--cap-muted); font-size: 13px; }
#coaching-view .cap-infos dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
#coaching-view .cap-infos dd.cap-texte { font-weight: 400; white-space: pre-line; }
#coaching-view .cap-pied { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--cap-ligne); }
#coaching-view .cap-pied-form { padding: 14px 0 0; }
#coaching-view .cap-btn { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
#coaching-view .cap-danger { color: var(--cap-bad); border-color: #e7c4c4; }
#coaching-view .cap-sous { margin: 0; font-size: 12px; color: var(--cap-muted); }
#coaching-view .cap-mods { display: grid; gap: 4px; margin: 8px 0 0; padding: 10px; border: 1px solid var(--cap-ligne); border-radius: 10px; max-height: 240px; overflow: auto; font-size: 13px; }
#coaching-view .cap-mods label, #coaching-view .cap-coche { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; }
#coaching-view .cap-mods input, #coaching-view .cap-coche input { width: 18px; height: 18px; flex: none; margin-top: 1px; accent-color: var(--cap-violet); }

#coaching-view .cap-outils { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 16px 0 12px; }
#coaching-view #cap-q { flex: 1; min-width: 220px; min-height: 44px; padding: 0 14px; border: 1px solid var(--cap-ligne-f); border-radius: 12px; background: #fff; }
#coaching-view .cap-filtres { display: flex; gap: 6px; flex-wrap: wrap; }
#coaching-view .cap-filtres button { min-height: 38px; padding: 0 12px; border: 1px solid var(--cap-ligne); border-radius: 99px; background: #fff; font-size: 13px; font-weight: 600; }
#coaching-view .cap-filtres button[aria-pressed="true"] { border-color: var(--cap-violet); background: var(--cap-lavande); color: var(--cap-violet); }
#coaching-view .cap-filtres i { font-style: normal; color: var(--cap-muted); font-weight: 500; }
#coaching-view .cap-eleves { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
#coaching-view .cap-eleve { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--cap-ligne); border-radius: 16px; background: #fff; box-shadow: var(--cap-ombre); text-align: left; }
#coaching-view .cap-eleve:hover { border-color: var(--cap-ligne-f); background: #fff; }
#coaching-view .cap-eleve[aria-current="true"] { border-color: var(--cap-violet); box-shadow: 0 0 0 3px #7b2d8e22; }
#coaching-view .cap-haut { display: flex; align-items: center; gap: 10px; min-width: 0; }
#coaching-view .cap-av { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 12px; color: #fff; font-weight: 700; font-size: 14px; }
#coaching-view .cap-nom { font-weight: 700; font-size: 15px; }
#coaching-view .cap-eleve .cap-sous, #coaching-view .cap-bas { font-size: 12px; color: var(--cap-muted); }
#coaching-view .cap-credits { display: flex; gap: 3px; }
#coaching-view .cap-credits i { flex: 1; height: 8px; border-radius: 3px; background: #ece4f1; }
#coaching-view .cap-credits i.u { background: var(--cap-violet); }
#coaching-view .cap-credits i.r { background: #c9a2d6; }
#coaching-view .cap-credits i.x { box-shadow: inset 0 0 0 1px #b8923f; }
#coaching-view .cap-credits i.x.u { background: #b8923f; }
#coaching-view .cap-relance { color: var(--cap-warn); font-weight: 600; }
#coaching-view .cap-modules { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; font-size: 13px; }
#coaching-view .cap-modules li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 8px; border-radius: 8px; background: #fdfbfe; }
#coaching-view .cap-modules li span:last-child { font-size: 12px; font-weight: 600; white-space: nowrap; }
#coaching-view .cap-st-fait { color: var(--cap-ok); }
#coaching-view .cap-st-reserve { color: var(--cap-violet); }
#coaching-view .cap-st-libre { color: var(--cap-muted); }

#coaching-view .cap-reglages { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; align-items: start; }
#coaching-view .cap-bloc { padding: 18px; border: 1px solid var(--cap-ligne); border-radius: 16px; background: #fff; box-shadow: var(--cap-ombre); }
#coaching-view .cap-bloc h3 { font-size: 17px; margin-bottom: 4px; }
#coaching-view .cap-bloc > p { margin: 0 0 12px; font-size: 13px; color: var(--cap-muted); }
#coaching-view .cap-bloc form { display: grid; gap: 8px; margin-top: 10px; }
#coaching-view .cap-bloc textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--cap-ligne-f); border-radius: 10px; font: inherit; }
#coaching-view .cap-bloc summary { cursor: pointer; font-weight: 600; color: var(--cap-violet); min-height: 32px; }
#coaching-view .cap-liste-modules { display: grid; gap: 6px; margin: 0 0 12px; padding: 0; list-style: none; counter-reset: m; }
#coaching-view .cap-liste-modules li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--cap-ligne); border-radius: 10px; font-size: 14px; }
#coaching-view .cap-liste-modules li::before { counter-increment: m; content: counter(m); display: grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 7px; background: var(--cap-lavande); color: var(--cap-violet); font-weight: 700; font-size: 12px; }
#coaching-view .cap-liste-modules li.cap-li-exam::before { content: "★"; background: #fbf1dc; color: #7a5a12; }
#coaching-view .cap-liste-modules li span { flex: 1; }
#coaching-view .cap-liste-modules li small { color: var(--cap-muted); }

@media (max-width: 1100px) {
  #coaching-view .cap-zone.ouverte { grid-template-columns: minmax(0, 1fr); }
  #coaching-view .cap-panneau { position: fixed; inset: auto 0 0 0; max-height: 86vh; overflow: auto; border-radius: 18px 18px 0 0; z-index: 60; }
}
@media (max-width: 760px) {
  #coaching-view .cap-tuiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #coaching-view .cap-bandeau h2 { font-size: 22px; }
  #coaching-view .cap-agenda { grid-template-columns: 1fr; border: 0; background: none; box-shadow: none; gap: 10px; }
  #coaching-view .cap-jour { border: 1px solid var(--cap-ligne); border-radius: 14px; background: #fff; overflow: hidden; }
  #coaching-view .cap-jour.cap-sans { display: none; }
  #coaching-view .cap-jour h3 { display: flex; gap: 8px; align-items: baseline; text-align: left; }
  #coaching-view .cap-jour h3 b { display: inline; font-size: 16px; }
  #coaching-view .cap-creneaux { min-height: 0; }
  #coaching-view .cap-reglages { grid-template-columns: 1fr; }
  #coaching-view .cap-panneau { bottom: 64px; }
}
