/* Espace cabinet – rubrique « Demandes » */
.pj-pastille--gris { background: #EEF0F3; color: #5B6574; }
.pj-pastille { white-space: nowrap; }
.csp-tableau .csp-nowrap { white-space: nowrap; }
.csp-compteur.csp-compteur--neutre { background: var(--pj-or-clair); color: var(--pj-or-fonce); }

.csp-liste-courte { list-style: none; margin: 0 0 14px; padding: 0; }
.csp-liste-courte li { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--pj-trait); }
.csp-liste-courte li:last-child { border-bottom: 0; }
.csp-liste-courte a { flex: 1; display: flex; flex-direction: column; padding: 12px 4px; text-decoration: none; min-width: 0; }
.csp-liste-courte a:hover .csp-liste-courte__nom { color: var(--pj-or-fonce); }
.csp-liste-courte__nom { font-weight: 600; color: var(--pj-marine); }
.csp-liste-courte__info { font-size: 14px; color: var(--pj-gris); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.csp-barre-liste { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.csp-onglets { display: flex; gap: 4px; background: #fff; border: 1px solid var(--pj-trait); border-radius: 10px; padding: 4px; flex-wrap: wrap; }
.csp-onglets a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 7px; text-decoration: none; color: var(--pj-gris); font-weight: 600; font-size: 14.5px; }
.csp-onglets a:hover { color: var(--pj-marine); background: var(--pj-fond-app); }
.csp-onglets a.est-actif { background: var(--pj-marine); color: #fff; }
.csp-compteur { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--pj-orange); color: #fff; font-size: 12.5px; display: inline-grid; place-items: center; }
.csp-onglets a.est-actif .csp-compteur { background: var(--pj-or); color: var(--pj-marine); }
.csp-cherche { display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 14px; border: 1.5px solid #D5DAE2; border-radius: 10px; background: #fff; color: var(--pj-gris-clair); min-width: 280px; }
.csp-cherche:focus-within { border-color: var(--pj-or); }
.csp-cherche input { border: 0; outline: none; flex: 1; font: 15px var(--pj-sans); background: transparent; min-width: 0; }

.pj-panneau.csp-panneau-liste { padding: 6px 8px; overflow-x: auto; }
.csp-tableau td small { display: block; color: var(--pj-gris-clair); font-size: 12.5px; }
.csp-tableau .csp-ref { font-weight: 700; text-decoration: none; white-space: nowrap; }
.csp-tableau .csp-recu { white-space: nowrap; }
.csp-ligne { cursor: pointer; }
.csp-col-ouvrir { text-align: right; }
.csp-btn-petit { min-height: 36px; padding: 6px 14px; font-size: 14px; }
.csp-trombone { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: var(--pj-or-clair); color: var(--pj-or-fonce); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.csp-discret { color: var(--pj-gris-clair); font-size: 14px; }
.csp-total { color: var(--pj-gris-clair); font-size: 13.5px; margin: 10px 4px 0; }
.csp-pagination { display: flex; gap: 6px; margin-top: 14px; }
.csp-pagination a { min-width: 40px; height: 40px; display: grid; place-items: center; border: 1.5px solid var(--pj-trait); border-radius: 8px; text-decoration: none; font-weight: 600; background: #fff; }
.csp-pagination a.est-actif { background: var(--pj-marine); color: #fff; border-color: var(--pj-marine); }

/* Fiche */
.csp-retour { margin: -8px 0 14px; }
.csp-retour a { text-decoration: none; font-weight: 600; font-size: 14.5px; }
.csp-fiche-tete { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; border-left: 4px solid var(--pj-or); }
.csp-fiche-tete h2 { font-size: 30px; margin: 2px 0 8px; }
.csp-fiche-tete__ref { margin: 0; color: var(--pj-gris-clair); font-size: 14px; }
.csp-fiche-tete__contacts { display: flex; gap: 8px; flex-wrap: wrap; }

.csp-fiche { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 18px; align-items: start; }
.csp-fiche__actions { position: sticky; top: 92px; }
.csp-infos { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 24px; margin: 0; }
.csp-infos div { min-width: 0; }
.csp-infos dt { font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--pj-gris-clair); margin-bottom: 2px; }
.csp-infos dd { margin: 0; color: var(--pj-encre); overflow-wrap: anywhere; }
.csp-infos div:first-child { grid-column: 1 / -1; padding: 14px 16px; background: var(--pj-or-clair); border-radius: 8px; }
.csp-infos div:first-child dd { font-size: 17px; color: var(--pj-marine); }
.csp-message { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--pj-trait); }
.csp-message span { font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--pj-gris-clair); }
.csp-message p { margin: 6px 0 0; white-space: normal; }

.csp-pieces-liste { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 8px; }
.csp-pieces-liste li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--pj-trait); border-radius: 8px; }
.csp-pieces-liste__ico { width: 38px; height: 38px; border-radius: 8px; background: var(--pj-or-clair); color: var(--pj-or-fonce); display: grid; place-items: center; flex: none; }
.csp-pieces-liste__nom { flex: 1; min-width: 0; overflow-wrap: anywhere; font-weight: 500; }
.csp-pieces-liste__nom small { display: block; color: var(--pj-gris-clair); font-weight: 400; }

.csp-historique { list-style: none; margin: 0 0 18px; padding: 0 0 0 18px; border-left: 2px solid var(--pj-trait); display: grid; gap: 12px; }
.csp-historique li { position: relative; display: flex; flex-direction: column; font-size: 14.5px; }
.csp-historique li::before { content: ""; position: absolute; left: -24px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid var(--pj-or); }
.csp-historique time { font-size: 12.5px; color: var(--pj-gris-clair); }
.csp-historique em { color: var(--pj-gris); font-style: normal; }
.csp-note { display: grid; gap: 10px; justify-items: start; padding-top: 14px; border-top: 1px solid var(--pj-trait); }
.csp-note .pj-champ { width: 100%; }

.csp-action form { display: grid; gap: 14px; }
.csp-action--principale { border-top: 3px solid var(--pj-or); }
.csp-ligne-2 { grid-template-columns: 1fr 1fr !important; gap: 12px !important; }
.csp-conflit { padding: 12px; border-radius: 8px; background: #FCF0E3; color: #6B4210 !important; }
.csp-btn-plein { width: 100%; }
.csp-actions-liste { display: grid; gap: 12px; }
.csp-actions-liste form { gap: 10px; }
.pj-btn.csp-btn-danger { background: #fff; border-color: var(--pj-rouge); color: var(--pj-rouge); }
.pj-btn.csp-btn-danger:hover { background: var(--pj-rouge); color: #fff; }
.pj-champ small { font-weight: 400; color: var(--pj-gris-clair); }

@media (max-width: 1100px) {
	.csp-fiche { grid-template-columns: 1fr; }
	.csp-fiche__actions { position: static; order: -1; }
}
@media (max-width: 640px) {
	.csp-cherche { min-width: 0; width: 100%; }
	.csp-onglets { width: 100%; }
	.csp-onglets a { flex: 1 1 45%; justify-content: center; padding: 9px 8px; font-size: 13.5px; }
	.csp-infos { grid-template-columns: 1fr; }
	.csp-fiche-tete h2 { font-size: 25px; }
	.csp-fiche-tete__contacts .pj-btn { flex: 1; }
	/* Le tableau devient une pile de fiches */
	.pj-panneau.csp-panneau-liste { padding: 0; overflow: visible; background: transparent; border: 0; }
	.csp-tableau, .csp-tableau tbody { display: block; width: 100%; }
	.csp-tableau thead { display: none; }
	.csp-tableau tr { display: block; background: #fff; border: 1px solid var(--pj-trait); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
	.csp-tableau tr:hover td { background: transparent; }
	.csp-tableau td { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 6px 0; border: 0; text-align: right; white-space: normal !important; min-width: 0; }
	.csp-tableau td::before { content: attr(data-label); flex: none; text-align: left; font-weight: 600; color: var(--pj-gris-clair); font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; }
	.csp-tableau td > * { min-width: 0; overflow-wrap: anywhere; }
	.csp-tableau td small { display: block; }
	.csp-tableau td:first-child { flex-direction: column; align-items: flex-start; text-align: left; padding-bottom: 10px; margin-bottom: 4px; border-bottom: 1px solid var(--pj-trait); }
	.csp-tableau td:first-child::before { content: none; }
	.csp-tableau td.csp-col-ouvrir { padding-top: 10px; }
	.csp-tableau td.csp-col-ouvrir::before { content: none; }
	.csp-tableau td.csp-col-ouvrir .pj-btn { width: 100%; }
}
