/* Module Secteurs : liste des secteurs (php/divers/secteurs.php) et accueil d'un secteur (php/divers/lancement.php).
   Même palette que les autres écrans modernisés (vert #0f5132, bordures #e2e8f0). */

/* Barre au-dessus de la liste */
.sect-barre {
	display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
	margin: 14px 0 10px; padding: 10px 14px;
	background: #fff; border: 1px solid #e2e8f0; border-radius: 10px;
}
.sect-barre__titre { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.sect-barre__titre #sous_menu { font-weight: 700; color: #0f172a; font-size: .95rem; }
.sect-barre__titre small { color: #64748b; }
.sect-barre .btn-success { background: #0f5132; border-color: #0f5132; }

/* Tableau des secteurs */
.sect-table { font-size: .875rem; }
.sect-table thead th { color: #64748b; font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; border-bottom: 1px solid #e2e8f0; }
.sect-table tbody tr { cursor: pointer; }
.sect-table tbody tr:hover > * { background: #f0fdf4 !important; }
.sect-table td { vertical-align: middle; }
.sect-num { color: #64748b; font-variant-numeric: tabular-nums; }
.sect-prefixe { display: inline-block; padding: 1px 8px; border-radius: 6px; background: #f1f5f9; color: #0f172a; font-weight: 600; font-size: .78rem; letter-spacing: .04em; }
.sect-devise { display: inline-block; padding: 1px 8px; border-radius: 999px; background: #eff6ff; color: #1d4ed8; font-weight: 600; font-size: .76rem; }
.sect-badge { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: .76rem; font-weight: 600; }
.sect-badge--oui, .sect-badge--actif { background: #dcfce7; color: #166534; }
.sect-badge--non { background: #f1f5f9; color: #64748b; }
.sect-ouvrir { color: #0f5132; font-weight: 600; font-size: .8rem; white-space: nowrap; opacity: .55; }
.sect-table tbody tr:hover .sect-ouvrir { opacity: 1; }

/* Accueil d'un secteur */
.sect-accueil { margin-top: 12px; }
.sect-fiche {
	display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
	padding: 14px 16px; margin-bottom: 14px;
	background: #fff; border: 1px solid #e2e8f0; border-left: 4px solid #0f5132; border-radius: 10px;
}
.sect-fiche__code {
	flex: none; min-width: 56px; height: 56px; padding: 0 10px; border-radius: 12px;
	display: flex; align-items: center; justify-content: center;
	background: #0f5132; color: #fff; font-weight: 800; letter-spacing: .06em;
}
.sect-fiche__texte { flex: 1 1 220px; min-width: 0; }
.sect-fiche__nom { font-size: 1.1rem; font-weight: 700; color: #0f172a; }
.sect-fiche__desc { color: #64748b; font-size: .875rem; }
.sect-fiche__badges { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sect-fiche__date { color: #64748b; font-size: .8rem; }

.sect-raccourcis__titre { margin: 18px 0 8px; font-weight: 700; color: #0f172a; font-size: .9rem; }
.sect-raccourcis { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.sect-raccourci {
	display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left;
	padding: 12px 14px; background: #fff; border: 1px solid #e2e8f0; border-radius: 10px;
	transition: border-color .15s, box-shadow .15s, transform .15s;
}
.sect-raccourci[hidden] { display: none; }
.sect-raccourci:hover:not(:disabled) { border-color: #0f5132; box-shadow: 0 4px 14px rgba(15, 81, 50, .1); transform: translateY(-1px); }
.sect-raccourci__titre { font-weight: 700; color: #0f5132; }
.sect-raccourci__desc { color: #64748b; font-size: .8rem; line-height: 1.35; }
.sect-raccourci.is-inactif { cursor: not-allowed; opacity: .6; }
.sect-raccourci.is-inactif .sect-raccourci__titre { color: #64748b; }

/* Message quand une section ne s'applique pas (ex. Emballage d'un secteur sans emballage) */
.sect-vide {
	margin: 16px 0; padding: 14px 16px; border-radius: 10px;
	background: #f8fafc; border: 1px dashed #cbd5e1; color: #475569;
}

/* Textes sous les chiffres (masqués ailleurs en PNY, stats-dashboard-pny.css) : utiles ici (devises, dépôts / escales…) */
.sect-stats .ddd-stats .ddd-kpi__foot,
.sect-accueil .ddd-stats .ddd-kpi__foot { display: block; }

/* ===== Sections Créations, Emballage, Stock (php/divers/nouveau.php, emballage.php, stock_ext.php) ===== */
.sect-section { margin: 14px 0 10px; padding: 12px 16px; background: #fff; border: 1px solid #e2e8f0; border-left: 4px solid #0f5132; border-radius: 10px; }
.sect-section__titre { font-size: 1.05rem; font-weight: 700; color: #0f172a; }
.sect-section__desc { color: #64748b; font-size: .85rem; }

/* Onglets en pilules (avant : onglets Bootstrap avec grandes images) */
.sect-onglets .nav-tabs { border: 0; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.sect-onglets .nav-tabs .nav-link {
	display: flex; align-items: center; gap: 8px; padding: 5px 14px;
	border: 1px solid #e2e8f0; border-radius: 999px; background: #fff; color: #334155; font-weight: 600; font-size: .85rem;
	transition: border-color .15s, background .15s, color .15s;
}
/* Icône dans une pastille ronde vert clair (avant : images PNG colorées) */
.sect-onglets .sect-ico {
	flex: none; display: inline-flex; align-items: center; justify-content: center;
	width: 26px; height: 26px; margin-left: -6px; border-radius: 50%;
	background: #e8f3ee; color: #0f5132; transition: background .15s, color .15s;
}
.sect-onglets .sect-ico svg { width: 14px; height: 14px; }
.sect-onglets .nav-tabs .nav-link:hover .sect-ico { background: #0f5132; color: #fff; }
.sect-onglets .nav-tabs .nav-link:hover { border-color: #0f5132; color: #0f5132; }
.sect-onglets .nav-tabs .nav-link.active { background: #0f5132; border-color: #0f5132; color: #fff; }
.sect-onglets .nav-tabs .nav-link.active .sect-ico { background: rgba(255, 255, 255, .2); color: #fff; }

/* En-tête d'un onglet (php/divers/sect_onglet.php) */
.sect-onglet {
	display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
	margin: 12px 0 8px; padding: 10px 14px; background: #fff; border: 1px solid #e2e8f0; border-radius: 10px;
}
.sect-onglet__titre { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.sect-onglet__titre #sous_menu { font-weight: 700; color: #0f172a; font-size: .95rem; }
.sect-onglet__compte { padding: 1px 9px; border-radius: 999px; background: #f1f5f9; color: #475569; font-size: .75rem; font-weight: 600; }
.sect-onglet__compte:empty { display: none; }
.sect-onglet__titre small { color: #64748b; }
.sect-onglet__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.sect-btn-primaire { background: #0f5132; border: 1px solid #0f5132; color: #fff; }
.sect-btn-primaire:hover { background: #0b3d26; border-color: #0b3d26; color: #fff; }
.sect-btn-secondaire { background: #fff; border: 1px solid #cbd5e1; color: #334155; }
.sect-btn-secondaire:hover { border-color: #0f5132; color: #0f5132; }

/* Tableaux des onglets : même style que la liste des secteurs */
#menu-changer table.dataTable { font-size: .875rem; }
#menu-changer table.dataTable thead th { color: #64748b; font-weight: 600; font-size: .76rem; text-transform: uppercase; letter-spacing: .03em; border-bottom: 1px solid #e2e8f0; }
#menu-changer table.dataTable tbody tr[id] { cursor: pointer; }
#menu-changer table.dataTable tbody tr[id]:hover > * { background: #f0fdf4 !important; }

/* Fenêtres d'ajout / de modification (php/divers, classe .sect-fen, script dist/js/sect-fenetres.js).
   Le cadre (en-tête, champs, boutons) vient de modales.css ; ici : sous-titre, blocs, message, pied. */
.sect-fen .modal-header { align-items: flex-start; }
.sect-fen__sous { margin-top: 2px; padding-left: 14px; color: #64748b; font-size: .82rem; font-weight: 400; }
.sect-fen .modal-body { display: flex; flex-direction: column; gap: 12px; }
.sect-fen__bloc { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 12px 14px 14px; }
.sect-fen__bloc-titre {
	display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap;
	margin: 0 0 10px; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #0f5132;
}
.sect-fen__bloc-titre small { text-transform: none; letter-spacing: 0; font-weight: 500; color: #64748b; font-size: .78rem; }
.sect-fen__req { color: #b91c1c; margin-left: 2px; }
.sect-fen__note { color: #64748b; font-size: .78rem; margin-top: 4px; }
.sect-fen__options { display: flex; gap: 10px; flex-wrap: wrap; }
.sect-fen__option {
	display: flex; align-items: flex-start; gap: 10px; flex: 1 1 220px; margin: 0;
	padding: 10px 12px; border: 1px solid #e2e8f0; border-radius: 10px; cursor: pointer; background: #f8fafc;
}
.sect-fen__option:has(input:checked) { border-color: #0f5132; background: #e8f3ee; }
.sect-fen__option .form-check-input { margin-top: 3px; flex: none; }
.sect-fen__option strong { display: block; color: #0f172a; font-size: .875rem; }
.sect-fen__option span { color: #64748b; font-size: .78rem; }
.sect-fen__msg {
	padding: 9px 12px; border-radius: 10px; font-size: .85rem;
	background: #fef2f2; border: 1px solid #fecaca; color: #991b1b;
}
.sect-fen__msg[hidden] { display: none; }
.sect-fen .modal-footer { justify-content: flex-end; gap: 8px; }
.sect-fen .modal-footer > * { margin: 0; }
.sect-fen__aide { margin-right: auto !important; color: #64748b; font-size: .78rem; }
.sect-fen__vide { padding: 14px; text-align: center; color: #64748b; font-size: .85rem; }
.sect-fen__lignes { max-height: 260px; overflow: auto; border-radius: 8px; }
.sect-fen__lignes .table { margin: 0; }
.sect-fen__lignes td { vertical-align: middle; }
.sect-fen__retirer {
	border: 0; background: none; padding: 2px 6px; border-radius: 6px; color: #b91c1c; line-height: 1;
}
.sect-fen__retirer:hover { background: #fef2f2; }
.sect-fen__ligne-ajout { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.sect-fen__ligne-ajout > div { flex: 1 1 220px; }
.sect-fen #sous_compte_table tbody tr { cursor: pointer; }

/* Bouton « + Nouveau secteur » dans l'en-tête « Secteurs » des cartes (php/divers/secteurs.php) */
.ddd-stats__actions .btn-success { background: #0f5132; border-color: #0f5132; }
.ddd-stats__actions .btn-success:hover { background: #0b3d26; border-color: #0b3d26; }

/* Icônes dans les lignes des listes (ex. Stock › Mouvement escale ; avant : images PNG colorées) :
   pastille pleine, icône blanche ; variantes de couleur ; « --nu » = icône seule en couleur (coche, horloge). */
td .sect-ico {
	display: inline-flex; align-items: center; justify-content: center; flex: none;
	width: 18px; height: 18px; border-radius: 50%; background: #0f5132; color: #fff; vertical-align: middle;
	box-shadow: 0 1px 2px rgba(15, 23, 42, .15);
}
td .sect-ico svg { width: 10px; height: 10px; }
td .sect-ico.sect-ico--bleu { background: #2563eb; }
td .sect-ico.sect-ico--ambre { background: #d97706; }
td .sect-ico.sect-ico--nu { width: auto; height: auto; background: none; box-shadow: none; color: #16a34a; }
td .sect-ico.sect-ico--nu svg { width: 18px; height: 18px; }
td .sect-ico.sect-ico--nu.sect-ico--ambre { color: #d97706; }
/* Lien d'action dans une ligne : pastille arrondie icône + nombre */
.sect-lien {
	display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px 1px 1px; font-size: .78rem; gap: 4px;
	border: 1px solid #e2e8f0; border-radius: 999px; background: #fff;
	color: #0f172a; font-weight: 600; text-decoration: none; white-space: nowrap;
	transition: border-color .15s, background .15s;
}
.sect-lien:hover { border-color: #0f5132; background: #f0fdf4; color: #0f5132; }
.sect-etat { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; white-space: nowrap; }
/* Boutons à fond plein (Mouvement escale : « Récept. dépôt » bleu, « Mouvement » vert) */
.sect-lien--bleu, .sect-lien--vert { color: #fff; }
.sect-lien--bleu { background: #2563eb; border-color: #2563eb; }
.sect-lien--vert { background: #0f5132; border-color: #0f5132; }
.sect-lien--bleu:hover { background: #1d4ed8; border-color: #1d4ed8; color: #fff; }
.sect-lien--vert:hover { background: #0b3d26; border-color: #0b3d26; color: #fff; }
.sect-lien--bleu td .sect-ico, td .sect-lien--bleu .sect-ico,
td .sect-lien--vert .sect-ico { background: rgba(255, 255, 255, .22); box-shadow: none; }
.sect-lien--ambre { background: #d97706; border-color: #d97706; color: #fff; }
.sect-lien--ambre:hover { background: #b45309; border-color: #b45309; color: #fff; }
td .sect-lien--ambre .sect-ico { background: rgba(255, 255, 255, .22); box-shadow: none; }
td .sect-ico.sect-ico--rouge { background: #dc2626; }
td .sect-ico.sect-ico--clic { cursor: pointer; }
td .sect-ico.sect-ico--clic:hover { background: #b91c1c; }
.sect-lien--rouge { background: #dc2626; border-color: #dc2626; color: #fff; }
.sect-lien--rouge:hover { background: #b91c1c; border-color: #b91c1c; color: #fff; }
td .sect-lien--rouge .sect-ico { background: rgba(255, 255, 255, .22); box-shadow: none; }

/* Icônes des lignes de tous les tableaux DataTables (dist/js/icones-tableaux.js) */
img.sect-img--clic { cursor: pointer; border-radius: 50%; transition: filter .15s; }
img.sect-img--clic:hover { filter: brightness(.88); }
