@charset "UTF-8";
/* =============================================================================
   THÈME ACAIS — SVP Assistance
   Refonte visuelle d'après le projet Claude Design « Redesign outil de ticketting ».
   Fichier de surcharge : chargé APRÈS les CSS d'origine, il les habille sans
   modifier la logique PHP/JS. Palette officielle ACAIS (charte 6 pôles).
   ============================================================================= */

:root {
  --acais-red:      #861a22;   /* rouge Siège — couleur d'action */
  --acais-red-dark: #5c1017;
  --acais-red-tint: #f7e9ea;

  --ink:    #2b2320;           /* texte principal */
  --muted:  #8a7f75;
  --muted2: #a2968c;
  --muted3: #6b5f52;
  --muted4: #5c5248;

  --bg:     #f6f2ec;           /* fond de page chaud */
  --card:   #ffffff;

  --border:  #e7dfd4;
  --border2: #ded5c9;
  --border3: #ece5dc;
  --line:    #f1ebe2;
  --input-bg:#fdfcfa;

  /* pôles / états */
  --orange:  #f09200;  --orange-d:#7a4d00;  --orange-t:#fdf1dd;
  --blue:    #0089b6;  --blue-d:  #045d80;  --blue-t:  #e2f0f7;
  --teal:    #7ebab5;
  --violet:  #816183;
  --green:   #61993b;  --green-d: #4a7a2c;  --green-t: #e9f1e2;
  --err:     #a11a25;  --err-t:   #f7e9ea;  --err-bd:  #e3b9be;

  --radius:    12px;
  --radius-sm: 9px;
  --radius-lg: 14px;

  --li3: linear-gradient(90deg,#861a22 0 17%,#f09200 17% 34%,#0089b6 34% 51%,#7ebab5 51% 68%,#816183 68% 85%,#61993b 85% 100%);
  --shadow-card: 0 1px 3px rgba(43,35,32,.08);
  --shadow-pop:  0 14px 34px rgba(43,35,32,.18);
  --shadow-modal:0 20px 50px rgba(20,12,10,.35);
  --font: "Carlito", "Calibri", "Segoe UI", "Nunito Sans", Arial, sans-serif;
}

/* ------------------------------------------------------------------ BASE --- */
html, body,
html body { /* bat la spécificité de style.css / newDashboard.css / connexion.css */
  font-family: var(--font) !important;
  background: var(--bg) !important;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--acais-red); }
a:hover { color: var(--acais-red-dark); }
::selection { background: var(--acais-red-tint); }

/* ---------------------------------------------------------------- HEADER --- */
body header {
  background: #fff !important;
  height: auto !important;
  overflow: visible !important;
  position: relative;
}
/* liseré des 6 pôles sous l'en-tête */
body header::after {
  content: "";
  display: block;
  height: 3px;
  background: var(--li3);
}
body header nav {
  height: 64px;
  border-bottom: 1px solid var(--border3) !important;
  justify-content: flex-start !important;
  gap: 16px;
  padding: 0 24px;
}

/* bloc logo + titre */
#divNomApp {
  width: auto !important;
  flex-direction: row !important;
  gap: 12px;
  border-right: 1px solid var(--border3);
  padding-right: 18px;
}
#divNomApp a { gap: 12px; }
nav #divNomApp img { width: auto !important; height: 38px; }
#divNomApp #nomApp { font-size: 19px !important; color: var(--ink); }
nav #nomApp span { color: var(--acais-red) !important; }
#divNomApp p { font-size: 11px; color: var(--muted2); margin: 0; }

/* menu principal */
#menu { width: auto !important; flex: 1; }
#menu div { width: auto !important; }
#menu div #ulMenu { justify-content: flex-start !important; gap: 4px; }
#menu div #ulMenu li a {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--muted3) !important;
  transition: background .15s, color .15s;
}
/* neutralise le soulignement dégradé d'origine */
#menu div #ulMenu li a:after,
#divUserInfo #sous-menu ul #profile a:after { display: none !important; }
#menu div #ulMenu li a:hover { background: var(--line); color: var(--ink) !important; }
#menu div #ulMenu li a.activePage {
  background: var(--acais-red-tint) !important;
  color: var(--acais-red) !important;
  font-weight: 700;
}
/* sous-menu webmaster */
#menu li:hover #menu-webmaster {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-pop);
  padding: 8px;
  top: 60px;
  width: auto;
  min-width: 220px;
}
#menu li:hover #menu-webmaster li { margin: 0 !important; }
#menu-webmaster li a {
  display: block;
  padding: 8px 12px !important;
  border-radius: 7px;
  white-space: nowrap;
}
#menu-webmaster li a:hover { background: var(--line); }
.chevron::after { border-color: var(--muted2); }

/* infos utilisateur + avatar (l'avatar est injecté par theme-acais.js) */
#divUserInfo { width: auto !important; gap: 10px; }
.acais-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--acais-red); color: #fff;
  font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex: none; text-transform: uppercase;
}
#divUserInfo #nameRole #name p { font-weight: 700; color: var(--ink); }
#divUserInfo #nameRole #role p { color: var(--muted2); font-size: 11.5px; text-align: left; }
#divUserInfo .chevron #sous-menu {
  background: #fff; border: 1px solid var(--border);
  border-radius: 10px; box-shadow: var(--shadow-pop);
  right: 12px; top: 60px; width: auto; min-width: 170px; padding: 8px;
}
#divUserInfo #sous-menu li { margin: 0 !important; }
#divUserInfo #sous-menu a { display: block; padding: 8px 12px; border-radius: 7px; }
#divUserInfo #sous-menu a:hover { background: var(--line); }
.fa-power-off { color: var(--muted3); }
.fa-power-off:hover { color: var(--acais-red) !important; }

/* barre de navigation mobile (bas d'écran) */
#menu-portable .tab i, #menu-portable .tab p { color: var(--muted3); }
#menu-portable .tab:hover i, #menu-portable .tab:hover p { color: var(--acais-red); }
#nom-portable h1 span { color: var(--acais-red) !important; }

/* --------------------------------------------------------------- BOUTONS --- */
input[type=submit],
button.acais-btn,
#returnApp,
.downloadBTN a {
  background: var(--acais-red) !important;
  color: #fff !important;
  border: none !important;
  border-radius: var(--radius-sm) !important;
  font-weight: 700 !important;
  font-family: var(--font) !important;
  cursor: pointer;
  transition: background .15s;
  text-decoration: none !important;
}
input[type=submit]:hover,
#returnApp:hover,
.downloadBTN a:hover { background: var(--acais-red-dark) !important; }
.downloadBTN a .spanIcon { background: rgba(255,255,255,.18) !important; }

/* ----------------------------------------------------- INPUTS / SELECTS --- */
input[type=text], input[type=email], input[type=password],
input[type=date], input[type=search], input[type=number], input[type=tel],
select, textarea {
  font-family: var(--font);
  border: 1px solid var(--border2);
  background: var(--input-bg);
  border-radius: var(--radius-sm);
  color: var(--ink);
  padding: 10px 12px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--acais-red);
  box-shadow: 0 0 0 3px rgba(134,26,34,.10);
}
select:disabled, input:disabled, textarea:disabled {
  background: #f3ede4; color: var(--muted2); cursor: not-allowed;
}
.asterisque, .obligatoire { color: var(--acais-red) !important; font-weight: 700; }

/* ---------------------------------------------------- CONTENU / TITRES --- */
#content { background: var(--bg); }
main #divTitle #title,
main h1#title { color: var(--ink); font-weight: 700; }

/* ============================================================ DASHBOARD === */
/* zone filtres / recherche */
#table-tickets_filter label {
  color: var(--ink);
  font-weight: 700;
  font-size: 14px !important;
}
#table-tickets_filter label input[aria-controls="table-tickets"] {
  border: 1px solid var(--border2) !important;
  background: var(--input-bg) !important;
  border-radius: var(--radius-sm) !important;
  font-family: var(--font) !important;
  color: var(--ink) !important;
  font-size: 14px !important;
}

/* tableau des tickets = carte */
main section#sectionTable #table-tickets,
main section#sectionNoTicket #divNoTicket,
#graphs > div {
  background: var(--card) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow-card) !important;
  color: var(--ink) !important;
}
main section#sectionTable #table-tickets thead {
  border-bottom: 1px solid var(--border3) !important;
}
main section#sectionTable #table-tickets thead td {
  padding: 13px 18px !important;
  text-transform: uppercase;
  letter-spacing: .6px;
  font-size: 11.5px !important;
  font-weight: 700;
  color: var(--muted) !important;
  text-align: left;
}
main section#sectionTable #table-tickets tbody td {
  padding: 10px 12px !important;
  color: var(--ink);
  vertical-align: middle;
}
main section#sectionTable #table-tickets tbody tr:not(:last-child) {
  border-bottom: 1px solid var(--line) !important;
}
main section#sectionTable #table-tickets tbody tr:hover {
  background-color: #fbf7f0 !important;
}

