/* Pages de l'application d'origine habillees comme le Centre de soutien scolaire :
   cadre blanc, en-tete clair, tableaux et boutons du theme (voir centre.css), sans modifier les vues d'origine. */
.legacy-centre .card-header { background: #fff !important; }
.legacy-centre .card { box-shadow: none; }
.legacy-centre .card-header.card-padding { padding-bottom: 10px; }
.legacy-centre h2 { font-size: 22px; font-weight: 600; color: var(--sk1, #1565c0); }
.legacy-centre h2 small { display: block; margin-top: 4px; font-size: 13px; font-weight: 400; color: #90a4ae; }
.legacy-centre .card-body { padding-left: 15px; padding-right: 15px; }
.legacy-centre table.table { margin-bottom: 0; }
.legacy-centre .table-responsive { border: 1px solid #e6ebef; border-radius: 8px; box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.legacy-centre .form-control, .legacy-centre .fg-line .form-control { border-radius: 0; }
.legacy-centre .btn-primary { background-color: var(--sk2, #2196f3); border-color: var(--sk2, #2196f3); }
.legacy-centre .btn-primary:hover { background-color: var(--sk1, #1565c0); border-color: var(--sk1, #1565c0); }
.legacy-centre .pagination > .active > a, .legacy-centre .pagination > .active > span { background-color: var(--sk2, #2196f3); border-color: var(--sk2, #2196f3); }
/* fenetres : meme en-tete colore et memes boutons que les modales du Centre */
.modal-modern .modal-header:not(.mm-header) { padding: 18px 22px; background: #0d7fc4; color: #fff; border: 0; }
.modal-modern .modal-header:not(.mm-header) .modal-title, .modal-modern .modal-header:not(.mm-header) .modal-title span { margin: 0; color: #fff !important; font-size: 18px; font-weight: 600; }
.modal-modern .modal-header:not(.mm-header) .close { color: #fff; opacity: .8; }
.modal-modern .modal-footer .btn-primary { color: #fff; background: #1e88e5; border: 1px solid #1e88e5; border-radius: 2px; text-transform: uppercase; font-weight: 600; letter-spacing: .4px; }
.modal-modern .modal-footer .btn-link, .modal-modern .modal-footer .btn-default { color: #444; background: #fff; border: 1px solid #ddd; border-radius: 2px; text-transform: uppercase; font-weight: 600; letter-spacing: .4px; }
/* ===== Ecran de poste : saisie a gauche, liste du poste a droite ===== */
.poste-etape { margin: 6px 0 8px 5px; font-size: 12px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: #78909c; }
/* onglets : gros boutons avec icone et libelle */
.poste-onglets { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; padding: 0; list-style: none; }
.poste-onglets > li { flex: 1 1 88px; }
.poste-onglets > li > a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 66px; padding: 8px 6px; border: 2px solid #e3e8ec; border-radius: 10px; background: #fff; color: #546e7a; font-size: 13px; font-weight: 600; text-align: center; line-height: 1.15; text-decoration: none; transition: all .15s; position: relative; }
.poste-onglets > li > a .zmdi { font-size: 24px; }
.poste-onglets > li > a:hover { border-color: var(--sk3, #64b5f6); color: var(--sk1, #1565c0); }
.poste-onglets > li.active > a { border-color: var(--sk2, #2196f3); background: var(--sk2, #2196f3); color: #fff; box-shadow: 0 3px 8px rgba(0,0,0,.18); }
.poste-onglets-liste > li { flex: 1 1 90px; }
.poste-onglets-liste > li > a { min-height: 52px; font-size: 12px; }
.poste-onglets-liste > li > a .zmdi { font-size: 18px; }
.poste-onglets-liste > li > a em { position: absolute; top: -7px; right: -5px; min-width: 20px; padding: 1px 6px; border-radius: 10px; background: #ff9800; color: #fff; font-size: 11px; font-style: normal; font-weight: 700; }
/* ===== formulaires du poste : grille reguliere sur 12 colonnes ===== */
.ps-c3 { grid-column: span 3; }
.ps-c9 { grid-column: span 9; }
/* liste des postes */
.liste-postes .prof-outil select.form-control { height: 40px; border: 1px solid #cfd8dc; border-radius: 6px; background: #fff; padding: 6px 10px; }
.liste-postes .col-num { width: 60px; color: #90a4ae; }
.liste-postes .val-forte { font-weight: 600; }
.liste-postes .col-actions .btn { margin-right: 6px; }
/* fenetre « Ouvrir un poste » : le calendrier doit pouvoir depasser du cadre */
.modal-modern .modal-content:has(.date-picker) { overflow: visible; }
.modal-modern .modal-content:has(.date-picker) .modal-header { border-radius: 3px 3px 0 0; }
.modal-modern .modal-content:has(.date-picker) .modal-footer { border-radius: 0 0 3px 3px; position: relative; z-index: 0; }
.modal-modern .date-picker { position: relative; }
.modal-modern ul.dropdown-menu[uib-datepicker-popup-wrap], .modal-modern .uib-datepicker-popup { z-index: 1100; min-width: 280px; max-height: none; overflow: visible; }
.modal-modern .uib-datepicker-popup table { width: 100%; }
/* alignement : le formulaire commence exactement sous la rangee d'onglets, dans tous les onglets */
.poste-etape { margin-left: 0; }
/* rangees d'onglets regulieres : 3 colonnes (2 rangees de 3), 6 en ligne sur grand ecran */
.poste-onglets { display: grid; grid-template-columns: repeat(3, 1fr); }
.poste-onglets > li { min-width: 0; }
@media (min-width: 1700px) {
  .poste-onglets { grid-template-columns: repeat(6, 1fr); }
}
@media (max-width: 575px) {
  .poste-onglets { grid-template-columns: repeat(2, 1fr); }
}
/* ===== listes filtrees (bons d'achat, services, sorties/entrees huile, grignon) : meme en-tete que la liste des postes ===== */
.liste-centre .card > .card-header.card-padding[style] { background: #fff !important; padding-bottom: 6px; }
.liste-centre .card > .card-header.card-padding[style] h1 { background: none !important; margin: 0 0 4px; font-size: 22px; font-weight: 600; color: var(--sk1, #1565c0); }
.liste-centre .card > .row:has(> #chat-search) { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px 28px; margin: 0; padding: 4px 10px 16px; }
.liste-centre .card > .row > #chat-search { float: none; width: auto; margin: 0 !important; padding: 0; }
.liste-centre .card > .row > #chat-search:has(select) { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; }
.liste-centre .card > .row > #chat-search:has(select) > div { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: #607d8b; white-space: nowrap; }
.liste-centre .card > .row > #chat-search select { height: 38px; min-width: 120px; padding: 4px 10px; border: 1px solid #cfd8dc; border-radius: 6px; background: #fff; color: #37474f; font-size: 14px; font-weight: 400; }
.liste-centre .card > .row > #chat-search > div[style*="font-size:large"] { font-size: 15px !important; font-weight: 600; color: #37474f; line-height: 1.8; }
.liste-centre .card > .row > #chat-search .fg-line { margin: 0; }
.liste-centre .card > .row > #chat-search > .fg-line { padding-left: 0 !important; padding-right: 0 !important; min-width: 240px; }
.liste-centre .card > .row > #chat-search > #chat-search { margin: 10px 0 0 !important; padding: 0 !important; }
.liste-centre .card > .row > #chat-search span[style*="x-large"] { display: inline-block; padding: 6px 16px; border-radius: 8px; background: #e3f2fd; color: var(--sk1, #1565c0); font-size: 18px !important; font-weight: 700; }
.liste-centre .card > .row > #chat-search > div[style*="font-size:large"] { display: block !important; padding: 2px 0; }
/* titres de page de type "block-header" (parametres globaux) : meme titre que les listes */
.liste-centre .block-header { margin: 0; padding: 22px 10px 10px 25px; }
.liste-centre .block-header > h2 { margin: 0; font-size: 22px; font-weight: 600; text-transform: none; color: var(--sk1, #1565c0); line-height: 1.2; }
/* ===== pages d'informations en lecture / edition (societe, parametrage, fiches client, article, utilisateur) ===== */
.pmb-block .pmbb-header { display: flex; justify-content: flex-end; align-items: center; min-height: 44px; padding: 8px 4px 0; }
.pmb-block .pmbb-header .actions { position: static; display: block; margin: 0; padding: 0; list-style: none; }
.pmb-block .pmbb-header .actions > li { display: inline-block; }
/* mode lecture : etiquette / valeur alignees, lignes separees */
.pmb-block .pmbb-view dl.dl-horizontal { display: flex; align-items: baseline; gap: 16px; margin: 0; padding: 10px 6px; border-bottom: 1px solid #eef1f4; }
.pmb-block .pmbb-view dl.dl-horizontal:hover { background: #f8fafb; }
.pmb-block .pmbb-view dl.dl-horizontal > dt { flex: 0 0 210px; width: auto; float: none; margin: 0; text-align: left; font-size: 13px; font-weight: 600; color: #607d8b; }
.pmb-block .pmbb-view dl.dl-horizontal > dd { flex: 1 1 auto; width: auto; margin: 0; padding: 0; float: none; color: #263238; font-size: 14.5px; font-weight: 500; min-height: 20px; word-break: break-word; }
.pmb-block .pmbb-view dl.dl-horizontal > dd:empty::before, .pmb-block .pmbb-view dl.dl-horizontal > dd:blank::before { content: "\2014"; color: #b0bec5; }
.pmb-block .pmbb-view dd .img-responsive { max-height: 120px !important; border-radius: 6px; border: 1px solid #e3e8ec; padding: 6px; background: #fff; }
/* mode edition : meme grille, champs de meme hauteur */
.pmb-block .pmbb-edit dl.dl-horizontal { display: flex; align-items: center; gap: 16px; margin: 0 0 14px; }
.pmb-block .pmbb-edit dl.dl-horizontal > dt { flex: 0 0 210px; width: auto; float: none; margin: 0; padding: 0 !important; text-align: left; font-size: 13px; font-weight: 600; color: #607d8b; }
.pmb-block .pmbb-edit dl.dl-horizontal > dd { flex: 1 1 auto; width: auto; margin: 0; float: none; }
.pmb-block .pmbb-edit .form-control, .pmb-block .pmbb-edit select.form-control { height: 40px; padding: 6px 12px; border: 1px solid #cfd8dc; border-radius: 6px; background: #fff; box-shadow: none; font-size: 14.5px; }
.pmb-block .pmbb-edit .form-control:focus { border-color: var(--sk2, #2196f3); box-shadow: 0 0 0 3px rgba(33, 150, 243, .18); }
.pmb-block .pmbb-edit .fg-line:after { display: none; }
.pmb-block .pmbb-edit .fileinput .row { display: flex; align-items: center; margin: 0; }
.pmb-block .pmbb-edit .fileinput .row > [class*="col-"] { float: none; width: auto; padding: 0 8px 0 0; }
.pmb-block .pmbb-edit .fileinput .row > .col-sm-2 > div { display: flex; gap: 8px; }
.pmb-block .pmbb-edit .fileinput .btn-icon { margin: 0 !important; }
.pmb-block .pmbb-edit > div.m-t-30, .pmb-block form.pmbb-edit > .m-t-30 { display: flex; gap: 12px; align-items: center; margin-top: 22px !important; padding-top: 16px; border-top: 1px solid #eef1f4; }
.pmb-block .pmbb-edit .btn-primary { padding: 9px 24px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; border-radius: 6px; }
.pmb-block .pmbb-edit .btn-link { color: #607d8b; text-transform: uppercase; font-weight: 600; }
@media (max-width: 767px) {
  .pmb-block dl.dl-horizontal { flex-direction: column; align-items: stretch !important; gap: 4px !important; }
  .pmb-block dl.dl-horizontal > dt { flex-basis: auto !important; }
}
/* correctifs : le theme reduit les liens « actions » a une icone ronde et decale les valeurs */
.pmb-block .pmbb-header { min-height: 0; padding-top: 14px; padding-bottom: 6px; }
.pmb-block .pmbb-view dl.dl-horizontal, .pmb-block .pmbb-edit dl.dl-horizontal { align-items: center; }
.pmb-block .pmbb-view dl.dl-horizontal > dt, .pmb-block .pmbb-view dl.dl-horizontal > dd { padding: 0 !important; margin: 0 !important; line-height: 1.4; float: none !important; position: static !important; }
.pmb-block .pmbb-view dl.dl-horizontal > dt { width: auto !important; flex: 0 0 210px; }
.pmb-block .pmbb-body > .row > [class*="col-"] { float: none; width: 100%; max-width: 780px; }
.pmb-block .pmbb-body { padding-top: 6px; }
/* ===== blocs de saisie « brd-2 » (bons d'achat, collections, factures) : meme style que le poste ===== */
.liste-centre .card [style*="background-color:#f4f4f4"], .liste-centre .card [style*="background:#f4f4f4"] { background: none !important; }
.liste-centre .card-header h1, .liste-centre .card-header h2 { color: var(--sk1, #1565c0); font-weight: 600; text-shadow: none; }
.liste-centre .row:has(> [class*="col-"] > .brd-2) { display: flex; flex-wrap: wrap; align-items: stretch; margin-left: -8px; margin-right: -8px; }
.liste-centre .row:has(> [class*="col-"] > .brd-2) > [class*="col-"] { float: none; padding: 0 8px; margin-bottom: 14px; }
.liste-centre .brd-2.p-15 { height: 100% !important; min-height: 92px; padding: 12px 14px !important; border: 1px solid #cfd8dc !important; border-radius: 8px; background: #fff; box-shadow: none; }
.liste-centre .brd-2.p-15 > div[class*="f-16"] { font-size: 12px !important; font-weight: 600; color: #607d8b !important; margin-bottom: 6px !important; }
.liste-centre .brd-2.p-15 .form-control, .liste-centre .brd-2.p-15 select { height: 40px; padding: 6px 12px; border: 1px solid #cfd8dc; border-radius: 6px; background: #fff; box-shadow: none; font-size: 15px !important; }
.liste-centre .brd-2.p-15 .form-control:focus { border-color: var(--sk2, #2196f3); box-shadow: 0 0 0 3px rgba(33, 150, 243, .18); }
.liste-centre .brd-2.p-15 h4 { margin: 0 !important; }
.liste-centre .brd-2.p-15 .fg-line:after { display: none; }
.liste-centre .brd-2.p-15 .date-picker { margin: 0 !important; }
/* lignes de TOUS les tableaux de donnees (ng-table et table-striped) : une ligne sur deux teintee, survol plus marque */
table.table-striped > tbody > tr:nth-of-type(odd) > td, table.table-striped > tbody > tr:nth-of-type(odd) > th, table[ng-table] > tbody > tr:nth-of-type(odd) > td, table[ng-table] > tbody > tr:nth-of-type(odd) > th { background: #ffffff; }
table.table-striped > tbody > tr:nth-of-type(even) > td, table.table-striped > tbody > tr:nth-of-type(even) > th, table[ng-table] > tbody > tr:nth-of-type(even) > td, table[ng-table] > tbody > tr:nth-of-type(even) > th { background: #eef4fa; }
table.table-striped > tbody > tr:hover > td, table.table-striped > tbody > tr:hover > th, table[ng-table] > tbody > tr:hover > td, table[ng-table] > tbody > tr:hover > th { background: #dcebf8 !important; }
/* a l'impression (bons, factures) : fond blanc */
@media print {
  table.table-striped > tbody > tr > td, table[ng-table] > tbody > tr > td, table.table-striped > tbody > tr > th, table[ng-table] > tbody > tr > th { background: #fff !important; }
}
/* ===== fenetres modales : plus fines, plus douces ===== */
.modal-backdrop.in { opacity: .38; }
.modal-modern .modal-dialog { margin-top: 56px; }
.modal-modern.fade .modal-dialog { transform: translateY(-14px) scale(.985); transition: transform .22s ease, opacity .22s ease; }
.modal-modern.in .modal-dialog { transform: none; }
.modal-modern .modal-content { border-radius: 16px; box-shadow: 0 20px 55px rgba(15, 40, 70, .30), 0 2px 8px rgba(15, 40, 70, .12); }
.modal-modern:not(.modal-doc):not(.modal-apercu) .modal-dialog:not(.modal-lg) { max-width: 94%; }
.modal-modern .modal-body { padding: 18px 22px 8px; }
.modal-modern .modal-body label { font-size: 12px; font-weight: 600; color: #607d8b; }
.modal-modern .modal-body .form-control { height: 38px; padding: 6px 12px; border: 1px solid #d7e0e8; border-radius: 8px; background: #fff; }
.modal-modern .modal-body .form-control:focus { border: 1px solid var(--sk2, #2196f3); box-shadow: 0 0 0 3px rgba(33, 150, 243, .15); }
.modal-modern .modal-footer { padding: 12px 22px 18px; }
/* boutons : couleurs intuitives (valider = vert, annuler = gris, supprimer = rouge) */
.modal-modern .mm-btn-danger { background: linear-gradient(135deg, #e53935, #c62828) !important; color: #fff !important; border: 0 !important; }
.modal-modern .modal-footer { background: #f6f9fc; border-top: 1px solid #e6eef6; padding: 12px 20px; }
/* champs plus compacts */
.modal-modern .modal-body { padding: 16px 20px 10px; }
.modal-modern .modal-body label { font-size: 11.5px; margin-bottom: 3px; }
.modal-modern .modal-body .form-control { height: 34px; padding: 4px 10px; font-size: 13.5px; border-radius: 7px; }
.modal-modern .modal-body .form-group { margin-bottom: 12px; }
/* ===== citernes : cartes de niveau et journal des mouvements ===== */
.page-citernes { padding: 0 24px 30px 40px; }
.ct-resume { display: flex; gap: 14px; margin-top: 10px; flex-wrap: wrap; }
.ct-resume > div { background: #fff; border: 1px solid #e3e8ec; border-radius: 10px; padding: 8px 16px; min-width: 150px; }
.ct-resume small { display: block; font-size: 11.5px; font-weight: 600; color: #78909c; text-transform: uppercase; letter-spacing: .4px; }
.ct-resume b { font-size: 20px; color: #263238; }
.jc-entree { background: #e8f5e9; color: #2e7d32; }
.jc-sortie { background: #fff3e0; color: #e65100; }
.jc-annulation { background: #e3f2fd; color: #1565c0; }
.jc-nettoyage { background: #f3e5f5; color: #7b1fa2; }
.jc-correction { background: #ffebee; color: #c62828; }
.jc-report { background: #eceff1; color: #607d8b; }
/* consultation d'une facture */
.liste-prof table td.plus { color: #2e7d32; font-weight: 600; }
