/* Atelier VSI appliquée à l'IA, jour 2 : l'utilisation d'un LLM en direct.
   Complète assets/styles.css et assets/vsi.css : les post-it, chips et épingles
   prennent la couleur du groupe (--gc) au lieu de celle du domaine métier. */

.note[data-g], .pin[data-g] { border-top-color: var(--gc); }
.note[data-g] { background: color-mix(in srgb, var(--gc) 9%, var(--note)); }
.pin.mini[data-g] { --c: var(--gc); }
#declPanel[data-g] { border-left: 4px solid var(--gc); }

.vue-chk {
  margin-left: auto; display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; color: var(--ink); cursor: pointer; user-select: none; white-space: nowrap;
}
.vue-chk[hidden] { display: none; }
.vue-chk input { width: 15px; height: 15px; accent-color: var(--accent); cursor: pointer; margin: 0; }

/* =====================================================================
   Onglets 3 et 4 : cas GxP Data Buddy, repris de databuddy.css (Biarritz).
   Les règles sont limitées à #phase3 / #phase4 pour ne pas toucher
   aux onglets 1 et 2 ; les post-it prennent la couleur du groupe (--gc).
   ===================================================================== */
.groupbar .modes { margin-left: auto; }
.groupbar .modes[hidden] { display: none; }
.modes button { padding: 9px 18px; font-size: 13.5px; }
#rPanel[data-g], #notePanel[data-g] { border-left: 4px solid var(--gc); }

/* ---------- onglet 3 : formulaire ---------- */
form.dbform { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.dbform #f-rtitre, .dbform #f-rdescr { grid-column: 1; }
.dbform #f-famille { grid-column: 2; grid-row: 1 / span 3; }
#rForm { grid-template-rows: auto auto 1fr auto; }
@media (max-width: 820px) {
  form.dbform { grid-template-columns: 1fr; }
  .dbform #f-famille { grid-column: 1; grid-row: auto; }
}
/* ---------- onglet 3 : barre de vote ---------- */
.votebar { display: flex; align-items: center; gap: 14px 24px; flex-wrap: wrap; justify-content: space-between; }
.votebar[hidden] { display: none; }
.vote-l h2 { font-size: 17px; }
.vote-l p { margin: 3px 0 0; font-size: 13px; color: var(--ink-soft); }
.vote-r { display: flex; align-items: center; gap: 12px 22px; flex-wrap: wrap; }
.budget { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-soft); }
.budget .slots { display: flex; gap: 5px; }
.budget .slots i { width: 16px; height: 16px; border-radius: 50%; background: var(--dot); box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.budget .slots i.used { background: transparent; border: 1.5px dashed var(--line-strong); box-shadow: none; }
.budget b { font-family: var(--mono); font-weight: 600; color: var(--ink); }
.votebar .chk-in { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; cursor: pointer; }

/* ---------- onglet 3 : mur par origine, 5 colonnes comme le mur des risques du jour 1 ---------- */
#flux { display: grid; gap: 14px; align-items: start; grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1200px) { #flux { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 820px)  { #flux { grid-template-columns: 1fr; } }
#flux .col { min-height: 150px; }
.rnote .kill { opacity: 1; }
.dots { display: flex; gap: 4px; flex-wrap: wrap; margin-left: auto; }
.dotp {
  appearance: none; border: 0; padding: 0; cursor: default;
  width: 20px; height: 20px; border-radius: 50%; background: var(--dot);
  box-shadow: 0 1px 2px rgba(0,0,0,.35), inset 0 -2px 0 rgba(0,0,0,.15);
}
.dotp.mine { outline: 2px solid var(--ink); outline-offset: 1px; }
.vote .rnote { cursor: pointer; }
.vote .rnote:hover { box-shadow: var(--shadow-lift); }
.vote .rnote .kill { display: none; }
.vote.plein .rnote { cursor: default; }
.vote .rnote:has(.dotp.mine) { box-shadow: 0 0 0 2px var(--dot), var(--shadow); }
.vote.plein .rnote:has(.dotp.mine) { cursor: pointer; }

/* ---------- onglet 4 : inspecteur ---------- */
.inspecteur {
  margin: 0 0 16px; padding: 12px 16px; display: flex; align-items: flex-start; gap: 18px;
  border-left: 4px solid var(--accent); background: var(--surface);
  border-radius: var(--r-s); box-shadow: var(--shadow);
}
.inspecteur[hidden] { display: none; }
.inspecteur h2 { font-size: 20px; color: var(--accent-ink); margin-top: 2px; }
.inspecteur .devise { margin: 2px 0 0; font-style: italic; color: var(--ink-soft); }
.insp-txt { flex: 1; min-width: 0; }
.insp-q { margin: 10px 0 2px; padding-left: 20px; display: flex; flex-direction: column; gap: 5px; }
.insp-q li { font-size: 14px; line-height: 1.45; color: var(--ink); font-weight: 600; }
.insp-q li::marker { color: var(--accent); }
.insp-photo {
  flex: none; width: 120px; height: 150px; object-fit: cover; object-position: top;
  border-radius: var(--r-s); border: 1px solid var(--line); box-shadow: var(--shadow);
}
@media (max-width: 620px) { .insp-photo { width: 84px; height: 105px; } }

/* ---------- onglet 4 : saisie des notes ---------- */
form.noteform { grid-template-columns: minmax(0, 7fr) minmax(0, 2fr) minmax(0, 3fr); }
.noteform #f-texte { grid-column: 1; }
.noteform #f-type { grid-column: 2; }
.noteform #f-qinsp { grid-column: 3; }
@media (max-width: 900px) {
  form.noteform { grid-template-columns: 1fr; }
  .noteform #f-type, .noteform #f-qinsp { grid-column: 1; }
}
.noteform textarea { min-height: 112px; }
.qband { display: flex; flex-direction: column; gap: 7px; }
.qband > label {
  display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: start; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--line); border-left: 4px solid var(--accent);
  border-radius: var(--r-s); padding: 7px 10px; font-size: 12.5px; line-height: 1.35;
}
.qband > label:hover, .qband > label:has(input:checked) { background: var(--accent-soft); }
.qband > label:has(input:checked) { border-color: var(--accent); }
.qband input { margin: 2px 0 0; width: 15px; height: 15px; accent-color: var(--accent); cursor: pointer; }
.qband b { font-family: var(--mono); font-size: 11px; margin-right: 4px; }

