/* CJ Actes – compléments d'interface (s'appuie sur les styles du Noyau et des Dossiers). */

/* Files de travail */
.cja-files { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.cja-file { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 10px; text-decoration: none; font-weight: 600; border: 1px solid; }
.cja-file strong { font-size: 20px; }
.cja-file-verifier { background: #fff8e6; color: #7a5410; border-color: #f1d9a0; }
.cja-file-signer { background: #eef3fb; color: #14284b; border-color: #c9d6ec; }
.cja-file-signifier { background: #fdecea; color: #8e2a1f; border-color: #f2c3bd; }
.cja-table td { vertical-align: top; }
.cja-table td:first-child a { color: #14284b; text-decoration: none; }
.cja-table td:first-child a:hover { text-decoration: underline; }

/* Création */
.cja-rappel p { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cja-rappel .dashicons { color: #b8892b; }
.cja-modeles-choix { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.cja-modele-carte { position: relative; cursor: pointer; }
.cja-modele-carte input { position: absolute; opacity: 0; }
.cja-modele-carte > span { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 14px; border: 2px solid #dfe4ec; border-radius: 10px; background: #fff; }
.cja-modele-carte > span .dashicons { color: #b8892b; }
.cja-modele-carte input:checked + span { border-color: #14284b; background: #f3f6fb; box-shadow: 0 0 0 3px rgba(20, 40, 75, .12); }
.cja-modele-carte input:focus-visible + span { outline: 3px solid #b8892b; outline-offset: 2px; }

/* Étapes du circuit */
.cja-etapes { list-style: none; margin: 0 0 14px; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; counter-reset: e; }
.cja-etapes li { flex: 1 1 120px; display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 8px; background: #f1f3f7; color: #6b7280; font-weight: 600; font-size: 14px; }
.cja-etapes li > span { display: inline-flex; width: 24px; height: 24px; border-radius: 50%; align-items: center; justify-content: center; background: #d6dbe4; color: #fff; font-size: 13px; flex: none; }
.cja-etapes li.fait { color: #1e6b45; background: #e8f5ee; }
.cja-etapes li.fait > span { background: #1e8a55; }
.cja-etapes li.actuel { color: #14284b; background: #fff; box-shadow: inset 0 0 0 2px #14284b; }
.cja-etapes li.actuel > span { background: #14284b; }

/* Bloc actions */
.cja-actions h2 .dashicons { color: #b8892b; }
.cja-boutons { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cja-boutons form { margin: 0; }
.cja-volet { margin-top: 14px; border-top: 1px solid #eef1f5; padding-top: 10px; }
.cja-volet > summary { cursor: pointer; font-weight: 600; color: #23417a; padding: 4px 0; }
.cja-volet.cja-danger > summary { color: #a12d22; }
.cja-signer, .cja-signifier { margin-top: 16px; padding: 16px; border-radius: 10px; background: #f6f8fb; border: 1px solid #dfe4ec; }
.cja-signer h3, .cja-signifier h3 { margin: 0 0 10px; display: flex; gap: 6px; align-items: center; color: #14284b; }
.cja-confirme { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 10px; font-weight: 600; }
.cja-confirme input { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.cja-signer .cj-aide { display: block; margin-top: 8px; }
.cja-supprimer { margin: 12px 0 0; }
.cja-modes { border: 0; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.cja-modes legend { font-weight: 600; margin-bottom: 6px; padding: 0; }
.cja-mode { display: inline-flex; gap: 6px; align-items: center; padding: 9px 12px; border: 1px solid #c3cbd8; border-radius: 8px; background: #fff; cursor: pointer; min-height: 42px; }
.cja-mode:has(input:checked) { border-color: #14284b; box-shadow: inset 0 0 0 1px #14284b; background: #eef3fb; }
.cja-gps { margin-top: 6px; }

/* Texte de l'acte */
.cja-grille { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.cja-papier { background: #fff; border: 1px solid #dfe4ec; border-radius: 4px; box-shadow: 0 8px 24px rgba(20, 40, 75, .08); padding: 48px 56px; font-family: "Libre Caslon Text", Georgia, serif; font-size: 15.5px; line-height: 1.7; color: #1a1a1a; position: relative; overflow: hidden; }
.cja-papier.cja-projet::before { content: "PROJET"; position: absolute; top: 40%; left: 50%; transform: translate(-50%, -50%) rotate(-28deg); font-size: 110px; font-weight: 700; color: rgba(20, 40, 75, .05); pointer-events: none; letter-spacing: 6px; }
.cja-papier p { text-align: justify; margin: 0 0 12px; }
.cja-papier .cja-h1 { text-align: center; color: #14284b; font-size: 22px; letter-spacing: 1px; margin: 0 0 22px; font-family: inherit; }
.cja-papier .cja-h2 { text-align: center; font-size: 16px; text-decoration: underline; margin: 18px 0 10px; font-family: inherit; }
.cja-papier mark.cja-manque { background: #fde68a; color: #7c2d12; padding: 0 3px; border-radius: 3px; font-family: "Public Sans", sans-serif; font-size: .88em; }
.cja-decompte { width: 80%; margin: 8px auto 14px; border-collapse: collapse; font-family: "Public Sans", sans-serif; font-size: 14px; }
.cja-decompte td { padding: 5px 10px; border-bottom: 1px solid #e5e7eb; }
.cja-decompte .cja-total td { border-top: 2px solid #14284b; border-bottom: 0; font-weight: 700; }
.cja-papier .cja-remise { font-family: "Public Sans", sans-serif; font-size: 14px; }
.cja-infos .cj-carte { margin-bottom: 14px; }
.cja-circuit { list-style: none; margin: 0; padding: 0; }
.cja-circuit li { padding: 7px 0; border-bottom: 1px solid #eef1f5; font-size: 14px; }
.cja-circuit li > span:first-child { display: block; color: #5a6270; font-size: 12.5px; }
.cja-empreinte code { font-size: 11.5px; }

/* Édition */
.cja-editeur { width: 100%; min-height: 420px; font-family: "Libre Caslon Text", Georgia, serif; font-size: 15px; line-height: 1.65; padding: 14px 16px; border: 1px solid #c3cbd8; border-radius: 8px; resize: vertical; }
.cja-syntaxe code { background: #f1f3f7; padding: 1px 5px; border-radius: 4px; }
.cja-recharger { margin: 12px 0 0; padding: 12px; background: #f6f8fb; border-radius: 8px; }
.cja-recharger .cj-aide { display: block; margin-top: 4px; }
.cja-recharger.cja-suggere { background: #fff8e6; box-shadow: inset 0 0 0 1px #f1d9a0; }
.cja-manquants .cja-aller { margin: 3px 4px 0 0; border: 1px solid #e0b64e; background: #fde68a; color: #7c2d12; border-radius: 6px; padding: 3px 8px; cursor: pointer; font: inherit; font-size: 13px; }
.cja-entete-onglet { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.cja-entete-onglet h2 { margin: 0; }

/* Modèles */
.cja-modeles { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 18px; align-items: start; }
.cja-modeles-liste ul { list-style: none; margin: 0 0 12px; padding: 0; }
.cja-modeles-liste li { padding: 8px 10px; border-radius: 8px; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.cja-modeles-liste li a { color: #14284b; text-decoration: none; font-weight: 600; flex: 1 1 100%; }
.cja-modeles-liste li.actif { background: #eef3fb; box-shadow: inset 3px 0 0 #b8892b; }
.cja-variables { background: #f6f8fb; border-radius: 10px; padding: 12px; margin: 10px 0 14px; }
.cja-variables > p { margin: 0 0 8px; }
.cja-var-groupe { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 6px; }
.cja-var-groupe > .cj-petit { width: 80px; flex: none; }
.cja-var { border: 1px solid #c9d6ec; background: #fff; color: #14284b; border-radius: 999px; padding: 4px 10px; font: inherit; font-size: 13px; cursor: pointer; }
.cja-var:hover, .cja-var:focus-visible { background: #14284b; color: #fff; }

/* Accueil */
.cja-compteurs { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.cja-compteurs a { text-decoration: none; color: #14284b; font-weight: 600; display: inline-flex; gap: 8px; align-items: center; }
.cja-compteurs a.cja-zero { color: #8a93a3; font-weight: 400; }

@media (max-width: 960px) {
	.cja-grille, .cja-modeles { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
	.cja-table thead { display: none; }
	.cja-table, .cja-table tbody, .cja-table tr, .cja-table td { display: block; width: 100%; }
	.cja-table tr { padding: 10px 0; border-bottom: 1px solid #dde3ec; }
	.cja-table td { border: 0; padding: 3px 0; text-align: left !important; }
	.cja-table td[data-label]:not([data-label="Acte"])::before { content: attr(data-label) " : "; color: #5a6270; font-size: 12.5px; }
	.cja-table td[data-label="Dossier"] br, .cja-table td[data-label="Dossier"] .cj-petit { display: none; }
	.cja-papier { padding: 24px 18px; font-size: 15px; }
	.cja-papier .cja-h1 { font-size: 18px; }
	.cja-decompte { width: 100%; }
	.cja-etapes li { flex: 1 1 45%; font-size: 13px; padding: 8px; }
	.cja-var-groupe > .cj-petit { width: 100%; }
	.cja-boutons .cj-bouton { flex: 1 1 auto; justify-content: center; }
	.cja-boutons form { flex: 1 1 100%; }
	.cja-boutons form .cj-bouton { width: 100%; }
}

/* Champs complémentaires (heure, zones de texte) */
.cj-form input[type=time] { width: 100%; max-width: 100%; min-height: 40px; border: 1px solid #c3cbd8; border-radius: 7px; padding: 6px 10px; font: inherit; font-size: 14px; background: #fff; }
.cja-signifier textarea, .cja-actions textarea { font-family: inherit; line-height: 1.5; }

/* Colonne d'informations : libellé au-dessus de la valeur */
.cja-infos .cjd-dl > div { grid-template-columns: 1fr; gap: 2px; }
.cja-infos .cj-statut { white-space: nowrap; }
.cja-infos .cj-mono { font-size: 13.5px; }
