/* @portee: admin */
/* =========================================================================
   Évaluations v4 (agent 6) — grilles pondérées, synthèses des jurys, onglets — préfixe ev6-
   ========================================================================= */

/* Modales dont le contenu est enveloppé (x-data) : en-tête et pied fixes, corps qui défile */
.modal > .ev6-modal-wrap, .modal > .cmp6-ajout, .modal > .ev6-modal-wrap > form, .modal > form[x-data] { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.modal > .ev6-modal-wrap > form > .modal-body, .modal > .cmp6-ajout > .modal-body, .modal > form[x-data] > .modal-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; }

/* Formulaire d'évaluation */
.ev6-grille-field .select, .ev6-grille-ro { max-width: 100%; }
.ev6-grille-ro { display: flex; align-items: center; gap: .4rem; background: var(--bg-sunken); color: var(--text-2); min-width: 0; }
.ev6-poids { display: inline-block; margin-left: .25rem; padding: 0 .35rem; border-radius: var(--r-pill); background: var(--bg-inverse); color: var(--text-inverse); font-size: .68rem; font-weight: 800; vertical-align: 1px; }
.ev6-scale { display: flex; align-items: center; gap: .18rem; flex-wrap: wrap; }
.ev6-scale button { width: 1.75rem; height: 1.75rem; border-radius: 7px; border: 1px solid var(--line-strong); background: var(--bg-elev); color: var(--text-2); font: inherit; font-size: .78rem; font-weight: 750; cursor: pointer; transition: all .12s var(--ease); }
.ev6-scale button:hover { border-color: var(--brand); color: var(--text); }
.ev6-scale button.is-on { background: color-mix(in srgb, var(--brand) 22%, var(--bg-elev)); border-color: var(--brand-line); color: var(--brand-ink); }
.ev6-scale button.is-cur { background: var(--brand); border-color: var(--brand); color: #000; }
.ev6-scale button:focus-visible { outline: none; box-shadow: var(--ring); }
.ev6-scale .rec-stars-val { flex-basis: 100%; margin-left: 0; }
.ev6-jury { display: flex; align-items: center; gap: .35rem; }
.rec-crit-list.is-loading { opacity: .5; pointer-events: none; }
.ev6-notice { padding: .6rem .8rem; }

/* Écran des évaluations */
.ev6-ecart { margin-left: .3rem; }
.ev6-row-alerte > td:first-child { box-shadow: inset 3px 0 0 var(--danger); }
.ev6-discutes { display: flex; flex-wrap: wrap; gap: .25rem; }
.ev6-discutes .chip { padding: .12rem .5rem; font-size: .72rem; }
.ev6-histo-jury.is-alerte { border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); background: color-mix(in srgb, var(--danger-soft) 55%, var(--bg-elev)); }
.ev6-tl-grille { background: var(--bg-inverse); color: var(--text-inverse); }
.ev6-tl-grille b { background: var(--brand); color: #000; }

/* Par offre */
.ev6-offres { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: .9rem; }
.ev6-offre { padding: .9rem 1rem; display: flex; flex-direction: column; gap: .7rem; }
.ev6-offre-head { display: flex; align-items: flex-start; gap: .6rem; }
.ev6-offre-head .grow { display: flex; flex-direction: column; }
.ev6-clip2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--text); }
.ev6-offre-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.ev6-offre-kpis > div { display: flex; flex-direction: column; padding: .5rem .6rem; border-radius: var(--r-sm); background: var(--bg-sunken); }
.ev6-offre-kpis b { font-size: 1.15rem; font-weight: 850; }
.ev6-classement { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .3rem; }
.ev6-classement li { display: flex; align-items: center; gap: .5rem; padding: .35rem .45rem; border-radius: var(--r-sm); }
.ev6-classement li:first-child { background: var(--brand-soft); }
.ev6-classement .grow { min-width: 0; color: var(--text); }
.ev6-rang { width: 1.4rem; height: 1.4rem; border-radius: 50%; display: grid; place-items: center; background: var(--bg-inverse); color: var(--text-inverse); font-size: .72rem; font-weight: 850; flex-shrink: 0; }
.ev6-classement li:first-child .ev6-rang { background: var(--brand); color: #000; }
.ev6-offre-foot { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: auto; }

/* Grilles & réglages */
.ev6-grilles-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); gap: 1rem; align-items: start; }
.ev6-grille { padding: .85rem 1rem; display: flex; flex-direction: column; gap: .6rem; }
.ev6-grille.is-off { opacity: .62; }
.ev6-grille.is-commune { border-style: dashed; }
.ev6-grille-head { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }
.ev6-grille-head > .grow { min-width: 180px; }
.ev6-grille-icon { background: var(--brand-soft); color: var(--brand-ink); }
.ev6-weights { display: flex; flex-wrap: wrap; gap: .35rem; }
.ev6-weight { position: relative; display: inline-flex; align-items: center; gap: .45rem; max-width: 100%; padding: .22rem .55rem; border-radius: var(--r-pill); border: 1px solid var(--line); font-size: .76rem; overflow: hidden; isolation: isolate; }
.ev6-weight::before { content: ""; position: absolute; inset: 0; width: var(--w, 0%); background: var(--brand-soft); z-index: -1; }
.ev6-weight .truncate { max-width: 220px; color: var(--text-2); font-weight: 600; }
.ev6-weight b { font-size: .7rem; color: var(--brand-ink); white-space: nowrap; }
.ev6-reglages { position: sticky; top: 0; }
.ev6-reglages fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.ev6-reglages fieldset:disabled { opacity: .65; }

/* Éditeur de grille */
.ev6-crit-edit { display: flex; flex-direction: column; gap: .45rem; }
.ev6-crit-row { display: grid; grid-template-columns: auto minmax(0, 1fr) 7.5rem auto; gap: .5rem; align-items: start; padding: .5rem; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-elev); }
.ev6-crit-row:hover { border-color: var(--line-strong); }
.ev6-crit-move { display: flex; flex-direction: column; }
.ev6-crit-lib { display: flex; flex-direction: column; gap: .3rem; margin: 0; }
.ev6-crit-lib .input:first-child { font-weight: 650; }
.ev6-crit-aide { font-size: .8rem; }
.ev6-crit-poids { display: flex; flex-direction: column; gap: .2rem; margin: 0; }
.ev6-crit-poids .xsmall { text-align: right; }

@media (max-width: 1100px) { .ev6-grilles-layout { grid-template-columns: 1fr; } .ev6-reglages { position: static; } }
@media (max-width: 640px) {
  .ev6-crit-row { grid-template-columns: minmax(0, 1fr) 5.5rem; }
  .ev6-crit-move { display: none; }
  .ev6-crit-row > .btn { grid-column: 2; justify-self: end; }
  .ev6-offre-kpis b { font-size: 1rem; }
}
.ev6-seuils-row { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.ev6-seuils-row label { display: flex; flex-direction: column; gap: .15rem; }
.ev6-jurys td:nth-child(2) { min-width: 8.5rem; }
@media (max-width: 640px) { .ev6-scale { gap: .12rem; } .ev6-scale button { width: 1.58rem; height: 1.7rem; font-size: .74rem; } }
