/* Portail CRM 9355 — reprend la maquette : IBM Plex Sans / Source Serif 4, fond ivoire,
   une couleur par entité, étiquettes firme / affaires / personnel. */
:root {
  --fond: #f6f4ef; --carte: #ffffff; --encre: #1c1b19; --doux: #5c584f; --moyen: #3d3a34;
  --trait: #e2ded4; --trait-leger: #efece5; --creux: #ebe7dd;
  --finexit: #1f4e79; --numeriz: #b3541e; --andau: #6a3d8f; --e9355: #3d3a34;
  --affaires-fond: #e3ecf5; --affaires: #173d60; --perso-fond: #f7e3d6; --perso: #7a3410;
  --erreur: #a3281f; --succes: #2e6b3a;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: 'IBM Plex Sans', system-ui, sans-serif; color: var(--encre); background: var(--fond); font-size: 15px; }
a { color: var(--finexit); text-decoration: none; }
a:hover { color: #123a5c; text-decoration: underline; }
h1 { font-family: 'Source Serif 4', Georgia, serif; font-weight: 600; font-size: 30px; margin: 0; }
h2 { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--doux); margin: 0; }
.cadre { display: flex; min-height: 100vh; }
nav.lat { width: 232px; flex-shrink: 0; background: var(--encre); color: var(--fond); padding: 28px 20px; display: flex; flex-direction: column; gap: 24px; }
nav.lat .marque { font-family: 'Source Serif 4', Georgia, serif; font-size: 22px; font-weight: 600; }
nav.lat .sous { font-size: 12px; color: #b9b5aa; }
nav.lat a { display: block; color: #e9e6de; padding: 10px 12px; border-radius: 8px; }
nav.lat a:hover { background: #2e2c29; text-decoration: none; }
nav.lat a.actif { background: var(--fond); color: var(--encre); font-weight: 600; }
nav.lat .bas { margin-top: auto; display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: #cfcabe; }
nav.lat select, nav.lat button { width: 100%; }
main { flex-grow: 1; padding: 28px 40px 60px; display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.entete { display: flex; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.entete .titre { flex-grow: 1; display: flex; flex-direction: column; gap: 6px; }
.fil { font-size: 14px; color: var(--doux); display: flex; gap: 8px; }
.carte { background: var(--carte); border: 1px solid var(--trait); border-radius: 12px; padding: 20px; }
.grille { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g5 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.dossier { display: flex; flex-direction: column; gap: 8px; min-height: 160px; color: var(--encre); }
.dossier:hover { border-color: var(--doux); text-decoration: none; }
.dossier .nom { font-family: 'Source Serif 4', Georgia, serif; font-size: 19px; font-weight: 600; line-height: 1.2; }
.dossier .pied { margin-top: auto; font-size: 13px; display: flex; gap: 12px; }
.pastille { display: inline-block; width: 10px; height: 10px; border-radius: 5px; vertical-align: middle; }
.ent { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--doux); display: inline-flex; gap: 6px; align-items: center; }
.chiffre { font-size: 28px; font-weight: 600; }
.legende { font-size: 13px; color: var(--doux); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 10px; border: 1px solid #cfcabe; background: var(--carte); color: var(--encre); font: inherit; font-size: 15px; cursor: pointer; text-decoration: none; }
.btn:hover { border-color: var(--doux); text-decoration: none; }
.btn.plein { background: var(--encre); color: var(--fond); border-color: var(--encre); font-weight: 600; }
.btn.petit { min-height: 34px; padding: 0 12px; font-size: 14px; border-radius: 8px; }
.onglets { display: inline-flex; gap: 4px; padding: 4px; background: var(--creux); border-radius: 10px; }
.onglets a { padding: 8px 14px; border-radius: 8px; color: var(--moyen); }
.onglets a.actif { background: var(--encre); color: var(--fond); font-weight: 600; text-decoration: none; }
.defile { overflow-x: auto; border-radius: 12px; }
table { width: 100%; border-collapse: collapse; background: var(--carte); border: 1px solid var(--trait); border-radius: 12px; overflow: hidden; font-size: 14px; }
th { text-align: left; padding: 10px 14px; background: var(--trait-leger); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--doux); white-space: nowrap; }
td { padding: 10px 14px; border-top: 1px solid var(--trait-leger); vertical-align: top; }
tr.exclue td { color: #6b675e; background: #f4f3f0; }
tr.exclue td a { color: #4d4a44; }
.tronque { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.etiquette { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 12px; font-size: 12px; font-weight: 600; background: var(--creux); color: var(--moyen); white-space: nowrap; }
.etiquette.affaires { background: var(--affaires-fond); color: var(--affaires); }
.etiquette.personnel { background: var(--perso-fond); color: var(--perso); }
.prov { font-size: 12px; color: var(--doux); }
.ligne { padding: 10px 0; border-bottom: 1px solid var(--trait-leger); display: flex; flex-direction: column; gap: 3px; }
.ligne:last-child { border-bottom: 0; }
.journal-item { padding: 12px; border-radius: 10px; background: var(--fond); display: flex; flex-direction: column; gap: 6px; }
.journal-item.personnel { background: #fbf1ea; }
.meta { font-size: 12px; color: var(--moyen); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
form.pile { display: flex; flex-direction: column; gap: 10px; }
form.rangee { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
label { font-size: 13px; color: var(--moyen); display: flex; flex-direction: column; gap: 4px; }
label.case { flex-direction: row; align-items: center; gap: 6px; }
input[type=text], input[type=search], input[type=date], input[type=number], input[type=email], input[type=password], select, textarea {
  font: inherit; font-size: 15px; color: var(--encre); background: var(--carte); border: 1px solid #cfcabe; border-radius: 8px; padding: 9px 12px; min-height: 42px; }
textarea { min-height: 64px; resize: vertical; }
.recherche input { width: 420px; }
.flash { padding: 12px 16px; border-radius: 10px; font-size: 14px; }
.flash.erreur { background: #f8e1de; color: var(--erreur); }
.flash.succes { background: #e1efe3; color: var(--succes); }
.flash.info { background: var(--affaires-fond); color: var(--affaires); }
.question { border: 2px solid var(--perso); background: #fdf6f1; }
.retard { color: var(--erreur); font-weight: 600; }
.comme { padding: 10px 14px; border-radius: 10px; background: var(--perso-fond); color: var(--perso); font-size: 14px; font-weight: 600; }
details summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.connexion { max-width: 420px; margin: 12vh auto; }
.vide { color: var(--doux); font-style: italic; }

/* Session 3c : facettes, puces, arbre des listes, alerte « ne pas solliciter » */
.facettes { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.facettes > .legende { width: 72px; flex-shrink: 0; }
.puce { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border-radius: 16px; border: 1px solid #cfcabe; background: var(--carte); color: var(--encre); font-size: 13px; }
.puce:hover { border-color: var(--doux); text-decoration: none; }
.puce.actif { background: var(--encre); color: var(--fond); border-color: var(--encre); font-weight: 600; }
.puce .n { color: var(--doux); font-size: 12px; }
.puce.actif .n { color: #cfcabe; }
.puce.petite { min-height: 24px; padding: 0 8px; font-size: 12px; margin: 2px 2px 2px 0; }
.puce.grise { color: #6b675e; background: #f4f3f0; text-decoration: line-through; }
.etiquette.alerte { background: #f8e1de; color: var(--erreur); }
.arbre ul { list-style: none; margin: 10px 0 0; padding: 0 0 0 14px; border-left: 2px solid var(--trait); display: flex; flex-direction: column; gap: 8px; }
.arbre li { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.arbre .nom-liste { font-family: 'Source Serif 4', Georgia, serif; font-size: 19px; font-weight: 600; color: var(--encre); }