/* pastille d'état — classes posées par theme-acais.js */
.etat-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 12.5px; font-weight: 700; white-space: nowrap;
}
.etat-pill::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: currentColor; opacity: .9;
}
.etat-na      { background: var(--acais-red-tint); color: var(--acais-red); }
.etat-cours   { background: var(--blue-t);   color: var(--blue-d); }
.etat-attente { background: var(--orange-t); color: var(--orange-d); }
.etat-resolu  { background: var(--green-t);  color: var(--green-d); }
.etat-cloture { background: #efeae3;         color: var(--muted3); }
.etat-annule  { background: #efeae3;         color: var(--muted3); }

/* vignette de catégorie (lettre teintée) injectée par theme-acais.js */
.cat-tile {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 8px;
  font-size: 13px; font-weight: 700; flex: none;
  vertical-align: middle; margin-right: 9px;
  background: #f3ede4; color: var(--muted4);
}

/* icônes d'état d'origine — recolorées sur la palette */
.icon-ticket-vert  { background-color: var(--green)  !important; }
.icon-ticket-orange{ background-color: var(--orange) !important; }
.icon-ticket-rouge { background-color: var(--err)    !important; }
.icon-ticket-gris  { background-color: #cdbfae       !important; }
.icon-ticket-noir  { background-color: var(--ink)    !important; }

/* pagination DataTables */
#divTable .dataTables_wrapper .dataTables_paginate {
  background: #fff !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-sm) !important;
  box-shadow: var(--shadow-card) !important;
}
#divTable .dataTables_wrapper .dataTables_paginate .paginate_button.current,
#divTable .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover,
#divTable .dataTables_wrapper .dataTables_paginate .paginate_button.current:active {
  color: var(--acais-red) !important;
}

/* interrupteur "tickets clôturés" */
.checkbox-toggle-round:checked + div:before { background-color: var(--green) !important; }
.informationDashboard i { color: var(--orange) !important; }

/* graphiques */
#graphs > div { padding: 14px 10px !important; }

/* ========================================================= NOUVEAU TICKET = */
#sectionFormTicket #divFormTicket {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  max-width: 900px;
  margin: 20px auto;
  padding: 24px 28px;
}
#form-creation-ticket { width: 100% !important; margin: 0 !important; }
#form-creation-ticket .divInput { display: flex; flex-direction: column; margin: 0 0 16px; }
#form-creation-ticket .divInput label {
  font-size: 13px; font-weight: 700; color: var(--ink);
  margin-bottom: 6px; text-align: left; width: auto; float: none;
}
#form-creation-ticket select,
#form-creation-ticket input,
#form-creation-ticket textarea { width: 100%; font-size: 14px; }
#form-creation-ticket textarea { min-height: 96px; resize: vertical; }
#selectionLieux, #selectionVehicule { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
#selectionLieux .divInput, #selectionVehicule .divInput { margin-bottom: 0; }
/* dépôt de pièces jointes (js/depot-fichiers.js) */
.depot { margin: 4px 0 18px; }
.depot-zone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  border: 1.5px dashed var(--border2); border-radius: 10px; background: var(--input-bg);
  padding: 18px 16px; text-align: center; cursor: pointer; color: var(--muted);
  transition: border-color .15s, background-color .15s;
}
.depot-zone:hover, .depot-zone:focus-visible { border-color: var(--acais-red); outline: none; }
.depot-zone.depot-survol { border-color: var(--acais-red); border-style: solid; background: #f7e9ea; }
.depot-ic { width: 26px; height: 26px; color: var(--acais-red); }
.depot-txt { font-size: 14px; color: var(--ink, #2b2622); }
.depot-lien { color: var(--acais-red); font-weight: 700; text-decoration: underline; }
.depot-aide { font-size: 12px; color: var(--muted); }
.depot-erreurs { color: var(--acais-red); font-size: 12.5px; margin-top: 6px; }
.depot-erreurs:empty { display: none; }
.depot-liste { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.depot-item {
  display: flex; align-items: center; gap: 10px; padding: 6px 8px;
  border: 1px solid var(--border2); border-radius: 8px; background: #fff;
}
.depot-vignette {
  flex: 0 0 38px; height: 38px; border-radius: 6px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; color: #fff; background: #8a8079;
}
.depot-vignette img { width: 100%; height: 100%; object-fit: cover; }
.depot-pdf { background: #b3261e; }
.depot-word { background: #2b579a; }
.depot-excel { background: #217346; }
.depot-powerpoint { background: #c43e1c; }
.depot-infos { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.depot-nom { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.depot-taille { font-size: 11.5px; color: var(--muted); }
.depot-suppr {
  flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; border: 0;
  background: transparent; color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer;
}
.depot-suppr:hover { background: #f7e9ea; color: var(--acais-red); }
/* dans le fil de commentaires : zone plus compacte */
.tkd-composer .depot-zone { padding: 10px 12px; flex-direction: row; flex-wrap: wrap; }
.tkd-composer .depot-ic { width: 18px; height: 18px; }
.tkd-composer .depot-aide { width: 100%; }

#divInput15 { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
#divInput15 input[type=submit] { padding: 12px 22px; font-size: 14px; }
#divInput15 p { color: var(--muted); font-size: 12.5px; }
@media (max-width: 992px) {
  #selectionLieux, #selectionVehicule { grid-template-columns: 1fr; }
}

/* ===================================================== MODALE (jQuery UI) = */
body .ui-widget-overlay { background: rgba(43,35,32,.45) !important; opacity: 1 !important; }
.ui-dialog {
  border: none !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-modal) !important;
  padding: 0 !important;
  overflow: hidden !important;
  font-family: var(--font) !important;
  max-width: 460px !important;
}
.ui-dialog::before { content: ""; display: block; height: 4px; background: var(--li3); }
.ui-dialog #dialog {
  text-align: left !important;
  padding: 22px 24px !important;
  margin: 0 !important;
  color: var(--ink);
  font-size: 14px; line-height: 1.55;
}
.ui-dialog .ui-dialog-buttonpane { border: none !important; margin: 0 !important; padding: 0 22px 18px !important; background: none !important; }
.ui-dialog .ui-dialog-buttonpane .ui-button,
.ui-dialog .ui-dialog-buttonset button {
  background: var(--acais-red) !important;
  color: #fff !important;
  border: none !important;
  border-radius: var(--radius-sm) !important;
  padding: 9px 18px !important;
  font-weight: 700 !important;
  font-family: var(--font) !important;
}
.ui-dialog .ui-dialog-buttonset button:hover { background: var(--acais-red-dark) !important; }

/* =================================================== TOASTS & BANDEAUX ==== */
#acais-toasts {
  position: fixed; top: 16px; right: 16px; z-index: 10050;
  display: flex; flex-direction: column; gap: 10px; max-width: 360px;
}
.acais-toast {
  display: flex; align-items: center; gap: 12px;
  background: #fff; border: 1px solid var(--border);
  border-radius: 11px; padding: 12px 14px;
  box-shadow: 0 6px 18px rgba(43,35,32,.14);
  animation: acais-toast-in .2s ease-out;
}
.acais-toast .ic { width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center; flex: none; font-weight: 700; }
.acais-toast .tx { line-height: 1.35; }
.acais-toast .tt { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.acais-toast .sb { font-size: 12.5px; color: var(--muted); }
.acais-toast.ok  .ic { background: var(--green-t); color: var(--green-d); }
.acais-toast.info .ic { background: var(--blue-t);  color: var(--blue-d); }
.acais-toast.err  { border-color: var(--err-bd); } .acais-toast.err .ic { background: var(--err-t); color: var(--err); }
@keyframes acais-toast-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* messages inline PHP */
p.erreur {
  background: var(--err-t) !important; border: 1px solid var(--err-bd) !important;
  color: var(--err) !important; border-radius: 11px; padding: 12px 14px 12px 40px !important;
}
p.ok {
  background: var(--green-t) !important; border: 1px solid #cfe0c2 !important;
  color: var(--green-d) !important; border-radius: 11px; padding: 12px 14px 12px 40px !important;
}

/* ============================================================= CONNEXION = */
body.acais-auth, .acais-auth main { background: var(--bg) !important; }
.acais-auth main section #zoneConnexion,
.acais-auth main section #zoneDeconnexion {
  background: #fff !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: 0 10px 30px rgba(43,35,32,.08) !important;
  overflow: hidden;
  max-width: 460px !important;
  width: 92% !important;
  padding-bottom: 30px !important;
  position: relative;
}
.acais-auth main section #zoneConnexion::before,
.acais-auth main section #zoneDeconnexion::before {
  content: ""; display: block; height: 4px; background: var(--li3);
}
.acais-auth #zoneConnexion #titre { padding: 6px 34px 0; }
.acais-auth #zoneConnexion #titre h1,
.acais-auth #zoneDeconnexion #titre h1 {
  font-size: 23px !important; padding-top: 22px !important; color: var(--ink) !important;
}
.acais-auth #titre h1 span { color: var(--acais-red) !important; }
.acais-auth .acais-auth-logo { display: block; height: 60px; margin: 24px auto 0; }
.acais-auth .acais-auth-sub { text-align: center; color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.acais-auth #zoneConnexion #titre h2 { font-size: 16px; color: var(--ink); }
.acais-auth #zoneConnexion #titre p { color: var(--muted2); }

.acais-auth #formulaire .divInput { padding: 10px 34px !important; }
.acais-auth #formulaire .divInput label { font-weight: 700; color: var(--ink); }
.acais-auth #formulaire .divInput input {
  height: 44px !important; background: var(--input-bg) !important;
  border: 1px solid var(--border2) !important; border-radius: var(--radius-sm) !important;
  font-family: var(--font) !important; font-size: 15px !important; color: var(--ink) !important;
}
.acais-auth #formulaire .divInput.mail div { border: 1px solid var(--border2); border-radius: var(--radius-sm); overflow: hidden; background: var(--input-bg); }
.acais-auth #formulaire .divInput.mail div input { border: none !important; background: transparent !important; border-radius: 0 !important; }
.acais-auth #formulaire .divInput.mail div span {
  padding: 0 12px !important; background: #f3ede4; align-self: stretch; display: flex; align-items: center;
  font-weight: 700; color: var(--muted3); border-left: 1px solid var(--border2); font-size: 14px !important;
}
.acais-auth #formulaire .divInput .toggle { color: var(--muted) !important; right: 12px !important; transform: translateY(-50%) !important; }
.acais-auth #formulaire .divInput input[type="submit"] {
  width: 100% !important; background: var(--acais-red) !important; color: #fff !important; height: 46px !important;
  border-radius: var(--radius-sm) !important; font-size: 15px !important; font-weight: 700 !important;
}
.acais-auth #formulaire .divInput input[type="submit"]:hover { background: var(--acais-red-dark) !important; }
.acais-auth #autresLiens a { color: var(--acais-red) !important; font-weight: 700; }
.acais-auth #autresLiens a:hover { color: var(--acais-red-dark) !important; }
.acais-auth .acais-auth-foot { text-align: center; color: var(--muted2); font-size: 11.5px; margin-top: 18px; padding: 0 20px; }

/* bandeau "déconnecté" façon design */
.acais-banner-ok {
  display: flex; align-items: center; gap: 9px;
  background: var(--green-t); border: 1px solid #cfe0c2; border-radius: var(--radius-sm);
  padding: 9px 12px; margin: 18px 34px 0; color: var(--green-d); font-weight: 700; font-size: 13px;
}

/* =============================================================================
   SURCHARGES DES CSS DE PAGE (new_ticket.css, ticket.css, profil.css)
   Ces fichiers sont liés dans les fragments inclus, donc charges APRES ce
   theme. Leurs regles d'accent ne sont pas !important : on impose la palette.
   ============================================================================= */
.divInput label,
main section#sectionFormTicket #divFormTicket form .divInput label,
main section#sectionTicket #divTicket .divInput label,
main section#sectionAttributionTech #divAttributionTech .divInput label,
main section#sectionNewCommentaire #divNewCommentaire .divInput label,
main section#sectionCommentaire #divCommentaire .divInput label { color: var(--ink) !important; }

main section#sectionTicket #id-form-ticket .divBtn input[type="submit"],
main section#sectionAttributionTech #id-form-attribution .divBtn input[type="submit"],
main section#sectionNewCommentaire #id-form-commentaire .divBtn input[type="submit"],
main section#sectionTicket #divBoutonTicket .divBtn #btn_afficher_modification,
main section#sectionFormTicket #divFormTicket form .divInput input[type="submit"],
main section#sectionFormTicket #divFormTicket form #saveClose .divInput input,
#div-btn-password button {
  background: var(--acais-red) !important;
  background-color: var(--acais-red) !important;
  color: #fff !important; border: none !important;
  border-radius: var(--radius-sm) !important; font-family: var(--font) !important;
}

.divTel { color: var(--muted3) !important; }
main #divMDP p span.caractereSpePonc { border-color: var(--acais-red) !important; }
main #div_piece_jointe #table-tickets tbody tr:hover,
main #divCommentaire .tableauModification tbody tr:hover { background-color: #fbf7f0 !important; }

main section#sectionTicket #divTicket .divInput input,
main section#sectionTicket #divTicket .divInput textarea,
main section#sectionTicket #divTicket .divInput select,
main section#sectionAttributionTech #divAttributionTech .divInput select,
main section#sectionAttributionTech #divAttributionTech .divInput input,
main section#sectionNewCommentaire #divNewCommentaire .divInput textarea,
main section#sectionNewCommentaire #divNewCommentaire .divInput input,
main section#sectionNewCommentaire #divNewCommentaire .divInput select,
main section#sectionFormTicket #divFormTicket form .divInput input,
main section#sectionFormTicket #divFormTicket form .divInput textarea,
main section#sectionFormTicket #divFormTicket form .divInput select {
  background: var(--input-bg) !important;
  border: 1px solid var(--border2) !important;
  border-radius: var(--radius-sm) !important;
  font-family: var(--font) !important;
}

main section#sectionTicket #divTicket,
main section#sectionAttributionTech #divAttributionTech,
main section#sectionNewCommentaire #divNewCommentaire,
main section#sectionCommentaire #divCommentaire,
main #divMDP {
  background: var(--card) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-card) !important;
}

