.applicants tr[data-status='completed']{background-color: rgba(7, 165, 146, .075)}
.applicants tr[data-status='blocked']{background-color: rgba(231, 63, 26, .075)}



/* Tableaux des fiches clients / dossiers : la 1re colonne n'est pas un « N° »
   (règle générale de os-admin.css), elle prend sa largeur naturelle. */
table.fiche:not(.record) tr th:first-child:not(.noid), table.fiche:not(.record) tr td:first-child:not(.noid) {
    width: auto;
    max-width: none;
    white-space: normal;
    text-align: left;
}

/* Encadré d'alerte dans le flux de la page (doublons, contrôles des parties).
   .error-box de l'admin est une notification flottante qui recouvre le contenu. */
.alerte-box {
    position: static;
    display: block;
    margin: 0 0 20px 0;
    padding: 12px 16px;
    border: 1px solid rgb(var(--brand-accent-600, 208 0 1));
    border-left-width: 4px;
    background: #fff6f6;
    color: rgb(var(--brand-accent-700, 173 0 1));
    font-size: 15px;
}
.alerte-box p, .alerte-box li { color: inherit; margin: 2px 0; }
.alerte-box a { color: inherit; text-decoration: underline; }
.alerte-box ul { margin: 6px 0 0 18px; list-style: disc; }
.alerte-box label { display: inline; color: rgb(var(--brand-ink, 15 23 42)); font-weight: 600; }

/* Listes à recherche (select2) : toujours sur toute la largeur du champ,
   même si elles ont été dessinées dans un bloc caché. */
.las .select2-container { width: 100% !important; }

/* Tableaux des fiches : la dernière colonne n'est pas une colonne d'actions. */
table.fiche:not(.record) tr th:last-child:not(.noactions),
table.fiche:not(.record) tr td:last-child:not(.noactions) {
    width: auto;
    font-size: 14px;
    text-align: left;
    white-space: normal;
}

