/* CJ Terrain – tournée et remise sur téléphone. */

/* Champs de saisie (mêmes réglages que les formulaires du Noyau, pour tous les formulaires du module). */
.cj-champ :is(input[type=text], input[type=date], input[type=time], input[type=number], input[type=tel], input[type=email], input[type=search], select, textarea) {
	width: 100%; max-width: 100%; min-height: 40px; border: 1px solid #c3cbd8; border-radius: 7px; padding: 6px 10px; font-size: 14px; font-family: inherit; background: #fff; color: inherit;
}
.cj-champ :is(input, select, textarea):focus { border-color: #23417a; box-shadow: 0 0 0 2px rgba(35, 65, 122, .15); outline: none; }
.cj-champ input[type=file] { max-width: 100%; }
.cjt-form [hidden], .cjt-synchro[hidden], [data-cjt-installer][hidden], [data-cjt-hl][hidden], [data-cjt-attente][hidden], [data-cjt-form-ordre][hidden] { display: none !important; }

.cjt-etat { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.cjt-reseau { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: #1e6b45; background: #e7f5ed; padding: 4px 12px; border-radius: 20px; }
.cjt-reseau .cjt-point { width: 9px; height: 9px; border-radius: 50%; background: #1e8449; }
.cjt-reseau.hors { color: #8a4a00; background: #fdf3e1; }
.cjt-reseau.hors .cjt-point { background: #b9770e; }
.cjt-synchro { border-left: 4px solid #23417a; }
.cjt-synchro p { margin: 0 0 8px; }
.cjt-synchro-erreurs { margin: 0 0 10px; padding-left: 20px; font-size: 13.5px; }
.cjt-hl { background: #fdf3e1; color: #7a4a00; border-radius: 9px; padding: 10px 14px; font-weight: 500; }
.cjt-bloc p { margin: 0 0 6px; }
.cjt-attente-accueil { color: #8a4a00; font-weight: 600; }

/* Tournée */
.cjt-arrets { list-style: none; margin: 0; padding: 0; counter-reset: a; }
.cjt-arret { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid #eef1f5; }
.cjt-ordre { flex: none; width: 34px; height: 34px; border-radius: 50%; background: #14284b; color: #fff; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.cjt-arret.fait .cjt-ordre { background: #1e8a55; }
.cjt-arret.echec .cjt-ordre { background: #8a93a3; }
.cjt-arret.attente .cjt-ordre { background: #23417a; box-shadow: 0 0 0 3px rgba(35, 65, 122, .2); }
.cjt-arret-corps { flex: 1; min-width: 0; }
.cjt-arret-tete { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-bottom: 4px; }
.cjt-arret-tete strong { color: #14284b; font-size: 15.5px; }
.cjt-arret p { margin: 0 0 4px; }
.cjt-adresse .dashicons { color: #b8892b; font-size: 18px; width: 18px; height: 18px; vertical-align: -3px; }
.cjt-arret-act { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cjt-arret-act form { margin: 0; }
.cjt-arret.fait .cjt-arret-corps { opacity: .8; }
.cjt-distance { color: #23417a; font-weight: 600; }
.cjt-commune { border-top: 1px solid #eef1f5; padding: 8px 0; }
.cjt-commune > summary { cursor: pointer; padding: 4px 0; color: #14284b; font-size: 15px; }
.cjt-a-signifier { list-style: none; margin: 4px 0 6px; padding: 0; }
.cjt-a-signifier li label { display: flex; gap: 10px; align-items: flex-start; padding: 8px 4px; border-radius: 8px; cursor: pointer; }
.cjt-a-signifier li label:hover { background: #f6f8fb; }
.cjt-a-signifier input { width: 20px; height: 20px; margin-top: 2px; flex: none; }
.cjt-a-signifier span span { display: block; }
.cjt-ajouter { margin-top: 10px; }
.cjt-faits { list-style: none; margin: 0; padding: 0; }
.cjt-faits li { padding: 7px 0; border-bottom: 1px solid #eef1f5; }

/* Remise */
.cjt-dest p { margin: 0 0 8px; }
.cjt-adresse-grande { font-size: 16px; font-weight: 600; color: #14284b; }
.cjt-reperes { color: #3b4352; }
.cjt-choix { display: flex; }
.cjt-choix .cj-onglet { flex: 1; text-align: center; display: inline-flex; gap: 6px; align-items: center; justify-content: center; }
.cjt-form h2 { margin-top: 0; }
.cjt-modes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-bottom: 14px; }
.cjt-mode { position: relative; cursor: pointer; }
.cjt-mode input { position: absolute; opacity: 0; }
.cjt-mode span { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 48px; padding: 8px; border: 2px solid #dfe4ec; border-radius: 10px; background: #fff; font-weight: 600; color: #14284b; }
.cjt-mode input:checked + span { border-color: #14284b; background: #14284b; color: #fff; }
.cjt-mode input:focus-visible + span { outline: 3px solid #b8892b; outline-offset: 2px; }
.cjt-quand { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.cjt-gps { font-size: 13.5px; color: #8a4a00; margin: -4px 0 12px; }
.cjt-gps.ok { color: #1e6b45; }
.cjt-gps .dashicons { font-size: 17px; width: 17px; height: 17px; vertical-align: -3px; }
.cjt-apercu { display: block; max-width: 220px; max-height: 160px; border-radius: 8px; margin-top: 8px; border: 1px solid #dfe4ec; }
.cjt-signature { margin: 6px 0 14px; }
.cjt-sig-titre { display: flex; justify-content: space-between; align-items: center; margin: 0 0 6px; }
.cjt-pad { display: block; width: 100%; height: 190px; border: 2px dashed #b8892b; border-radius: 10px; background: #fffdf7; touch-action: none; cursor: crosshair; margin-bottom: 8px; }
.cjt-mention > summary, .cjt-frais-bloc > summary, .cjt-reglages > summary { cursor: pointer; font-weight: 600; color: #14284b; padding: 6px 0; }
.cjt-frais-bloc { background: #f6f8fb; border-radius: 9px; padding: 6px 12px; margin: 6px 0 14px; }
.cjt-frais-bloc[open] { padding-bottom: 12px; }
.cjt-demarches { list-style: none; margin: 0 0 12px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 14px; }
.cjt-demarches li { padding: 5px 0; }
.cjt-demarches input { width: 19px; height: 19px; }
.cjt-erreur { background: #fbeaea; color: #922b21; border-radius: 8px; padding: 10px 12px; font-weight: 600; }
.cjt-gros { width: 100%; min-height: 54px; font-size: 16.5px; justify-content: center; }
.cjt-passages { list-style: none; margin: 0 0 12px; padding: 0; }
.cjt-passages li { padding: 8px 0; border-bottom: 1px solid #eef1f5; }
.cjt-ligne { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cjt-ligne input[type=text] { min-height: 40px; border: 1px solid #c3cbd8; border-radius: 7px; padding: 4px 10px; font: inherit; width: 140px; }
.cjt-volet h3 .dashicons { color: #b8892b; }
.cjt-volet-p { font-size: 13px; margin: 0 0 10px; }

/* Frais */
.cjt-grille { align-items: start; }
.cjt-somme { width: 100%; border-collapse: collapse; margin-bottom: 12px; }
.cjt-somme td { padding: 6px 4px; border-bottom: 1px solid #eef1f5; }
.cjt-somme td:last-child { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cjt-fort td { border-top: 2px solid #14284b; font-weight: 700; color: #14284b; }
.cjt-act { white-space: nowrap; }
.cjt-act form { display: inline; }
.cjt-barre-frais { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; background: #f6f8fb; padding: 10px; border-radius: 9px; }
.cjt-barre-frais select, .cjt-barre-frais input { min-height: 40px; border: 1px solid #c3cbd8; border-radius: 7px; padding: 4px 10px; font: inherit; }
.cjt-barre-frais input { flex: 1 1 200px; }

@media (max-width: 760px) {
	.cjt-grille { grid-template-columns: minmax(0, 1fr) !important; }
	.cj-champ :is(input, select, textarea) { font-size: 16px; }
	.cjt-table thead { display: none; }
	.cjt-table, .cjt-table tbody, .cjt-table tr, .cjt-table td { display: block; width: 100%; }
	.cjt-table tr { padding: 10px 0; border-bottom: 1px solid #dde3ec; }
	.cjt-table td { border: 0; padding: 2px 0; text-align: left !important; }
	.cjt-arret-act .cj-bouton { flex: 1 1 auto; justify-content: center; }
	.cjt-modes { grid-template-columns: 1fr 1fr; }
	.cjt-choix .cj-onglet { font-size: 13.5px; padding-left: 6px; padding-right: 6px; }
	.cjt-pad { height: 220px; }
}