/* ============================================================ REPORTING === */
.rep-head { display: flex; align-items: baseline; gap: 12px; margin: 4px 0 18px; flex-wrap: wrap; }
.rep-head h1 { margin: 0; padding: 0; font-size: 24px; font-weight: 700; color: var(--ink); }
.rep-head .rep-sub { font-size: 13.5px; color: var(--muted); }

/* barre de filtre par période */
.rep-filter {
  display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-card); padding: 14px 16px; margin: 0 0 16px;
}
.rep-filter .fld { display: flex; flex-direction: column; gap: 5px; }
.rep-filter .fld label { font-size: 12px; font-weight: 700; color: var(--ink); }
.rep-filter input[type=date] { height: 40px; font-size: 14px; }
.rep-filter .rep-actions { display: flex; gap: 8px; align-items: center; margin-left: auto; }
.rep-filter button {
  height: 40px; padding: 0 18px; border: none; border-radius: var(--radius-sm);
  background: var(--acais-red); color: #fff; font-weight: 700; font-family: var(--font);
  font-size: 14px; cursor: pointer;
}
.rep-filter button:hover { background: var(--acais-red-dark); }
.rep-filter a.rep-reset {
  height: 40px; display: inline-flex; align-items: center; padding: 0 16px;
  border: 1px solid var(--border2); border-radius: var(--radius-sm);
  color: var(--muted4); font-weight: 700; font-size: 14px; text-decoration: none; background: #fff;
}
.rep-filter a.rep-reset:hover { background: var(--line); color: var(--ink); }
.rep-filter .quick { display: flex; gap: 6px; flex-wrap: wrap; }
.rep-filter .quick a {
  height: 30px; display: inline-flex; align-items: center; padding: 0 11px;
  border: 1px solid var(--border2); border-radius: 999px; background: #fff;
  color: var(--muted3); font-size: 12.5px; font-weight: 700; text-decoration: none;
}
.rep-filter .quick a:hover { background: var(--acais-red-tint); color: var(--acais-red); border-color: var(--acais-red-tint); }
.rep-badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  background: var(--acais-red-tint); color: var(--acais-red); font-size: 12.5px; font-weight: 700;
}

.rep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.rep-tile {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-card); padding: 16px 16px 15px;
  display: flex; flex-direction: column; gap: 8px;
}
.rep-tile .ic {
  width: 38px; height: 38px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; flex: none;
}
.rep-tile .ic svg { width: 20px; height: 20px; }
.rep-tile .val { font-size: 30px; font-weight: 700; color: var(--ink); line-height: 1; }
.rep-tile .lbl { font-size: 13px; font-weight: 700; color: var(--ink); }
.rep-tile .sub { font-size: 12px; color: var(--muted); }
.rep-tile.is-alert { border-color: var(--err-bd); }
.rep-tile.is-alert .val { color: var(--err); }

.rep-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 16px; }
@media (max-width: 900px) { .rep-cols { grid-template-columns: 1fr; } }
.rep-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-card); padding: 18px 20px;
}
.rep-card h3 {
  margin: 0 0 14px; font-size: 11.5px; font-weight: 700; letter-spacing: .8px;
  text-transform: uppercase; color: var(--muted); text-decoration: none; text-align: left;
}
.rep-row { display: grid; grid-template-columns: 150px 1fr 44px; align-items: center; gap: 12px; margin-bottom: 11px; }
.rep-row:last-child { margin-bottom: 0; }
.rep-row .rl { font-size: 13.5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 8px; }
.rep-row .rl .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.rep-track { display: block; width: 100%; height: 9px; border-radius: 999px; background: var(--line); overflow: hidden; }
.rep-fill { display: block; height: 100%; min-width: 2px; border-radius: 999px; background: var(--acais-red); }
.rep-row .rc { font-size: 13.5px; font-weight: 700; color: var(--ink); text-align: right; }
.rep-empty { color: var(--muted); font-size: 13px; }

/* tuiles cliquables (lien vers la liste pré-filtrée) */
a.rep-tile-link { text-decoration: none !important; color: inherit; display: block; }
.rep-tile { transition: box-shadow .15s, border-color .15s, transform .15s; }
a.rep-tile-link:hover .rep-tile { border-color: var(--acais-red); box-shadow: 0 5px 16px rgba(43,35,32,.12); transform: translateY(-1px); }

/* ligne de tableau cliquable */
#table-tickets tbody tr { cursor: pointer; }

/* ============================================================ NOTIFICATIONS */
.notif { position: relative; display: flex; align-items: center; }
.notif-btn {
  position: relative; width: 38px; height: 38px; border: 1px solid var(--border2);
  border-radius: 10px; background: var(--input-bg); display: flex; align-items: center;
  justify-content: center; cursor: pointer; color: var(--ink); padding: 0;
}
.notif-btn:hover { background: var(--line); }
.notif-btn svg { width: 18px; height: 18px; }
.notif-badge {
  position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px; border-radius: 9px;
  background: var(--acais-red); color: #fff; font-size: 10.5px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
}
.notif-badge.is-zero { display: none; }
.notif-panel {
  position: absolute; top: 48px; right: 0; width: 344px; max-width: 92vw;
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow-pop); z-index: 1200; overflow: hidden; display: none;
}
.notif-panel.open { display: block; }
.notif-head { display: flex; align-items: baseline; gap: 8px; padding: 13px 16px 11px; border-bottom: 1px solid var(--line); }
.notif-head .t { font-size: 14px; font-weight: 700; color: var(--ink); }
.notif-head .c { font-size: 12px; color: var(--muted2); }
.notif-head .mark { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--acais-red); cursor: pointer; background: none; border: none; padding: 0; font-family: var(--font); }
.notif-head .mark:hover { color: var(--acais-red-dark); }
.notif-list { max-height: 60vh; overflow-y: auto; }
.notif-item { display: flex; gap: 11px; padding: 12px 16px; border-top: 1px solid var(--line); text-decoration: none !important; color: inherit; }
.notif-item:first-child { border-top: none; }
.notif-item.unread { background: #fdf9f2; }
.notif-item .ic { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex: none; }
.notif-item .ic svg { width: 15px; height: 15px; }
.notif-item .bd { line-height: 1.35; flex: 1; }
.notif-item .bd .m { font-size: 13px; color: var(--ink); }
.notif-item .bd .tm { font-size: 11.5px; color: var(--muted2); margin-top: 2px; }
.notif-item .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--acais-red); margin: 6px 0 0 auto; flex: none; }
.notif-foot { padding: 11px 16px; border-top: 1px solid var(--line); text-align: center; font-size: 12.5px; font-weight: 700; color: var(--acais-red); cursor: pointer; }
.notif-empty { padding: 22px 16px; text-align: center; color: var(--muted); font-size: 13px; }
/* cloche mobile dans la barre haute */
#nom-portable .notif-btn { width: 34px; height: 34px; }
#nom-portable .notif-panel { position: fixed; top: 56px; right: 10px; left: 10px; width: auto; max-width: none; }
#nom-portable .m-right { display: flex; align-items: center; gap: 12px; }