[data-t="action"]    { --tc: var(--z-play);    --tbg: var(--z-play-bg); }
[data-t="souhait"]   { --tc: var(--z-control); --tbg: var(--z-control-bg); }
[data-t="reflexion"] { --tc: var(--z-drift);   --tbg: var(--z-drift-bg); }
.tband { display: flex; flex-direction: column; gap: 7px; }
.tband > label {
  display: flex; gap: 8px; align-items: center; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--line); border-left: 4px solid var(--tc);
  border-radius: var(--r-s); padding: 8px 10px; font-size: 13px; font-weight: 600;
}
.tband > label:hover, .tband > label:has(input:checked) { background: var(--tbg); }
.tband > label:has(input:checked) { border-color: var(--tc); }
.tband input { margin: 0; width: 15px; height: 15px; accent-color: var(--tc); cursor: pointer; }

/* ---------- onglet 4 : réponses par question ---------- */
.qcols { display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .qcols { grid-template-columns: 1fr; } }
.qcol {
  background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--accent);
  border-radius: var(--r-m); padding: 11px 11px 13px; min-width: 0;
  display: flex; flex-direction: column; gap: 10px;
}
.qcol-head { display: flex; gap: 8px; align-items: baseline; }
.qcol-head .k { font-family: var(--mono); font-size: 11px; font-weight: 600; color: var(--accent-ink); }
.qcol-head h3 { font-family: var(--sans); font-size: 13.5px; font-weight: 600; line-height: 1.35; }
.qcol-head .eyebrow { margin-left: auto; }
.qsec { display: flex; flex-direction: column; gap: 8px; padding-top: 8px; border-top: 1px dashed var(--line-strong); }
.qsec-head { display: flex; align-items: center; gap: 7px; }
.qsec-head i { width: 10px; height: 10px; border-radius: 2px; background: var(--tc); }
.qsec-head span { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--tc); font-weight: 600; }
.qsec-head em { margin-left: auto; font-style: normal; font-family: var(--mono); font-size: 10px; color: var(--ink-faint); }
.qnotes { display: flex; flex-direction: column; gap: 10px; }

/* note colorée par groupe, comme les post-it */
.pnote {
  background: color-mix(in srgb, var(--gc) 13%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--gc) 35%, transparent);
  border-left: 5px solid var(--gc); border-radius: 2px;
  padding: 9px 34px 10px 11px; box-shadow: var(--shadow); position: relative; min-height: 66px;
  font-size: 13.5px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere;
}
.pnote .kill {
  position: absolute; top: 5px; right: 5px; width: 20px; height: 20px;
  border: 0; border-radius: 2px; background: transparent; color: var(--ink-faint);
  font-size: 18px; line-height: 1; cursor: pointer;
}
.pnote .kill:hover { background: var(--z-red-bg); color: var(--z-red); }
.pnote .move {
  position: absolute; right: 5px; width: 20px; height: 17px; border: 0; border-radius: 2px;
  background: transparent; color: var(--ink-faint); font-size: 11px; line-height: 1; cursor: pointer;
}
.pnote .move.up { top: 27px; }
.pnote .move.down { top: 44px; }
.pnote .move:hover { background: var(--surface); color: var(--ink); }
.pnote .move:disabled { opacity: .25; cursor: default; background: transparent; }
