.body-app .lockscreen-wrapper .profile-wrapper {
    border-radius: 0px;
    height: 85px;
    margin-right: 11px;
    margin-top: 0px;
    overflow: hidden;
    width: auto;
    display: inline-block;
}
.body-app .lockscreen-wrapper .profile-wrapper img {
    height: 85px;
    max-width: 100%;
}
.body-app .lockscreen-wrapper.intro-profile {
    height: 85px;
    max-width: 100%;
}
.color-bands.grey {
  background-color: #cdcdcd;
}
.body-app.no-top .grid.simple .grid-title,
.body-app.no-top .grid.simple .grid-body,
.body-app.no-top .grid.simple .grid-title + .grid-body {
    border-radius: 0;
}
.body-app .add-indispo {
    border-radius: 5px;
    border: 3px #adb4b9;
    border-style: dashed;
    text-align: center;
    cursor: pointer;
}
.body-app .add-indispo .grid-title {
    padding: 15px !important;
}
.body-app .add-indispo i {
    font-size: 20px;
}
.body-app .grid-title.descriptive p {
    width: 80%;
}
.algs {
    display: inline;
}
.algs img , img.algs{
    height: 25px;
    margin:0px 2px;
    cursor:pointer;
}
.icon-co2 {
    color:#007a6f;
    font-weight: 800;
    transform: rotate(30deg);
}
.co2-container {
    background: linear-gradient(45deg, #007a6f, #00ac8a);
    background-color: #008876;
    border-radius: 20px;
    color: white;
    font-family: 'montserrat';
    padding: 20px;
    margin:10px 0px 20px
}
.co2-container-warning {
    background: linear-gradient(45deg, #de7400, #f9b965);
    background-color: #fbb05e;
}
.co2-container .side-left {
    text-align: center;
}
.co2-container .side-right {
    text-align: right;
    min-height: 100px;
}
.co2-container .side-left i {
    font-size: 60px;
    transform: rotate(30deg);
}
.co2-container .side-left i.no-rotate {
    transform: none;
}
.co2-container h1,.co2-container h2,.co2-container h3, .co2-container h4, .co2-container h5, .co2-container h6{
    color:white !important;
    font-family: 'montserrat' !important;
}
.co2-container small{
    color:white !important;
}
.co2-container h3{
    font-size:30px !important;
    font-weight: 900;
    color:#cccccc;
}
.co2-container .side-right .ab-img{
    position: absolute;
    width: 50px;
    bottom: 0px;
    right: 10px;
}
.co2-container .side-right .help{
    position: absolute;
    width: 50px;
    top: 0px;
    right: 10px;
}
.btn-modal-co2 {
    cursor: pointer;
    background: #009688;
    color: #fff;
    padding: 3px 7px;
    border-radius: 5px;
    margin: 0px 5px 2px 4px;
    vertical-align: text-bottom;
    text-align: center;
}
.btn-modal-co2.warning {
    background: #fbb05e;
}
.btn-modal-co2 i {
    font-weight: 900;
    transform: rotate(30deg);
    vertical-align: text-bottom;
}
.btn-modal-co2 i.no-rotate {
    transform: none;
}
.checkbox.check-primary.checkbox-circle.checkbox-xl {
    display: inline-block;
}
.checkbox.check-primary.checkbox-circle.checkbox-xl label{
    height: 10px !important;
}
.checkbox.check-primary.checkbox-circle.checkbox-xl label:before{
    width: 30px !important;
    height: 30px !important;
}
.checkbox.check-primary.checkbox-circle.checkbox-xl label:after{
    width: 28px !important;
    height: 28px !important;
	  left: -3px !important;
    top: 7px !important;
    font-size: 20px !important;
}
/* HACCP */
.btn.btn-icon-grid {
    display: block;
    width: 100%;
    padding: 20px 5px;
    text-align: center;
    border-radius: 2px;
    position: relative;
}
.btn.btn-icon-grid .icon {
    font-size: 50px;
    margin: 10px 0px 15px;
    font-weight: normal;
}
.position-relative .icon-right {
    position: absolute;
    bottom: -20px;
    right: 5px;
    cursor: help;
    font-size: 20px;
    display: inline-block;
}
.btn.btn-icon-grid b {
    font-size: 14px;
    font-weight: bold;
    display: block;
    padding: 0px 5px 10px;
    font-family: 'Montserrat';
    white-space: normal;
}
.haccp .notification-messages {
    overflow: hidden;
    position: relative;
}
.haccp .notification-messages, .notification-messages-chat {
    padding: 10px 12px 10px;
}
.haccp .notification-messages .message-wrapper {
    display: inline-block;
    width: 100%;
    height: 43px;
    float: left;
}
.haccp .notification-messages .date {
    display: inline-block;
    font-size: 11px;
    line-height: 15px;
    font-style: normal;
    opacity: 0.5;
    max-width: 100%;
}
.haccp .notification-messages.danger  {
    background-color: #ffbfbf;
    color: #5d616a;
    border: 2px solid #c19191;
}
.haccp .notification-messages.warning  {
    background-color: #f9cda7;
    color: #5d616a;
    border: 2px solid #c1b191;
}
.haccp .notification-messages.info {
    border: 2px solid #c8e8f8;
}
.haccp .notification-messages.warning {
    color: #5d616a;
}
.haccp .notification-messages .users {
    display: inline-block;
    position: absolute;
    right: 10px;  
    top: 10px;
}
.haccp .label {
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: inline-block;
}
.haccp .h-tasks-date {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.haccp .h-tasks-date input {
    width: auto;
}
.label.zone {
    background-color: #00000096;
    color: #ffffff;
}
.grid.simple.grid-day {
    border-top: 2px solid #8fa2ab;
}
.bg-ai {
    box-shadow: 0px 0px 20px 5px rgba(161, 127, 224, 0.5);
    -webkit-box-shadow: 0px 0px 20px 5px rgba(161, 127, 224, 0.5);
    -moz-box-shadow: 0px 0px 20px 5px rgba(161, 127, 224, 0.5);
}
.btn-ai {
    box-shadow: 0px 0px 10px 2px rgba(52,204,204,0.72) inset;
    -webkit-box-shadow: 0px 0px 10px 2px rgba(52,204,204,0.72) inset;
    -moz-box-shadow: 0px 0px 10px 2px rgba(52,204,204,0.72) inset;
}
.btn-ai:hover {
    box-shadow: 0px 0px 5px 1px rgba(52,204,204,0.72) inset;
    -webkit-box-shadow: 0px 0px 5px 1px rgba(52,204,204,0.72) inset;
    -moz-box-shadow: 0px 0px 5px 1px rgba(52,204,204,0.72) inset;
}
/* Compact, discreet AI button — secondary to the manual action beside it */
.btn-ai-sm {
    padding: 4px 11px !important;
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    box-shadow: 0 1px 6px rgba(161, 127, 224, 0.3) !important;
}
.btn-ai-sm img {
    height: 13px !important;
    margin-right: 4px !important;
}
.bg-ai .table-json table{
    margin: 5px auto;
}
.bg-ai .table-json table td, .bg-ai .table-json table th{
    text-align: center;
    padding: 1px 3px;
    border: 1px solid;
}
.prod-ai-preview {
    max-height: 40vh;
    overflow: auto;
}
.bg-ai .panel-default > .panel-heading {
    background: #ebf0f2;
    padding: 0px !important;
}
.bg-ai .panel-title {
    font-size: 12px;
    color: #8c9091;
}
.bg-ai .panel-body {
    white-space: pre-line;
    font-size: 12px;
}
.small-titles h1, .small-titles h2, .small-titles h3, .small-titles h4, .small-titles h5, .small-titles h6 {
    font-size: 16px;
}

/* NUTRITIONAL TABLE */
.table-nutri { font-size: 12px; margin-bottom: 5px; }
.table-nutri td, .table-nutri th { padding: 3px 8px !important; border-top: 1px solid #eee !important; }
.table-nutri thead th { border-bottom: 2px solid #ddd !important; font-size: 11px; color: #999; }
.table-nutri-compact { font-size: 11px; margin-bottom: 3px; }
.table-nutri-compact td, .table-nutri-compact th { padding: 1px 5px !important; }
.table-nutri-compact thead th { font-size: 10px; color: rgba(255,255,255,0.6); }
.table-nutri-compact td, .table-nutri-compact th { border-top-color: rgba(255,255,255,0.15) !important; }

/* TWO-COLUMN CO2/NUTRI LAYOUT */
.co2-row { margin: 10px 0 20px; }
.co2-row > [class*="col-"] { padding: 0 5px; }
.co2-container-nutri {
    background: linear-gradient(45deg, #b9453d, #e68900);
    background-color: #F44336;
}
.co2-compact { padding: 15px 18px; position: relative; }
.co2-block-header { margin-bottom: 5px; display: flex; align-items: center; gap: 8px; }
.co2-block-header i { font-size: 28px; }
.co2-block-header b { font-size: 13px; letter-spacing: 0.5px; }
.co2-block-header .pull-right { margin-left: auto; }
.co2-value { font-size: 26px !important; font-weight: 900; margin: 2px 0 5px; }
.co2-score-footer { display: flex; align-items: center; gap: 10px; margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,0.2); }
.co2-score-img { max-height: 45px; }
.co2-score-label { font-size: 11px; font-weight: 700; letter-spacing: 0.5px; opacity: 0.85; }
.co2-agribalyse { position: absolute; bottom: 10px; right: 12px; cursor: pointer; }
.co2-agribalyse-img { width: 40px; opacity: 0.8; }
.co2-agribalyse-img:hover { opacity: 1; }
@media (max-width: 991px) {
    .co2-row > [class*="col-"] { padding: 0 15px; }
    .co2-row > .col-xs-12:first-child .co2-container { margin-bottom: 10px; }
}
.table-nutri-compact th, .table-nutri-compact td {
    color: #f2f2f2;
    font-size: 11px;
}
/* CUSTOM SWEET ALERT */
.sweet-alert {
    margin-left: -15vw !important;
    width: 30vw !important;
}
@media (max-width: 1700px) {
    .sweet-alert {
        margin-left: -25vw !important;
        width: 50vw !important;
    }
}
@media (max-width: 1400px) {
    .sweet-alert {
        margin-left: -30vw !important;
        width: 60vw !important;
    }
}
@media (max-width: 1200px) {
    .sweet-alert {
        margin-left: -40vw !important;
        width: 80vw !important;
    }
}
@media (max-width: 768px) {
    .sweet-alert {
        margin-left: -45vw !important;
        width: 90vw !important;
    }
}
@media (max-width: 576px) {
    .sweet-alert {
        left: 0 !important;
        margin-left: 0 !important;
        width: 100% !important;
    }
}

/* Password Strength Indicator */
.password-strength { margin-top: 10px; padding: 10px; background: #f9f9f9; border-radius: 4px; }
.password-strength.dark { background: #e9e9e9; }
.strength-bar { height: 6px; background: #e0e0e0; border-radius: 3px; overflow: hidden; margin-bottom: 10px; }
.strength-fill { height: 100%; width: 0%; transition: width 0.3s, background-color 0.3s; }
.strength-fill.weak { background: #e74c3c; width: 20%; }
.strength-fill.fair { background: #e67e22; width: 40%; }
.strength-fill.medium { background: #f1c40f; width: 60%; }
.strength-fill.good { background: #27ae60; width: 80%; }
.strength-fill.strong { background: #2ecc71; width: 100%; }
.criteria-list { list-style: none; padding: 0; margin: 0; font-size: 12px; }
.criteria-list li { padding: 3px 0; color: #999; transition: color 0.2s; }
.criteria-list li::before { content: "✗ "; color: #e74c3c; }
.criteria-list li.valid { color: #27ae60; }
.criteria-list li.valid::before { content: "✓ "; color: #27ae60; }
.criteria-list li.invalid { color: #e74c3c; }
.login-rules { margin-top: 10px; padding: 10px; background: #f9f9f9; border-radius: 4px; }

/* Login Page (index.php) */
.index-body { background: #000; }
.login-container { animation-duration: 2s; }
.login-logo-wrapper { padding-top: 80px; padding-bottom: 80px; }
.login-logo { max-height: 200px; max-width: 80%; }
.login-notif { display: none; }
.login-remote-access { display: none; }
.login-remote-icon { font-size: 50px; }
.login-separator { color: #999; margin-bottom: 12px; }
.login-separator-line { display: inline-block; width: 40%; border-bottom: 1px solid #ddd; vertical-align: middle; }
.login-separator-text { display: inline-block; padding: 0 10px; vertical-align: middle; font-size: 12px; }
.login-microsoft-icon { width: 21px; height: 21px; vertical-align: middle; margin-right: 12px; }
.login-microsoft-text { vertical-align: middle; }
.login-powered { color: #999; }
.login-lost-pass-form { display: none; }

/* E-Invoicing / PDP Transmission Badge */
.pdp-transmission-badge {
    margin-top: 10px;
    padding: 10px 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    color: #fff;
    display: inline-block;
    text-align: left;
}
.pdp-transmission-badge .pdp-badge-inner {
    display: flex;
    align-items: center;
    gap: 10px;
}
.pdp-transmission-badge .pdp-badge-icon {
    font-size: 24px;
    opacity: 0.9;
}
.pdp-transmission-badge .pdp-badge-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.85;
}
.pdp-transmission-badge .pdp-badge-provider {
    font-weight: 600;
    font-size: 14px;
}
.pdp-transmission-badge .pdp-badge-details {
    font-size: 11px;
    opacity: 0.85;
}

td .shop-note {
    font-size: 11px;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    color:rgb(194, 99, 99);
}

/* Retour default values button */
.save-ret-def-all {
    opacity: 0.7;
    font-size: 12px;
}
.save-ret-def-all:hover {
    opacity: 1;
}


/* PRIMVUE DATATABLE */
.p-datatable-header-cell input.p-inputtext.p-component {
    width: 100%;
    min-width: 80px;
}
.p-datatable-header-cell button.p-datatable-column-filter-button {
    width: 30px;
}
.p-datatable-header-cell .p-datatable-inline-filter {
    gap: 1px;
}

/* Image picker modal */
.img-picker-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 55vh;
    overflow-y: auto;
    padding: 4px;
}
.img-picker-thumb {
    width: 90px;
    height: 90px;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 4px;
    transition: border-color .15s, opacity .15s;
}
.img-picker-thumb:hover {
    border-color: #fbb05e;
}
/* Image par défaut du slide : pastille sur l'image en place, étoile sur les autres images du même nom */
.img-picker-item {
    position: relative;
}
.img-picker-item .img-picker-thumb {
    display: block;
}
.img-picker-default-badge {
    position: absolute;
    left: 2px;
    right: 2px;
    bottom: 2px;
    padding: 2px 0;
    border-radius: 0 0 3px 3px;
    background: rgba(0, 0, 0, .65);
    color: #fff;
    font-size: 10px;
    line-height: 14px;
    text-align: center;
    pointer-events: none;
}
.img-picker-default-badge .fa {
    color: #fbb05e;
}
.img-picker-set-default {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .9);
    color: #555;
    font-size: 12px;
    line-height: 22px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
    cursor: pointer;
}
.img-picker-set-default:hover {
    background: #fbb05e;
    color: #fff;
}
.img-picker-info {
    margin-bottom: 12px;
    padding: 8px 12px;
    background: #f9f9f9;
    border-radius: 4px;
    border-left: 3px solid #fbb05e;
}
/* Upload panel (outside modal, fixed bottom-right) */
.img-picker-upload-panel {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
    width: 380px;
    animation: fadeInUp .2s;
}
.img-picker-upload-inner {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.18);
    padding: 20px;
    position: relative;
}
.img-picker-upload-inner .close {
    position: absolute;
    top: 10px;
    right: 14px;
}
.img-picker-upload-inner h5 {
    margin: 0 0 5px;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.img-picker-dropzone {
    margin-top: 10px;
    padding: 25px;
    border: 2px dashed #ccc;
    border-radius: 6px;
    text-align: center;
    cursor: pointer;
    color: #999;
    transition: border-color .15s, color .15s;
}
.img-picker-dropzone:hover,
.img-picker-dropzone-active {
    border-color: #fbb05e;
    color: #fbb05e;
}
.img-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: #f5f5f5;
    border: 2px dashed #ccc;
    cursor: pointer;
    padding: 20px;
    box-sizing: border-box;
}
.img-placeholder:hover {
    border-color: #999;
    background: #eee;
}
.img-placeholder .fa-picture-o {
    font-size: 40px;
    color: #aaa;
    margin-bottom: 10px;
}
.img-placeholder-text {
    font-size: 16px;
    font-weight: bold;
    color: #666;
    margin-bottom: 8px;
}
.img-placeholder-hint {
    font-size: 12px;
    color: #999;
    max-width: 400px;
    line-height: 1.4;
}

/* ==========================================================================
   Vue DataTable shared styles (template-generator & template-helpers)
   ========================================================================== */
.dt-header { display: flex; justify-content: space-between; align-items: center; }
.dt-header-search,
.dt-header-actions { display: flex; gap: 10px; align-items: center; }
.dt-header-search .p-inputtext { width: 200px; }
/* écran étroit (téléphone) : recherche pleine largeur, actions à la ligne — sinon la
   toolbar déborde du cadre du tableau et les boutons colonnes/export sont coupés */
@media screen and (max-width: 640px) {
    .dt-header { flex-wrap: wrap; gap: 8px; }
    .dt-header-search { flex: 1 1 100%; }
    .dt-header-search > span { white-space: nowrap; }
    .dt-header-search .p-inputtext { flex: 1 1 auto; width: auto; min-width: 0; }
    .dt-header-actions { margin-left: auto; flex-wrap: wrap; }
}
.dt-col-menu { max-height: 400px; overflow-y: auto; }
/* Bulk show/hide all columns row, sticky on top of the column menu */
.dt-col-menu-actions { position: sticky; top: 0; z-index: 1; display: flex; gap: 6px; padding-bottom: 6px; margin-bottom: 4px; background: #fff; border-bottom: 1px solid #eee; }
.dt-col-menu-action { flex: 1; border: 1px solid #e2e8f0; border-radius: 6px; background: #f8fafc; color: #475569; font-size: 11px; font-weight: 600; padding: 5px 6px; cursor: pointer; transition: background 0.15s, color 0.15s, border-color 0.15s; }
.dt-col-menu-action:hover { background: #2563eb; color: #fff; border-color: #2563eb; }
.dt-col-menu-item { padding: 4px 0; display: flex; align-items: center; gap: 8px; }
.dt-col-menu-item input { cursor: pointer; margin: 0; flex-shrink: 0; }
.dt-col-menu-item label { cursor: pointer; margin: 0; flex: 1; user-select: none; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Column freeze buttons (G/D) in column menu popover */
.dt-col-freeze-btns { display: flex; gap: 3px; flex-shrink: 0; margin-left: auto; }
.dt-col-freeze-btn {
    width: 22px; height: 20px; border: none; border-radius: 4px;
    font-size: 10px; font-weight: 700; cursor: pointer;
    background: #f1f5f9; color: #94a3b8;
    transition: background 0.15s, color 0.15s;
    padding: 0; line-height: 20px; text-align: center;
}
.dt-col-freeze-btn:hover { background: #e2e8f0; color: #475569; }
.dt-col-freeze-btn--active { background: #2563eb; color: #fff; }
.dt-col-freeze-btn--active:hover { background: #1d4ed8; color: #fff; }
/* Column carried in the markup for the file exports only — DataTables still sees it as visible */
.dt-export-only { display: none; }
.dt-export-item { padding: 8px; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.dt-export-item:not(:last-child) { border-bottom: 1px solid #eee; }
.dt-export-item i { width: 20px; }
.dt-spinner { width: 20px; height: 20px; }
.dt-options-nowrap { white-space: nowrap; }
.dt-options-btn { margin-left: 2px; }
.dt-options-btn-action { margin-left: 2px; cursor: pointer; }
.dt-rec-link { margin-top: 5px; display: inline-block; margin-right: 5px; }

/* Modale acompte — projet HT (components/pjt_prix.php) */
.fa-acompte-modal .fa-acompte-select {
	width: 100%;
	max-width: 280px;
}
.fa-acompte-modal .fa-acompte-saisir-ttc-wrap {
	margin: 6px 0 2px 0;
}
.fa-acompte-modal .fa-acompte-equiv {
	font-size: 12px;
	margin: 0 0 8px 0;
	min-height: 1.2em;
}

/* Aides au calcul - fiche produit (v_produit) */
.help-qt-compo {
	display: inline-block;
}
input.help_qt_compo {
	min-height: 18px !important;
	height: 18px !important;
	margin: 3px 0 0 0;
	width: 60px;
	font-size: 10px !important;
	padding: 0 3px !important;
}
i.help_qt_compo {
	font-size: 10px;
	margin-top: 5px;
	margin-left: 3px;
	cursor: pointer;
}
.help-qt-compo.hide {
	display: none !important;
}
@media print {
	.help-qt-compo, .noprint { display: none !important; }
}

/* Calculettes n_produit */
input.help_calc_gram, input.help_calc_subqt {
	min-height: 18px !important;
	height: 18px !important;
	margin: 3px 0 0 0;
	width: 80px;
	font-size: 10px !important;
	padding: 0 3px !important;
}
i.help_calc_gram, i.help_calc_subqt {
	font-size: 10px;
	margin-top: 5px;
	margin-left: 3px;
	cursor: pointer;
}

/* Platerie header inline */
.platerie-header { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 13px 0px;}
.platerie-header h3 { margin: 0; white-space: nowrap; }
.platerie-surcout { display: flex; align-items: center; gap: 6px; margin-left: auto; font-size: 12px; font-weight: 600; }
.platerie-surcout-label { white-space: nowrap; margin: 0; }
.platerie-surcout-input { width: 90px; height: 28px !important; min-height: 28px !important; font-size: 12px !important; padding: 2px 6px !important; }
.platerie-surcout-val { font-size: 12px; font-weight: 700; white-space: nowrap; padding: 2px 8px; background: #f5f5f5; border: 1px solid #ddd; border-radius: 3px; }

/* Validation column */
.validation-cell { width: 30px; min-width: 30px; max-width: 40px; }
.validation-cell i { font-size: 14px; }

/* Email attachment indicator */
.email-attachment-info { padding: 8px 12px; margin-bottom: 10px; background: #e8f4fd; border-radius: 4px; font-size: 12px; color: #31708f; }
.email-attachment-info i { margin-right: 5px; }

/* Fenêtre « Envoyer document par email » : plus large, éditeur plus haut, pièces jointes */
#modal_email .modal-dialog.modal-email-wide { width: 820px; max-width: 94%; }
@media screen and (max-width: 860px) { #modal_email .modal-dialog.modal-email-wide { width: auto; margin: 10px; } }
.email-attach-input { display: none; }
/* Dossier projet — sous-titres de groupe du cadre « Documents émis » */
.pjt-doc-group { margin: 12px 0 2px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #94a3b8; }
.email-attach-help { display: inline-block; margin-left: 8px; color: #94a3b8; font-size: 12px; }
.email-extra-files { margin-top: 8px; }
.email-extra-file { display: inline-block; margin: 0 8px 6px 0; padding: 4px 10px; background: #f1f5f9; border-radius: 6px; font-size: 12px; }
.email-extra-file i.fa-paperclip { margin-right: 5px; color: #64748b; }
.email-extra-file-del { margin-left: 8px; color: #ef4444; cursor: pointer; }

/* API Integration Header */
.api-header { background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%); border-radius: 8px; padding: 22px 24px; color: #e0e0e0; margin-bottom: 20px; }
.api-header-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.api-header-title { font-size: 15px; font-weight: 700; color: #fff; letter-spacing: .3px; }
.api-header-title i { margin-right: 8px; opacity: .7; }
.api-header-desc { font-size: 12px; line-height: 1.6; color: #b0b8c8; margin-bottom: 14px; }
.api-header-info { display: flex; flex-wrap: wrap; gap: 10px; font-size: 11px; }
.api-header-chip { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); border-radius: 5px; padding: 6px 12px; display: flex; align-items: center; gap: 6px; }
.api-header-chip code { background: rgba(255,255,255,.12); padding: 1px 6px; border-radius: 3px; font-size: 11px; color: #e8e8e8; }
.api-header-chip .label-muted { color: #8899aa; font-size: 10px; }
.api-header-legend { display: flex; gap: 12px; align-items: center; margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.08); font-size: 11px; color: #8899aa; }
.api-header-legend-item { display: flex; align-items: center; gap: 4px; }
.api-header-legend-dot { width: 8px; height: 8px; border-radius: 2px; }
.api-header-legend-dot.--read { background: #5b9bd5; }
.api-header-legend-dot.--write { background: #e8a838; }
.api-header-legend-dot.--delete { background: #e25d5d; }

/* API Permission Selector */
.api-perm-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; padding: 2px; }
.api-perm-card { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; background: #f8f9fa; border: 1px solid #e9ecef; border-radius: 6px; transition: border-color .15s; }
.api-perm-card:hover { border-color: #c5cad0; }
.api-perm-card-name { font-weight: 600; font-size: 12px; color: #333; letter-spacing: .2px; }
.api-perm-pills { display: flex; gap: 4px; }
.api-perm-pill { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 22px; border-radius: 4px; font-size: 10px; font-weight: 700; cursor: pointer; border: 1.5px solid #ccc; color: #aaa; background: #fff; transition: all .15s; user-select: none; }
.api-perm-pill:hover { opacity: .85; }
.api-perm-pill.active.--read { background: #e8f0fe; border-color: #5b9bd5; color: #3a7bc8; }
.api-perm-pill.active.--write { background: #fef3e0; border-color: #e8a838; color: #c48a1a; }
.api-perm-pill.active.--delete { background: #fde8e8; border-color: #e25d5d; color: #c43a3a; }
.api-perm-pill.disabled { opacity: .3; cursor: default; pointer-events: none; }
.api-perm-actions { display: flex; gap: 6px; margin-bottom: 8px; }
.api-perm-actions .btn { font-size: 11px; padding: 3px 10px; }
.api-perm-mini { display: inline-block; padding: 1px 6px; border-radius: 3px; font-size: 10px; font-weight: 600; margin: 1px 2px; }
.api-perm-mini.--read { background: #e8f0fe; color: #3a7bc8; }
.api-perm-mini.--write { background: #fef3e0; color: #c48a1a; }
.api-perm-mini.--delete { background: #fde8e8; color: #c43a3a; }
.api-perm-mini.--full { background: #e8f5e9; color: #388e3c; }
@media (max-width: 768px) { .api-perm-grid { grid-template-columns: 1fr; } }

/* MCP Settings */
.mcp-intro-badge { display:inline-block; padding:3px 10px; border-radius:4px; font-size:11px; font-weight:600; text-transform:uppercase; letter-spacing:.5px; background:rgba(59,130,246,.1); color:#3b82f6; }
.mcp-intro-desc { font-size:14px; line-height:1.6; color:#555; margin:10px 0 15px; }
.mcp-intro-section { margin-bottom:15px; }
.mcp-intro-section h5 { font-size:13px; font-weight:600; margin-bottom:8px; }
.mcp-intro-section p { font-size:13px; color:#666; margin-bottom:10px; }
.mcp-use-cases { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.mcp-use-case { display:flex; gap:10px; padding:10px; border-radius:6px; background:#f8f9fa; font-size:12px; }
.mcp-use-case > i { font-size:16px; color:#3b82f6; margin-top:2px; }
.mcp-use-case strong { display:block; margin-bottom:3px; font-size:12px; }
.mcp-use-case span { color:#666; line-height:1.5; }
.mcp-modes { display:flex; gap:10px; }
.mcp-mode { flex:1; padding:10px; border-radius:6px; border:1px solid #e5e7eb; }
.mcp-mode-label { display:block; font-weight:600; font-size:12px; margin-bottom:4px; }
.mcp-mode-desc { font-size:12px; color:#666; }
.mcp-intro-security { display:flex; align-items:center; gap:10px; padding:10px; border-radius:6px; background:rgba(34,197,94,.08); color:#16a34a; font-size:12px; margin-top:10px; }
.mcp-intro-security i { font-size:16px; }
.mcp-doc-link { display:flex; gap:12px; align-items:flex-start; }
@media (max-width: 768px) { .mcp-use-cases { grid-template-columns:1fr; } .mcp-modes { flex-direction:column; } }
/* Pers labo: save filters as default */
.btn-save-pers-labo-filters { display: inline-block; margin-top: 5px; float:right;}

/* Product price hint in formula step table */
.prod-price-hint { display: block; font-size: 0.7rem; color: #888; margin-top: 2px; }
.td-prix { min-width: 70px; }
.tr-etape-total th { border-top: 2px solid #dee2e6; font-size: 0.78rem; }

/* Heures supp doc panel - reduced font */
#hsupp-doc-panel .alert-info { font-size: 12px; }

/* Force bold on inputs (native rendering ignores font-weight on macOS) */
input.form-control.bold {
	-webkit-appearance: none;
	appearance: none;
}

/* Settings logo cards */
.settings-logo-card {
	border: 1px solid #e5e5e5;
	border-radius: 6px;
	padding: 15px;
	margin-bottom: 15px;
	display: flex;
	flex-direction: column;
}
input[type="file"] {
	height: auto !important;
}
.settings-logo-card .ajax-upload {
	margin-top: auto;
	cursor: pointer;
}
.settings-logo-card .settings-logo-upload {
	min-height: 0;
	padding: 0;
}
.settings-logo-card .settings-logo-upload .imgCont {
	display: none;
}
.settings-logo-card .btn-img-remove {
	align-self: flex-start;
	margin-bottom: 8px;
}
.settings-logo-preview {
	height: 120px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 4px;
	padding: 10px;
	margin-bottom: 10px;
}
.settings-logo-preview img {
	max-height: 100px;
	max-width: 100%;
	object-fit: contain;
}
.settings-logo-preview-dark {
	background: #1b1e24;
}
.settings-logo-preview-light {
	background: #f4f5f7;
}
.settings-logo-preview-white {
	background: #ffffff;
	border: 1px dashed #ddd;
}
.settings-section-title {
	font-size: 14px;
	font-weight: 600;
	color: #555;
	margin: 20px 0 15px;
	padding-bottom: 8px;
	border-bottom: 1px solid #e5e5e5;
}
/* Margin target badge */
.badge-marge { display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: 14px; font-weight: 600; }
.badge-marge-ok { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.badge-marge-ko { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.badge-marge-na { background: #f3f4f6; color: #6b7280; border: 1px solid #d1d5db; font-size: 11px; padding: 2px 8px; }
.margin-row-missing td { opacity: 0.7; }
.margin-calc-btn { background: #eef2ff; border: 1px solid #c7d2fe; color: #6366f1; border-radius: 6px; padding: 2px 6px; cursor: pointer; font-size: 12px; }
.margin-calc-btn:hover { background: #6366f1; color: #fff; }

/* Budget detail expandable rows (support user) */
.budget-detail-toggle { cursor: pointer; margin-right: 6px; font-size: 11px; color: #6366f1; transition: transform 0.15s; }
.budget-detail-row { display: none; }
.budget-detail-row > td { padding: 0 8px 12px 20px; background: #f8fafc; }
.budget-detail-table { width: 100%; font-size: 11px; border-collapse: collapse; }
.budget-detail-table th { background: #eef2ff; color: #4338ca; font-weight: 600; padding: 4px 8px; text-align: left; border-bottom: 1px solid #c7d2fe; }
.budget-detail-table td { padding: 3px 8px; border-bottom: 1px solid #e2e8f0; }
.budget-detail-table tr:last-child td { border-bottom: none; }
.budget-detail-src { display: inline-block; background: #f1f5f9; color: #64748b; padding: 1px 6px; border-radius: 4px; font-size: 10px; }
.budget-pack-summary > td { font-weight: 600; }
.budget-pack-toggle { cursor: pointer; margin-right: 6px; font-size: 11px; color: #6366f1; transition: transform 0.15s; }
.budget-pack-article > td:first-child { padding-left: 24px; color: #64748b; }
.budget-pack-reserve-excl > td { color: #94a3b8; } /* reserve pack left out of the forecast cost */

/* Project status badge (l_projet, k_projet) */
.pjt-status-badge {
	display: inline-block;
	padding: 2px 10px;
	border-radius: 12px;
	color: #fff;
	font-size: 0.78rem;
	font-weight: 600;
	white-space: nowrap;
}

/* Price Evolution Report - v_res_achat */
.evol-prix-up { color: #d9534f; font-weight: bold; }
.evol-prix-down { color: #0AA699; font-weight: bold; }
.evol-prix-neutral { color: #999; }
.evol-indicator { background: #ECEBEB; padding: 10px 15px; border-radius: 5px; margin: 5px; text-align: center; }
.evol-indicator h5 { margin: 0 0 5px 0; font-size: 13px; color: #666; }
.evol-indicator h3 { margin: 5px 0; font-size: 22px; }

/* Check progress in DataTables */
.check-progress-cell {
	display: flex;
	align-items: center;
	gap: 6px;
}
.check-progress-bar {
	flex: 1;
	height: 4px;
	background: #e2e8f0;
	border-radius: 2px;
	overflow: hidden;
	min-width: 40px;
}
.check-progress-fill {
	height: 100%;
	background: #0ea5e9;
	border-radius: 2px;
}
.check-progress-label {
	font-size: 0.72rem;
	color: #64748b;
	font-weight: 600;
	white-space: nowrap;
}
.check-progress-dual {
	display: flex;
	flex-direction: column;
	gap: 3px;
}
.check-progress-icon {
	font-size: 0.65rem;
	color: #94a3b8;
	width: 12px;
	text-align: center;
}
.check-progress-fill--rec {
	background: #f59e0b;
}
.check-next-info {
	font-size: 0.65rem;
	color: #475569;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 140px;
	display: block;
	padding-left: 2px;
}
.check-next-label {
	color: #94a3b8;
	font-weight: 600;
}
.check-next-assigned {
	color: #0ea5e9;
	font-weight: 500;
}
.check-next-reception {
	color: #94a3b8;
	font-style: italic;
}

/* a_settings.php — floating save button for the form currently in view */
body.settings-page form button[type="submit"][name="categorie"].sticky-active {
	position: fixed;
	bottom: 15px;
	left: 50%;
	transform: translateX(-50%);
	width: 60% !important;
	max-width: 700px;
	margin-left: 0 !important;
	margin-top: 0 !important;
	z-index: 100;
	box-shadow: 0 6px 20px -4px rgba(20, 184, 166, 0.5);
}

/* Camera preview — QR traçabilité détecté */
.cam-qr-badge {
	display: inline-block;
	background: #22c55e;
	color: #fff;
	border-radius: 50%;
	width: 22px;
	height: 22px;
	line-height: 22px;
	text-align: center;
	font-size: 11px;
	margin-left: -20px;
	margin-top: -4px;
	position: relative;
	top: -30px;
	box-shadow: 0 2px 6px rgba(0, 0, 0, .2);
	z-index: 5;
}

/* Secondary DLC label print modal — reading the product's original label (zebra.js) */
.z-ocr-btn { margin: 0; }
.z-ocr-btn .z-ocr-file { display: none; } /* two classes: beats Bootstrap's input[type="file"] { display: block } */
.z-ocr-status { margin-top: 6px; font-size: 12px; color: var(--v3-text-muted); }
.z-ocr-status.is-ok { color: var(--v3-text); font-weight: 600; }
.z-ocr-status.is-warn { color: var(--v3-danger); font-weight: 600; }
.z-ocr-row.is-busy .z-ocr-btn { opacity: .6; pointer-events: none; }
.modal-body .z-ocr-filled { outline: 2px solid var(--v3-success); outline-offset: 1px; } /* outline: the theme forces box-shadow none on inputs */

/* Traçabilité HACCP — source QR vs IA */
.trace-ocr-ok.trace-ocr-qr-source {
	background: #22c55e;
	color: #fff;
}
.trace-ocr-ok.trace-ocr-qr-source::after {
	content: '';
}

/* Solde Personnel — code overridden by personnel-default (contacts.code_rec / code_extra) */
.code-overridden {
	font-style: italic;
	color: #2563eb;
}
.code-original {
	margin-left: 4px;
	color: #94a3b8;
	font-size: 0.85em;
	text-decoration: line-through;
}

/* Fiche réception — photos jointes aux comptes rendus custom (block_retour.php) */
.ret-photos {
	padding: 8px 4px 4px;
	text-align: left;
}
.ret-photos-list {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 6px;
}
.ret-photo-thumb {
	position: relative;
	width: 64px;
	height: 64px;
	border-radius: 6px;
	overflow: hidden;
	border: 1px solid #e2e8f0;
	background: #f8fafc;
}
.ret-photo-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	cursor: zoom-in;
	display: block;
}
.ret-photo-del {
	position: absolute;
	top: 4px;
	right: 4px;
	background: rgba(0, 0, 0, 0.55);
	color: #fff;
	width: 24px;
	height: 24px;
	line-height: 24px;
	text-align: center;
	border-radius: 50%;
	cursor: pointer;
	font-size: 11px;
	user-select: none;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
	transition: background-color 0.15s ease;
	-webkit-tap-highlight-color: transparent;
}
.ret-photo-del:hover,
.ret-photo-del:active {
	background: #ef4444;
}
.ret-add-photo {
	position: relative;
	display: inline-flex;
	align-items: center;
	cursor: pointer;
	margin: 0;
}
.ret-add-photo input[type="file"] {
	display: none !important;
}
.ret-add-photo.is-uploading {
	opacity: 0.6;
	pointer-events: none;
}
@media (max-width: 480px) {
	.ret-photo-thumb { width: 56px; height: 56px; }
	.ret-photo-del { width: 28px; height: 28px; line-height: 28px; font-size: 13px; }
}
/* Variante "rapport retour" — miniatures compactes dans v_res_retour.php (visibles à l'impression et dans le PDF) */
.ret-photos-report {
	gap: 4px;
	margin: 0 0 4px;
}
.ret-photos-report .ret-photo-thumb {
	width: 32px;
	height: 32px;
	border-radius: 3px;
}
.ret-photos-report .ret-photo-thumb img {
	cursor: zoom-in;
}
@media print {
	.ret-photos-report { display: flex !important; flex-wrap: wrap; }
	.ret-photos-report .ret-photo-thumb { display: inline-block !important; }
	.ret-photos-report img { display: block !important; }
}

/* l_besoin — référence fournisseur sous Lot/Prix */
.ref-row {
	display: block;
	font-size: 9px;
	line-height: 1;
	color: #999;
	margin-top: 1px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.ref-row:empty { display: none; }

/* n_formule — sous-label "/pers" sous le prix HT/TTC par produit */
.prix-pers-label {
	display: block;
	font-size: 9px;
	line-height: 1;
	color: #999;
	font-style: italic;
	margin-top: 1px;
}
/* n_formule.php — colonne GRAM et indicateur Total par pers */
.pdt-gram {
	font-size: 13px;
}
.gram-pers-indicator {
	text-align: right;
}
.etape-gram-pers {
	font-size: 12px;
	padding: 4px 10px;
	border-radius: 4px;
	display: inline-block;
}
.etape-gram-pers.label-default {
	background-color: #bbb;
}

/* l_facture.php — colonne Réceptions (liste IDs tronquée) */
.r-ids-cell {
	display: inline-block;
	max-width: 110px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	vertical-align: middle;
}

/* v_produit.php / rec_prod.php — sous-produit avec coef manquant en base */
.table tr.error-coef > td {
	background-color: #fff1f2 !important;
	color: #b91c1c;
}
.table tr.error-coef > td b,
.table tr.error-coef > td strong {
	color: #b91c1c;
}

/* n_reception.php — "Matériel à laisser sur place" : groupage par pack */
#table-articles-sp .sp-pack-header td {
	background: #f1f5f9;
	font-weight: 600;
	border-top: 2px solid #e2e8f0;
}
#table-articles-sp .sp-pack-header .pack-comment {
	background: transparent;
	border: 0;
	border-bottom: 1px dashed #c8d0d8;
	padding: 2px 4px;
	font-weight: normal;
	font-size: 12px;
}
#table-articles-sp .sp-pack-header .pack-comment:focus {
	outline: none;
	border-bottom-color: #2563eb;
	border-bottom-style: solid;
}
#table-articles-sp .sp-pack-header .del-pack {
	cursor: pointer;
	color: #94a3b8;
}
#table-articles-sp .sp-pack-header .del-pack:hover {
	color: #ef4444;
}
#table-articles-sp .sp-pack-row td:first-child {
	padding-left: 28px;
	position: relative;
}
#table-articles-sp .sp-pack-row td:first-child::before {
	content: '└';
	position: absolute;
	left: 12px;
	color: #9aa6b2;
	font-weight: normal;
}

/* Planning cards visibility — compact chip selector (used in a_settings.php > app_perso) */
.planning-cards-config { padding: 2px 0; }
.planning-cards-config .pc-header { margin-bottom: 14px; }
.planning-cards-config .pc-header h5 {
	margin: 0 0 4px;
	font-size: 14px;
	font-weight: 700;
	color: #1e293b;
}
.planning-cards-config .pc-header p {
	margin: 0;
	font-size: 12px;
	color: #64748b;
}
.planning-cards-config .pc-group { margin-bottom: 10px; }
.planning-cards-config .pc-group:last-child { margin-bottom: 0; }
.planning-cards-config .pc-group-label {
	font-size: 10.5px;
	font-weight: 700;
	color: #94a3b8;
	text-transform: uppercase;
	letter-spacing: 0.6px;
	margin-bottom: 6px;
	display: flex;
	align-items: center;
	gap: 6px;
}
.planning-cards-config .pc-group-label i { font-size: 12px; }
.planning-cards-config .pc-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}
.planning-cards-config .pc-chip {
	display: inline-flex;
	align-items: center;
	padding: 5px 11px;
	margin: 0;
	border-radius: 14px;
	background: #f1f5f9;
	border: 1px solid #e2e8f0;
	color: #64748b;
	cursor: pointer;
	user-select: none;
	font-size: 12.5px;
	font-weight: 600;
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
	line-height: 1.4;
}
.planning-cards-config .pc-chip:hover {
	background: #e2e8f0;
	border-color: #cbd5e1;
}
.planning-cards-config .pc-chip input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
	width: 0;
	height: 0;
}
.planning-cards-config .pc-chip small {
	font-weight: 500;
	opacity: 0.7;
	margin-left: 4px;
}
.planning-cards-config .pc-chip::before {
	content: "\f00d";
	font-family: FontAwesome;
	font-size: 10px;
	margin-right: 7px;
	opacity: 0.55;
}
.planning-cards-config .pc-chip:has(input:checked) {
	background: #dcfce7;
	border-color: #86efac;
	color: #15803d;
}
.planning-cards-config .pc-chip:has(input:checked):hover {
	background: #bbf7d0;
	border-color: #22c55e;
}
.planning-cards-config .pc-chip:has(input:checked)::before {
	content: "\f00c";
	opacity: 1;
	color: #22c55e;
}

/* ============================================================
   COUNTER INITIALIZER (modal) — shared by v_pers_solde + v_personnel
   ============================================================ */
.counter-init__header {
	display: flex;
	align-items: center;
	gap: 10px;
	font-weight: 700;
	font-size: 16px;
}
.counter-init__error {
	background: #fff1f2;
	border-left: 4px solid #ef4444;
	color: #b91c1c;
	padding: 10px 14px;
	border-radius: 6px;
	margin-bottom: 14px;
	font-size: 13px;
}
.counter-init__intro {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	background: #eff6ff;
	border-left: 4px solid #2563eb;
	padding: 12px 16px;
	border-radius: 6px;
	margin-bottom: 16px;
	font-size: 12.5px;
	line-height: 1.55;
	color: #1e3a8a;
}
.counter-init__intro-icon {
	flex-shrink: 0;
	font-size: 18px;
	color: #2563eb;
	margin-top: 2px;
}
.counter-init__intro-text {
	flex: 1;
	min-width: 0;
}
.counter-init__intro-text b {
	color: #1e293b;
}
.counter-init__form {
	margin-bottom: 12px;
}
.counter-init__row {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	gap: 12px;
	margin-bottom: 12px;
}
.counter-init__field {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin-bottom: 12px;
}
.counter-init__field label {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.4px;
	color: #64748b;
	margin: 0;
}
.counter-init__field input,
.counter-init__field select {
	border: 1px solid #dce3e8;
	border-radius: 6px;
	padding: 8px 10px;
	font-size: 14px;
}
.counter-init__field input:focus,
.counter-init__field select:focus {
	border-color: #60a5fa;
	outline: none;
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.counter-init__actions {
	display: flex;
	gap: 10px;
	align-items: center;
}
.counter-init__sep {
	border: 0;
	border-top: 1px solid #e2e8f0;
	margin: 18px 0;
}
.counter-init__sub {
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.4px;
	color: #64748b;
	margin: 0 0 10px 0;
}
.counter-init__loading {
	text-align: center;
	padding: 20px 0;
}
.counter-init__empty {
	text-align: center;
	padding: 20px 0;
	color: #94a3b8;
}
.counter-init__table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}
.counter-init__table th {
	text-align: left;
	padding: 8px 10px;
	background: #f8fafc;
	color: #64748b;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	border-bottom: 1px solid #e2e8f0;
}
.counter-init__table td {
	padding: 8px 10px;
	border-bottom: 1px solid #f1f5f9;
}
.counter-init__fam-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 3px 10px;
	border-radius: 6px;
	border: 1px solid;
	font-size: 11px;
	font-weight: 600;
}
.counter-init__actions-col {
	white-space: nowrap;
	text-align: right;
}
.counter-init__icon-btn {
	background: transparent;
	border: 1px solid #e2e8f0;
	border-radius: 6px;
	width: 28px;
	height: 28px;
	cursor: pointer;
	color: #64748b;
	margin-left: 4px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.counter-init__icon-btn:hover { background: #f8fafc; }
.counter-init__icon-btn--danger { color: #ef4444; }
.counter-init__icon-btn--danger:hover { background: #fff1f2; }
@media (max-width: 768px) {
	.counter-init__row { grid-template-columns: 1fr; }
}

/* Code tarif: bouton de versionnement (nouvelle version datée) */
.ver_cp { color: #2563eb; cursor: pointer; margin-right: 18px; }
.ver_cp:hover { color: #1d4ed8; }
.ver_save, .ver_cancel { cursor: pointer; margin-right: 6px; }
tr.cp-draft-row { background: #eff6ff; }
#cp-history-toggle { white-space: nowrap; }
/* Ligne d'un code tarif archivé (une version plus récente est déjà en vigueur) */
tr.cp-archived-row { background: #f1f5f9; }
tr.cp-archived-row td input.form-control,
tr.cp-archived-row td select { background: #f1f5f9; color: #64748b; }

/* Besoin : pastille délai de livraison fournisseur (vert=marge, orange=limite, rouge=trop tard) */
.delai-dot { display:inline-block; width:9px; height:9px; border-radius:50%; vertical-align:middle; margin-right:4px; cursor:pointer; transition:box-shadow .15s; }
.preco-badge { display:inline-block; font-size:9px; font-weight:700; line-height:1.3; padding:0 5px; border-radius:8px; background:#fff7ed; color:#c2410c; border:1px solid #fed7aa; white-space:nowrap; vertical-align:middle; letter-spacing:.2px; }
.preco-badge.preco-pop { cursor:pointer; }
.preco-badge.preco-pop:hover { background:#ffedd5; }
.delai-dot.delai-pop:hover { box-shadow:0 0 0 3px rgba(100,116,139,0.25); }
.n-four-days { display:flex; flex-wrap:wrap; gap:6px 12px; padding-top:6px; }
.n-four-day { font-weight:500; cursor:pointer; white-space:nowrap; margin:0; }
.n-four-day input { margin-right:3px; vertical-align:middle; }
.delai-dot.is-green  { background:#22c55e; }
.delai-dot.is-orange { background:#f59e0b; }
.delai-dot.is-red    { background:#ef4444; }
/* Pastille délai — contenu du popover (lisibilité) */
.delai-pop-body { font-size:12px; line-height:1.5; min-width:205px; }
.delai-pop-body .dp-reason { font-weight:600; color:#334155; margin-bottom:7px; padding-bottom:6px; border-bottom:1px solid #eef2f6; }
.delai-pop-body .dp-grid { display:grid; grid-template-columns:max-content 1fr; gap:4px 12px; }
.delai-pop-body .dp-k { color:#64748b; white-space:nowrap; }
.delai-pop-body .dp-v { font-weight:600; color:#1e293b; }
.delai-pop-body .dp-empty { font-weight:400; font-style:italic; color:#a8b3c2; }
.delai-pop-body .dp-note { margin-top:8px; padding:6px 9px; border-radius:6px; background:#fff7ed; color:#b45309; font-weight:500; }

/* Rapport traçabilité — produit en en-tête → composantes indentées (h_report) */
#table-report tr.trace-row-root > td { background-color: #eff6ff; }
#table-report tr.trace-row-root td:nth-child(2) { font-weight: 700; }
.trace-tree-root { font-weight: 700; }
.trace-tree-root i.fa-cube { color: #2563eb; }
#table-report tr.trace-row-sub td:nth-child(3),
#table-report tr.trace-row-art td:nth-child(3) { padding-left: 24px; }
.trace-tree-child { color: #94a3b8; margin-right: 4px; }
.see-subprod-trace { color: #2563eb; margin-left: 6px; cursor: pointer; }
.see-subprod-trace:hover { color: #1d4ed8; }

/* Pop-up traçabilité (ordre de production) : ligne du produit lui-même distinguée, en fin de liste */
.table-trace tr.trace-row-produit > td { background: #eff6ff; border-top: 2px solid #2563eb; }
.trace-prod-tag { display: inline-block; white-space: nowrap; background: #2563eb; color: #fff; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; padding: 2px 8px; border-radius: 10px; margin-right: 6px; vertical-align: middle; }
.trace-prod-tag i { color: #fff; margin-right: 3px; }

/* Réutilisation : bouton compact (vignette + icône) au même niveau que la caméra */
.trace-reuse-btn { display: inline-flex; align-items: center; gap: 5px; vertical-align: middle; background: #ecfdf5 !important; border: 1px solid #a7f3d0 !important; color: #065f46 !important; padding: 4px 6px !important; }
.trace-reuse-btn:hover { background: #d1fae5 !important; border-color: #6ee7b7 !important; }
.trace-reuse-btn i.fa-clone { color: #059669; }
.trace-reuse-thumb { display: inline-block; width: 28px; height: 28px; border-radius: 5px; background-size: cover; background-position: center; background-color: #fff; border: 1px solid #a7f3d0; }
.trace-reuse-count { display: inline-flex; align-items: center; justify-content: center; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: #059669; color: #fff; font-size: 10px; font-weight: 800; }

/* Sélecteur d'étiquettes à réutiliser (pop-up au-dessus de la pop-up de production) */
.trace-reuse-picker-overlay { position: fixed; inset: 0; z-index: 100000; background: rgba(15,23,42,.55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.trace-reuse-picker { width: 560px; max-width: 96vw; max-height: 86vh; overflow: auto; background: #fff; border-radius: 12px; box-shadow: 0 12px 40px rgba(0,0,0,.3); padding: 16px 18px; }
.trace-reuse-picker-head { display: flex; align-items: center; justify-content: space-between; font-weight: 700; font-size: 16px; color: #1e293b; }
.trace-reuse-picker-head i { color: #059669; }
.trace-reuse-picker-close { cursor: pointer; font-size: 24px; line-height: 1; color: #94a3b8; padding: 0 4px; }
.trace-reuse-picker-close:hover { color: #ef4444; }
.trace-reuse-picker-hint { color: #64748b; font-size: 13px; margin: 4px 0 14px; }
.trace-reuse-picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.trace-reuse-pick { display: flex; align-items: center; gap: 10px; text-align: left; cursor: pointer; padding: 9px; border: 1px solid #a7f3d0; border-radius: 10px; background: #ecfdf5; }
.trace-reuse-pick:hover { background: #d1fae5; border-color: #34d399; }
.trace-reuse-pick.is-loading { opacity: .55; pointer-events: none; }
.trace-reuse-pick-thumb { width: 52px; height: 52px; flex: 0 0 auto; border-radius: 8px; background-size: cover; background-position: center; background-color: #fff; border: 1px solid #a7f3d0; }
.trace-reuse-pick-info { flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.trace-reuse-pick-info b { color: #065f46; font-size: 13px; }
.trace-reuse-pick-info span { color: #047857; font-size: 12px; }
.trace-reuse-pick > i { color: #059669; font-size: 20px; flex: 0 0 auto; }
/* Relevés de jours précédents (articles « dernier lot relevé ») : variante ambre + âge + badge « Dernier relevé » */
.trace-reuse-btn.is-old { background: #fff7ed !important; border-color: #fed7aa !important; color: #c2410c !important; }
.trace-reuse-btn.is-old i.fa-clone { color: #ea580c; }
.trace-reuse-age { display: inline-flex; align-items: center; height: 17px; padding: 0 5px; border-radius: 9px; background: #ea580c; color: #fff; font-size: 10px; font-weight: 800; }
.trace-reuse-pick { position: relative; }
.trace-reuse-pick.is-old { background: #fff7ed; border-color: #fed7aa; }
.trace-reuse-pick.is-old:hover { background: #ffedd5; border-color: #fdba74; }
.trace-reuse-pick.is-old .trace-reuse-pick-info b, .trace-reuse-pick.is-old .trace-reuse-pick-info span { color: #9a3412; }
.trace-reuse-pick.is-old > i { color: #ea580c; }
.trace-reuse-pick-info .trace-reuse-pick-day { font-size: 11px; font-weight: 700; color: #64748b; }
.trace-reuse-pick-info .trace-reuse-pick-last { align-self: flex-start; white-space: nowrap; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .3px; padding: 1px 6px; border-radius: 8px; background: #059669; color: #fff; }
.trace-reuse-pick-expired { color: #ef4444; margin-left: 4px; }
/* Rapport de traçabilité (legacy) : pastille ↻ « étiquette réutilisée » sur la vignette (.trace-report-thumb est relative dans style.css) */
.trace-report-reuse { position: absolute; left: 2px; bottom: 2px; width: 16px; height: 16px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 9px; background: #059669; color: #fff; border: 1.5px solid #fff; }
/* Fiche article : option « dernier lot relevé » grisée (jamais disabled → toujours postée) si l'article n'est pas à tracer */
.trace-last-lot-block.is-inactive .radio { opacity: .5; pointer-events: none; }

/* n_article — liste des substituts avec quantité */
.n-article-sub-table { max-width: 560px; }
.n-article-sub-table > thead > tr > th { font-size: 11px; text-transform: uppercase; letter-spacing: .3px; color: #64748b; border-bottom: 1px solid #e2e8f0; }
.n-article-sub-table > tbody > tr > td { vertical-align: middle; }
.n-article-sub-table .n-article-sub-qty { text-align: center; }
.n-article-sub-table .input-group-addon { font-weight: 700; color: #64748b; }
.n-article-sub-del { display: inline-block; padding: 4px 6px; }

/* n_article — provenance et propriétés par référence fournisseur (celles de l'article verrouillées) */
.n-article-origin-col { width: 16%; }
.n-article-origin-cell { min-width: 170px; }
.n-article-origin-provwrap { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.n-article-origin-provwrap input { width: 100%; min-width: 0; }
.n-article-origin-provwrap input[readonly] { background: var(--v3-bg-secondary); color: var(--v3-text-muted); }
.n-article-origin-lock { color: var(--v3-text-muted); }
.n-article-origin-art { display: flex; flex-wrap: wrap; gap: 3px; margin-bottom: 4px; }
.n-article-origin-art:empty { display: none; }
.n-article-origin-chip { font-weight: 600; background: var(--v3-bg-secondary); color: var(--v3-text-muted); }
/* commentaire de la référence, sous la référence : imprimé sur le nouveau bon de commande */
.n-article-note { display: block; width: 100%; margin-top: 4px; font-size: 12px; }

/* Barre de défilement horizontale flottante pour tableaux larges (sticky-hscroll.js) */
.sticky-hscroll { position: fixed; left: 0; bottom: 0; width: 100%; height: 16px; overflow-x: auto; overflow-y: hidden; z-index: 1030; background: rgba(255,255,255,.9); box-shadow: 0 -1px 4px rgba(0,0,0,.08); display: none; }
.sticky-hscroll-inner { height: 1px; }
@media (hover: none) { .sticky-hscroll { display: none !important; } }
@media print { .sticky-hscroll { display: none !important; } }
/* Zone scrollable pilotée par la barre flottante (hors OD), sa barre native rendue en bas de contenu est masquée pour éviter une double barre */
.sticky-hscroll-target { overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; }
.sticky-hscroll-target::-webkit-scrollbar { display: none; }
@media print { .sticky-hscroll-target { overflow: visible !important; } }

/* Registre Documents HACCP (h_documents) — plusieurs fichiers par document */
.hdoc-name { font-weight: 600; }
.hdoc-files { margin-top: 4px; }
.hdoc-file { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #64748b; padding: 1px 0; }
.hdoc-file .fa-file-o { color: #999; }
.hdoc-file a { color: #2563eb; }
.hdoc-file-name { flex: 1; word-break: break-all; }
.hdoc-edit-file { display: inline-flex; align-items: center; gap: 8px; background: #f1f5f9; border-radius: 6px; padding: 4px 10px; margin: 0 6px 6px 0; font-size: 12px; }
.hdoc-edit-file .hdoc-remove { color: #ef4444; cursor: pointer; }

/* ── Balises dynamiques : aide à l'insertion sous le champ « Détails facturation » (KASPIA #17047) ── */
.balise-helper {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 14px;
    margin-top: 8px;
}
.balise-helper-title {
    font-weight: 700;
    color: #1e293b;
    font-size: 13px;
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
}
.balise-helper-title .fa-magic { color: #2563eb; margin-right: 6px; }
.balise-helper-title .balise-chevron { margin-left: auto; color: #64748b; font-size: 12px; transition: transform 0.2s ease; }
.balise-helper:not(.is-collapsed) .balise-chevron { transform: rotate(90deg); }
.balise-helper-body { display: none; margin-top: 10px; }
.balise-helper:not(.is-collapsed) .balise-helper-body { display: block; }
.balise-helper-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
}
.balise-helper-label { color: #334155; font-size: 13px; min-width: 230px; }
.balise-helper-label .help { color: #64748b; font-weight: 400; }
.balise-helper-ctrl { display: inline-flex; align-items: center; color: #334155; font-size: 13px; }
.balise-helper .balise-num {
    width: 60px;
    padding: 3px 8px;
    border: 1px solid #dce3e8;
    border-radius: 6px;
    font-size: 13px;
}
.balise-helper .balise-num:focus {
    outline: none;
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.balise-helper .balise-insert { margin: 0; }
.balise-helper-hint { color: #64748b; font-size: 12px; margin-top: 2px; }

/* Dossier projet — boutons d'action par réception (Ouvrir / Dupliquer / Supprimer), compacts */
.rec-action-btn { padding: 11px 13px; margin-top: 10px; }
.rec-action-btn > i { font-size: 24px; }
.rec-dup-btn { background: #fff; border: 1px solid #d7dde5; color: #2563eb; }
.rec-dup-btn:hover { background: #eff6ff; border-color: #bcd2f5; color: #1d4ed8; }

/* Offre — bouton « Actualiser la facturation » + aperçu (doctools.js, documents v_doc_offre*) */
.offre-refresh-btn {
	position: fixed; bottom: 24px; left: 50%; z-index: 1000;
	box-shadow: 0 4px 14px rgba(30, 41, 59, 0.22);
	border: 1px solid #d7dde5; font-weight: 600;
	opacity: 0; visibility: hidden; pointer-events: none;
	transform: translateX(-50%) translateY(14px);
	transition: opacity .25s ease, transform .25s ease, visibility .25s ease;
}
.offre-refresh-btn.is-visible { opacity: 1; visibility: visible; pointer-events: auto; transform: translateX(-50%) translateY(0); }
.offre-refresh-btn > i { margin-right: 5px; color: #2563eb; }
.offre-refresh-totals {
	display: flex; align-items: center; flex-wrap: wrap; gap: 12px;
	padding: 12px 14px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px;
}
.offre-refresh-totals .fa { color: #64748b; }
.offre-refresh-alert { margin-top: 12px; margin-bottom: 0; }
.offre-refresh-group { margin-top: 18px; }
.offre-refresh-group__title { font-weight: 700; color: #1e293b; margin-bottom: 4px; }
.offre-refresh-group__note { font-size: 12px; color: #b45309; margin-bottom: 6px; }
.offre-refresh-group__empty { padding: 6px 0; }
.offre-refresh-table { margin-bottom: 0; }
.offre-refresh-table th { color: #64748b; font-size: 12px; font-weight: 600; }
.offre-refresh-badge {
	display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 600;
}
/* Row tints + badge colors per status */
.offre-refresh-table tr.offre-refresh-st-mod  { background: #fff7ed; }
.offre-refresh-table tr.offre-refresh-st-add  { background: #ecfdf5; }
.offre-refresh-table tr.offre-refresh-st-del  { background: #fff1f2; color: #9f1239; text-decoration: line-through; }
.offre-refresh-table tr.offre-refresh-st-keep { background: #eff6ff; }
.offre-refresh-badge.offre-refresh-st-mod  { background: #ffedd5; color: #b45309; }
.offre-refresh-badge.offre-refresh-st-add  { background: #d1fae5; color: #047857; }
.offre-refresh-badge.offre-refresh-st-del  { background: #fee2e2; color: #b91c1c; }
.offre-refresh-badge.offre-refresh-st-same { background: #f1f5f9; color: #64748b; }
.offre-refresh-badge.offre-refresh-st-keep { background: #dbeafe; color: #1d4ed8; }
@media print { .offre-refresh-btn, .offre-refresh-modal { display: none !important; } }

/* Réception INTITULÉ — compteur de longueur (cfg_data nom_alert_max / v_rec), non bloquant */
.nom-char-count { margin-left: 6px; font-size: 12px; color: #64748b; }
.nom-char-count.over-limit { color: #ef4444; font-weight: 700; }

/* Mode Live (Dispatch Live) — section d'accès dans l'onglet Réception(s) du projet */
.dlive-beta {
	font-size: 9px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
	color: #b45309; background: #fef3c7; padding: 1px 7px; border-radius: 99px;
	vertical-align: middle; position: relative; top: -1px; margin-left: 6px;
}
/* flag enabled=0 posé par le dossier bêta — indicateur lecture seule */
.dlive-off {
	font-size: 9px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
	color: #dc2626; background: #fef2f2; border: 1px solid #fecaca; padding: 1px 7px; border-radius: 99px;
	vertical-align: middle; position: relative; top: -1px; margin-left: 6px; cursor: help;
}
.dlive-tiles { display: flex; flex-wrap: wrap; gap: 14px; }
.dlive-tile {
	flex: 1 1 280px; display: flex; align-items: center; gap: 15px;
	padding: 15px 18px; border-radius: 12px; border: 1px solid #e2e8f0; background: #fff;
	text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s;
}
.dlive-tile-icon {
	flex-shrink: 0; width: 52px; height: 52px; border-radius: 12px;
	display: flex; align-items: center; justify-content: center;
}
.dlive-tile-icon i { font-size: 32px; line-height: 1; }
.dlive-tile-body { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.dlive-tile-title { font-size: 15px; font-weight: 800; color: #1e293b; }
.dlive-tile-sub { font-size: 12px; color: #94a3b8; font-weight: 600; margin-top: 2px; }
.dlive-tile-arrow { font-size: 26px; color: #cbd5e1; flex-shrink: 0; transition: transform .15s, color .15s; }
.dlive-tile-office { border-color: #dbeafe; cursor: pointer; }
.dlive-tile-office .dlive-tile-icon { background: #eff6ff; color: #2563eb; }
.dlive-tile-office:hover { border-color: #2563eb; box-shadow: 0 8px 22px -10px rgba(37,99,235,.45); transform: translateY(-1px); }
.dlive-tile-office:hover .dlive-tile-arrow { color: #2563eb; transform: translateX(3px); }
.dlive-tile-office:hover .dlive-tile-title { color: #1d4ed8; }
.dlive-tile-client { background: #f8fafc; border-style: dashed; cursor: not-allowed; }
.dlive-tile-client .dlive-tile-icon { background: #f1f5f9; color: #94a3b8; }
.dlive-tile-client .dlive-tile-title { color: #64748b; }
.dlive-tile-soon {
	flex-shrink: 0; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
	color: #b45309; background: #fef3c7; padding: 4px 10px; border-radius: 99px;
}
/* Tuile « Interface client » active (lien public) */
.dlive-tile-client-on { border-color: #bbf7d0; cursor: pointer; }
.dlive-tile-client-on .dlive-tile-icon { background: #ecfdf5; color: #16a34a; }
.dlive-tile-client-on:hover { border-color: #16a34a; box-shadow: 0 8px 22px -10px rgba(22,163,74,.45); transform: translateY(-1px); }
.dlive-tile-client-on:hover .dlive-tile-arrow { color: #16a34a; transform: translateX(3px); }
.dlive-tile-client-on:hover .dlive-tile-title { color: #15803d; }

/* Config Commande Live — sélection des lieux/produits + lien/QR à partager */
.dlive-config { margin-top: 18px; padding-top: 18px; border-top: 1px dashed #e2e8f0; display: flex; flex-wrap: wrap; gap: 22px; }
.dlive-config-fields { flex: 1 1 300px; display: flex; flex-direction: column; gap: 14px; }
.dlive-field { display: flex; flex-direction: column; }
.dlive-label { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: #64748b; margin-bottom: 6px; }
.dlive-share { flex: 0 0 auto; display: flex; gap: 16px; align-items: flex-start; }
.dlive-qr { width: 132px; height: 132px; flex-shrink: 0; border-radius: 12px; background: #fff; border: 1px solid #e2e8f0; padding: 6px; display: flex; align-items: center; justify-content: center; }
.dlive-qr img, .dlive-qr canvas { display: block; }
.dlive-share-link { display: flex; flex-direction: column; min-width: 200px; }
.dlive-share-row { display: flex; gap: 8px; align-items: center; }
.dlive-link-input { flex: 1; min-width: 0; font-size: 12px; color: #334155; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 8px 10px; }
.dlive-copy { flex-shrink: 0; padding: 8px 12px; }
.dlive-saved { margin-top: 8px; font-size: 12px; font-weight: 700; color: #16a34a; display: none; }

/* ===== Standard version bêta / ancienne version (app/helpers_ui.php + PageHeader) ===== */
/* Pill « accès bêta » (betaSwitchRowHtml) : flottant en haut à droite au niveau du titre — aucune ligne dédiée, la page ne se décale pas */
.beta-switch-row { float: right; position: relative; z-index: 2; margin: 5px 0 5px 12px; }
.pull-right + .beta-switch-row { margin-right: 10px; }
/* Bandeau « Vous êtes sur l'ancienne version » (pages .old.php) */
.legacy-fallback-banner { background: #fff7ed; border-left: 4px solid #f59e0b; padding: 12px 16px; margin: 15px 0; border-radius: 6px; }
.legacy-fallback-banner > .fa-info-circle { color: #f59e0b; margin-right: 8px; }
.legacy-fallback-banner a { color: #2563eb; font-weight: 600; margin-left: 6px; white-space: nowrap; }
.legacy-fallback-banner a .fa-arrow-right { margin-left: 4px; }
/* Dual-version (app/helpers_version.php) : bandeau des pages legacy + barre Vue DualVersionBar */
/* Bandeau posé AVANT le <form> d'une page legacy : hérite l'offset haut de .content, et le .content du form qui suit perd le sien */
.page-content .content.dual-version-banner-wrap { min-height: 0; padding-bottom: 0; }
.page-content .content.dual-version-banner-wrap .legacy-fallback-banner { margin-bottom: 0; }
.page-content .content.dual-version-banner-wrap + form .content { padding-top: 15px; }
.legacy-fallback-banner .dual-version-keep { margin-left: 12px; vertical-align: middle; }
.legacy-fallback-banner .dual-version-note { color: #64748b; margin-left: 4px; }
.dual-version-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; background: #fff7ed; border-left: 4px solid #f59e0b; border-radius: 6px; padding: 10px 16px; margin: 0 0 14px; }
.dual-version-bar > .pi-info-circle { color: #f59e0b; }
.dual-version-bar-text { font-weight: 600; color: #1e293b; }
.dual-version-bar .sxd-hero-legacy-link { margin-left: auto; }
/* Badge BÊTA du titre de page (prop beta de PageHeader) */
h1.page-title .page-title-beta { vertical-align: middle; position: relative; top: -2px; }
/* Badge BETA cliquable + pop-up d'information standard (BetaInfoDialog).
   inline-flex + order : texte puis icône, alignement vertical exact quel que soit le contexte (h1, hero, action). */
button.badge.badge-warning.beta-badge-btn { display: inline-flex; align-items: center; gap: 5px; border: 0; cursor: pointer; font: inherit; font-size: 10px; font-weight: 800; letter-spacing: .5px; line-height: 1; padding: 5px 10px; border-radius: 6px; vertical-align: middle; }
button.badge.badge-warning.beta-badge-btn:hover { filter: brightness(.96); }
h1.page-title .beta-badge-btn, h1.page-title .page-title-beta { font-size: 11px; }
/* Neutralise .page-title i (style.css:2182 — float/top/size pensés pour l'icône de titre) qui fuit sur l'icône du badge */
button.badge.badge-warning.beta-badge-btn .pi { float: none; position: static; top: auto; font-size: 11px; order: 2; margin: 0; line-height: 1; color: inherit; }
.beta-info-head { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.05rem; }
.beta-info-intro { margin: 0 0 14px; color: #334155; }
.beta-info-section h4 { margin: 12px 0 8px; font-size: .82rem; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; color: #64748b; }
.beta-info-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.beta-info-list li { display: flex; gap: 8px; align-items: baseline; }
.beta-info-list .pi-check-circle { color: #22c55e; }
.beta-info-list.is-notes .pi-info-circle { color: #2563eb; }
.beta-info-footnote { margin-right: auto; font-size: .78rem; color: #94a3b8; }
/* Avis bêta (BetaFeedbackDialog) : bouton d'en-tête, formulaire et carte de rappel */
.beta-info-host { display: contents; }
h1.page-title .page-title-feedback { display: inline-flex; align-items: center; gap: 5px; margin-left: 8px; border: 1px solid #e2e8f0; background: #fff; color: #64748b; border-radius: 6px; padding: 5px 9px; font-family: inherit; font-size: 11px; font-weight: 700; letter-spacing: .2px; line-height: 1; cursor: pointer; vertical-align: middle; position: relative; top: -2px; }
h1.page-title .page-title-feedback:hover { color: #2563eb; background: #f8fafc; }
h1.page-title .page-title-feedback .pi { float: none; position: static; top: auto; margin: 0; font-size: 11px; line-height: 1; color: inherit; }
.beta-fb-row { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; }
.beta-fb-row.is-col { flex-direction: column; align-items: stretch; gap: 6px; }
.beta-fb-row label { margin: 0; font-size: .82rem; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; color: #64748b; }
.beta-fb-note { font-size: .8rem; color: #64748b; }
.beta-fb-text { width: 100%; }
.beta-fb-meta { display: block; margin-top: 8px; font-size: .78rem; color: #94a3b8; }
.beta-fb-thanks { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 0 8px; text-align: center; color: #334155; }
.beta-fb-thanks .pi { font-size: 2.2rem; color: #22c55e; }
.beta-fb-nudge { position: fixed; right: 20px; bottom: 20px; z-index: 1090; display: flex; align-items: center; gap: 12px; max-width: min(460px, calc(100vw - 32px)); padding: 12px 14px; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; box-shadow: 0 10px 30px rgba(30, 41, 59, .14); }
.beta-fb-nudge-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 13px; line-height: 1.25; color: #334155; }
.beta-fb-nudge-close { border: 0; background: transparent; color: #94a3b8; cursor: pointer; padding: 4px; line-height: 1; }
.beta-fb-nudge-close:hover { color: #1e293b; }
.beta-fb-pop-enter-active, .beta-fb-pop-leave-active { transition: opacity .25s ease, transform .25s ease; }
.beta-fb-pop-enter-from, .beta-fb-pop-leave-to { opacity: 0; transform: translateY(12px); }
@media screen and (max-width: 640px) { .beta-fb-nudge { left: 16px; right: 16px; bottom: 16px; flex-wrap: wrap; } }
@media print { .beta-fb-nudge { display: none !important; } }
/* pages sxd à barre d'enregistrement flottante (.sxd-savebar, z-index 900) : le rappel ne la recouvre plus —
   posé au-dessus de la pill (≈ 56px + 24px de marge), et au-dessus de la barre multi-rangées sous 900px */
body:has(.sxd-savebar) .beta-fb-nudge { bottom: 92px; }
@media screen and (max-width: 900px) { body:has(.sxd-savebar) .beta-fb-nudge { bottom: 140px; } }

/* Pastille « retour fiche de liaison » (cantines GOURM-ECOLIER) — dossier projet */
.bl-dot { font-size: 16px; line-height: 1; cursor: default; }
.bl-dot-ok { color: #22c55e; }
.bl-dot-wait { color: #ef4444; }

/* Température par article à réception (réglage temp_by_article) — inputs de la cellule REF/DLC */
.br-temp-input { width: 62px; font-size: 10px; padding: 2px 4px; }

/* Heure réellement pointée (check-in/out) sous l'horaire planifié — tableau personnel réception (rec_pers) */
.pers-punch {
	display: block; margin-top: 3px; white-space: nowrap;
	font-size: 11px; font-weight: 700; color: #1d4ed8;
}
.pers-punch .fa { font-size: 10px; }
.pers-punch b { font-weight: 800; }
.pers-punch b.is-ok { color: #15803d; }
.pers-punch b.is-late { color: #ef4444; }
.pers-punch b.is-early { color: #b45309; }

/* Réception — encart « Résultats décalés » (surcoûts du rapport) : style affiné, filet ambre + fond pâle */
.refresh-results-alert {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 12px;
	border-left: 3px solid #f59e0b;
	background: #fffdf7;
	border-radius: 4px;
	color: #92400e;
	font-size: 12.5px;
	line-height: 1.4;
}
.refresh-results-alert .rr-txt { flex: 1; }
.refresh-results-alert .rr-ico { color: #f59e0b; }
.refresh-results-btn { white-space: nowrap; }

/* Uploaded document name, under its thumbnail/chip (ajax uploader in filename=auto mode) */
.imgCont .upload-file-name {
	display: block;
	max-width: 200px;
	margin-top: 4px;
	color: #64748b;
	font-size: 11px;
	line-height: 1.3;
	word-break: break-all;
}
.imgCont .upload-file-name a { color: #64748b; }

/* Popover « Détails » poids/volume (fiche fonction) : le popover est inline dans .container-ff (overflow:auto) qui tronquait les longues listes */
.popover.popover-detail { max-width: none; width: 470px; }
.popover.popover-detail .popover-content { max-height: 260px; overflow-y: auto; }
.popover.popover-detail .popover-content table { margin-bottom: 0; }

/* Reception feedback: meaning of each star (receptionRatingScaleHelpHtml, helpers_ui.php) */
.rating-scale-help { font-size: 15px; color: #94a3b8; cursor: pointer; margin-left: 6px; vertical-align: middle; }
.rating-scale-help:hover { color: #64748b; }
.popover.popover-detail:has(.rating-scale) { max-width: calc(100vw - 20px); }
.popover.popover-detail .popover-content:has(.rating-scale) { max-height: none; }
.rating-scale { list-style: none; margin: 0; padding: 0; }
.rating-scale li { display: flex; gap: 10px; padding: 6px 0; line-height: 1.35; font-size: 13px; color: #334155; }
.rating-scale li + li { border-top: 1px solid #f1f5f9; }
.rating-scale-stars { flex: 0 0 auto; padding-top: 1px; color: #f0ad4e; white-space: nowrap; }
.rating-scale-stars .fa-star-o { color: #cbd5e1; }
.rating-scale-note { margin: 6px 0 0; font-size: 12px; font-style: italic; color: #64748b; }

/* DocEmailDialog (composant global) : modale « Envoyer le document par email » */
.p-dialog.doc-email-dialog { width: 550px; }
.p-dialog.doc-email-dialog-wide { width: 760px; }
.doc-email-dialog .doc-email-field { margin-bottom: 14px; }
.doc-email-dialog .doc-email-field label { display: block; font-weight: 700; color: #1e293b; margin-bottom: 4px; }
.doc-email-dialog .doc-email-check { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.doc-email-dialog .doc-email-check label { margin: 0; font-weight: 600; color: var(--v3-text); cursor: pointer; }
.doc-email-dialog .doc-email-notes { display: flex; flex-direction: column; gap: 6px; }
.doc-email-dialog .doc-email-notes .p-message-content { padding: 6px 10px; }
.doc-email-dialog .doc-email-notes .p-message-text { font-size: 13px; line-height: 1.45; }
.doc-email-dialog .doc-email-progress { display: flex; align-items: center; gap: 10px; margin-top: 6px; color: #64748b; font-weight: 600; }
.doc-email-dialog .doc-email-spinner { width: 28px; height: 28px; margin: 0; }

/* Page de remerciement après signature électronique (rendue sur place dans v_doc.php, langue du document) */
.sign-thanks { padding: 40px 20px; background: #fff; border-radius: 12px; }
.sign-thanks-icon { display: block; font-size: 72px; color: var(--v3-success, #22c55e); margin: 0 auto 24px; }
.sign-thanks h1 { font-weight: 700; color: #1e293b; margin-bottom: 12px; }
.sign-thanks p { color: #64748b; font-size: 16px; margin-bottom: 20px; }

/* Devis groupé par type d'étape : le titre du type ne doit pas rester orphelin en bas de page */
.tps-type-title { page-break-after: avoid; break-after: avoid; }

/* Menu (display_formule: devis, facture, fiche fonction) — light extra gap closing a product's sub-products list */
.tps_subprod_font:not(.hide-subs) + .tps_prod_font,
.tps_subprod_font:not(.hide-subs) + .menu-mat + .tps_prod_font { margin-top: 12px; }

/* ============================================================================
   Prix d'un pack = somme des prix de vente de ses composants (cfg pack_price_sum_btn)
   Partagé par le dossier réception legacy (modale #modal_pack_price) et la fiche pack
   (bloc dépliant inline). Rendu produit par assets/js/pack-price.js.
   ========================================================================== */
.pp-price-cell { display: flex; align-items: center; gap: 6px; }
.pp-price-cell .pack-prix { flex: 1 1 auto; min-width: 0; }
.pp-eur { color: #64748b; }
.pp-btn, .pp-btn-all { white-space: nowrap; }
.pp-btn-all { margin-left: 10px; vertical-align: middle; }

.pp-body { padding: 0 4px 4px; }
.pp-alert { border: 1px solid; border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; font-size: 13px; }
.pp-alert.is-danger { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }
.pp-alert.is-warn   { color: #b45309; background: #fffbeb; border-color: #fde68a; }
.pp-alert.is-ok     { color: #15803d; background: #f0fdf4; border-color: #bbf7d0; }
.pp-alert-msg b { font-weight: 900; }
.pp-chips { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.pp-chip { cursor: pointer; border: 1px solid; border-radius: 999px; padding: 2px 10px; font-size: 11px; font-weight: 700; background: #fff; }
.pp-chip.on { box-shadow: 0 0 0 2px rgba(37,99,235,.2); }

.pp-tablewrap { overflow: auto; max-height: min(58vh, 520px); -webkit-overflow-scrolling: touch; border: 1px solid #e2e8f0; border-radius: 8px; }
.pp-table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 13px; background: #fff; }
.pp-table thead th { position: sticky; top: 0; z-index: 1; background: #f8fafc; border-bottom: 1px solid #e2e8f0;
	padding: 8px 10px; font-size: 11px; font-weight: 900; text-transform: uppercase; color: #64748b; text-align: left; }
.pp-table td { padding: 7px 10px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.pp-table tbody tr:hover { background: #f8fafc; }
.pp-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pp-table th.pp-num { text-align: right; }
.pp-c-chev, .pp-c-chk { width: 30px; text-align: center; }
.pp-c-tot { font-weight: 700; }
.pp-c-src small { display: block; color: #64748b; font-size: 11px; margin-top: 2px; }
.pp-toggle, .pp-detail-toggle, .pp-retry { cursor: pointer; color: #64748b; }
.pp-typ { display: inline-block; font-size: 10px; font-weight: 900; color: #64748b; background: #f1f5f9;
	border-radius: 4px; padding: 1px 5px; margin-right: 4px; }

.pp-row.is-lvl1 .pp-c-nom { padding-left: 28px; border-left: 1px solid #e2e8f0; }
.pp-row.is-lvl2 .pp-c-nom { padding-left: 46px; border-left: 1px solid #e2e8f0; }
.pp-row.is-lvl3 .pp-c-nom { padding-left: 64px; border-left: 1px solid #e2e8f0; }
.pp-row.is-rollup { color: #94a3b8; background: #fbfcfd; }
.pp-row.is-rollup .pp-num { text-decoration: line-through; }
.pp-row.is-sum .pp-c-tot { font-style: italic; }
.pp-row.is-none .pp-c-tot { color: #b91c1c; }
.pp-row.is-err { background: #fef2f2; }

.pp-src { display: inline-block; border: 1px solid; border-radius: 999px; padding: 1px 8px; font-size: 10px; font-weight: 900; white-space: nowrap; }
.pp-src.is-gamme     { color: #15803d; background: #f0fdf4; border-color: #bbf7d0; }
.pp-src.is-catalogue { color: #0e7490; background: #ecfeff; border-color: #a5f3fc; }
.pp-src.is-coef      { color: #b45309; background: #fffbeb; border-color: #fde68a; }
.pp-src.is-cout      { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }
.pp-src.is-none      { color: #64748b; background: #f8fafc; border-color: #cbd5e1; border-style: dashed; }
.pp-src.is-sum       { color: #64748b; background: #f1f5f9; border-color: #e2e8f0; }
.pp-src.is-rollup    { color: #94a3b8; background: transparent; border-color: transparent; }
.pp-chip.is-gamme     { color: #15803d; border-color: #bbf7d0; }
.pp-chip.is-catalogue { color: #0e7490; border-color: #a5f3fc; }
.pp-chip.is-coef      { color: #b45309; border-color: #fde68a; }
.pp-chip.is-cout      { color: #b91c1c; border-color: #fecaca; }
.pp-chip.is-none      { color: #64748b; border-color: #cbd5e1; border-style: dashed; }
.pp-chip-inline { display: inline-block; font-size: 10px; font-weight: 700; border-radius: 4px; padding: 1px 5px; margin-left: 4px; }
.pp-chip-inline.is-repl { color: #b45309; background: #fffbeb; }
.pp-chip-inline.is-qt   { color: #0e7490; background: #ecfeff; }
.pp-chip-inline.is-err  { color: #b91c1c; background: #fef2f2; }
.pp-dot { display: inline-block; min-width: 18px; text-align: center; border: 1px solid; border-radius: 999px;
	padding: 0 5px; font-size: 10px; font-weight: 900; margin-right: 3px; }
.pp-dot.is-gamme { color:#15803d; border-color:#bbf7d0; background:#f0fdf4; }
.pp-dot.is-catalogue { color:#0e7490; border-color:#a5f3fc; background:#ecfeff; }
.pp-dot.is-coef { color:#b45309; border-color:#fde68a; background:#fffbeb; }
.pp-dot.is-cout { color:#b91c1c; border-color:#fecaca; background:#fef2f2; }
.pp-dot.is-none { color:#64748b; border-color:#cbd5e1; background:#f8fafc; }

.pp-foot { margin-top: 14px; margin-left: auto; width: 360px; max-width: 100%; }
.pp-foot-row { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 0; font-size: 13px; }
.pp-foot-row b { font-variant-numeric: tabular-nums; }
.pp-foot-main { border-top: 1px solid #e2e8f0; margin-top: 4px; padding-top: 8px; }
.pp-foot-main b { font-size: 18px; font-weight: 900; }
.pp-delta.is-up { color: #15803d; } .pp-delta.is-down { color: #b91c1c; } .pp-delta.is-flat { color: #64748b; }
.pp-foot-alt { border-top: 1px dashed #e2e8f0; margin-top: 6px; padding-top: 8px; }
.pp-nested > td { padding: 0 !important; background: #f8fafc; }
.pp-table-sum .pp-c-nom { white-space: normal; }
.pp-note { margin-top: 8px; color: #64748b; font-size: 11px; }
.pp-empty { text-align: center; color: #64748b; padding: 22px 10px; }
.pp-legend { margin-top: 12px; font-size: 12px; color: #64748b; }
.pp-legend summary { cursor: pointer; }
.pp-legend ul { list-style: none; padding: 8px 0 0; margin: 0; }
.pp-legend li { padding: 3px 0; }
.pp-sum-row.is-risk { background: #fff7f7; }
.pp-sum-row.is-flat { color: #64748b; }
.pp-nested-in { padding: 10px 0 4px; }
.pp-dirty-banner { border: 1px solid #fde68a; background: #fffbeb; color: #b45309; border-radius: 8px;
	padding: 8px 12px; margin-bottom: 10px; font-size: 13px; }
.pp-ack { margin-top: 10px; color: #b91c1c; font-size: 13px; }
.pp-ack input { margin-right: 6px; }

@media (max-width: 720px) {
	.pp-table { min-width: 560px; }
	.pp-foot { width: 100%; }
}

/* Fiche pack : panneau inline + bascule HT/TTC */
.pp-inline { display: none; border: 1px solid #e2e8f0; border-radius: 8px; padding: 14px; margin: 0 0 18px; background: #fff; }
.pp-inline-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.pp-basetoggle .btn { padding: 3px 12px; }

/* Fiche de fonction — plan du site : fichier non-image (PDF) rendu en lien + QR scannable a l'impression */
.s-img-file { display: flex; align-items: center; gap: 12px; margin: 6px 1% 10px; }
.s-img-file-qr { width: 84px; height: 84px; flex: 0 0 84px; }

/* Besoins achats — stock par site (multi-stocks) */
.l-besoin-site-stock div { white-space: nowrap; }

/* Transport table — « Trajet » column (driver app): compact, muted while left on default */
th.th-veh-mode { width: 1%; white-space: nowrap; cursor: help; }
select.veh-mode-select { width: auto; min-height: 0; height: 28px; padding: 0 4px; font-size: 12px; color: #1e293b; border: 1px solid #dce3e8; border-radius: 6px; }
select.veh-mode-select:has(option[value=""]:checked) { color: #94a3b8; }

/* Étoiles de préférence (p-rating, contacts.preference) : ambre partout, jamais la couleur primaire */
.p-rating .p-rating-option-active .p-rating-icon { color: var(--v3-warning, #f59e0b); }

/* Fiche article — Consultation IA (assets/js/ai/article-ai.js) */
/* Warning text: the warning token darkened for small text on light backgrounds */
.aia-modal { --aia-warn-text: color-mix(in srgb, var(--v3-warning-hover) 72%, var(--v3-text)); }
.aia-modal .modal-body { max-height: calc(100vh - 200px); overflow-y: auto; text-align: left; }
.aia-title-icon { height: 22px; margin-right: 6px; vertical-align: -5px; }
.aia-run img { height: 16px; }
.aia-article { background: var(--v3-bg-hover); border: 1px solid var(--v3-border); border-radius: var(--v3-radius-sm); padding: 10px 12px; margin-bottom: 12px; font-size: 13px; }
.aia-article b, .aia-subtitle, .aia-section h5 { font-weight: 700; }
.aia-subtitle { margin: 12px 0 6px; }
.aia-section h5 { margin: 18px 0 8px; }
.aia-muted { color: var(--v3-text-muted); font-size: 12px; font-weight: 500; }
.aia-doc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; }
.aia-file-btn { margin: 0; }
.aia-file-btn .aia-file { display: none; } /* two classes: beats Bootstrap's input[type="file"] { display: block } */
.aia-file-btn.disabled { opacity: .6; pointer-events: none; }
.aia-docs { list-style: none; padding: 0; margin: 10px 0; display: flex; flex-wrap: wrap; gap: 8px; }
.aia-doc { position: relative; width: 84px; height: 84px; border: 1px solid var(--v3-border); border-radius: var(--v3-radius-sm); overflow: hidden; background: var(--v3-bg-hover); display: flex; align-items: center; justify-content: center; text-align: center; font-size: 10px; word-break: break-all; }
.aia-doc img { width: 100%; height: 100%; object-fit: cover; }
.aia-doc-pdf .fa { display: block; font-size: 26px; color: var(--v3-danger); margin-bottom: 2px; }
.aia-doc-del { position: absolute; top: 3px; right: 3px; cursor: pointer; }
.aia-check { display: flex; align-items: flex-start; gap: 8px; margin: 6px 0; font-weight: 500; cursor: pointer; }
.aia-check input, .aia-alt input, .aia-table input { flex: none; width: 16px; height: 16px; margin: 2px 0 0; }
.aia-status { margin-top: 12px; min-height: 24px; font-size: 13px; color: var(--v3-text-muted); }
.aia-status img { height: 22px; margin-right: 8px; vertical-align: middle; }
.aia-status.is-error { color: var(--v3-danger); font-weight: 600; }
.aia-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.aia-chip { border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 600; background: var(--v3-bg-primary-subtle); color: var(--v3-text); }
.aia-chip.is-warn { background: var(--v3-bg-warning-subtle); color: var(--aia-warn-text); }
.aia-cache { margin-bottom: 10px; font-size: 12px; color: var(--v3-text-muted); }
.aia-alerts .alert { margin-bottom: 8px; padding: 8px 12px; font-size: 12px; }
.aia-alt { display: flex; align-items: flex-start; gap: 8px; padding: 6px 10px; margin-bottom: 6px; border: 1px solid var(--v3-border); border-radius: var(--v3-radius-sm); font-weight: 500; cursor: pointer; }
.aia-alt.is-selected { border-color: var(--v3-primary); background: var(--v3-bg-primary-subtle); }
.aia-badge { display: inline-block; margin-left: 4px; padding: 1px 7px; border-radius: 6px; font-size: 11px; font-weight: 600; background: var(--v3-bg-secondary); color: var(--v3-text-muted); white-space: nowrap; }
.aia-src-label { background: var(--v3-bg-success-subtle); color: color-mix(in srgb, var(--v3-success-hover) 72%, var(--v3-text)); }
.aia-src-calc { background: var(--v3-bg-info-subtle); color: color-mix(in srgb, var(--v3-info-hover) 72%, var(--v3-text)); }
.aia-src-ciqual { background: var(--v3-bg-primary-subtle); color: var(--v3-primary-700); }
/* No violet token in v3-vars: the AI colour is mixed from the primary and danger tokens */
.aia-src-ia { background: color-mix(in srgb, var(--v3-bg-primary-subtle) 55%, var(--v3-bg-danger-subtle)); color: color-mix(in srgb, var(--v3-primary-700) 60%, var(--v3-danger-hover)); }
.aia-table { margin-bottom: 6px; font-size: 12px; }
.aia-table th, .aia-table td { padding: 5px 6px !important; vertical-align: top !important; }
.aia-table .aia-col-cb { width: 28px; }
.aia-table .aia-col-warn { width: 30%; }
.aia-warn { display: block; font-size: 11px; color: var(--aia-warn-text); }
.aia-info { display: block; font-size: 11px; color: var(--v3-text-muted); }
.aia-row-changed { background: var(--v3-bg-warning-subtle); }
.aia-info-list { display: grid; grid-template-columns: max-content 1fr; gap: 3px 12px; margin: 8px 0 0; font-size: 12px; }
.aia-info-list dt { font-weight: 600; color: var(--v3-text-muted); }
.aia-info-list dd { margin: 0; }
.aia-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; }
.aia-foot .btn { margin: 0 !important; }
.aia-foot-note { margin-right: auto; font-size: 11px; color: var(--v3-text-muted); }
.aia-link { font-size: 12px; cursor: pointer; }
.aia-link.disabled { opacity: .5; pointer-events: none; }
.aia-filled { outline: 2px solid var(--v3-success); outline-offset: 1px; } /* outline: the theme forces box-shadow none on inputs */
@media screen and (max-width: 767px) {
	.aia-modal .modal-dialog { width: auto; margin: 0; }
	.aia-modal .modal-content { min-height: 100vh; border-radius: 0; }
	.aia-modal .modal-body { max-height: none; }
	.aia-file-btn { flex: 1 1 100%; min-height: 44px; }
	.aia-foot .btn { flex: 1 1 auto; min-height: 44px; }
	.aia-foot-note { width: 100%; margin-right: 0; }
}

/* ====== VehicleOption (global/components/VehicleOption.js) — camion + verdict de disponibilité ====== */
.veh-opt { display: flex; align-items: center; gap: 6px; width: 100%; min-width: 0; }
.veh-opt-name { font-weight: 600; color: var(--v3-text, #1e293b); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.veh-opt-loc { flex-shrink: 0; padding: 1px 4px; border-radius: 3px; background: color-mix(in srgb, var(--v3-warning, #f59e0b) 20%, white); color: color-mix(in srgb, var(--v3-warning, #f59e0b) 55%, black); font-size: 9px; font-weight: 700; }
.veh-opt-reason { margin-left: auto; font-size: 10px; font-style: italic; white-space: nowrap; color: var(--v3-text-muted, #64748b); }
.veh-opt.is-unavailable .veh-opt-name { color: var(--v3-text-muted, #64748b); text-decoration: line-through; }
.veh-opt.is-unavailable .veh-opt-reason { color: var(--v3-danger, #ef4444); }
.veh-opt.is-warning .veh-opt-reason { color: var(--v3-warning, #f59e0b); font-weight: 600; }

/* ====== Indisponibilités des camions : VehicleDowntimeDialog, VehicleDowntimeList (global) et bandeau du Planning Véhicules ====== */
.p-dialog.veh-dt-dialog { width: 680px; }
.veh-dt { display: flex; flex-direction: column; gap: 12px; }
.veh-dt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.veh-dt-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.veh-dt-field > label { margin: 0; font-size: 13px; font-weight: 600; color: var(--v3-text, #1e293b); }
.veh-dt-field .p-select, .veh-dt-field .p-textarea { width: 100%; }
.veh-dt-field-wide { grid-column: 1 / -1; }
.veh-dt-field-hint { justify-content: flex-end; }
.veh-dt-when { display: flex; gap: 8px; min-width: 0; }
.veh-dt-when > .p-datepicker { flex: 1 1 auto; min-width: 0; }
.veh-dt-when > .veh-dt-time { flex: 0 0 96px; }
.veh-dt-when .p-datepicker input { width: 100%; min-width: 0; }
.veh-dt-hint { margin: 0; font-size: 12px; color: var(--v3-text-muted, #64748b); }
.veh-dt-msg { margin: 0; }
.veh-dt-msg-title { font-weight: 600; }
.veh-dt-msg-list { margin: 4px 0 0; padding-left: 18px; }
.veh-dt-delete { margin-right: auto; }
.veh-dt-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.veh-dt-list-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.veh-dt-list-title { font-weight: 700; color: var(--v3-text, #1e293b); }
.veh-dt-list-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.veh-dt-list-table th { padding: 6px 8px; text-align: left; font-weight: 600; color: var(--v3-text-muted, #64748b); border-bottom: 1px solid var(--v3-border, #e2e8f0); }
.veh-dt-list-table td { padding: 6px 8px; border-bottom: 1px solid var(--v3-border, #e2e8f0); vertical-align: top; }
.veh-dt-list-table td:first-child { white-space: nowrap; }
.veh-dt-list-table tr.is-past td { color: var(--v3-text-muted, #64748b); }
.veh-dt-list-actions { width: 64px; text-align: right; white-space: nowrap; }
.veh-dt-list-action { margin-left: 10px; font-size: 15px; color: var(--v3-text-muted, #64748b); cursor: pointer; }
.veh-dt-list-action:hover { color: var(--v3-primary, #2563eb); }
.veh-dt-list-empty { margin: 0; padding: 10px 0; color: var(--v3-text-muted, #64748b); }
.veh-dt-day { display: flex; flex-direction: column; gap: 4px; margin: 6px 0 10px; }
.veh-dt-day-row { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; padding: 6px 10px; border-left: 4px solid var(--v3-danger, #ef4444); border-radius: 6px; background: #fff1f2; font-size: 13px; color: var(--v3-text, #1e293b); }
.veh-dt-day-row > i { color: var(--v3-danger, #ef4444); }
.veh-dt-day-veh { font-weight: 700; }
.veh-dt-day-when { font-weight: 600; }
.veh-dt-day-driver, .veh-dt-day-note { color: var(--v3-text-muted, #64748b); }
.veh-dt-day-edit { margin-left: auto; color: var(--v3-text-muted, #64748b); cursor: pointer; }
.veh-dt-day-edit:hover { color: var(--v3-primary, #2563eb); }
@media screen and (max-width: 600px) {
	.veh-dt-grid { grid-template-columns: 1fr; }
}

/* ====== StaffName (global/components/StaffName.js, staff_display_html) — prénom en petit après le nom ====== */
/* inherit: heading rules (h3 small → Open Sans 300 #444, Bootstrap line-height 1) must not restyle the first name */
.staff-name-first { font-size: 0.82em; font-weight: 500; font-family: inherit; color: inherit; line-height: inherit; }


/* SxdShortcuts — raccourcis de navigation WMS repliables, uniformes (sxd + legacy).
   Desktop : liens discrets en ligne. ≤719px : repli natif « ☰ Raccourcis ⌄ » (doc WMS 03 §2.3). */
.sxd-shortcuts { display: block; }
.sxd-shortcuts-summary { display: none; }
.sxd-shortcuts-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; padding: 8px 0 0; }
.sxd-shortcuts-label { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: #94a3b8; font-weight: 800; }
.sxd-shortcuts-link { display: inline-flex; align-items: center; gap: 6px; color: #2563eb; font-weight: 700; font-size: 13.5px; text-decoration: none; }
.sxd-shortcuts-link:hover { text-decoration: underline; }
.page-title-shortcuts { display: block; margin: 0 0 14px; }
@media screen and (max-width: 719px) {
	.sxd-shortcuts-label { display: none; }
	.sxd-shortcuts-summary { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 12px;
		border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; color: #1e293b; font-weight: 700; font-size: 13px; cursor: pointer; list-style: none; }
	.sxd-shortcuts-summary::-webkit-details-marker { display: none; }
	.sxd-shortcuts-chevron { margin-left: auto; transition: transform .15s; }
	.sxd-shortcuts[open] > .sxd-shortcuts-summary .sxd-shortcuts-chevron { transform: rotate(180deg); }
	.sxd-shortcuts-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; padding: 6px 4px 0; }
	.sxd-shortcuts-link { min-height: 44px; }
}

/* Actual-hours validation (hours_check.php), legacy pages + labo + Solde. Yellow on the field itself: the pale row tint (.sc-updated) already means « changed by another user »; [type="time"] outweighs v3.css .form-control:not(.select2-input) !important. */
input[type="time"].hours-corrected { background-color: var(--v3-btn-warning) !important; border-color: var(--v3-warning) !important; color: var(--v3-text) !important; font-weight: 700; }
.hours-status { display: inline-block; margin-top: 2px; padding: 1px 6px; border-radius: var(--v3-radius-xs); font-size: 9px; font-weight: 800; line-height: 1.5; text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; cursor: default; }
.hours-status.is-prevu { background-color: var(--v3-border); color: var(--v3-text-muted); }
.hours-status.is-realise { background-color: var(--v3-bg-success-subtle); color: var(--v3-success-hover); }
.pers-validate-hours { text-transform: none; }
/* LCB order controls of the legacy reception staff tab (components/rec_pers.php): own row of the grey toolbar, shown when LCB is enabled */
.rec-pers-lcb { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--v3-border); }
.rec-pers-lcb .btn { margin: 0; text-transform: none; font-weight: 600; }
.rec-pers-lcb .btn .fa { margin-right: 4px; }
.rec-pers-lcb .lcb-delete .fa { margin-right: 0; }
.rec-pers-lcb-tag { margin-right: auto; padding: 3px 9px; border-radius: var(--v3-radius-xs); background-color: var(--v3-text); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .06em; cursor: default; }
.rec-pers-lcb-meta { color: var(--v3-text-muted); font-size: 12px; }
.rec-pers-lcb-warn { color: var(--v3-warning); font-size: 12px; font-weight: 700; cursor: help; }
h3 .pers-validate-hours { margin-left: 10px; font-size: 11px; vertical-align: middle; }

/* LangFlag (assets/vue/global/components/LangFlag.js) — drapeau d'une langue de document */
.lang-flag { display: inline-flex; align-items: center; flex: none; line-height: 1; }
.lang-flag-svg { display: inline-flex; width: 20px; height: 15px; border-radius: 2px; overflow: hidden; box-shadow: 0 0 0 1px rgba(15, 23, 42, .12); }
.lang-flag-svg svg { width: 100%; height: 100%; display: block; }
.lang-flag-code { display: inline-block; padding: 1px 5px; border-radius: var(--v3-radius-xs); background-color: var(--v3-border); color: var(--v3-text-muted); font-size: 10px; font-weight: 800; letter-spacing: .04em; }

/* ThumbPreview (assets/vue/global/components/ThumbPreview.js) — miniature + aperçu au survol */
.thumb-preview { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 36px; border-radius: var(--v3-radius-xs); background-color: #f1f5f9; overflow: hidden; vertical-align: middle; }
.thumb-preview.is-clickable { cursor: zoom-in; }
.thumb-preview.is-clickable.is-file { cursor: pointer; }
.thumb-preview-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-preview-icon { font-size: 20px; color: var(--v3-text-muted); }
.thumb-preview-pop { position: fixed; z-index: 2000; width: 320px; height: 320px; display: flex; align-items: center; justify-content: center; padding: 8px; background-color: #fff; border: 1px solid var(--v3-border); border-radius: var(--v3-radius-sm); box-shadow: 0 16px 40px rgba(15, 23, 42, .16); pointer-events: none; }
.thumb-preview-pop img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }

/* Dossier réception (app/n_reception.php) — blocage « Bloquer à partir du » */
.rec-timeblock-input { vertical-align: middle; }
.rec-timeblock-input[readonly] { opacity: .6; cursor: not-allowed; } /* v3.css forces the input background */
.rec-lock-badge { margin-right: 8px; vertical-align: middle; }
