/* Lecture des contraintes — feuille partagée par l'espace débouché et les rapports admin.
   Cf. public/js/contraintes-ui.js pour la convention de couleur. */

.cu-liste {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Grille à colonnes fixes : les pictogrammes, les verdicts et les exigences s'alignent
   d'une ligne à l'autre. C'est cet alignement qui permet de lire en diagonale — une
   disposition en flux libre obligerait à relire chaque ligne. */
.cu-ligne {
    display: grid;
    grid-template-columns: minmax(140px, 190px) 24px 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 5px 8px;
    border-radius: 6px;
    font-size: 13px;
    background: #f9fafb;
}

.cu-cap {
    display: flex;
    align-items: center;
    gap: 7px;
    font-weight: 600;
    color: #111827;
}

.cu-cap i {
    width: 16px;
    text-align: center;
    color: #6b7280;
}

.cu-marqueur {
    text-align: center;
    font-size: 15px;
}

.cu-exigence {
    color: #6b7280;
}

.cu-count {
    display: inline-block;
    margin-left: 4px;
    padding: 1px 7px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #e5e7eb;
    font-size: 11px;
    font-weight: 600;
}

/* La question n'existe que sur l'orange : elle est donc toujours la seule chose
   cliquable de la ligne, ce qui la rend repérable sans avoir à la chercher. */
.cu-question {
    border: none;
    background: none;
    padding: 0;
    font: inherit;
    font-weight: 600;
    color: #b45309;
    text-decoration: underline;
    cursor: pointer;
    white-space: nowrap;
}

.cu-question:hover {
    color: #92400e;
}

/* --- les trois états --- */

.cu-ok .cu-marqueur      { color: #16a34a; }
.cu-inconnu .cu-marqueur { color: #d97706; }
.cu-bloquant .cu-marqueur{ color: #dc2626; }
.cu-sansobjet .cu-marqueur { color: #9ca3af; }

.cu-inconnu  { background: #fffbeb; }
.cu-bloquant { background: #fef2f2; }

/* --- marqueurs compacts (colonnes de tableau) --- */

.cu-compact {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 12px;
}

/* Le verdict se pose en pastille sur le pictogramme : une seule case de tableau porte
   les deux informations — de quoi il s'agit, et si ça passe. */
.cu-compact-marqueur {
    position: absolute;
    right: -3px;
    bottom: -3px;
    font-size: 10px;
    background: #fff;
    border-radius: 50%;
    line-height: 1;
}

.cu-compact.cu-ok       { color: #166534; background: #dcfce7; }
.cu-compact.cu-ok .cu-compact-marqueur       { color: #16a34a; }
.cu-compact.cu-inconnu  { color: #92400e; background: #fef3c7; }
.cu-compact.cu-inconnu .cu-compact-marqueur  { color: #d97706; }
.cu-compact.cu-bloquant { color: #991b1b; background: #fee2e2; }
.cu-compact.cu-bloquant .cu-compact-marqueur { color: #dc2626; }
.cu-compact.cu-sansobjet { opacity: 0.35; }
.cu-compact.cu-sansobjet .cu-compact-marqueur { color: #9ca3af; }

.cu-col {
    width: 46px;
    text-align: center;
}

/* Lu par les lecteurs d'écran, invisible à l'œil : les pictogrammes seuls ne disent rien
   à qui ne les voit pas. */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 640px) {
    .cu-ligne {
        grid-template-columns: 1fr 24px;
        grid-template-areas: "cap marq" "exi exi" "q q";
        gap: 4px 10px;
    }
    .cu-cap      { grid-area: cap; }
    .cu-marqueur { grid-area: marq; }
    .cu-exigence { grid-area: exi; }
    .cu-question { grid-area: q; justify-self: start; }
}