/* ============================= BARRE DE NAVIGATION MOBILE (façon maquette 1a) */
.mnav {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px;
  flex: 1; text-decoration: none !important; color: var(--muted); font-size: 10.5px; font-weight: 700;
  background: none; border: none; cursor: pointer; font-family: var(--font);
}
.mnav svg { width: 22px; height: 22px; }
.mnav.active { color: var(--acais-red); }
.mnav .ic { position: relative; display: inline-flex; }
.mnav .mbadge {
  position: absolute; top: -5px; right: -9px; min-width: 15px; height: 15px; border-radius: 8px;
  background: var(--acais-red); color: #fff; font-size: 9.5px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; padding: 0 3px;
}
.mfab {
  width: 48px; height: 48px; border-radius: 50%; background: var(--acais-red); color: #fff;
  display: flex; align-items: center; justify-content: center; margin-top: -22px; flex: none;
  box-shadow: 0 6px 14px rgba(134, 26, 34, .35); text-decoration: none !important;
}
.mfab svg { width: 24px; height: 24px; stroke: #fff !important; }

/* avatar + menu (Profil / Déconnexion) dans la barre haute mobile */
.m-avatar {
  width: 32px; height: 32px; border-radius: 50%; background: var(--acais-red); color: #fff;
  font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center;
  border: none; cursor: pointer; flex: none;
}
.m-menu {
  position: fixed; top: 56px; right: 10px; background: #fff; border: 1px solid var(--border);
  border-radius: 10px; box-shadow: var(--shadow-pop); padding: 8px; display: none; z-index: 1200; min-width: 180px;
}
.m-menu.open { display: block; }
.m-menu a { display: block; padding: 10px 12px; border-radius: 7px; text-decoration: none; color: var(--ink); font-size: 14px; }
.m-menu a:hover { background: var(--line); }

/* ============================================== TABLEAU DESKTOP : avatars/notes */
.tbl-user { display: inline-flex; align-items: center; gap: 8px; }
.tbl-av { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 10.5px; font-weight: 700; flex: none; }
.tbl-av.none { background: #fdf6f6; color: var(--err); border: 1px dashed #d8a7ab; }
.tbl-user.none .tbl-name { color: var(--err); font-weight: 700; }
.td-date { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.td-note { font-size: 12px; color: var(--muted); margin-top: 1px; }
.td-note.late { color: var(--err); font-weight: 700; }

/* ============================================ NOUVEAU TICKET : étapes numérotées */
.nt-step { display: flex; align-items: center; gap: 10px; margin: 22px 0 12px; }
.nt-step:first-child { margin-top: 4px; }
.nt-step .n { width: 22px; height: 22px; border-radius: 50%; background: var(--acais-red-tint); color: var(--acais-red); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: none; }
.nt-step .l { font-size: 14px; font-weight: 700; color: var(--ink); }
.nt-sep { height: 1px; background: var(--line); margin: 20px 0; }

/* nouveau ticket : en-tête, champs appariés, séparateurs d'étapes */
.nt-head { display: flex; align-items: baseline; gap: 12px; max-width: 900px; margin: 0 auto 14px; flex-wrap: wrap; }
.nt-head h1 { margin: 0; padding: 0; font-size: 24px; font-weight: 700; color: var(--ink); }
.nt-head span { font-size: 13.5px; color: var(--muted); }
.nt-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.nt-grid2 .divInput { margin-bottom: 0 !important; }
#form-creation-ticket .nt-step { border-top: 1px solid var(--line); padding-top: 20px; margin: 20px 0 12px; }
#form-creation-ticket .nt-step:first-child { border-top: none; padding-top: 0; margin-top: 2px; }
@media (max-width: 900px) { .nt-grid2 { grid-template-columns: 1fr; gap: 0; } .nt-head { padding: 0 4px; } }

/* profil : en-têtes de section */
.pf-sec { font-size: 11.5px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); margin: 24px 0 12px; padding-top: 16px; border-top: 1px solid var(--line); }
#id-form-profil > .pf-sec:first-child, #sectionFormTicket .pf-sec:first-of-type { border-top: none; padding-top: 0; margin-top: 6px; }

/* ---- cartes de tickets mobile (rendues par ticket-cards.js, cf. maquette 1a) ---- */
#ticket-cards { display: none; }               /* affiché uniquement sur mobile */
.tk-card {
  display: block; background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--shadow-card); padding: 12px 14px; margin-bottom: 9px;
  text-decoration: none !important; color: inherit;
}
.tk-card:active { background: #fbf7f0; }
.tk-top { display: flex; align-items: center; gap: 8px; }
.tk-cat { width: 26px; height: 26px; border-radius: 7px; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex: none; }
.tk-id { font-family: Consolas, ui-monospace, Menlo, monospace; font-size: 12.5px; font-weight: 700; color: var(--muted4); }
.tk-spacer { flex: 1; }
.tk-title { font-size: 15px; font-weight: 700; color: var(--ink); margin-top: 7px; line-height: 1.25; }
.tk-lieu { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.tk-foot { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--line); margin-top: 10px; padding-top: 9px; }
.tk-date { font-size: 12.5px; font-weight: 700; color: var(--ink); }
.tk-note { font-size: 12px; color: var(--muted); }
.tk-note.late { color: var(--err); font-weight: 700; }
.tk-techav { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; flex: none; }
.tk-tech { font-size: 12.5px; color: var(--ink); }
.tk-tech.none { color: var(--err); font-weight: 700; }
.tk-empty { text-align: center; color: var(--muted); padding: 26px 10px; }

/* ==================================================== FILTRES DU DASHBOARD = */
.dashfilter {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-card); padding: 14px 16px; margin: 16px 0;
  display: flex; flex-direction: column; gap: 12px;
}
.dashfilter .df-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.dashfilter .df-pills { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; }
.dashfilter .df-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
/* nombre de lignes affichées (js/dashboard.js) */
.dashfilter .df-count { margin-top: 8px; font-size: 13px; color: var(--muted); text-align: left; }
.dashfilter .df-count.is-filtre b { color: var(--acais-red); }
.dashfilter select.df-select { height: 36px; font-size: 13px; padding: 0 12px; }
.dashfilter .df-search { display: flex; align-items: center; gap: 8px; height: 36px; width: 250px; border: 1px solid var(--border2); border-radius: var(--radius-sm); padding: 0 12px; background: var(--input-bg); }
.dashfilter .df-search svg { width: 15px; height: 15px; flex: none; }
.dashfilter .df-search input { border: none !important; background: transparent !important; padding: 0 !important; width: 100%; height: 100%; font-size: 13.5px; box-shadow: none !important; }
.dashfilter .df-search input:focus { box-shadow: none !important; }
.dashfilter .df-pill {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px; border-radius: 999px;
  font-size: 13px; font-weight: 700; cursor: pointer; border: 1px solid transparent;
  background: var(--line); color: var(--muted3); user-select: none;
}
.dashfilter .df-pill .dot { width: 7px; height: 7px; border-radius: 50%; }
.dashfilter .df-pill .cnt { opacity: .7; font-weight: 400; }
.dashfilter .df-pill:hover { filter: brightness(.97); }
.dashfilter .df-pill.is-on.p-all      { background: var(--acais-red);     color: #fff; }
.dashfilter .df-pill.is-on.p-na       { background: var(--acais-red-tint);color: var(--acais-red); }
.dashfilter .df-pill.is-on.p-cours    { background: var(--blue-t);        color: var(--blue-d); }
.dashfilter .df-pill.is-on.p-attente  { background: var(--orange-t);      color: var(--orange-d); }
.dashfilter .df-pill.is-on.p-resolu   { background: var(--green-t);       color: var(--green-d); }
.dashfilter .df-pill.is-on.p-retard   { background: #fff; border-color: var(--err); color: var(--err); }
.dashfilter .df-pill.is-on.p-tech     { background: var(--acais-red-tint);color: var(--acais-red); }
/* moteur de recherche déplacé dans la barre de filtre -> on masque celui de DataTables */
#table-tickets_filter { display: none !important; }

/* =============================================================================
   MOBILE — surcharge des anciennes media-queries (polices géantes, débordements)
   pour un rendu proche de la maquette Claude Design. Mobile-first, sans framework.
   ============================================================================= */
@media (max-width: 992px) {
  html, body { font-size: 16px !important; overflow-x: hidden !important; }
  * { box-sizing: border-box; }
  img { max-width: 100%; }

  /* ---- en-tête mobile (barre haute compacte) ---- */
  body header { overflow: visible !important; }
  #div-nom-portable { display: block !important; height: auto !important; background: #fff; }
  #nom-portable { height: 56px !important; display: flex !important; align-items: center !important; justify-content: space-between !important; gap: 10px; padding: 0 14px !important; }
  #nom-portable a { flex-direction: row !important; gap: 10px; align-items: center !important; }
  #nom-portable h1 { font-size: 18px !important; margin: 0 !important; padding: 0 !important; }
  #nom-portable h1 span { color: var(--acais-red) !important; }
  #nom-portable img { width: auto !important; height: 30px !important; }

  /* ---- barre de navigation du bas (reconstruite par mobile-nav.js : Tickets / + / Notifications) ---- */
  #menu-portable {
    display: flex !important; align-items: center; justify-content: space-around;
    height: 64px !important; padding: 0 12px !important; background: #fff !important;
    border-top: 1px solid var(--border3); box-shadow: 0 -2px 10px rgba(43, 35, 32, .06);
  }

  /* ---- contenu ---- */
  main { width: 92% !important; margin: 16px auto 90px !important; }
  #graphs { display: none !important; }               /* pas de graphiques sur mobile (comme la maquette) */
  main #divTitle #title { font-size: 20px !important; }

  /* ---- connexion / déconnexion ---- */
  .acais-auth main { height: auto !important; min-height: 100vh; padding: 24px 0 !important; }
  .acais-auth main section #zoneConnexion,
  .acais-auth main section #zoneDeconnexion { width: 92% !important; max-width: 440px !important; }
  .acais-auth #zoneConnexion #titre h1,
  .acais-auth #zoneDeconnexion #titre h1 { font-size: 22px !important; }
  .acais-auth #zoneConnexion #titre h2 { font-size: 16px !important; }
  .acais-auth #zoneConnexion #titre p { font-size: 13px !important; }
  .acais-auth #formulaire .divInput { padding: 10px 22px !important; }
  .acais-auth #formulaire .divInput label { font-size: 13px !important; }
  .acais-auth #formulaire .divInput.mail div { font-size: 15px !important; }
  .acais-auth #formulaire .divInput input { height: 46px !important; font-size: 15px !important; }
  .acais-auth #formulaire .divInput input[type="submit"] { height: 48px !important; font-size: 15px !important; }
  .acais-auth #autresLiens { font-size: 13px !important; }
  .acais-auth #formulaire .divInput .fa { font-size: 1.2rem !important; }

  /* ---- filtres du tableau de bord ---- */
  #dashfilter { padding: 12px !important; margin: 12px 0 !important; }
  #dashfilter .df-top { flex-direction: column; align-items: stretch; }
  #dashfilter .df-pills { flex-wrap: nowrap !important; overflow-x: auto !important; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
  #dashfilter .df-pill { flex: none; font-size: 12.5px !important; }
  #dashfilter .df-right { width: 100%; margin-left: 0 !important; }
  #dashfilter select.df-select { flex: 1; }
  #dashfilter .df-search { flex: 1; width: auto; }

  /* ---- liste des tickets : la table brute est masquée, remplacée par les
         cartes design #ticket-cards (rendues par ticket-cards.js) ---- */
  main section#sectionTable { margin-top: 8px !important; }
  main section#sectionTable #table-tickets,
  main section#sectionTable #table-tickets_info,
  #selectMobileSearch { display: none !important; }
  #ticket-cards { display: block; }

  /* recherche native DataTables + toggle clôturés : pleine largeur, tailles normales */
  #table-tickets_filter { width: 100% !important; text-align: left !important; }
  #table-tickets_filter label { font-size: 13px !important; width: 100% !important; padding-left: 0 !important; }
  #table-tickets_filter label input[aria-controls="table-tickets"] { width: 100% !important; height: 42px !important; font-size: 14px !important; margin: 6px 0 0 !important; }
  #selectMobileSearch { height: 44px !important; font-size: 14px !important; border-radius: var(--radius-sm) !important; border: 1px solid var(--border2) !important; margin-bottom: 12px !important; }
  div.switch label { font-size: 13px !important; }
  div.switch label input#checkbox-toggle-archive { height: auto !important; font-size: inherit !important; }
  .dataTables_wrapper .dataTables_paginate .paginate_button { font-size: 13px !important; }

  /* ---- nouveau ticket ---- */
  main section#sectionFormTicket #divFormTicket { padding: 16px !important; }
  main section#sectionFormTicket #divFormTicket form .divInput { padding: 0 0 14px !important; }
  main section#sectionFormTicket #divFormTicket form .divInput label { font-size: 13px !important; }
  main section#sectionFormTicket #divFormTicket form .divInput input,
  main section#sectionFormTicket #divFormTicket form .divInput select { height: 46px !important; font-size: 15px !important; }
  main section#sectionFormTicket #divFormTicket form .divInput textarea { height: auto !important; min-height: 96px !important; font-size: 15px !important; }
  main section#sectionFormTicket #divFormTicket form .file #label_file { height: auto !important; font-size: 14px !important; padding: 12px 16px !important; }
  #div_champs_obligatoire { font-size: 12.5px !important; }
  #selectionLieux, #selectionVehicule { grid-template-columns: 1fr !important; gap: 0 !important; }
  /* barre d'action « Créer le ticket » collée en bas (comme la maquette) */
  #divInput15 { position: sticky; bottom: 0; background: var(--card); margin: 0 -16px -16px !important; padding: 12px 16px !important; border-top: 1px solid var(--border3); z-index: 3; }
  #divInput15 input[type="submit"] { width: 100% !important; height: 48px !important; font-size: 15px !important; }
  #divInput15 p { display: none; }

  /* ---- éditeur Trumbowyg : icônes de taille raisonnable ---- */
  .trumbowyg-button-pane button { width: 34px !important; height: 34px !important; }
  .trumbowyg-box svg, .trumbowyg-modal svg { width: 18px !important; }

  /* ---- détail ticket / profil : une colonne ---- */
  main section#sectionTicket #divTicket .divInput label,
  main section#sectionFormTicket #divFormTicket form .divInput label { font-size: 13px !important; }
}

/* petits téléphones */
@media (max-width: 420px) {
  #nom-portable h1 { font-size: 16px !important; }
  .rep-grid { grid-template-columns: 1fr 1fr; }
}

/* ============================================================ DÉTAIL TICKET === */
.tkd { max-width: 1180px; margin: 0 auto; }
.tkd-crumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.tkd-crumb a { font-weight: 700; color: var(--acais-red); text-decoration: none; }
.tkd-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.tkd-cat { width: 44px; height: 44px; border-radius: 11px; font-size: 19px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: none; }
.tkd-hinfo { min-width: 0; flex: 1; }
.tkd-hrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tkd-id { font-family: Consolas, ui-monospace, Menlo, monospace; font-size: 15px; font-weight: 700; color: var(--muted); }
.tkd-hrow .etat-pill { padding: 4px 11px; }
.tkd-meta { font-size: 12.5px; color: var(--muted); }
.tkd-title { font-size: 22px; font-weight: 700; color: var(--ink); margin-top: 3px; line-height: 1.25; }
.tkd-hactions { display: flex; align-items: center; gap: 9px; flex: none; }
.tkd-icobtn { width: 38px; height: 38px; border: 1px solid var(--border2); border-radius: 9px; background: #fff; color: var(--muted4); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.tkd-icobtn:hover { background: var(--line); }
.tkd-icobtn svg { width: 16px; height: 16px; }

.tkd-grid { display: grid; grid-template-columns: 1fr 350px; gap: 18px; align-items: start; }
.tkd-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.tkd-side { display: flex; flex-direction: column; gap: 14px; }
.tkd-card { background: var(--card); border: 1px solid var(--border); border-radius: 13px; box-shadow: var(--shadow-card); padding: 18px 22px; }
.tkd-side .tkd-card { padding: 16px 18px; }
.tkd-label { font-size: 11.5px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.tkd-muted { font-size: 12.5px; color: var(--muted); }
.tkd-desc { font-size: 14.5px; color: var(--ink); line-height: 1.6; }
.tkd-desc p { margin: 0 0 6px; }
.tkd-pj { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--line); }
.tkd-pj-list { display: flex; gap: 8px; flex-wrap: wrap; }
.tkd-pj-item { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--acais-red); text-decoration: none; background: var(--acais-red-tint); padding: 5px 10px; border-radius: 8px; }
.tkd-pj-item svg { width: 13px; height: 13px; }

/* fil d'activité */
.tkd-actbar { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.tkd-seg { display: inline-flex; background: #f0e9de; border-radius: 8px; padding: 3px; gap: 2px; margin-left: auto; }
.tkd-seg button { padding: 5px 11px; border-radius: 6px; border: none; background: none; color: var(--muted3); font-size: 12px; font-weight: 700; cursor: pointer; font-family: var(--font); }
.tkd-seg button.on { background: #fff; color: var(--acais-red); box-shadow: 0 1px 2px rgba(43,35,32,.12); }
.tkd-feed { margin-top: 8px; }
.tkd-ev { display: grid; grid-template-columns: 30px 1fr; column-gap: 14px; }
.tkd-ev-rail { display: flex; flex-direction: column; align-items: center; }
.tkd-ev-av, .tkd-ev-ic { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex: none; font-size: 11px; font-weight: 700; }
.tkd-ev-ic svg { width: 14px; height: 14px; }
.tkd-ev-av.none { background: #fdf6f6; color: var(--err); border: 1px dashed #d8a7ab; }
.tkd-ev-line { width: 2px; flex: 1; background: var(--line); min-height: 8px; }
.tkd-ev:last-child .tkd-ev-line { display: none; }
.tkd-ev-body { padding-bottom: 18px; min-width: 0; }
.tkd-ev-txt { font-size: 13.5px; color: var(--ink); line-height: 1.45; }
.tkd-ev-who { font-size: 13.5px; color: var(--ink); }
.tkd-ev-when { margin-top: 2px; }
.tkd-bubble { background: var(--input-bg); border: 1px solid var(--line); border-radius: 0 11px 11px 11px; padding: 10px 13px; font-size: 14px; color: var(--ink); line-height: 1.5; margin-top: 6px; }
.tkd-bubble p { margin: 0; }

/* composeur */
.tkd-composer { display: flex; gap: 12px; margin-top: 14px; padding-top: 16px; border-top: 1px solid var(--line); }
.tkd-composer .tkd-ev-av { width: 34px; height: 34px; font-size: 12.5px; }
.tkd-composer textarea { width: 100%; min-height: 70px; }
.tkd-composer-row { display: flex; align-items: center; gap: 14px; margin-top: 9px; flex-wrap: wrap; }
.tkd-attach { margin: 0; }
.tkd-attach input[type=file] { display: none; }
.tkd-attach #label_file { cursor: pointer; font-size: 12.5px; font-weight: 700; color: var(--muted4); }
.tkd-attach #label_file:hover { color: var(--acais-red); }
.tkd-action-wrap { display: flex; align-items: center; gap: 7px; }
.tkd-action-wrap select { height: 34px; font-size: 13px; padding: 0 10px; }
.tkd-composer-row .tkd-btn-red { margin-left: auto; }
#div_delete { cursor: pointer; color: var(--err); }

/* sidebar : échéance */
.tkd-card-head { display: flex; align-items: center; margin-bottom: 6px; }
.tkd-echeance { display: flex; align-items: baseline; gap: 9px; margin-top: 2px; }
.tkd-big { font-size: 21px; font-weight: 700; color: var(--ink); }
.tkd-chip { padding: 3px 9px; border-radius: 999px; background: var(--orange-t); color: var(--orange-d); font-size: 12px; font-weight: 700; }
.tkd-chip.late { background: var(--err-t); color: var(--err); }
.tkd-field { display: flex; flex-direction: column; gap: 5px; margin-top: 12px; }
.tkd-field label { font-size: 12.5px; font-weight: 700; color: var(--ink); }
.tkd-field select, .tkd-field input { width: 100%; height: 40px; }
.div_delai_dateSpe.tkd-field { gap: 12px; }
.tkd-btns { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.tkd-btns .divBtn { margin: 0; }
.tkd-btn { width: 100%; height: 42px; border-radius: 9px; font-weight: 700; font-size: 13.5px; cursor: pointer; border: none; font-family: var(--font); }
.tkd-btn-red { background: var(--acais-red) !important; color: #fff !important; }
.tkd-btn-red:hover { background: var(--acais-red-dark) !important; }
.tkd-btn-green { background: var(--green) !important; color: #fff !important; }
.tkd-btn-green:hover { background: var(--green-d) !important; }
.tkd-btn-outline { background: #fff !important; color: var(--muted4) !important; border: 1px solid var(--border2) !important; }
.tkd-btn-outline:hover { background: var(--line) !important; }
.tkd-composer-row .tkd-btn-red { width: auto; height: 36px; padding: 0 18px; }

/* sidebar : lieu / personnes */
.tkd-lieu { display: flex; gap: 11px; }
.tkd-lieu-ic { width: 34px; height: 34px; border-radius: 9px; background: #efe8dd; color: var(--muted3); display: flex; align-items: center; justify-content: center; flex: none; }
.tkd-lieu-ic svg { width: 16px; height: 16px; }
.tkd-lieu-t { font-size: 14.5px; font-weight: 700; color: var(--ink); }
.tkd-person { display: flex; align-items: center; gap: 11px; }
.tkd-person + .tkd-tels { margin: 7px 0 0 45px; }
.tkd-person-b { flex: 1; min-width: 0; line-height: 1.3; }
.tkd-person-n { font-size: 14px; font-weight: 700; color: var(--ink); }
.tkd-tels { display: flex; gap: 8px; flex-wrap: wrap; }
.tkd-tels span { font-size: 12px; color: var(--acais-red); font-weight: 700; }
.tkd-sep { height: 1px; background: var(--line); margin: 13px 0; }
.tkd-attrib { margin-top: 13px; }
.tkd-attrib .tkd-btn { margin-top: 10px; }
.tkd-note { display: flex; gap: 10px; align-items: flex-start; background: var(--input-bg); border: 1px dashed var(--border2); border-radius: 13px; padding: 13px 16px; }
.tkd-note svg { width: 15px; height: 15px; color: var(--muted); flex: none; margin-top: 2px; }
.tkd-note span { font-size: 12.5px; color: var(--muted3); line-height: 1.5; }

@media (max-width: 900px) {
  .tkd-grid { grid-template-columns: minmax(0, 1fr); } /* 1fr seul garde la largeur min. du contenu et élargit la page */
  .tkd-head { flex-wrap: wrap; }
  /* composeur : tout en pleine largeur, empilé */
  .tkd-composer { flex-direction: column; gap: 10px; }
  .tkd-composer > .tkd-ev-av { display: none; }        /* pas d'avatar sur mobile (gain de place) */
  .tkd-composer form { width: 100%; }
  .tkd-composer textarea { min-height: 90px; }
  .tkd-composer-row { flex-direction: column; align-items: stretch; gap: 10px; }
  .tkd-attach { align-self: flex-start; }
  .tkd-action-wrap { display: flex; align-items: center; gap: 8px; width: 100%; }
  .tkd-action-wrap select { flex: 1; width: 100%; height: 40px; }
  .tkd-composer-row .tkd-btn-red { width: 100%; height: 44px; margin-left: 0; }
  /* éditeur Trumbowyg lisible sur mobile */
  .tkd-composer .trumbowyg-box, .tkd-composer .trumbowyg-editor { min-height: 120px; margin: 0; }
  .tkd-composer .trumbowyg-button-pane { flex-wrap: wrap; }
}

/* ==================================================== REPORTING (v2, t4) ===== */
.rp { max-width: 1180px; margin: 0 auto; }
.rp-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.rp-title { display: flex; align-items: baseline; gap: 12px; }
.rp-title h1 { margin: 0; padding: 0; font-size: 24px; font-weight: 700; color: var(--ink); }
.rp-upd { font-size: 13.5px; color: var(--muted); }
.rp-tools { display: flex; align-items: center; gap: 10px; margin-left: auto; flex-wrap: nowrap; }
.rp-seg { display: inline-flex; align-items: center; height: 38px; background: #f0e9de; border-radius: 9px; padding: 3px; gap: 2px; }
.rp-seg a { display: flex; align-items: center; height: 32px; padding: 0 13px; border-radius: 7px; color: var(--muted3); font-size: 13px; font-weight: 700; text-decoration: none; }
.rp-seg a.on { background: #fff; color: var(--acais-red); box-shadow: 0 1px 2px rgba(43,35,32,.12); }
.rp-daterange { display: flex; align-items: center; gap: 6px; height: 38px; }
.rp-daterange input[type=date] { height: 38px; font-size: 12.5px; padding: 0 10px; }
.rp-daterange span { color: var(--muted2); }
.rp-daterange button { height: 38px; padding: 0 14px; border: 1px solid var(--border2); border-radius: var(--radius-sm); background: #fff; color: var(--muted4); font-weight: 700; cursor: pointer; font-family: var(--font); }
.rp-export { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; background: #fff; border: 1px solid var(--border2); border-radius: 9px; font-size: 13px; font-weight: 700; color: var(--muted4) !important; text-decoration: none; }
.rp-export svg { width: 15px; height: 15px; }
.rp-alert { display: flex; align-items: center; gap: 12px; background: var(--err-t); border: 1px solid var(--err-bd); border-radius: 12px; padding: 13px 16px; margin-bottom: 14px; color: var(--err); }
.rp-alert svg { width: 18px; height: 18px; flex: none; }
.rp-alert-txt { font-size: 13.5px; color: var(--ink); line-height: 1.45; }
.rp-alert-txt b { color: var(--err); }
.rp-alert-btn { margin-left: auto; padding: 8px 14px; background: var(--acais-red); border-radius: 8px; font-size: 12.5px; font-weight: 700; color: #fff !important; text-decoration: none; flex: none; }
.rp-alert-btn:hover { background: var(--acais-red-dark); }
.rp-kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.rp-kpi { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; box-shadow: var(--shadow-card); }
.rp-kpi.is-alert { border: 1.5px solid var(--err-bd); }
.rp-kpi-h { display: flex; align-items: center; gap: 8px; }
.rp-kpi-ic { width: 28px; height: 28px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex: none; }
.rp-kpi-ic svg { width: 14px; height: 14px; }
.rp-kpi-lbl { font-size: 12.5px; font-weight: 700; color: var(--muted4); }
.rp-kpi-val { font-size: 27px; font-weight: 700; color: var(--ink); margin-top: 8px; line-height: 1; }
.rp-kpi-sub { font-size: 11.5px; color: var(--muted); margin-top: 5px; }
.rp-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; align-items: start; }
.rp-card { background: var(--card); border: 1px solid var(--border); border-radius: 13px; padding: 18px 22px; box-shadow: var(--shadow-card); }
.rp-card-h { font-size: 11.5px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); }
.rp-stack { display: flex; height: 16px; border-radius: 8px; overflow: hidden; margin-top: 14px; gap: 2px; }
.rp-stack span { min-width: 5px; }
.rp-etat-list { margin-top: 12px; }
.rp-etat-row { display: flex; align-items: center; gap: 9px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.rp-etat-row:last-child { border-bottom: none; }
.rp-etat-row .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.rp-etat-row .rl { font-size: 13.5px; color: var(--ink); }
.rp-etat-row .rn { margin-left: auto; font-size: 13.5px; font-weight: 700; color: var(--ink); }
.rp-etat-row .rp { font-size: 12px; color: var(--muted2); width: 42px; text-align: right; }
.rp-catrow { display: grid; grid-template-columns: 26px 110px 1fr 34px; gap: 10px; align-items: center; margin-top: 11px; }
.rp-catlist .rp-catrow:first-child { margin-top: 14px; }
.rp-tile { width: 26px; height: 26px; border-radius: 7px; font-size: 11.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.rp-cn { font-size: 13.5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-cv { font-size: 13.5px; font-weight: 700; color: var(--ink); text-align: right; }
.rp-bar { height: 9px; border-radius: 5px; background: #f0e9de; position: relative; }
.rp-bar-f { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 5px; background: var(--acais-red); }
.rp-dirrow { display: grid; grid-template-columns: 64px 1fr 34px; gap: 10px; align-items: center; margin-top: 12px; }
.rp-dirlist .rp-dirrow:first-child { margin-top: 14px; }
.rp-dn { font-size: 13.5px; color: var(--ink); }
.rp-techrow { display: grid; grid-template-columns: 26px 118px 1fr 26px; gap: 10px; align-items: center; margin-top: 11px; }
.rp-techlist .rp-techrow:first-child { margin-top: 14px; }
.rp-av { width: 26px; height: 26px; border-radius: 50%; font-size: 10.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.rp-tech-note { display: flex; align-items: center; gap: 9px; background: var(--input-bg); border: 1px dashed var(--border2); border-radius: 9px; padding: 9px 12px; margin-top: 14px; text-decoration: none; }
.rp-tech-note svg { width: 14px; height: 14px; flex: none; }
.rp-tech-note span { font-size: 12.5px; color: var(--muted3); }
.rp-tech-note b { color: var(--err); }
.rp-tech-cta { margin-left: auto; font-weight: 700; color: var(--acais-red) !important; }
@media (max-width: 900px) {
  .rp-kpis { grid-template-columns: 1fr 1fr; }
  .rp-charts { grid-template-columns: 1fr; }
  .rp-tools { margin-left: 0; width: 100%; }
  .rp-seg { flex: 1; } .rp-seg a { flex: 1; text-align: center; }
  .rp-daterange { flex: 1; } .rp-daterange input[type=date] { flex: 1; min-width: 0; }
}

/* ============================================= PAGE NOTIFICATIONS (mobile) ==== */
#notif-page { position: fixed; inset: 0; background: var(--bg); z-index: 3000; display: none; flex-direction: column; }
#notif-page.open { display: flex; }
.np-head { display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 12px; background: #fff; border-bottom: 1px solid var(--border3); }
.np-head .np-back { border: none; background: none; font-size: 28px; line-height: 1; color: var(--ink); cursor: pointer; width: 34px; }
.np-head .np-t { font-size: 16px; font-weight: 700; color: var(--ink); }
.np-head .np-mark { margin-left: auto; border: none; background: none; color: var(--acais-red); font-weight: 700; font-size: 13px; cursor: pointer; font-family: var(--font); }
.np-list { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 9px; }
.np-item { display: flex; align-items: center; gap: 11px; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.np-item.unread { background: #fffdf8; border-color: #f0dccb; }
.np-item .ic { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex: none; }
.np-item .ic svg { width: 16px; height: 16px; }
.np-item .bd { flex: 1; text-decoration: none; color: inherit; line-height: 1.35; min-width: 0; }
.np-item .bd .m { font-size: 13.5px; color: var(--ink); display: block; }
.np-item .bd .tm { font-size: 11.5px; color: var(--muted2); }
.np-read { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--border2); background: #fff; color: var(--green-d); cursor: pointer; flex: none; font-size: 14px; }
.np-read:hover { background: var(--green-t); }

/* ==================================================== MON PROFIL (t5) ========= */
.pfd { max-width: 1180px; margin: 0 auto; }
/* neutralise le form{width:80%} global de style.css qui rétrécissait la grille */
#id-form-profil { width: 100% !important; margin: 0 !important; }
.pfd-field { min-width: 0; }
.pfd-lock { flex-wrap: wrap; }
.pfd-head { display: flex; align-items: center; gap: 16px; margin: 12px 0 18px; flex-wrap: wrap; }
.pfd-av { width: 56px; height: 56px; border-radius: 50%; background: var(--acais-red); color: #fff; font-size: 21px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: none; }
.pfd-name { font-size: 24px; font-weight: 700; color: var(--ink); }
.pfd-meta { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.pfd-role { padding: 3px 10px; border-radius: 999px; background: var(--acais-red-tint); color: var(--acais-red); font-size: 12px; font-weight: 700; }
.pfd-meta > span:not(.pfd-role) { font-size: 12.5px; color: var(--muted); }
.pfd-logout { display: inline-flex; align-items: center; gap: 7px; padding: 10px 15px; border: 1px solid #c9878d; border-radius: 9px; background: #fff; font-size: 13.5px; font-weight: 700; color: var(--acais-red) !important; text-decoration: none; }
.pfd-logout svg { width: 15px; height: 15px; }
.pfd-grid { display: grid; grid-template-columns: 1fr 380px; gap: 18px; align-items: start; }
.pfd-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.pfd-card { background: var(--card); border: 1px solid var(--border); border-radius: 13px; box-shadow: var(--shadow-card); padding: 20px 24px; }
.pfd-card-h { display: flex; align-items: center; }
.pfd-fields2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 14px; }
.pfd-field { display: flex; flex-direction: column; gap: 6px; }
.pfd-field label { font-size: 13px; font-weight: 700; color: var(--ink); }
.pfd-field input, .pfd-field select { width: 100%; height: 42px; box-sizing: border-box; }
.pfd-lock { display: flex; align-items: center; gap: 8px; padding: 10px 2px; font-size: 14.5px; color: var(--muted4); }
.pfd-lock svg { width: 14px; height: 14px; color: var(--muted2); flex: none; }
.pfd-lockmeta { font-size: 12px; color: var(--muted2); }
.pfd-hint { display: flex; align-items: center; gap: 8px; margin-top: 9px; }
.pfd-hint svg { width: 13px; height: 13px; flex: none; }
.pfd-hint span { font-size: 12.5px; color: var(--muted3); }
.pfd-sep { height: 1px; background: var(--line); margin: 16px 0 14px; }
.pfd-footer { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 2px; }
.pfd-oblig { font-size: 12.5px; color: var(--muted); }
.pfd-btn { width: auto !important; padding: 0 18px; height: 42px; display: inline-flex; align-items: center; justify-content: center; text-decoration: none !important; }
.pfd-pwbtns { margin-top: 12px; display: flex; gap: 8px; }
.pfd-pwbtns .tkd-btn { width: auto; padding: 0 14px; height: 38px; }
.pfd-checklist { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; background: var(--input-bg); border: 1px solid var(--line); border-radius: 9px; padding: 11px 13px; }
.pf-chk { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted3); }
.pf-chk .pf-dot { width: 13px; height: 13px; border: 1.5px solid #c9bda9; border-radius: 50%; flex: none; position: relative; }
.pf-chk.ok { color: var(--green-d); font-weight: 700; }
.pf-chk.ok .pf-dot { border-color: var(--green-d); background: var(--green-d); }
.pf-chk.ok .pf-dot::after { content: "✓"; position: absolute; inset: 0; color: #fff; font-size: 9px; line-height: 12px; text-align: center; }
.pf-chk-note { font-size: 11.5px; color: var(--muted2); margin-top: 2px; }
#divMDP .pfd-field { margin-top: 12px; }
@media (max-width: 900px) {
  .pfd-grid { grid-template-columns: 1fr; }
  .pfd-footer .pfd-btn { flex: 1; }
}

/* détail ticket : uniformise les champs du panneau (date butoir = même taille) */
.tkd-field input, .tkd-field select { width: 100% !important; height: 40px; box-sizing: border-box; min-width: 0; }
.tkd-field input[type=date] { width: 100% !important; }

/* [#2] Bloc de réouverture d'un ticket clôturé (détail ticket) */
.tkd-reopen{display:flex;flex-direction:column;gap:10px;margin-top:14px;padding:16px;
  border:1px dashed var(--acais-red,#861a22);border-radius:12px;background:#fbf5f5}
.tkd-reopen-txt{display:flex;flex-direction:column;gap:2px}
.tkd-reopen-txt b{color:var(--acais-red,#861a22);font-size:14px}
.tkd-reopen form{display:flex;flex-direction:column;gap:10px}
.tkd-reopen textarea{width:100%;min-height:60px;resize:vertical;border:1px solid #e4dccf;
  border-radius:10px;padding:10px 12px;font:inherit;background:#fff}
.tkd-reopen .tkd-btn{align-self:flex-start}

/* [#5] Ligne pièce jointe avec bouton de suppression (ticket clôturé) */
.tkd-pj-row{display:flex;align-items:center;gap:6px}
.tkd-pj-row .tkd-pj-item{flex:1;min-width:0}
.tkd-pj-del{flex:none;display:inline-flex;align-items:center;justify-content:center;
  width:30px;height:30px;border:1px solid #e4dccf;border-radius:8px;background:#fff;
  color:var(--acais-red,#861a22);cursor:pointer;transition:background .15s,border-color .15s}
.tkd-pj-del svg{width:15px;height:15px}
.tkd-pj-del:hover{background:#fbeaea;border-color:var(--acais-red,#861a22)}

/* =========================================================================
   [#1] INTERVENTIONS
   ========================================================================= */
.iv-grid{display:grid;grid-template-columns:1.3fr 1fr;gap:20px;align-items:start;
  max-width:1100px;margin:0 auto 40px}
.iv-form-card .nt-grid2{display:grid;grid-template-columns:1fr 1fr;gap:14px 18px}
.iv-form-card .divInput{display:flex;flex-direction:column;gap:6px;margin:0 0 14px}
.iv-form-card label{font-size:13px;font-weight:600;color:#5b5147}
.iv-form-card input,.iv-form-card select,.iv-form-card textarea{
  width:100%;border:1px solid #e4dccf;border-radius:10px;padding:10px 12px;
  font:inherit;background:#fff;box-sizing:border-box}
.iv-form-card textarea{min-height:110px;resize:vertical}
.iv-actions{display:flex;justify-content:flex-end;margin-top:6px}
.iv-list{display:flex;flex-direction:column;gap:12px;max-height:640px;overflow:auto}
.iv-item{border:1px solid #eee4d5;border-radius:12px;padding:12px 14px;background:#fffdf9}
.iv-item-top{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-bottom:4px}
.iv-date{font-weight:700;color:var(--acais-red,#861a22);font-size:13.5px}
.iv-badge{background:#e2f0f7;color:#045d80;border-radius:20px;padding:2px 10px;font-size:12px;font-weight:600}
.iv-dur{background:#fdf1dd;color:#7a4d00;border-radius:20px;padding:2px 10px;font-size:12px;font-weight:600}
.iv-tk{margin-left:auto;background:#efeae3;color:#6b5f52;border-radius:8px;padding:2px 8px;font-size:12px;font-weight:700;text-decoration:none}
.iv-lieu{font-size:12.5px;color:#8a7d6d;margin-bottom:4px}
.iv-item .iv-desc{font-size:14px;color:#3a332c;line-height:1.45}
@media (max-width:992px){
  .iv-grid{grid-template-columns:1fr}
  .iv-form-card .nt-grid2{grid-template-columns:1fr}
}

/* =========================================================================
   [#9] ADMIN LIEUX & SALLES
   ========================================================================= */
.al-wrap{max-width:1000px;margin:0 auto 40px;display:flex;flex-direction:column;gap:16px}
.al-form{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.al-form input,.al-form select{border:1px solid #e4dccf;border-radius:9px;padding:9px 11px;font:inherit;background:#fff}
.al-form input[name="nom"]{flex:1;min-width:160px}
.al-bat.al-off{opacity:.55}
.al-bat-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.al-bat-title{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:15px}
.al-code{background:var(--acais-red,#861a22);color:#fff;border-radius:7px;padding:2px 8px;font-size:12px;font-weight:700;letter-spacing:.5px}
.al-tag{background:#f3e2e3;color:#a11a25;border-radius:20px;padding:1px 9px;font-size:11px;font-weight:700}
.al-bat-actions,.al-zone-actions{display:flex;gap:6px}
.al-mini{border:1px solid #e4dccf;background:#fff;border-radius:8px;min-width:30px;height:30px;
  padding:0 8px;cursor:pointer;font-size:14px;color:#6b5f52;transition:background .15s,border-color .15s}
.al-mini:hover{background:#f6f2ec;border-color:#cbbfa9}
.al-zones{margin-top:14px;padding-top:12px;border-top:1px solid #eee4d5;display:flex;flex-direction:column;gap:12px}
.al-zone{background:#fffdf9;border:1px solid #eee4d5;border-radius:11px;padding:10px 12px}
.al-zone.al-off{opacity:.55}
.al-zone-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
.al-zone-name{font-weight:600;color:#3a332c;font-size:14px}
.al-pieces{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px;align-items:center}
.al-piece{display:inline-flex;align-items:center;gap:4px;background:#eef4f8;color:#045d80;
  border-radius:20px;padding:4px 6px 4px 12px;font-size:13px}
.al-piece.al-off{background:#f0ece5;color:#8a7d6d;text-decoration:line-through}
.al-px{border:none;background:transparent;cursor:pointer;font-size:12px;color:inherit;opacity:.65;padding:0 2px}
.al-px:hover{opacity:1}
.al-inline{display:inline-flex;align-items:center;gap:6px}
.al-inline input[type="text"]{border:1px dashed #cbbfa9;border-radius:20px;padding:5px 12px;font:inherit;font-size:13px;background:#fff;min-width:130px}
.al-addzone{margin-top:4px}
@media (max-width:992px){
  .al-form{flex-direction:column;align-items:stretch}
  .al-form input,.al-form select{width:100%;box-sizing:border-box}
}

/* [#6] Rattachement multi-établissements (webmaster) */
.ud-wrap{max-width:720px;margin:0 auto 40px}
.ud-wrap select{width:100%;border:1px solid #e4dccf;border-radius:10px;padding:10px 12px;font:inherit;background:#fff;box-sizing:border-box}
.ud-checks{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:10px;margin-top:10px}
.ud-check{display:flex;align-items:center;gap:9px;border:1px solid #eee4d5;border-radius:10px;
  padding:10px 12px;background:#fffdf9;cursor:pointer;font-size:14px}
.ud-check input{width:17px;height:17px;accent-color:var(--acais-red,#861a22)}
.ud-check.ud-lock{background:#f3eee6;color:#8a7d6d}
.ud-check.ud-lock::after{content:"principale";margin-left:auto;font-size:11px;font-weight:700;color:#a11a25;background:#f3e2e3;border-radius:20px;padding:1px 8px}

/* =========================================================================
   ÉVOLUTIONS OCT. 2026 — téléphones cliquables, préférences de notification,
   filtres enregistrés, interventions (tickets déjà clôturés)
   ========================================================================= */
.tkd-tels a { font-size: 12px; color: var(--acais-red); font-weight: 700; text-decoration: none;
  padding: 3px 9px; border-radius: 999px; background: #f7e9ea; }
.tkd-tels a:hover { text-decoration: underline; }

.pf-switch { display: flex; align-items: flex-start; gap: 12px; padding: 11px 0; cursor: pointer;
  border-top: 1px solid #f0e9df; }
.pfd-card-h + .pf-switch { border-top: 0; }
.pf-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.pf-switch-ui { flex: none; width: 38px; height: 22px; border-radius: 999px; background: #d8cfc3;
  position: relative; transition: background .15s; margin-top: 1px; }
.pf-switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px;
  border-radius: 50%; background: #fff; transition: transform .15s; }
.pf-switch input:checked + .pf-switch-ui { background: #61993b; }
.pf-switch input:checked + .pf-switch-ui::after { transform: translateX(16px); }
.pf-switch input:focus-visible + .pf-switch-ui { outline: 2px solid var(--acais-red); outline-offset: 2px; }
.pf-switch-tx { display: flex; flex-direction: column; gap: 2px; font-size: 14px; color: #2b2520; }
.pf-switch-tx small { font-size: 12.5px; color: #8a7f75; line-height: 1.35; }
#pf-notifs-msg { font-size: 12.5px; color: #a11a25; }

.df-saved { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.df-saved-lbl { font-size: 12.5px; color: #8a7f75; }
.df-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 6px 5px 11px; border-radius: 999px;
  background: #fff; border: 1px solid #e4dccf; font-size: 13px; color: #3a332c; cursor: pointer; }
.df-chip:hover { border-color: var(--acais-red); }
.df-chip.is-on { background: #f7e9ea; border-color: var(--acais-red); color: #861a22; font-weight: 700; }
.df-chip .x { border: 0; background: transparent; color: #a2968c; cursor: pointer; font-size: 15px; line-height: 1;
  padding: 0 4px; border-radius: 50%; }
.df-chip .x:hover { color: #a11a25; }
.df-save { border: 1px dashed #c9bfb2; background: transparent; border-radius: 999px; padding: 5px 12px;
  font: inherit; font-size: 13px; color: #6b5f52; cursor: pointer; }
.df-save:hover { border-color: var(--acais-red); color: var(--acais-red); }
.df-save-form { display: inline-flex; gap: 6px; align-items: center; }
.df-save-form input { border: 1px solid #e4dccf; border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 13px; width: 170px; }

.iv-recent { max-width: 760px; margin: 0 auto 40px; padding: 0 16px; }
a.iv-item { display: block; text-decoration: none; color: inherit; }
a.iv-item:hover { border-color: var(--acais-red); }
.ud-coord { display: flex; align-items: center; gap: 8px; margin-top: 16px; font-size: 14px; }

/* [Services] répartition technique / véhicule */
.tkd-chip-service { background: #e2f0f7; color: #045d80; }
.ud-coord select { border: 1px solid #e4dccf; border-radius: 9px; padding: 7px 10px; font: inherit; background: #fff; }
label.ud-coord[for="ud-service"] { flex-wrap: wrap; }

/* [Service Info] qualification et priorité 1-2-3 des tickets informatiques */
.tkd-prio-1, .tkd-chip.tkd-prio-1 { background: #f7e9ea; color: #a11a25; }
.tkd-prio-2, .tkd-chip.tkd-prio-2 { background: #fdf1dd; color: #7a4d00; }
.tkd-prio-3, .tkd-chip.tkd-prio-3 { background: #e9f1e2; color: #4a7a2c; }
.tkd-qualif.todo { border: 1.5px solid var(--acais-red); }
.tkd-prio-choice { display: flex; gap: 8px; margin-top: 6px; }
.tkd-prio-choice label { cursor: pointer; position: relative; }
/* radio masqué contenu dans son libellé : sans cela il hérite de width:100% et élargit la page */
.tkd-prio-choice input { position: absolute; opacity: 0; left: 0; top: 0; width: 1px; height: 1px; margin: 0; }
.tkd-prio-choice span { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 36px;
  border-radius: 9px; font-weight: 700; border: 2px solid transparent; }
.tkd-prio-choice input:checked + span { border-color: currentColor; }
.tkd-prio-choice input:focus-visible + span { outline: 2px solid var(--acais-red); outline-offset: 2px; }
#table-tickets tr[data-priorite] td[data-label="Identifiant"]::after { font-size: 11px; font-weight: 700; border-radius: 999px;
  padding: 1px 7px; margin-left: 6px; white-space: nowrap; }
#table-tickets tr[data-priorite="1"] td[data-label="Identifiant"]::after { content: "P1"; background: #f7e9ea; color: #a11a25; }
#table-tickets tr[data-priorite="2"] td[data-label="Identifiant"]::after { content: "P2"; background: #fdf1dd; color: #7a4d00; }
#table-tickets tr[data-priorite="3"] td[data-label="Identifiant"]::after { content: "P3"; background: #e9f1e2; color: #4a7a2c; }
#table-tickets tr[data-priorite="q"] td[data-label="Identifiant"]::after { content: "à qualifier"; background: #861a22; color: #fff; }

/* [Suivi SI] clôture « Ticket non conforme SI » */
.tkd-nc-card .tkd-card-head { justify-content: space-between; gap: 8px; }
.tkd-nc-card textarea { width: 100%; box-sizing: border-box; resize: vertical; }
.tkd-nc {
  margin-top: 6px; padding: 8px 12px; border-radius: 8px;
  background: #f7e9ea; color: var(--acais-red); font-size: 13.5px;
}

/* [Suivi SI] menu « Demande SI » : sous-menu ancré sous son libellé */
#menu li#demande_si { position: relative; }
#menu-demande-si { display: none; }
#menu li#demande_si:hover #menu-demande-si,
#menu li#demande_si:focus-within #menu-demande-si {
  display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; z-index: 999;
  background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-pop);
  padding: 8px; min-width: 260px; margin: 0; list-style: none;
}
#menu li#demande_si #menu-demande-si li { margin: 0 !important; float: none; }
#menu-demande-si li a { display: block; padding: 8px 12px !important; border-radius: 7px; white-space: nowrap; }
#menu-demande-si li a:hover { background: var(--line); }
/* libellé « Demande SI » : même rendu que les liens du menu (« Nouveau ticket »…),
   la petite flèche signale seulement le sous-menu */
#menu div #ulMenu li#demande_si > .chevron {
  height: auto; padding: 8px 14px; border-radius: 8px; font-size: 14px; font-weight: 600;
  color: var(--muted3); cursor: pointer; transition: background .15s, color .15s;
}
#menu div #ulMenu li#demande_si:hover > .chevron,
#menu div #ulMenu li#demande_si:focus-within > .chevron { background: var(--line); color: var(--ink); }
#menu div #ulMenu li#demande_si > .chevron::after { width: .35em; height: .35em; margin: 2px 0 0 8px; border-color: currentColor; }

/* ---------------------------------------------------------------- responsive */
/* l'attribut hidden gagne toujours (un display: grid/flex ne doit pas le contredire) */
[hidden] { display: none !important; }
/* Indicateurs : le choix de période passe à la ligne sur petit écran */
@media (max-width: 700px) {
  .rp-daterange { flex-wrap: wrap; height: auto; max-width: 100%; }
  .rp-daterange input[type=date] { flex: 1 1 130px; min-width: 0; }
}
/* menu de l'avatar (mobile) : toutes les entrées du menu de bureau, défilable */
.m-menu { max-height: calc(100vh - 140px); overflow-y: auto; min-width: 240px; }
.m-menu .m-groupe { padding: 10px 12px 2px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.m-menu a.m-sous { padding-left: 20px; }
.m-menu .m-sep { border-top: 1px solid var(--border2); margin: 6px 0; }
/* page ticket : élément flexible de #main, ne doit pas imposer sa largeur minimale */
.tkd { min-width: 0; }
@media (max-width: 700px) {
  .rp-head { align-items: flex-start; }
  .rp-export { height: auto; min-height: 38px; white-space: normal; }
  .tkd-hrow { flex-wrap: wrap; }
}
@media (max-width: 992px) {
  /* pastilles du tableau de bord : le bandeau défile au lieu d'élargir la page */
  #dashfilter, #dashfilter .df-top { min-width: 0; max-width: 100%; }
  #dashfilter .df-pills { min-width: 0; max-width: 100%; }
}
@media (max-width: 700px) {
  /* Indicateurs : outils (période, dates, export) empilés */
  .rp-tools { display: flex; flex-wrap: wrap; gap: 8px; max-width: 100%; min-width: 0; }
  .rp-head, .rp-title { min-width: 0; max-width: 100%; flex-wrap: wrap; }
}

/* =============================================================================
   Affichage à 150 % (fenêtres de 993 à 1320 px de large, souvent peu hautes)
   ============================================================================= */
/* sous-menu Webmaster : ancré sous son libellé, ouvert au survol, au clic et au
   clavier (classe .ouvert, js/theme-acais.js) ; il ne dépasse jamais le bas de
   l'écran : deux colonnes quand la fenêtre est peu haute, et défilement au besoin */
#menu li#webmaster { position: relative; }
#menu li#webmaster:hover #menu-webmaster,
#menu li#webmaster:focus-within #menu-webmaster,
#menu li#webmaster.ouvert #menu-webmaster {
  display: grid; grid-template-columns: 1fr; gap: 0 6px;
  position: absolute; top: 100%; left: auto; right: 0; z-index: 999;
  width: max-content; max-width: calc(100vw - 24px); min-width: 220px;
  max-height: calc(100vh - 84px); overflow-y: auto;
  background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-pop);
  padding: 8px; margin: 0; text-align: left; font-size: 14px;
}
#menu li#webmaster #menu-webmaster li { margin: 0 !important; float: none; }
@media (max-height: 720px) {
  #menu li#webmaster:hover #menu-webmaster,
  #menu li#webmaster:focus-within #menu-webmaster,
  #menu li#webmaster.ouvert #menu-webmaster { grid-template-columns: 1fr 1fr; grid-template-rows: repeat(6, auto); grid-auto-flow: column; }
  #menu-webmaster li a { padding: 6px 10px !important; }
}
#menu li#demande_si.ouvert #menu-demande-si {
  display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; z-index: 999;
  background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-pop);
  padding: 8px; min-width: 260px; margin: 0; list-style: none;
}
#menu div #ulMenu li > .chevron:focus-visible { outline: 2px solid var(--acais-red); outline-offset: -2px; }
/* libellé « Webmaster » : même rendu que les autres entrées du menu */
#menu div #ulMenu li#webmaster > .chevron {
  height: auto; padding: 8px 14px; border-radius: 8px; font-size: 14px; font-weight: 600;
  color: var(--muted3); cursor: pointer; transition: background .15s, color .15s;
}
#menu div #ulMenu li#webmaster:hover > .chevron,
#menu div #ulMenu li#webmaster.ouvert > .chevron { background: var(--line); color: var(--ink); }
#menu div #ulMenu li#webmaster > .chevron::after { width: .35em; height: .35em; margin: 2px 0 0 8px; border-color: currentColor; }

/* en-tête : les entrées du menu restent sur une ligne ; l'en-tête se resserre par paliers */
#menu div #ulMenu { flex-wrap: nowrap; }
#menu div #ulMenu li a, #menu div #ulMenu li > .chevron { white-space: nowrap; }
@media (min-width: 993px) and (max-width: 1400px) {
  body header nav { gap: 8px; padding: 0 12px; }
  #divNomApp { gap: 6px; padding-right: 10px; }
  #divNomApp p { display: none; } /* numéro de version */
  #menu div #ulMenu { gap: 0; }
  #menu div #ulMenu li a,
  #menu div #ulMenu li#demande_si > .chevron,
  #menu div #ulMenu li#webmaster > .chevron { padding: 8px 9px; font-size: 13.5px; }
}
@media (min-width: 993px) and (max-width: 1240px) {
  #divNomApp #nomApp { display: none; } /* le logo suffit */
  #divUserInfo #nameRole { display: none; } /* l'avatar suffit : nom et rôle dans « Mon profil » */
  #menu div #ulMenu li a,
  #menu div #ulMenu li#demande_si > .chevron,
  #menu div #ulMenu li#webmaster > .chevron { padding: 8px 7px; font-size: 13px; }
}
/* tableau de bord : les listes de filtres ne prennent pas toute la largeur */
.dashfilter select.df-select { max-width: 190px; }

/* zones de saisie de texte : hauteur proportionnée au contenu attendu
   - description d'un ticket ou d'une intervention : l'éditeur démarre à 150 px (au lieu
     de 300) et grandit avec le texte, jusqu'à 420 px puis défile ;
   - commentaire d'un ticket (200 caractères au plus) : deux lignes, agrandissable. */
#form-creation-ticket .trumbowyg-box { min-height: 0; }
#form-creation-ticket .trumbowyg-editor,
#form-creation-ticket .trumbowyg-textarea { min-height: 150px; max-height: 420px; height: auto; overflow-y: auto; }
.tkd-composer textarea { min-height: 52px; height: 52px; max-height: 200px; resize: vertical; }
@media (max-width: 900px) {
  .tkd-composer textarea { min-height: 64px; height: 64px; }
}
/* tableau de bord sur téléphone et tablette : listes de filtres et recherche passent à la
   ligne au lieu de sortir de l'écran (jusqu'à trois listes pour le service informatique) */
@media (max-width: 992px) {
  #dashfilter .df-right { flex-wrap: wrap; }
  #dashfilter select.df-select { flex: 1 1 140px; min-width: 0; max-width: none; }
  #dashfilter .df-search { flex: 1 1 100%; min-width: 0; box-sizing: border-box; }
}
/* cartes de tickets (téléphone et tablette) : toute la largeur, texte aligné à gauche.
   Leur conteneur DataTables est en flex : sans largeur, elles se réduisaient à leur
   contenu et partaient à droite entre 400 et 992 px. */
@media (max-width: 992px) {
  #ticket-cards { flex: 1 1 100%; width: 100%; min-width: 0; }
  /* l'ancienne style.css centre tout le body sous 992 px : le contenu des pages se lit à
     gauche (description d'un ticket et ses listes, fil d'activité, cartes) */
  #content { text-align: left; }
  /* page ticket : les libellés des champs (180 px, alignés à droite dans l'ancienne
     feuille) se placent au-dessus de leur champ, à gauche */
  .tkd .tkd-field > label, .tkd .tkd-action-wrap > label, .pfd-field > label { width: auto; text-align: left; }
  /* demandes SI : le formulaire prend toute la largeur (80 % dans l'ancienne feuille) */
  #ds-form, #au-form, .al-wrap form { width: 100%; box-sizing: border-box; margin-left: 0; margin-right: 0; }
  /* anciens tableaux (liste des utilisateurs, historiques) : ils défilent dans leur cadre */
  main section#sectionTable #divTable { overflow-x: auto; }
}
