/* Retours de Yohann du 03/11/2026 : en-tête, menus, export et impression, filtres, panier, tâches, CE à consulter. */

/* ---------- En-tête : logo pleine hauteur à droite, recherche raccourcie, déconnexion visible ---------- */
.app-header__inner{grid-template-columns:150px minmax(220px,640px) auto 1fr auto auto 190px;grid-template-rows:64px 44px;gap:0 14px;}
.header-first-line{grid-column:2;grid-row:1;gap:14px;}
.app-header__inner>.header-cart{grid-column:3;grid-row:1;margin-left:-4px;}
.app-header__inner>.user-box{grid-column:5;grid-row:1;max-width:260px;justify-self:end;}
.app-header__inner>.header-logout{grid-column:6;grid-row:1;}
.app-header__inner>.header-logo{grid-column:7;grid-row:1 / 3;}
.app-header .app-nav{grid-column:1 / 7;grid-row:2;}
.user-box__link{gap:9px;padding:6px 8px;border-radius:7px;}
.user-box__link:hover{background:#ffffff0a;}
.user-box__txt{max-width:200px;align-items:flex-end;text-align:right;}
.header-logout{display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;border-radius:8px;background:#d64545;color:#fff;font-size:18px;border:1px solid #e36d6d;box-shadow:0 2px 8px #d6454540;transition:background-color .15s,transform .15s;}
.header-logout:hover,.header-logout:focus-visible{background:#b83434;color:#fff;transform:translateY(-1px);outline:0;}
.header-logout:focus-visible{box-shadow:0 0 0 3px #ffffff33;}
.header-logo{display:flex;align-items:center;justify-content:center;align-self:center;width:190px;height:96px;padding:8px 12px;background:#fff;border-radius:9px;box-shadow:0 2px 10px #0b172b33;}
.header-logo img{width:100%;height:100%;object-fit:contain;}
.header-logo:hover{box-shadow:0 0 0 3px #ffffff2e;}
@media (min-width:992px) and (max-width:1399.98px){
  .app-header__inner{grid-template-columns:120px minmax(180px,330px) auto 1fr auto auto 150px;gap:0 10px;}
  .header-logo{width:150px;height:92px;}
  .app-header__inner>.user-box .user-box__txt{display:flex!important;max-width:140px;}
  .user-box__name{font-size:12px;}
}
@media (max-width:991.98px){
  .app-header__inner{display:flex;}
  .header-logo{width:96px;height:44px;padding:4px 6px;order:3;margin-left:auto;}
  .header-logout{order:4;margin-left:8px;}
  .app-header__inner>.user-box{order:2;margin-left:auto;}
}
/* Lien direct réservé à l’administrateur PMS BECUS */
.app-header .app-nav__list>li>a.nav-import{color:#ffd59a;}
.app-header .app-nav__list>li>a.nav-import i{opacity:.9;color:#ffbc63;}
.nav-import__tag{display:inline-block;margin-left:4px;padding:1px 6px;border-radius:10px;background:#ffbc6326;border:1px solid #ffbc6366;color:#ffd59a;font-size:10px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;line-height:14px;}

/* ---------- Pastille d’actualités : NEW + nombre en exposant ---------- */
.news-dot{position:relative;display:inline-flex;align-items:center;justify-content:center;width:auto;height:16px;padding:0 6px;margin-left:4px;border-radius:9px;background:#ff8a3d;color:#1f2b47;font-size:9px;font-weight:800;letter-spacing:.06em;line-height:16px;box-shadow:0 0 0 2px var(--cg-side-bg);animation:cg-news-pulse 2.2s ease-in-out infinite;}
.news-dot::before{content:"NEW";}
.news-dot__count{position:absolute;top:-7px;right:-7px;min-width:15px;height:15px;padding:0 4px;border-radius:8px;background:#fff;color:#c2410c;font-size:9px;font-weight:800;line-height:15px;text-align:center;box-shadow:0 0 0 2px var(--cg-side-bg);letter-spacing:0;}
.news-dot[hidden]{display:none;}
@keyframes cg-news-pulse{0%,100%{box-shadow:0 0 0 2px var(--cg-side-bg),0 0 0 0 #ff8a3d66;}50%{box-shadow:0 0 0 2px var(--cg-side-bg),0 0 0 5px #ff8a3d00;}}
@media (prefers-reduced-motion:reduce){.news-dot{animation:none;}}

/* ---------- Panier : information près du bouton du bandeau ---------- */
.cart-toast{position:fixed;z-index:1085;min-width:240px;max-width:320px;padding:10px 12px 10px 10px;border-radius:10px;background:#fff;color:var(--cg-ink,#1b2638);border:1px solid #d6dfeb;box-shadow:0 14px 36px #10203a2e;display:flex;align-items:flex-start;gap:10px;font-size:13px;line-height:1.35;animation:cg-cart-in .18s ease-out;}
.cart-toast::before{content:"";position:absolute;top:-7px;right:16px;width:12px;height:12px;background:#fff;border-left:1px solid #d6dfeb;border-top:1px solid #d6dfeb;transform:rotate(45deg);}
.cart-toast__ico{flex:none;display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:8px;background:#e8f6ee;color:#1d7a4a;font-size:15px;}
.cart-toast.is-removed .cart-toast__ico{background:#fdecec;color:#b83434;}
.cart-toast__body{flex:1 1 auto;min-width:0;}
.cart-toast__title{display:block;font-weight:700;}
.cart-toast__meta{display:block;color:#5b6b82;font-size:12px;margin-top:1px;}
.cart-toast__open{display:inline-block;margin-top:5px;font-weight:600;color:var(--cg-link);}
.cart-toast__close{flex:none;border:0;background:transparent;color:#7b8798;width:24px;height:24px;border-radius:6px;font-size:12px;}
.cart-toast__close:hover{background:#eef2f7;color:var(--cg-ink);}
@keyframes cg-cart-in{from{opacity:0;transform:translateY(-6px);}to{opacity:1;transform:none;}}
.header-cart.is-bumping{animation:cg-cart-bump .35s ease;}
@keyframes cg-cart-bump{30%{transform:scale(1.12);}100%{transform:none;}}

/* ---------- Export / Imprimer : portée, modèles d’impression ---------- */
.export-menu__list{--bs-dropdown-min-width:300px;padding:8px;}
.export-menu__scope{display:flex;align-items:center;gap:8px;margin:0 0 6px;padding:8px 10px;border-radius:8px;background:#f1f5fa;color:#334a68;font-size:12px;font-weight:600;line-height:1.3;}
.export-menu__scope i{color:var(--cg-link);font-size:14px;}
.export-menu__scope.is-selection{background:#fff5e8;color:#8a4b08;}
.export-menu__scope.is-selection i{color:#d97706;}
.export-menu__section{padding:8px 10px 3px;color:#64748b;font-size:10px;font-weight:700;letter-spacing:.07em;text-transform:uppercase;}
.export-menu__templates{display:flex;flex-direction:column;}
.export-menu__template{display:flex;align-items:center;gap:10px;padding:7px 10px;border-radius:7px;font-size:13px;color:#2a3b55;}
.export-menu__template:hover{background:#f0f4f9;}
.export-menu__template-ico{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:6px;background:#eef3f9;color:#5a7294;font-size:12px;flex:none;}
.export-menu__template-name{flex:1 1 auto;min-width:0;font-weight:600;}
.export-menu__template-name small{display:block;color:#6b7a90;font-weight:400;font-size:11px;}
.export-menu__template-actions{display:inline-flex;gap:4px;flex:none;}
.export-menu__template-actions button{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border:1px solid #d5deea;border-radius:6px;background:#fff;color:#3e5578;font-size:13px;}
.export-menu__template-actions button:hover{border-color:var(--cg-link);color:var(--cg-link);background:#f0f5fc;}
.export-menu__template-actions button[data-kind="xlsx"]:hover{color:#1d7a4a;border-color:#1d7a4a;background:#ebf7f0;}
.export-menu__manage small{display:block;}
.export-menu__empty{padding:6px 10px;font-size:12px;color:#6b7a90;}
.app-main .export-menu .dropdown-item span small{display:block;font-size:11px;color:#6b7a90;font-weight:400;}
/* Modèles d’impression : fenêtre de gestion */
.templates-table{width:100%;font-size:13px;}
.templates-table th{font-size:11px;letter-spacing:.05em;text-transform:uppercase;color:#64748b;font-weight:700;padding:6px 10px;border-bottom:1px solid #e3e9f1;}
.templates-table td{padding:9px 10px;border-bottom:1px solid #eef2f7;vertical-align:middle;}
.templates-table .form-check-input{margin:0;}
.templates-table .template-columns{color:#55657d;font-size:12px;line-height:1.4;}
.templates-table .template-source{display:inline-flex;align-items:center;gap:6px;padding:2px 8px;border-radius:10px;background:#eef3f9;color:#3e5578;font-size:11px;font-weight:600;}
.templates-note{font-size:12px;color:#55657d;line-height:1.5;margin:10px 0 0;}
/* Impression : case de pointage en début de ligne */
.print-sheet__tick{width:22px;text-align:center;}
.print-sheet__box{display:inline-block;width:11px;height:11px;border:1.2px solid #1f2b47;border-radius:2px;vertical-align:middle;}

/* ---------- Filtres de colonne : barre seule, liste de valeurs avec recherche ---------- */
.column-filter__title{display:none;}
.column-filter__choices{display:flex;flex-direction:column;gap:1px;max-height:220px;overflow:auto;margin:2px -4px 0;padding:2px 4px;border-top:1px solid #edf1f6;scrollbar-width:thin;}
.column-filter__choice{display:flex;align-items:center;gap:9px;padding:6px 6px;border-radius:6px;font-size:13px;font-weight:500;color:#2a3b55;cursor:pointer;}
.column-filter__choice:hover{background:#f0f4f9;}
.column-filter__choice input{margin:0;flex:none;}
.column-filter__choice span{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.column-filter__choice[hidden]{display:none;}
.column-filter__none{margin:4px 6px;font-size:12px;color:#6b7a90;}

/* ---------- Actions en masse (barre de sélection et panier) ---------- */
.bulk-more{position:relative;}
.bulk-more .dropdown-toggle::after{margin-left:6px;}
.bulk-more__menu,.cart-more__menu{--bs-dropdown-min-width:280px;padding:7px;border-radius:10px;border:1px solid #dbe2eb;box-shadow:0 12px 32px #16233a24;font-size:13px;max-height:min(70vh,520px);overflow:auto;}
.bulk-more__menu .cg-menu-section,.cart-more__menu .cg-menu-section{padding:7px 10px 3px;color:#64748b;font-size:10px;font-weight:700;letter-spacing:.07em;text-transform:uppercase;}
.bulk-more__menu .dropdown-item,.cart-more__menu .dropdown-item{display:flex;align-items:center;gap:10px;min-height:34px;padding:6px 10px;border-radius:7px;font-weight:500;color:#2a3b55;}
.bulk-more__menu .dropdown-item i,.cart-more__menu .dropdown-item i{width:16px;text-align:center;font-size:14px;color:#6b7f9c;}
.bulk-more__menu .dropdown-item:hover,.cart-more__menu .dropdown-item:hover{background:#eef3f9;color:#1b2b45;}
.bulk-more__menu .dropdown-item--danger,.cart-more__menu .dropdown-item--danger{color:#a92f2f;}
.bulk-more__menu .dropdown-item--danger i{color:#c84848;}
.cart-more{display:inline-flex;}
.cart-bulk{flex-wrap:wrap;}

/* ---------- Tâches : fenêtre de création et widget To-Do ---------- */
.task-form .task-motifs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;}
.task-form .task-motif{position:relative;display:flex;flex-direction:column;align-items:center;gap:6px;padding:10px 6px;border:1px solid #d9e1ec;border-radius:9px;background:#fff;color:#3b4d68;font-size:12px;font-weight:600;cursor:pointer;text-align:center;transition:border-color .15s,background-color .15s;}
.task-form .task-motif input{position:absolute;opacity:0;pointer-events:none;}
.task-form .task-motif i{font-size:18px;color:#5a7294;}
.task-form .task-motif:hover{border-color:#b7c7dc;background:#f7fafd;}
.task-form .task-motif:has(input:checked){border-color:var(--cg-primary);background:var(--cg-primary-soft);color:var(--cg-ink);box-shadow:inset 0 0 0 1px var(--cg-primary);}
.task-form .task-motif:has(input:checked) i{color:var(--cg-primary);}
.task-form .task-motif:has(input:focus-visible){outline:2px solid #d69848;outline-offset:2px;}
.task-form .task-link{display:grid;grid-template-columns:auto 1fr;gap:10px 14px;align-items:center;}
.task-form .task-link__kind{display:inline-flex;gap:4px;padding:3px;border-radius:8px;background:#eef2f7;}
.task-form .task-link__kind label{position:relative;padding:6px 12px;border-radius:6px;font-size:13px;font-weight:600;color:#4b5d77;cursor:pointer;}
.task-form .task-link__kind input{position:absolute;opacity:0;pointer-events:none;}
.task-form .task-link__kind label:has(input:checked){background:#fff;color:var(--cg-ink);box-shadow:0 1px 3px #1b2b4522;}
.task-form .task-people{display:flex;flex-wrap:wrap;gap:8px;}
.task-form .task-person{display:inline-flex;align-items:center;gap:7px;padding:6px 10px 6px 7px;border:1px solid #d9e1ec;border-radius:20px;background:#fff;font-size:13px;font-weight:500;color:#2f4158;cursor:pointer;}
.task-form .task-person input{margin:0;}
.task-form .task-person:has(input:checked){border-color:var(--cg-primary);background:var(--cg-primary-soft);}
.task-form .task-person--account{font-weight:600;}
.task-form .task-row{display:grid;grid-template-columns:1fr 1fr;gap:14px;}
.task-form .task-switch{display:flex;align-items:center;gap:10px;padding:10px 12px;border:1px solid #e1e7ef;border-radius:9px;background:#f8fafc;}
.task-form .task-switch strong{display:block;font-size:13px;}
.task-form .task-switch small{display:block;color:#5b6b82;font-size:12px;}
.task-form .task-admin-note{display:flex;gap:8px;align-items:flex-start;margin:8px 0 0;font-size:12px;color:#55657d;line-height:1.45;}
.task-form .task-admin-note i{color:#b7791f;margin-top:1px;}
.task-form .preference-section{margin-bottom:18px;padding-bottom:18px;}
.task-form .preference-section:last-of-type{border-bottom:0;margin-bottom:0;padding-bottom:0;}
@media (max-width:767.98px){.task-form .task-motifs{grid-template-columns:repeat(2,minmax(0,1fr));}.task-form .task-row,.task-form .task-link{grid-template-columns:1fr;}}
/* Widget To-Do */
.dash-card--todo .dash-card__body{padding-top:14px;}
.dash-todo__summary{display:flex;align-items:center;gap:12px;margin-bottom:12px;}
.dash-todo__count{font-size:30px;font-weight:800;line-height:1;color:#b45309;font-family:var(--cg-font-display,inherit);}
.dash-todo__label{flex:1 1 auto;font-weight:600;color:var(--cg-ink);font-size:14px;line-height:1.2;}
.dash-todo__label small{display:block;color:#6b7a90;font-weight:400;font-size:12px;margin-top:2px;}
.dash-todo__add{white-space:nowrap;}
.dash-todo__list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px;}
.dash-todo__item{display:grid;grid-template-columns:auto 1fr auto;gap:4px 10px;align-items:start;padding:9px 10px;border:1px solid #e3e9f1;border-radius:9px;background:#fff;transition:background-color .15s;}
.dash-todo__item:hover{background:#f8fafc;}
.dash-todo__item.is-late{border-color:#f1c4c4;background:#fff8f8;}
.dash-todo__item.is-done{opacity:.55;}
.dash-todo__item.is-done .dash-todo__title{text-decoration:line-through;}
.dash-todo__check{margin:3px 0 0;width:17px;height:17px;}
.dash-todo__main{min-width:0;}
.dash-todo__title{display:block;font-weight:600;color:var(--cg-ink);font-size:13px;line-height:1.3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.dash-todo__title a{color:var(--cg-link);}
.dash-todo__meta{display:flex;flex-wrap:wrap;gap:4px 10px;margin-top:3px;font-size:11.5px;color:#5b6b82;}
.dash-todo__meta i{font-size:11px;margin-right:3px;}
.dash-todo__motif{display:inline-flex;align-items:center;gap:4px;padding:1px 7px;border-radius:10px;font-size:10.5px;font-weight:700;letter-spacing:.03em;text-transform:uppercase;background:#eef3f9;color:#3e5578;}
.dash-todo__motif[data-motif="Étalonnage"]{background:#e7f0fd;color:#1e4fa3;}
.dash-todo__motif[data-motif="Maintenance"]{background:#fff2e2;color:#9a4d00;}
.dash-todo__motif[data-motif="Rappel"]{background:#fdecec;color:#a92f2f;}
.dash-todo__motif[data-motif="Inventaire"]{background:#ecf7ef;color:#1d6b3a;}
.dash-todo__motif[data-motif="Envoi"]{background:#f1ecfb;color:#5b3aa5;}
.dash-todo__motif[data-motif="RDV"]{background:#e6f6f8;color:#0f6c7a;}
.dash-todo__due{font-size:12px;font-weight:600;color:#3e5578;white-space:nowrap;text-align:right;}
.dash-todo__due small{display:block;font-weight:400;color:#6b7a90;font-size:11px;}
.dash-todo__item.is-late .dash-todo__due{color:#b83434;}
.dash-todo__empty{margin:8px 0 0;font-size:13px;color:#6b7a90;}
.dash-todo__more{margin:8px 0 0;font-size:12px;color:#6b7a90;}
/* Liste complète des tâches */
.tasks-table{width:100%;font-size:13px;}
.tasks-table th{font-size:11px;letter-spacing:.05em;text-transform:uppercase;color:#64748b;font-weight:700;padding:6px 10px;border-bottom:1px solid #e3e9f1;}
.tasks-table td{padding:8px 10px;border-bottom:1px solid #eef2f7;vertical-align:middle;}
.tasks-table tr.is-done td{opacity:.55;text-decoration:line-through;}
.tasks-table tr.is-late td.tasks-table__due{color:#b83434;font-weight:600;}

/* ---------- Page CE à consulter ---------- */
.page-head__ico--green{background:#e4f5ea;color:#1d7a4a;}
.ce-toolbar{align-items:center;}
.ce-tabs{display:inline-flex;gap:4px;padding:4px;border-radius:9px;background:#e9eef5;}
.ce-tab{display:inline-flex;align-items:center;gap:7px;padding:7px 12px;border-radius:7px;font-size:13px;font-weight:600;color:#4b5d77;text-decoration:none;}
.ce-tab:hover{color:var(--cg-ink);}
.ce-tab.is-active{background:#fff;color:var(--cg-ink);box-shadow:0 1px 3px #1b2b4522;}
.ce-tab__count{display:inline-flex;align-items:center;justify-content:center;min-width:22px;height:20px;padding:0 6px;border-radius:10px;background:#d7e0eb;color:#2f4158;font-size:11px;font-weight:700;}
.ce-tab.is-active .ce-tab__count{background:#1d7a4a;color:#fff;}
.ce-tab[data-ce-tab="alerts"].is-active .ce-tab__count{background:#c2410c;}
.certificates-table .col-check{width:44px;}
.certificates-table .ce-code{font-weight:700;color:var(--cg-link);}
.certificates-table .ce-ref{display:inline-flex;align-items:center;gap:8px;font-weight:600;}
.certificates-table .ce-date{font-weight:600;white-space:nowrap;}
.certificates-table .ce-alert{display:inline-flex;align-items:center;gap:5px;padding:2px 8px;border-radius:10px;background:#fff1e8;color:#c2410c;font-size:11px;font-weight:700;}
.certificates-table .ce-actions{display:inline-flex;gap:6px;justify-content:flex-end;white-space:nowrap;}
.certificates-table td:nth-child(3){max-width:260px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.certificates-table tbody tr.is-new td:first-child{box-shadow:inset 3px 0 0 #1d7a4a;}
.certificates-table .ce-status{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:600;color:#1d7a4a;}

/* ---------- Fiche instrument : pastille V liée à chaque certificat ---------- */
.certificate-validation{display:inline-flex;align-items:center;gap:6px;font-weight:600;white-space:nowrap;}
.certificate-validation.is-validated{color:#1d5fb4;}
.certificate-validation.is-pending{color:#8a6d1f;}
.certificate-validation__pill{width:18px;height:18px;}
.certificate-validation__pending{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;border-radius:50%;background:#fff3cd;color:#8a6d1f;font-size:11px;font-weight:800;line-height:1;}
#certificateStatus{display:none;}

/* ---------- Familles : code famille non modifiable ---------- */
.family-row-code{width:120px;white-space:nowrap;}
.family-code{display:inline-block;padding:3px 8px;border-radius:6px;background:#eef2f7;color:#3e5578;font-size:12px;font-weight:600;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;}
.family-settings-child .family-code{margin-left:14px;}
/* Colonnes du tableau des familles avec le code famille ajouté */
.modal .family-settings-table th:nth-child(1){width:64px;}
.modal .family-settings-table th:nth-child(2){width:128px;}
.modal .family-settings-table th:nth-child(3){width:auto;text-align:left;}
.modal .family-settings-table th:nth-child(4){width:116px;text-align:center;}
.modal .family-settings-table th:nth-child(5){width:84px;text-align:center;}
.modal .family-settings-table th:nth-child(3)::after,.modal .family-settings-table th:nth-child(4)::after{content:none;}
@media (max-width:767.98px){.modal .family-settings-table th:nth-child(2){width:0;font-size:0;}.modal .family-settings-table td.family-row-code{display:none;}.modal .family-settings-table th:nth-child(2){display:none;}}