/* Fiche dossier : complétude, onglets, pièces */
.succes-box { margin: 0 0 20px 0; padding: 12px 16px; border: 1px solid #2e7d32; border-left-width: 4px; background: #f1f8f1; color: #1b5e20; font-weight: 600; }
.onglets { display: flex; gap: 4px; border-bottom: 2px solid rgb(var(--brand-primary-200, 201 200 221)); margin-bottom: 20px; }
.onglets a { padding: 10px 18px; color: rgb(var(--brand-primary-700, 10 4 102)); border: 1px solid transparent; border-bottom: 0; text-decoration: none; }
.onglets a.actif { background: #fff; border-color: rgb(var(--brand-primary-200, 201 200 221)); font-weight: 700; margin-bottom: -2px; border-bottom: 2px solid #fff; }
table.pieces td { vertical-align: top; }
table.pieces .piece-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 6px; }
table.pieces .piece-form input[type="file"] { max-width: 220px; height: auto; padding: 4px; }
table.pieces .piece-form select, table.pieces .piece-form input[type="text"] { width: auto; min-width: 140px; height: 32px; padding: 2px 8px; margin: 0; font-size: 14px; }
.statut-piece { display: inline-block; padding: 2px 8px; border-radius: 3px; font-size: 13px; font-weight: 600; background: #eee; color: #444; }
.statut-piece.statut-recue, .statut-piece.statut-a_verifier { background: #fff4d6; color: #7a5200; }
.statut-piece.statut-validee { background: #e3f3e4; color: #1b5e20; }
.statut-piece.statut-rejetee { background: #fde4e4; color: #8a1c1c; }

/* Fiche dossier : onglet Informations */
.informations-form .champ-long { width: 100%; }
.informations-form .las small { display: block; color: #64748b; margin-top: 2px; }
.informations-form .las p.error { margin: 4px 0 0; font-size: 14px; }

/* Pages « voir » de la configuration (OsAdmin/fiche.html.twig) */
.fiche-config section { padding: 16px 20px; border-radius: 4px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.fiche-config h3 { font-size: 18px; color: rgb(var(--brand-primary-700, 10 4 102)); }
.fiche-config table.record th { width: 260px; text-align: left; vertical-align: top; font-weight: 600; color: #475569; }
.fiche-config table.tableau-fiche th { text-align: left; background: #f1f5f9; font-size: 13px; text-transform: none; }
.fiche-config table td { vertical-align: top; text-align: left; }
.fiche-config small.detail { color: #64748b; }
.fiche-config a.lien-fiche { color: rgb(var(--brand-primary-700, 10 4 102)); text-decoration: underline; }
.fiche-config p.vide { color: #64748b; font-style: italic; }
.fiche-config ul.phrases { margin: 0 0 0 20px; list-style: disc; }
.fiche-config ul.phrases li { margin: 4px 0; line-height: 1.5; }
.fiche-config ul.variables { columns: 3; }
.fiche-config .apercu-modele { max-height: 600px; overflow: auto; border: 1px solid #e2e8f0; padding: 20px 28px; background: #fff; font-family: 'Times New Roman', serif; font-size: 15px; line-height: 1.5; }
.etiquette { display: inline-block; padding: 2px 8px; border-radius: 3px; font-size: 13px; font-weight: 600; background: #eee; color: #444; white-space: nowrap; }
.etiquette-success { background: #e3f3e4; color: #1b5e20; }
.etiquette-warning { background: #fff4d6; color: #7a5200; }
.etiquette-gray { background: #eceff1; color: #546e7a; }

/* Filtres des listes de configuration (Pièces requises, Rôles requis) */
.filtres-config { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.filtres-config > div { flex: 1 1 170px; }
.filtres-config label { font-size: 13px; color: #475569; }

/* Schéma d'un processus (fiche « voir » d'un processus) */
.diagramme { display: flex; align-items: flex-start; gap: 12px; overflow-x: auto; padding: 8px 0; }
.diagramme .etape { display: flex; flex-direction: column; gap: 10px; min-width: 200px; }
.diagramme .etape-titre { font-size: 13px; font-weight: 700; color: #475569; text-transform: uppercase; margin: 0; }
.diagramme .case { border: 2px solid rgb(var(--brand-primary-300, 160 158 200)); border-radius: 6px; padding: 8px 12px; background: #fff; }
.diagramme .case small { color: #64748b; }
.diagramme .case.racine { background: rgb(var(--brand-primary-700, 10 4 102)); color: #fff; font-weight: 700; border-color: transparent; }
.diagramme .case.racine small { color: #e2e8f0; }
.diagramme .case.feuille { border-style: dashed; padding: 4px 10px; }
.diagramme .case.vide { color: #94a3b8; font-style: italic; border-style: dotted; }
.diagramme .fleche { align-self: center; font-size: 26px; color: #94a3b8; }
.diagramme .fleche.petite { font-size: 18px; }
.diagramme .branche { display: flex; align-items: center; gap: 8px; }
.diagramme .feuilles { display: flex; flex-direction: column; gap: 4px; }

/* Fenêtres (modifier, voir…) : la hauteur suit le contenu, avec défilement au-delà de l'écran.
   (os-admin.css fixait la hauteur à 100 % : grand vide sous un formulaire court.) */
.container-popup > div { height: auto; max-height: 100%; }
.container-popup .content { height: auto; max-height: calc(100vh - 40px); }
.container-popup .content:not(.record) { height: auto; max-height: calc(100vh - 100px); padding-bottom: 20px; }

/* Aperçu d'un modèle de document (fiche « voir » d'un modèle) : même rendu que les documents des dossiers. */
@font-face { font-family: 'EB Garamond'; src: url('../fonts/EBGaramond/EBGaramond-Regular.ttf'); font-weight: normal; font-style: normal; }
@font-face { font-family: 'EB Garamond'; src: url('../fonts/EBGaramond/EBGaramond-Bold.ttf'); font-weight: bold; font-style: normal; }
@font-face { font-family: 'EB Garamond'; src: url('../fonts/EBGaramond/EBGaramond-Italic.ttf'); font-weight: normal; font-style: italic; }
.fiche-config .apercu-document { font-family: 'EB Garamond', Georgia, serif; font-size: 17px; line-height: 1.5; max-height: 75vh; padding: 40px 56px; max-width: 900px; margin: 0 auto; box-shadow: 0 1px 6px rgba(0,0,0,.12); }
.fiche-config .apercu-document h1, .fiche-config .apercu-document h2, .fiche-config .apercu-document h3 { font-family: 'EB Garamond', Georgia, serif; }
.fiche-config .apercu-document * { font-family: inherit; }
.filtres-config a.btn-default { background: #fff; color: #334155; border: 1px solid #cbd5e1; }

/* Profils : actions permises, cochées par thème (templates/Profiles/form.html.twig) */
.profil-permissions .groupe-permissions { border: 1px solid #e2e8f0; border-radius: 4px; padding: 8px 14px 12px; margin: 10px 0; }
.profil-permissions legend { font-weight: 700; color: rgb(var(--brand-primary-700, 10 4 102)); padding: 0 6px; }
.profil-permissions .permission { display: flex; align-items: flex-start; margin: 8px 0; }
.profil-permissions .permission label { margin: 0; line-height: 1.3; }
.profil-permissions .permission small { color: #64748b; font-weight: normal; }

/* Boutons d'export des documents (onglet Documents) ; btn-primary n'avait aucun style. */
.btn-pdf, .btn-pdf:hover { background-color: #b91c1c; color: #fff; }
.btn-word, .btn-word:hover { background-color: #1d4ed8; color: #fff; }
.btn-primary { background-color: var(--success-color); color: #fff; }
.btn-pdf i, .btn-word i { margin-right: 6px; }
